-
Notifications
You must be signed in to change notification settings - Fork 363
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
clean-up Technical Debt #1594
clean-up Technical Debt #1594
Conversation
- S00103
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.
Reviewed 56 of 56 files at r1.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @guwirth)
cxx-checks/src/main/java/org/sonar/cxx/checks/regex/FileHeaderCheck.java, line 75 at r1 (raw file):
Charset.forName("UTF-8");
This pattern repeats several time in our code. I believe, that using of named constants instead of lookup would be a better idea
import java.nio.charset.StandardCharsets;
...
private Charset charset = StandardCharsets.UTF_8;
cxx-checks/src/main/java/org/sonar/cxx/checks/regex/FileRegularExpressionCheck.java, line 63 at r1 (raw file):
Charset.forName("UTF-8");
same here and in more than 30 other places
cxx-squid/src/main/java/org/sonar/cxx/CxxAstScanner.java, line 253 at r1 (raw file):
int max = min(lenOfB, lenOfA);
I believe, that every reader will suspect a mistake in this assignment. Why not to call the variable intersectionLength
?
Besides that, the function intersectionConcatenate()
might be useless since #1480. I might be wrong though.
@guwirth sorry for the delay; A couple of (late) comments from my side. |
@ivangalkin thx for your feedback. There are another 666 open isues waiting to be closed :-) (https://sonarcloud.io/dashboard?id=org.sonarsource.sonarqube-plugins.cxx%3Acxx). Will have a look in one of the next PR. |
This change is