PJ Walsh
PJ Walsh

Reputation: 89

How to suppress SonarQube rule on import-statement?

I'm trying to suppress a rule on an import

import com.sun.mail.smtp.SMTPMessage;

apparently doing the following on the class does not work

@SuppressWarnings("squid:S1191")

any suggestions? Using SonarQube 5.3

Upvotes: 3

Views: 1160

Answers (1)

PJ Walsh
PJ Walsh

Reputation: 89

Answering my own question. Just add a //NOSONAR comment to the line.

import com.sun.mail.smtp.SMTPMessage; //NOSONAR

Upvotes: 3

Related Questions