Skip to content

Comments

Fixing squid:S2275 -Fixing squid:UselessParenthesesCheck#10

Open
misgersameer wants to merge 1 commit intoSonarQubeCommunity:masterfrom
DevFactory:release/printf-style-format-strings-fix-1
Open

Fixing squid:S2275 -Fixing squid:UselessParenthesesCheck#10
misgersameer wants to merge 1 commit intoSonarQubeCommunity:masterfrom
DevFactory:release/printf-style-format-strings-fix-1

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 <sameer.misger@prospectasoftware.com>
@dbolkensteyn
Copy link

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

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