-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolves JS-278 #4769
Resolves JS-278 #4769
Conversation
77a72b6
to
c1b81a1
Compare
c1b81a1
to
cb0d1f9
Compare
This commit removes the concept of ESLint key from the backend. The rational is that the usage of ESLint is an implementation detail of the frontend that must not propagate to the other layers: would we want to totally change the way the frontend detect issues, the backend should not be impacted at all. Rationality aside, this change removes the requirements of maintaining a mapping between the ESLint keys and their RSpec counterparts, which will make our life easier in the future. Java checks now have RSpec identifiers only. To preserve compatiblity with potential plugins that depend on this one, the semantic `eslintKey` was left untouched, but now means "RSpec identifier". Only the tests that contained the rule key in their expectation have been updated. Other tests, and especially ruling tests, were left untouched. A word about the ESLint plugin: in order to not break the public contract of the ESLint plugin that is also built from the frontend code, the ESLint keys have been kept in the rules entry point.
cb0d1f9
to
d74fa41
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, very nice Eric! thx!
some small comments, from what we discussed you can focus on the quickfixes test and ignore the others.
sonar-plugin/api/src/main/java/org/sonar/plugins/javascript/api/Check.java
Show resolved
Hide resolved
sonar-plugin/api/src/main/java/org/sonar/plugins/javascript/api/TestFileCheck.java
Outdated
Show resolved
Hide resolved
* Remove the "number of rules in public API" test entirely * Improve the Linter Wrapper test to ignore only SXXX fixtures instead of being super permissive * Remove the unneeded and confusing `@Rule` annotation on TestFileCheck abstract class
Quality Gate failedFailed conditions See analysis details on SonarQube Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
Fixes JS-278
Please read the commit messages for more information.
Also, this may seem like a big change according to the number of files changed, but around 440 of these files are Java Check subclasses where the
eslintKey
public getter was removed. You can safely ignore them and focus on the 20 or so relevant changes that this PR brings.