Add check if error not in ignoredError list

It was possible to add an error code more than one time if we don't change caret position after adding ignored error for the first time
This commit is contained in:
Valentina Kiryushkina
2015-12-09 20:33:33 +03:00
parent b59d380606
commit f8b1c58139
@@ -411,7 +411,9 @@ public class Pep8ExternalAnnotator extends ExternalAnnotator<Pep8ExternalAnnotat
@Override
public void consume(ModifiableModel model) {
PyPep8Inspection tool = (PyPep8Inspection)model.getUnwrappedTool(PyPep8Inspection.INSPECTION_SHORT_NAME, file);
tool.ignoredErrors.add(myCode);
if (!tool.ignoredErrors.contains(myCode)) {
tool.ignoredErrors.add(myCode);
}
}
});
}