additionalEditorconfigFile doesn't seem to work
See original GitHub issuePossible duplicate of #322 but I couldn’t find a solution yet.
Versions:
- Pluging: 10.0.0
- ktlint: 0.40.0
Current Behavior
Ktlint doesn’t seem to stick by .editorconfig
properties. I am getting max line length
error for test classes.
Expected Behavior
Ktlint should stick by .editorconfig
properties. I shouldn’t get max line length
error for test classes.
I have below setup of ktlint
.
ktlint {
android = true
ignoreFailures = false
additionalEditorconfigFile = rootProject.file(".editorconfig")
version = "0.40.0"
disabledRules = [
'import-ordering',
'chain-wrapping',
'no-blank-line-before-rbrace'
]
}
.editorconfig
file(located under rootProject)
[*]
insert_final_newline = true
[*.{kt,kts}]
max_line_length=120
[**/test/**.kt]
max_line_length=1000
However still getting;
/path/to/test/class.kt:321:1
Exceeded max line length (120) (cannot be auto-corrected)`
Am I missing something here?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
editorconfig not working correctly - Visual Studio Feedback
When I'm using Folder View and edit on *.js, *.ts or *.cs file. The 'indent_size' property is not applied on Format Document in...
Read more >visual studio 2017 - .editorconfig not doing anything in VS2017?
For a reason or another editorconfig file does not do anything when the solution folder has a parent folder named between square brackets....
Read more >Settings do not apply if .editorconfig file is not in curently ...
I tried npm install editorconfig -g and ran editorconfig [file-in-question] and the configuration was what I expected. If not, please file on ...
Read more >EditorConfig settings - Visual Studio (Windows) - Microsoft Learn
Settings in EditorConfig files let you maintain consistent coding styles and settings in a codebase, such as indent style, tab width, end of ......
Read more >457046 – Support .editorconfig (editorconfig.org) - Bugs
It seems that the code to support most of the other IDE's is actually hosted on editorconfig.org (or various github projects). I don't...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Note that you don’t need to use
additionalEditorconfigFile
for.editorconfig
files located inside source file parents directories.Regarding your problem - could you try to reproduce it with KtLint
0.39.0
version?Thanks a lot @Tapchicoma! I’ll wait for it then. Hope to have it fixing this issue. Otherwise, I’ll ping them and update this issue.