You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The filename rule should produce a lint error when the kotlin source file name does not match the symbol declared whether or not an editorconfig is present or if it is missing path section which includes the offending file.
Observed Behavior
Starting in 0.40.0 it does not find this error.
However 0.39.0 does under the same circumstances.
Steps to Reproduce
Create file src/main/kotlin/Wrong.kt
classRight
(no editorconfig) ktlint src/main/kotlin/Wrong.kt and it does not find any errors
with editorconfig
[*.{kt,kts}]
indent_size = 4
a lint error will be found
src/main/kotlin/Wrong.kt:1:1: class Right should be declared in a file named Right.kt (cannot be auto-corrected)
If you again change the editorconfig file to the below, the lint error will disappear again
[src/test/**/*.{kt,kts}]
indent_size = 4
Your Environment
MacOS
ktlint 0.40.0
Java 11
The text was updated successfully, but these errors were encountered:
Expected Behavior
The
filename
rule should produce a lint error when the kotlin source file name does not match the symbol declared whether or not an editorconfig is present or if it is missing path section which includes the offending file.Observed Behavior
Starting in 0.40.0 it does not find this error.
However 0.39.0 does under the same circumstances.
Steps to Reproduce
Create file
src/main/kotlin/Wrong.kt
(no editorconfig)
ktlint src/main/kotlin/Wrong.kt
and it does not find any errorswith editorconfig
a lint error will be found
If you again change the editorconfig file to the below, the lint error will disappear again
Your Environment
The text was updated successfully, but these errors were encountered: