-
Notifications
You must be signed in to change notification settings - Fork 503
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
Wrong file path resolved when using --editorconfig #1551
Comments
The logging above is indeed inccorrect.
Whenever the But the least that could be done, is to mention the current behavior in the CLI help. |
That is fine, I expected that. The problem is with path-based rules in the provided EditorConfig. If the EditorConfig looks like this:
Then when it is found by directory traversal, both |
Tnx for this clarification. That indeed sounds like a bug. |
Deprecate ExperimentalParams.editorConfigDefaults in favor of new parameter ExperimentalParams.editorConfigDefaults. When used in the old implementation this resulted in ignoring all ".editorconfig" files on the path to the file. The new implementation uses properties from the "editorConfigDefaults" parameter only when no ".editorconfig" files on the path to the file supplies this property for the filepath. Closes pinterest#1551 API consumers can easily create the EditConfigDefaults by calling "EditConfigDefaults.load(path)" or creating it programmatically. The CLI still supports the "--editorconfig=" option but has improved support. The path given can be either be a path to file or directory. In case of a directory path, it is expected that the directory does contain a file with name ".editorconfig". In of a file path, any valid file name is accepted. The path can be relative or absolute. Depending on the OS, the "~" at the start of the path is accepted as well. BaseCLITest no longer always waits 3 seconds for completion of the asynchronous process. Once the process is started, it checks every 100 ms whether the process is still alive (e.g. is running) and stops polling otherwise resulting in better performance (most notable on local machine). The maximum duration of the CLI test has been increased to 10 seconds.
* Improve support of default editorconfig properties Deprecate ExperimentalParams.editorConfigDefaults in favor of new parameter ExperimentalParams.editorConfigDefaults. When used in the old implementation this resulted in ignoring all ".editorconfig" files on the path to the file. The new implementation uses properties from the "editorConfigDefaults" parameter only when no ".editorconfig" files on the path to the file supplies this property for the filepath. Closes #1551 API consumers can easily create the EditConfigDefaults by calling "EditConfigDefaults.load(path)" or creating it programmatically. The CLI still supports the "--editorconfig=" option but has improved support. The path given can be either be a path to file or directory. In case of a directory path, it is expected that the directory does contain a file with name ".editorconfig". In of a file path, any valid file name is accepted. The path can be relative or absolute. Depending on the OS, the "~" at the start of the path is accepted as well. BaseCLITest no longer always waits 3 seconds for completion of the asynchronous process. Once the process is started, it checks every 100 ms whether the process is still alive (e.g. is running) and stops polling otherwise resulting in better performance (most notable on local machine). The maximum duration of the CLI test has been increased to 10 seconds.
When using
--editorconfig
option, a wrong path will be resolved.Without
--editorconfig
:With
--editorconfig=/tmp/editorconfig
:Notice that the file's director name has been replaced with the editorconfig path. Path-specific rules for e.g.
[**/example/*.kt]
won't be applied.The text was updated successfully, but these errors were encountered: