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

Fixing squid:S2275 -Fixing squid:UselessParenthesesCheck #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fixing squid:S2275 -Fixing squid:UselessParenthesesCheck #10

wants to merge 1 commit into from

Conversation

misgersameer
Copy link

This pull request is focused on resolving occurrences of Sonar rule " UselessParenthesesCheck -    Useless parentheses around expressions should be removed to prevent any misunderstanding, squid:S2275 -  Printf-style format strings should not lead to unexpected behavior at runtime. You can find more information about the issues here:
https://dev.eclipse.org/sonar/rules/show/squid:S2275
https://dev.eclipse.org/sonar/rules/show/squid:UselessParenthesesCheck

Please let me know if you have any questions.
Sameer Misger

Change-Id: Id3de673d50ad22c690eb854371ee3995d9eef258
Signed-off-by: smisger <[email protected]>
@dbolkensteyn
Copy link

@misgersameer could you provide a single pull request to address all quality flaws that you'd like to fix?

@@ -86,7 +86,7 @@ public ChangeLogHandler getChangeLog(DateRange dateRange) {
LOG.info("Getting change log information for %s\n", baseDir.getAbsolutePath());
if (!hgRepo.initFrom(baseDir)) {
throw new HgRepositoryNotFoundException(
String.format("Can't find repository in: %s\n",baseDir.getAbsolutePath()));
String.format("Can't find repository in: %s%n",baseDir.getAbsolutePath()));

Choose a reason for hiding this comment

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

@misgersameer this change seems incorrect, and is unrelated to redundant parentheses

Copy link
Author

Choose a reason for hiding this comment

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

%n should be used in place of \n to produce the platform-specific line separator

more info can be found at https://dev.eclipse.org/sonar/rules/show/squid:S2275

@misgersameer
Copy link
Author

@dbolkensteyn i need to fix them one by, surely i combine when there is a small fix

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

Successfully merging this pull request may close these issues.

2 participants