We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The .editorconfig file passed to --editorconfig should have its configuration used by ktlint.
.editorconfig
--editorconfig
--editorconfig argument's configuration is not used when --stdin option is used.
--stdin
Make a kotlin file at ~/src/SomeKotlinFile.kt and an editor config at ~/config/.editorconfig.
~/src/SomeKotlinFile.kt
~/config/.editorconfig
cat <path-to-home>/src/SomeKotlinFile.kt | ktlint --stdin --editorconfig=<path-to-home>/config/.editorconfig won't use the config's options, while ktlint <path-to-home> --editorconfig=<path-to-home>/config/.editorconfig will.
cat <path-to-home>/src/SomeKotlinFile.kt | ktlint --stdin --editorconfig=<path-to-home>/config/.editorconfig
ktlint <path-to-home> --editorconfig=<path-to-home>/config/.editorconfig
It will use an .editorconfig in the current directory instead, so the config will be taken into account if ~/config/ is the working directory.
~/config/
The text was updated successfully, but these errors were encountered:
Yes, usage of --stdin overrides --editorconfig option. Workaround would be:
cd ~/config/ && cat ~/src/SomeKotlinFile.kt | ktlint --stdin
Sorry, something went wrong.
Tapchicoma
Successfully merging a pull request may close this issue.
Expected Behavior
The
.editorconfig
file passed to--editorconfig
should have its configuration used by ktlint.Observed Behavior
--editorconfig
argument's configuration is not used when--stdin
option is used.Steps to Reproduce
Make a kotlin file at
~/src/SomeKotlinFile.kt
and an editor config at~/config/.editorconfig
.cat <path-to-home>/src/SomeKotlinFile.kt | ktlint --stdin --editorconfig=<path-to-home>/config/.editorconfig
won't use the config's options, whilektlint <path-to-home> --editorconfig=<path-to-home>/config/.editorconfig
will.It will use an .editorconfig in the current directory instead, so the config will be taken into account if
~/config/
is the working directory.Your Environment
The text was updated successfully, but these errors were encountered: