-
Notifications
You must be signed in to change notification settings - Fork 26
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
Conflicting instructions in sections for a given file #74
Comments
I wasn't asked, but I think this doesn't have to be a special case, it's enough to specify the order in which the sections are combined, as they can already be, and to state that a that a section can override options from the previous one. |
@SunsetTechuila Yeah, this is the very first thought that comes to mind, but I doubt it is extensible. We could've had 2 files, and both of them match to both sections. The problem is that we might want for one file to take settings from section So although this solution is very simple, I do not think it is ideal. |
I agree this is the intended behavior. The spec says:
I think we just need to replace the word "rule" with "pair", which is defined in the spec. |
Okay, if we have stated this already in the doc, then, I guess, the solution proposed by @SunsetTechuila comes naturally |
It's not a solution proposed by me, but by the spec) I read it once more after seeing your issue, but somehow missed that exact paragraph. |
@SunsetTechuila I agree, that is just a question of interpretation. In any case, thank you for pointing this out, I appreciate that 🤝 |
Consider that we have file, located in
/some/dir/MyFile.java
And we have the following
.editorconfig
file:This is a very simple example to demonstrate the problem. The problem essentially is that any file
X
, such as/some/dir/MyFile.java
in our example, could be potentially matched by multiple sections. And those sections can (the spec correctly does not forbid it) have conflicting instructions, such as an example above.What we need to do:
The spec must clarify what we require the implementation to do in such case.
The text was updated successfully, but these errors were encountered: