Skip to content
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

refactor: Use full string key for Sonar rules #581

Merged
merged 5 commits into from
Jun 22, 2021

Conversation

slarse
Copy link
Collaborator

@slarse slarse commented Jun 21, 2021

Fix #580

This PR fixes the inconsistent use of rule keys internally in Sorald, where in some places an integer was used, and in others a string. Additionally, the full key is now used (e.g. "S1854" instead of "1854"). This is due to needing the full key when interacting with Sonar, and translating back and forth is both a hassle and error prone. It also doesn't make much sense not to use the full key, it's just an element of potential confusion for users.

The implementation is backwards compatible for now. That is to say, if someone were to type --rule-key 1854 or provide a violation specifier with the "shortened" rule key on the command line, that would still work.

@slarse slarse added the WiP label Jun 21, 2021
@slarse slarse requested a review from khaes-kth June 22, 2021 07:46
@slarse
Copy link
Collaborator Author

slarse commented Jun 22, 2021

@khaes-kth Any chance you can have a look at this today? It's a blocker for #582

@khaes-kth
Copy link
Collaborator

@slarse
Sure. I will do it now.

Copy link
Collaborator

@khaes-kth khaes-kth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@khaes-kth khaes-kth merged commit 2c47070 into master Jun 22, 2021
@khaes-kth khaes-kth deleted the issue/580-use-full-string-key branch June 22, 2021 13:08
@slarse
Copy link
Collaborator Author

slarse commented Jun 22, 2021

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Use full SonarJava key in all internal parts and as input
2 participants