In Sonar, how to prevent checking some rules in some packages?

前端 未结 2 2018
北海茫月
北海茫月 2020-12-31 01:53

We have an Android/Blackberry project with a common part. That part, obviously, is written to compile to both Android and Blackberry targets, and, consequently, cannot use s

2条回答
  •  情书的邮戳
    2020-12-31 02:40

    If you separate the common part to an own project you can add a new Quality Profile in Sonar (where you deactivated these rules) and assign it to your common project.

    Apart from that you can use the

    // NOSONAR
    

    comment to supress a warning on a single line (see FAQ).

提交回复
热议问题