Support dot notation in rule S3317

@Quentin, may I suggest adding support for dot.case notation filename as well?

I get a code smell to rename file connection.manager.ts where my ConnectionManager class is and I find that to also be a wrong behavior of the rule, wouldn’t you agree?

BTW, my IDE recognizes the connection between dot.case filename and CamelCase class name and when I change one asks me if I’d like to change the other accordingly. For example, if I try to rename the above file to magic.connection.manager.ts it will ask me if I’d like to change the class name and all its usages to MagicConnectionManager, which I find to be a correct thing to ask.

Hi,

Thanks for the feedback, issue is created Support dot notation in S3317 (`file-name-differ-from-class`) · Issue #2855 · SonarSource/SonarJS · GitHub
(Next time better start a new thread then reviving the old one)

2 Likes