Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Haml-Syntax-Checker compatible with haml ~> 5.0.4 #1325

Merged
merged 1 commit into from
Nov 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion flycheck.el
Original file line number Diff line number Diff line change
Expand Up @@ -7723,7 +7723,8 @@ See URL `http://haml.info'."
:command ("haml" "-c" "--stdin")
:standard-input t
:error-patterns
((error line-start "Syntax error on line " line ": " (message) line-end))
((error line-start "Syntax error on line " line ": " (message) line-end)
(error line-start ":" line ": syntax error, " (message) line-end))
:modes haml-mode)

(flycheck-define-checker handlebars
Expand Down
10 changes: 8 additions & 2 deletions test/flycheck-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -3241,12 +3241,18 @@ See https://github.com/flycheck/flycheck/issues/531 and Emacs bug #19206"))
"language/groovy.groovy" 'groovy-mode
'(2 14 error "unexpected token: {" :checker groovy)))

(flycheck-ert-def-checker-test haml haml nil
(flycheck-ert-def-checker-test haml haml "haml-error"
(flycheck-ert-should-syntax-check
"language/haml.haml" 'haml-mode
"language/haml/haml-error.haml" 'haml-mode
'(5 nil error "Inconsistent indentation: 3 spaces used for indentation, but the rest of the document was indented using 2 spaces."
:checker haml)))

(flycheck-ert-def-checker-test haml haml "ruby-error"
(flycheck-ert-should-syntax-check
"language/haml/ruby-error.haml" 'haml-mode
'(1 nil error "unexpected end-of-input"
:checker haml)))

(flycheck-ert-def-checker-test handlebars handlebars nil
(flycheck-ert-should-syntax-check
"language/handlebars.hbs" '(handlebars-mode web-mode)
Expand Down
1 change: 1 addition & 0 deletions test/resources/language/haml/ruby-error.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- foo.each do