Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13985706
D9693.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D9693.diff
View Options
diff --git a/src/lint/linter/ArcanistJSHintLinter.php b/src/lint/linter/ArcanistJSHintLinter.php
--- a/src/lint/linter/ArcanistJSHintLinter.php
+++ b/src/lint/linter/ArcanistJSHintLinter.php
@@ -31,6 +31,13 @@
protected function getDefaultMessageSeverity($code) {
if (preg_match('/^W/', $code)) {
return ArcanistLintSeverity::SEVERITY_WARNING;
+ } else if (preg_match('/^E043$/', $code)) {
+ // TODO: If JSHint encounters a large number of errors, it will quit
+ // prematurely and add an additional "Too Many Errors" error. Ideally, we
+ // should be able to pass some sort of `--force` option to `jshint`.
+ //
+ // See https://github.com/jshint/jshint/issues/180
+ return ArcanistLintSeverity::SEVERITY_DISABLED;
} else {
return ArcanistLintSeverity::SEVERITY_ERROR;
}
diff --git a/src/lint/linter/__tests__/jshint/too-many-errors.lint-test b/src/lint/linter/__tests__/jshint/too-many-errors.lint-test
new file mode 100644
--- /dev/null
+++ b/src/lint/linter/__tests__/jshint/too-many-errors.lint-test
@@ -0,0 +1,5 @@
+/* jshint maxerr: 1 */
+console.log('foobar')
+~~~~~~~~~~
+disabled:2:22
+warning:2:22
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Oct 21, 10:27 PM (3 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6740107
Default Alt Text
D9693.diff (1 KB)
Attached To
Mode
D9693: Skip the "Too Many Errors" error that is raised by JSHint.
Attached
Detach File
Event Timeline
Log In to Comment