Skip to content

indent_style = space is ignored if indent_size = unset #277

@blue42u

Description

@blue42u

If the indent_size is not set for a file, the check for indent_style = space is silently skipped.

Example:

# .editorconfig
root = true
[*]
indent_style = space
# indent_size = 3
# example.txt (whitespace made visible)
this line is unindented -- should PASS
····this line is indented with 4 spaces -- should PASS
→       this line is indented with 1 tab -- should FAIL
→       ····this line is indented with 1 tab and 4 spaces -- should FAIL
$ ec example.txt  # Should fail on the latter 2 lines
$ echo $?
0

Note that if the indent_size = 3 is uncommented from the .editorconfig but we disable the indentation size check, the expected errors are reported:

$ ec -disable-indent-size example.txt
example.txt:
	3: Wrong indent style found (tabs instead of spaces)
	4: Wrong indent style found (tabs instead of spaces)

2 errors found

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions