简体   繁体   中英

How To Exclude a specific rule from a specific file in Sonarlint

I am trying to exclude a specific rule from a file in sonarlint, I have multiple java automation projects open in eclipse, and I am wondering if my "Value" is correct on my analyzed property that I have set. (LN_LexisConveyOnline is the name of the project) I have implemented the below, and nothing seems to change. Thanks

My Implementation

You can do right click over rule, and click in Exclude rule. This, in the browser of rules in Eclipse IDE.

If this is a Java file, you might want to opt for @SuppressWarnings("java:S100") instead or //NOSONAR .

Note that SonarLint (the Eclipse plugin) and Sonar (the server) may not share the same key for the same rule. I had at least the problem with issue prefixed by java: and squid: (I presumed this was the old prefix).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM