Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarified conflicting rules in multiple sections defined in the same .editorconfig file when matched for single file #75

Merged
merged 1 commit into from
Mar 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,12 @@ given filename. The search shall stop if an EditorConfig file is found with
the ``root`` key set to ``true`` in the preamble or when reaching the root
filesystem directory.

Files are read top to bottom and the most recent rules found take
precedence. If multiple EditorConfig files have matching sections, the rules
Files are read top to bottom and the most recent pairs found take
precedence. Thus, in case a given file matches multiple sections
within a single ``.editorconfig`` file, the pairs defined in the section that
comes later in the ``.editorconfig`` file take precedence over pairs defined
in the section that comes earlier in the same ``.editorconfig`` file.
If multiple EditorConfig files have matching sections, the pairs
from the closer EditorConfig file are read last, so pairs in closer
files take precedence.

Expand Down