Created
December 7, 2011 07:30
-
-
Save guileen/1441870 to your computer and use it in GitHub Desktop.
closure lint ignore error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: errorrules.py | |
=================================================================== | |
--- errorrules.py (revision 7) | |
+++ errorrules.py (working copy) | |
@@ -25,6 +25,7 @@ | |
FLAGS = flags.FLAGS | |
flags.DEFINE_boolean('jsdoc', True, | |
'Whether to report errors for missing JsDoc.') | |
+flags.DEFINE_list('ignore_errors', [], 'List of error codes to ignore.') | |
def ShouldReportError(error): | |
@@ -34,9 +35,9 @@ | |
True for all errors except missing documentation errors. For these, | |
it returns the value of the jsdoc flag. | |
""" | |
- return FLAGS.jsdoc or error not in ( | |
+ return (FLAGS.jsdoc or error not in ( | |
errors.MISSING_PARAMETER_DOCUMENTATION, | |
errors.MISSING_RETURN_DOCUMENTATION, | |
errors.MISSING_MEMBER_DOCUMENTATION, | |
errors.MISSING_PRIVATE, | |
- errors.MISSING_JSDOC_TAG_THIS) | |
+ errors.MISSING_JSDOC_TAG_THIS)) and str(error) not in FLAGS.ignore_errors |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment