Created
June 5, 2014 17:32
-
-
Save daniellmb/b0486fc0ba3d09eb66d9 to your computer and use it in GitHub Desktop.
Closure Linter Reference
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
# "File-fatal" errors - these errors stop further parsing of a single file | |
FILE_NOT_FOUND = -1 | |
FILE_DOES_NOT_PARSE = -2 | |
# Spacing | |
EXTRA_SPACE = 1 | |
MISSING_SPACE = 2 | |
EXTRA_LINE = 3 | |
MISSING_LINE = 4 | |
ILLEGAL_TAB = 5 | |
WRONG_INDENTATION = 6 | |
WRONG_BLANK_LINE_COUNT = 7 | |
# Semicolons | |
MISSING_SEMICOLON = 10 | |
MISSING_SEMICOLON_AFTER_FUNCTION = 11 | |
ILLEGAL_SEMICOLON_AFTER_FUNCTION = 12 | |
REDUNDANT_SEMICOLON = 13 | |
# Miscellaneous | |
ILLEGAL_PROTOTYPE_MEMBER_VALUE = 100 | |
LINE_TOO_LONG = 110 | |
LINE_STARTS_WITH_OPERATOR = 120 | |
COMMA_AT_END_OF_LITERAL = 121 | |
MULTI_LINE_STRING = 130 | |
UNNECESSARY_DOUBLE_QUOTED_STRING = 131 | |
# Requires, provides | |
GOOG_REQUIRES_NOT_ALPHABETIZED = 140 | |
GOOG_PROVIDES_NOT_ALPHABETIZED = 141 | |
MISSING_GOOG_REQUIRE = 142 | |
MISSING_GOOG_PROVIDE = 143 | |
EXTRA_GOOG_REQUIRE = 144 | |
EXTRA_GOOG_PROVIDE = 145 | |
# JsDoc | |
INVALID_JSDOC_TAG = 200 | |
INVALID_USE_OF_DESC_TAG = 201 | |
NO_BUG_NUMBER_AFTER_BUG_TAG = 202 | |
MISSING_PARAMETER_DOCUMENTATION = 210 | |
EXTRA_PARAMETER_DOCUMENTATION = 211 | |
WRONG_PARAMETER_DOCUMENTATION = 212 | |
MISSING_JSDOC_TAG_TYPE = 213 | |
MISSING_JSDOC_TAG_DESCRIPTION = 214 | |
MISSING_JSDOC_PARAM_NAME = 215 | |
OUT_OF_ORDER_JSDOC_TAG_TYPE = 216 | |
MISSING_RETURN_DOCUMENTATION = 217 | |
UNNECESSARY_RETURN_DOCUMENTATION = 218 | |
MISSING_BRACES_AROUND_TYPE = 219 | |
MISSING_MEMBER_DOCUMENTATION = 220 | |
MISSING_PRIVATE = 221 | |
EXTRA_PRIVATE = 222 | |
INVALID_OVERRIDE_PRIVATE = 223 | |
INVALID_INHERIT_DOC_PRIVATE = 224 | |
MISSING_JSDOC_TAG_THIS = 225 | |
UNNECESSARY_BRACES_AROUND_INHERIT_DOC = 226 | |
INVALID_AUTHOR_TAG_DESCRIPTION = 227 | |
JSDOC_PREFER_QUESTION_TO_PIPE_NULL = 230 | |
JSDOC_ILLEGAL_QUESTION_WITH_PIPE = 231 | |
JSDOC_TAG_DESCRIPTION_ENDS_WITH_INVALID_CHARACTER = 240 | |
# TODO(robbyw): Split this in to more specific syntax problems. | |
INCORRECT_SUPPRESS_SYNTAX = 250 | |
INVALID_SUPPRESS_TYPE = 251 | |
UNNECESSARY_SUPPRESS = 252 | |
# File ending | |
FILE_MISSING_NEWLINE = 300 | |
FILE_IN_BLOCK = 301 | |
# Interfaces | |
INTERFACE_CONSTRUCTOR_CANNOT_HAVE_PARAMS = 400 | |
INTERFACE_METHOD_CANNOT_HAVE_CODE = 401 | |
# ActionScript specific errors: | |
# TODO(user): move these errors to their own file and move all JavaScript | |
# specific errors to their own file as well. | |
# All ActionScript specific errors should have error number at least 1000. | |
FUNCTION_MISSING_RETURN_TYPE = 1132 | |
PARAMETER_MISSING_TYPE = 1133 | |
VAR_MISSING_TYPE = 1134 | |
PARAMETER_MISSING_DEFAULT_VALUE = 1135 | |
IMPORTS_NOT_ALPHABETIZED = 1140 | |
IMPORT_CONTAINS_WILDCARD = 1141 | |
UNUSED_IMPORT = 1142 | |
INVALID_TRACE_SEVERITY_LEVEL = 1250 | |
MISSING_TRACE_SEVERITY_LEVEL = 1251 | |
MISSING_TRACE_MESSAGE = 1252 | |
REMOVE_TRACE_BEFORE_SUBMIT = 1253 | |
REMOVE_COMMENT_BEFORE_SUBMIT = 1254 | |
# End of list of ActionScript specific errors. |
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
closure_linter.checker: | |
--closurized_namespaces: Namespace prefixes, used for testing ofgoog.provide/require | |
(default: '') | |
(a comma separated list) | |
--ignored_extra_namespaces: Fully qualified namespaces that should be not be reported as extra by the linter. | |
(default: '') | |
(a comma separated list) | |
closure_linter.common.simplefileflags: | |
-e,--exclude_directories: Exclude the specified directories (only applicable along with -r or --presubmit) | |
(default: '_demos') | |
(a comma separated list) | |
-x,--exclude_files: Exclude the specified files | |
(default: 'deps.js') | |
(a comma separated list) | |
-r,--recurse: Recurse in to the subdirectories of the given path; | |
repeat this option to specify a list of values | |
closure_linter.ecmalintrules: | |
--custom_jsdoc_tags: Extra jsdoc tags to allow | |
(default: '') | |
(a comma separated list) | |
closure_linter.error_check: | |
--jslint_error: List of specific lint errors to check. Here is a list of accepted values: | |
- all: enables all following errors. | |
- blank_lines_at_top_level: validatesnumber of blank lines between blocks at top level. | |
- indentation: checks correct indentation of code. | |
- well_formed_author: validates the @author JsDoc tags. | |
- no_braces_around_inherit_doc: forbids braces around @inheritdoc JsDoc tags. | |
- braces_around_type: enforces braces around types in JsDoc tags. | |
- optional_type_marker: checks correct use of optional marker = in param types. | |
- unused_private_members: checks for unused private variables. | |
; | |
repeat this option to specify a list of values | |
(default: '[]') | |
--[no]strict: Whether to validate against the stricter Closure style. This includes optional_type_marker, | |
well_formed_author, no_braces_around_inherit_doc, variable_arg_marker, indentation, braces_around_type, | |
blank_lines_at_top_level. | |
(default: 'false') | |
closure_linter.errorrules: | |
--disable: Disable specific error. Usage Ex.: gjslint --disable 1,0011 foo.js. | |
(a comma separated list) | |
--ignore_errors: Disable specific error. Usage Ex.: gjslint --ignore_errors 1,0011 foo.js. | |
(default: '') | |
(a comma separated list) | |
--[no]jsdoc: Whether to report errors for missing JsDoc. | |
(default: 'true') | |
--max_line_length: Maximum line length allowed without warning. | |
(default: '80') | |
(a positive integer) | |
closure_linter.gjslint: | |
--additional_extensions: List of additional file extensions (not js) that should be treated as JavaScript files. | |
(a comma separated list) | |
--[no]beep: Whether to beep when errors are found. | |
(default: 'true') | |
--[no]check_html: Whether to check javascript in html files. | |
(default: 'false') | |
-?,--[no]help: show this help | |
--[no]helpshort: show usage only for this module | |
--[no]helpxml: like --help, but generates XML output | |
--[no]multiprocess: Whether to attempt parallelized linting using the multiprocessing module. Enabled by default on | |
Linux if the multiprocessing module is present (Python 2.6+). Otherwise disabled by default. Disabling may make | |
debugging easier. | |
(default: 'false') | |
--[no]summary: Whether to show an error count summary. | |
(default: 'false') | |
--[no]time: Whether to emit timing statistics. | |
(default: 'false') | |
--[no]unix_mode: Whether to emit warnings in standard unix format. | |
(default: 'false') | |
closure_linter.indentation: | |
--[no]debug_indentation: Whether to print debugging information for indentation. | |
(default: 'false') | |
closure_linter.runner: | |
--[no]error_trace: Whether to show error exceptions. | |
(default: 'false') | |
--limited_doc_files: List of files with relaxed documentation checks. Will not report errors for missing | |
documentation, some missing descriptions, or methods whose @return tags don't have a matching return statement. | |
(default: 'dummy.js,externs.js') | |
(a comma separated list) | |
gflags: | |
--flagfile: Insert flag definitions from the given file into the command line. | |
(default: '') | |
--undefok: comma-separated list of flag names that it is okay to specify on the command line even if the program does | |
not define a flag with that name. IMPORTANT: flags in this list that have arguments MUST use the --flag=value | |
format. | |
(default: '') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment