sindresorhus / atom-editorconfig

Helps developers maintain consistent coding styles between different editors
https://atom.io/packages/editorconfig
MIT License
811 stars 80 forks source link

indent_size rule not being applied #192

Closed mgauthier closed 5 years ago

mgauthier commented 7 years ago

When I run the command "show status" in atom, it reports that everything is correct for an xml file that I have deliberately added incorrect tab sizing to

Involved .editorconfig-files

root = true

[*] indent_style = space indent_size = 4 trim_trailing_whitespace = true charset = utf-8

4 space indentation

[*.{java, xml}] indent_size = 4

2 space indentation

[*.sh] indent_size = 2

Directory structure

.editorconfig is in the root of my project, no other .editorconfig files

Installed packages

Built-in Atom Packages (90) ├── atom-dark-syntax@0.28.0 ├── atom-dark-ui@0.53.0 ├── atom-light-syntax@0.29.0 ├── atom-light-ui@0.46.0 ├── base16-tomorrow-dark-theme@1.5.0 ├── base16-tomorrow-light-theme@1.5.0 ├── one-dark-ui@1.9.2 ├── one-light-ui@1.9.2 ├── one-dark-syntax@1.7.1 ├── one-light-syntax@1.7.1 ├── solarized-dark-syntax@1.1.2 ├── solarized-light-syntax@1.1.2 ├── about@1.7.5 ├── archive-view@0.63.0 ├── autocomplete-atom-api@0.10.0 ├── autocomplete-css@0.15.1 ├── autocomplete-html@0.7.2 ├── autocomplete-plus@2.34.2 ├── autocomplete-snippets@1.11.0 ├── autoflow@0.29.0 ├── autosave@0.24.0 ├── background-tips@0.26.1 ├── bookmarks@0.44.2 ├── bracket-matcher@0.85.3 ├── command-palette@0.40.3 ├── dalek@0.2.0 ├── deprecation-cop@0.56.2 ├── dev-live-reload@0.47.0 ├── encoding-selector@0.23.2 ├── exception-reporting@0.41.2 ├── find-and-replace@0.207.3 ├── fuzzy-finder@1.5.0 ├── git-diff@1.3.3 ├── go-to-line@0.32.0 ├── grammar-selector@0.49.3 ├── image-view@0.61.1 ├── incompatible-packages@0.27.2 ├── keybinding-resolver@0.36.3 ├── line-ending-selector@0.6.2 ├── link@0.31.2 ├── markdown-preview@0.159.7 ├── metrics@1.2.1 ├── notifications@0.66.2 ├── open-on-github@1.2.1 ├── package-generator@1.1.0 ├── settings-view@0.248.0 ├── snippets@1.1.1 ├── spell-check@0.71.3 ├── status-bar@1.8.5 ├── styleguide@0.49.3 ├── symbols-view@0.115.2 ├── tabs@0.104.2 ├── timecop@0.36.0 ├── tree-view@0.215.1 ├── update-package-dependencies@0.11.0 ├── welcome@0.36.2 ├── whitespace@0.36.2 ├── wrap-guide@0.40.0 ├── language-c@0.57.0 ├── language-clojure@0.22.2 ├── language-coffee-script@0.48.5 ├── language-csharp@0.14.2 ├── language-css@0.42.1 ├── language-gfm@0.88.1 ├── language-git@0.19.0 ├── language-go@0.43.1 ├── language-html@0.47.2 ├── language-hyperlink@0.16.1 ├── language-java@0.27.0 ├── language-javascript@0.126.1 ├── language-json@0.19.0 ├── language-less@0.31.0 ├── language-make@0.22.3 ├── language-mustache@0.13.1 ├── language-objective-c@0.15.1 ├── language-perl@0.37.0 ├── language-php@0.37.5 ├── language-property-list@0.9.1 ├── language-python@0.45.2 ├── language-ruby@0.70.5 ├── language-ruby-on-rails@0.25.2 ├── language-sass@0.58.0 ├── language-shellscript@0.25.0 ├── language-source@0.9.0 ├── language-sql@0.25.4 ├── language-text@0.7.2 ├── language-todo@0.29.1 ├── language-toml@0.18.1 ├── language-xml@0.35.0 └── language-yaml@0.29.0

Community Packages (27) /Users/mgauthier/.atom/packages ├── api-blueprint-preview@0.7.0 ├── atom-html-preview@0.1.22 ├── autocomplete-html-entities@0.1.0 ├── busy-signal@1.4.1 ├── editorconfig@2.2.2 ├── intentions@1.1.2 ├── jshint@1.8.6 ├── language-api-blueprint@1.0.2 ├── language-babel@2.61.0 ├── language-emblem@0.2.0 ├── language-groovy@0.7.0 ├── language-haml@0.24.3 ├── language-jsx@0.1.1 ├── language-matlab-octave@0.1.2 ├── linter@2.1.4 ├── linter-erb@1.1.0 ├── linter-eslint@8.1.7 ├── linter-haml@2.0.1 ├── linter-htmlhint@1.3.3 ├── linter-jshint@3.1.2 ├── linter-pycodestyle@2.0.2 ├── linter-rubocop@2.1.1 ├── linter-sass-lint@1.7.4 ├── linter-scss-lint@3.1.0 ├── linter-ui-default@1.2.4 ├── react@0.16.2 └── rubocop-auto-correct@1.5.1

florianb commented 7 years ago

Hi @mgauthier - thanks for your report, i tried to reproduce your issue. I had to remove the whitespace after the comma ([*.{java, xml}] to [*.{java,xml}]) to make it work. So i would be happy if you could test that.

However i faced some issues updating the settings automagically after editing the .editorconfig-file which just didn't work as expected. It might be necessary to reopen the dedicated xml-file to have the changes being applied. I'm investigating this further.

Let me know if this works for you.