Skip to content

Commit

Permalink
Clarified conflicting rules in multiple sections defined in the same …
Browse files Browse the repository at this point in the history
….editorconfig file
  • Loading branch information
mipo256 committed Mar 1, 2025
1 parent cecca53 commit dd73a0f
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions index.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.. Copyright (c) 2019--2025 EditorConfig Team
All rights reserved.
Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -183,13 +184,8 @@ special characters for wildcard matching:
If the glob contains a path separator (a ``/`` not inside square brackets), then the glob is relative
to the directory level of the particular `.editorconfig` file itself.
Otherwise the pattern may also match at any level below the `.editorconfig`
level.

Therefore, a leading slash is not relevant if there is already a slash in the middle of the pattern.
Thus, the globs `/subdir/*.c` and `subdir/*.c` must yield the same result.

For example, ``*.c`` matches any file that ends with ``.c`` in the
directory of ``.editorconfig`` or any other directory below one that stores this ``.editorconfig``.
level. For example, ``*.c`` matches any file that ends with ``.c`` in the
directory of ``.editorconfig`` or any other directory below one that stores this ``.editorconfig``.
However, the glob ``subdir/*.c`` only matches files that end
with ``.c`` in the ``subdir`` directory in the directory of ``.editorconfig``.

Expand Down Expand Up @@ -424,7 +420,4 @@ this specification.
.. _plugin-tests repository: https://github.com/editorconfig/editorconfig-plugin-tests
.. _Semantic Versioning 2.0.0: https://semver.org/spec/v2.0.0.html
.. _specification repository: https://github.com/editorconfig/specification
<<<<<<< HEAD
.. _gitignore format: https://git-scm.com/docs/gitignore#_pattern_format
=======
>>>>>>> 4c747a0 (Code review clean-up)

0 comments on commit dd73a0f

Please sign in to comment.