Skip to content

Commit 34c1306

Browse files
committed
Show solium's Fatal errors in the linter too
1 parent 8a29da3 commit 34c1306

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

solidity-mode.el

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,15 @@ we pass the directory to solium via the `--config' option."
505505
source-inplace)
506506
:error-patterns
507507
((error line-start (zero-or-more " ") line ":" column (zero-or-more " ") "error" (message))
508+
(error line-start (zero-or-more not-newline) "[Fatal error]" (message))
508509
(warning line-start (zero-or-more " ") line ":" column (zero-or-more " ") "warning" (message)))
510+
:error-filter
511+
;; Add fake line numbers if they are missing in the lint output
512+
(lambda (errors)
513+
(dolist (err errors)
514+
(unless (flycheck-error-line err)
515+
(setf (flycheck-error-line err) 1)))
516+
errors)
509517
:modes solidity-mode
510518
:predicate (lambda () (eq major-mode 'solidity-mode)))
511519

0 commit comments

Comments
 (0)