-
versions used: SonarLint v1.19.0 for VSCode on Windows
-
error observed:
While refactoring thesubdirectory
name to conformsonarlint(java:S120)
, from<Subdirectory>
to<subDirectory>
, I get the error:
This file "Example.Java" should be located in "com\example\project\<directory>\<subDirectory>" directory, not in "a:\project_folder\src\main\java\com\example\project\<directory>\<Subdirectory>".sonarlint(java:S1598)
Example.Java:
package com.example.project.<directory>.<subDirectory>;
// rest of the code
- steps to reproduce
- Create a directory with some mixed uppercase and lowercase letters
- Create a class inside and let it sink, rest there for some builds and packaging
- Decide to conform the java:S120 and refactor the directory’s name with the same name, but different letter casings
- Observe VSCode’s
problems
tab and see the error there
- potential workaround
Changing the directory’s name to something other than the previous name (with with different casing)