Hi,
I have your extension pack installed but have run across an issue with SonarLint. There isn't currently a way to disable a particular rule, even though I find the code analysis very helpful.
As an example:
// Typescript snippet
import { IHookProperties, setDefault } from "ts-log-class";
setDefault({
hook: (logProps: IHookProperties) => {
if (logProps.arguments.hasOwnProperty("user")) {
const user: any = JSON.parse(logProps.arguments.user);
// @SupressWarnings("all")
user.password = "[secret]";
logProps.arguments.user = JSON.stringify(user);
}
return JSON.stringify(logProps);
},
out: (message?: any, ...optionalParameters: any[]) => {
Logging.Logger.debug(message, optionalParameters);
}
});
In this case I need to suppress the error Credentials should not be hard-coded (typescript:S2068) because one, it is a copy of the object, and two it prevents the password from being printed/logged in my cloud provider. Since there is no way to currently suppress this and any other errors that are false positives, should we consider temporarily removing SonarLint from the pack?
Hi,
I have your extension pack installed but have run across an issue with SonarLint. There isn't currently a way to disable a particular rule, even though I find the code analysis very helpful.
As an example:
In this case I need to suppress the error
Credentials should not be hard-coded (typescript:S2068)because one, it is a copy of the object, and two it prevents the password from being printed/logged in my cloud provider. Since there is no way to currently suppress this and any other errors that are false positives, should we consider temporarily removing SonarLint from the pack?