question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Indent should be consistent

See original GitHub issue
  • Feature request

How many indent spaces should I use?

I encounter many YAML files, some indent 4 spaces, some indent 2 spaces, and some indent 2 spaces before - list, and others not. Sometimes I got confused when they mixed:

example:
  indent: 2 spaces
  items:
  - one
  - two
  others:
    - three
    - four
  inner:
      indent: 4 spaces
      items:
      - five
      - six
      others:
          - seven
          - eight

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
daheisecommented, Nov 27, 2017

I concur with option two. Particular choice of indent is not as important as consistent indent.

0reactions
crdoconnorcommented, Feb 6, 2018

Oops. This was fixed a on v0.11.0 by the way. I forgot to close here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Indent consistently - JavaScript Video Tutorial - LinkedIn
Consistent indents are vital for writing code that's readable for humans. In this video, learn how to choose and implement a standard indent...
Read more >
10 Indent Best Practices - CLIMB
1. Indent your code consistently ... Consistent indentation makes code easier to read and understand. It helps to visually separate different ...
Read more >
[RSPEC-1120] Source code should be indented consistently
Proper indentation is a simple and effective way to improve the code's readability. Consistent indentation among the developers within a team also reduces ......
Read more >
How to Indent Your Code | Introduction to Computer Science
Basically, the general rule for indenting is that code between curly brackets should be indented. Curly brackets are { and } . So...
Read more >
HTML: Indentation and Spacing | CSE 154 Unofficial Style Guide
Spacing and indentation should be consistent throughout your code. Many developers choose to use 4-space or 2-space indentation. In HTML, each nested tag ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found