"Rename file" rule confused with upper case?

sonarqube 7.9, sonarlint (latest)

sonar had a smell to rename a file, which was done. Now it’s saying to rename the file to its current name. Could the uppercase name have anything to do with this?

current file name: src/seedDefault/seedTag/SEED_TAGS.js
message: Rename this file to "SEED_TAGS".
file contents:

const SEED_TAGS = [
  {
    value: "Maintenance",
    color: "#00ff00",
    enabled: true
  },
  {
    value: "Operation",
    color: "#ffff00",
    enabled: true
  },
  {
    value: "Process",
    color: "#990000",
    enabled: true
  },
  {
    value: "Admin",
    color: "#0000ff",
    enabled: true
  }
]
export default SEED_TAGS

Hello @memelet,
thank you for the feedback and the clear description.

This is a wrong behavior of the rule, I created a ticket to track this issue.
We plan to rework some of SonarJS rules, we will probably get to it when we will start the effort.

For your information, the problem isn’t coming from the uppercase, but from the underscore in the exported name.

best,

Quentin

1 Like