question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Working through SonarQube Warnings

See original GitHub issue

Prerequisites

Description

This issue has been created to communicate work being done on fixing SonarQube warnings. If you would like to help out with fixing these warnings then please add a comment to this issue of which “rule” you are going to work on so we don’t double up.

Please PR a change which works on 1 rule at a time so that it can be reviewed and tested easily.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:59 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
arcturus2commented, Apr 1, 2020

Thank you @antares1470 @formalhaut69 and @sol695510 for helping with these SonarQube warnings. With an effort to time box this work we’ve agreed to focus on the following and then have this issue closed:

  • Resolve all Blocker and Critical warnings
  • Resolve all Bugs and Vulnerabilities
2reactions
antares1470commented, Mar 25, 2020

RULE (Java) Nested code blocks should not be used RULE (Java) Overriding methods should do more than simply call the same method in the super class RULE (Java) Strings should not be concatenated using ‘+’ in a loop RULE (Java) Collection.isEmpty() should be used to test for emptiness RULE (Java) String.valueOf() should not be appended to a String RULE (Java) Methods of “Random” that return floating point values should not be used in random integer generation RULE (Java) Case insensitive string comparisons should be made without intermediate upper or lower casing RULE (Java) Loggers should be named for their enclosing classes RULE (Java) “Collections.EMPTY_LIST”, “EMPTY_MAP”, and “EMPTY_SET” should not be used RULE (Java) Boolean checks should not be inverted RULE (Java) “StandardCharsets” constants should be preferred

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues - SonarQube Documentation
While running an analysis, SonarQube raises an issue every time a piece of code breaks a coding rule. The set of coding rules...
Read more >
How to suppress warnings for code in class / method comments
The project I work on has pseudo code in class comments to show example usage. Sonar reports “Remove the commented out code” issue...
Read more >
Turning Sonar off for certain code - java - Stack Overflow
squid:S00112 in this case is a Sonar issue ID. You can find this ID in the Sonar UI. Go to Issues Drilldown. Find...
Read more >
Using SonarQube with Diffblue Cover
A simple way to turn off the warnings given by SonarQube is to use the --annotate-suppress-warnings option to add the @SuppressWarnings code annotation...
Read more >
Configuring a Project to Exclude Certain Sonar Violations
In Java, we can exclude Sonar checks using the built-in @SuppressWarnings annotation. ... This works exactly the same way as suppressing compiler ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found