How can we ignore some SonarQube rules in Java?
As noted in the comments, all you have to do is remove the rules from your profile or edit them to lower their priority. You need the Global Administer Quality Profiles permission to do that. Once you're logged in with that permission, go to the Rules interface, search for a rule you want to deactivate, select the rule, click on it, and Deactivate it from the relevant profile.
Disable Sonar rule using pom.xml?
There seem to be a way of doing it but it may not be supported i.e.
<properties>
<sonar.issue.ignore.multicriteria>e1</sonar.issue.ignore.multicriteria>
<sonar.issue.ignore.multicriteria.e1.ruleKey>squid:S00107</sonar.issue.ignore.multicriteria.e1.ruleKey>
<sonar.issue.ignore.multicriteria.e1.resourceKey>**/*.java</sonar.issue.ignore.multicriteria.e1.resourceKey>
</properties>
Refer to : https://community.sonarsource.com/t/documentation-about-ignore-issues-seems-to-be-wrong-or-outdated/3353
but they do state :
We recommend users to use the UI to configure this, for best
experience. Consider the configuration via sonar-project.properties as
an undocumented hack, not official supported that may or may not work
reliably, use at your own risk.
Suppress Sonar's warning on import
Can you please try:
import com.sun.xml.ws.developer.JAXWSProperties; // NOSONAR
Where is WSIMPORT after JDK11
The executables for WSIMPORT can be found at the main site https://javaee.github.io/metro-jax-ws/.
They're no longer part of JDK.
Related Topics
How to Check If an Arraylist of Strings Contains Substrings of Another Arraylist of Strings
Generating Unique Random Numbers Effectively in Java
Android Room Persistent: Appdatabase_Impl Does Not Exist
How to Efficiently Read Multiple Json Files into a Dataframe or Javardd
Name a File in Java to Include Date and Time Stamp
Placing a Jlabel At a Specific X,Y Coordinate on a Jpanel
In Junit 5, How to Run Code Before All Tests
Type Safety: Unchecked Cast from Object to Arraylist<Myvariable>
How to Get Access to Job Parameters from Itemreader, in Spring Batch
Retrieve Integer Values from Excel Using Java
Maven: Best Way of Linking Custom External Jar to My Project
Getting Data from Incoming Json in a Java Servlet
Automatically Size Jpanel Inside Jframe
Pass and Get Json String to Spring Controller
Spring-Boot @Autowired Interface (Crudrepository) in My Service Class => Null Pointer Exception
Convert Html/Mxml File to Word Doc Programmatically in Java