Skip to content

Commit

Permalink
Remove jade checker and replace it with pug checker
Browse files Browse the repository at this point in the history
Jade is now deprecated and is replaced by pug. I do not feel it is
worth while to maintain a checker for both.

Closes GH-951
  • Loading branch information
robbyoconnor committed Sep 12, 2016
1 parent fd75a7e commit 58abe05
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 26 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Expand Up @@ -8,11 +8,13 @@
own ``.luacheckrc`` detection. Therefore ``flycheck-luacheckrc`` is
no longer used [GH-1057]
- ``:modes`` is now mandatory for syntax checker definitions [GH-1071]
- Remove Jade checker [GH-951] [GH-1084]

- New syntax checkers:

- Elixir with ``dogma`` [GH-969]
- sass and scss with ``sass-lint`` [GH-1070]
- pug [GH-951] [GH-1084]

- New features:

Expand Down
2 changes: 1 addition & 1 deletion Cask
Expand Up @@ -25,7 +25,6 @@
(depends-on "haml-mode")
(depends-on "handlebars-mode")
(depends-on "haskell-mode")
(depends-on "jade-mode")
(depends-on "js2-mode")
(depends-on "js3-mode")
(depends-on "json-mode")
Expand All @@ -35,6 +34,7 @@
(depends-on "mmm-mode")
(depends-on "php-mode")
(depends-on "processing-mode")
(depends-on "pug-mode")
(depends-on "puppet-mode")
(depends-on "racket-mode")
(depends-on "rhtml-mode")
Expand Down
12 changes: 6 additions & 6 deletions doc/languages.rst
Expand Up @@ -538,12 +538,6 @@ to view the docstring of the syntax checker. Likewise, you may use

.. syntax-checker-config-file:: flycheck-tidyrc

.. supported-language:: Jade

.. syntax-checker:: jade

Check syntax using the `Jade <http://jade-lang.com/>`_ compiler.

.. supported-language:: Javascript

Flycheck checks Javascript with one of `javascript-eslint`,
Expand Down Expand Up @@ -708,6 +702,12 @@ to view the docstring of the syntax checker. Likewise, you may use

Check syntax using the `Processing <https://processing.org/>`_ compiler.

.. supported-language:: Pug

.. syntax-checker:: pug

Check syntax using the `Pug <http://www.pugjs.org>`_ compiler.

.. supported-language:: Puppet

Flycheck checks Puppet with `puppet-parser` and lints with `puppet-lint`.
Expand Down
35 changes: 21 additions & 14 deletions flycheck.el
Expand Up @@ -197,7 +197,6 @@ attention to case differences."
haskell-ghc
haskell-hlint
html-tidy
jade
javascript-eslint
javascript-jshint
javascript-gjslint
Expand All @@ -214,6 +213,7 @@ attention to case differences."
php-phpmd
php-phpcs
processing
pug
puppet-parser
puppet-lint
python-flake8
Expand Down Expand Up @@ -7372,19 +7372,6 @@ See URL `https://github.com/htacg/tidy-html5'."
" - Warning: " (message) line-end))
:modes (html-mode nxhtml-mode))

(flycheck-define-checker jade
"A Jade syntax checker using the Jade compiler.

See URL `http://jade-lang.com'."
:command ("jade")
:standard-input t
:error-patterns
((error line-start
"Error: Jade:" line (zero-or-more not-newline) "\n"
(one-or-more (and (zero-or-more not-newline) "|"
(zero-or-more not-newline) "\n"))
(zero-or-more not-newline) "\n" (message) line-end))
:modes jade-mode)

(flycheck-def-config-file-var flycheck-jshintrc javascript-jshint ".jshintrc"
:safe #'stringp)
Expand Down Expand Up @@ -7777,6 +7764,26 @@ See https://github.com/processing/processing/wiki/Command-Line"
;; This syntax checker needs a file name
:predicate (lambda () (buffer-file-name)))

(flycheck-define-checker pug
"A Pug syntax checker using the pug compiler.

See URL `https://pugjs.org/'."
:command ("pug")
:standard-input t
:error-patterns
((error line-start
"Error: Pug:" line ":" column (zero-or-more not-newline) "\n"
(one-or-more (or (zero-or-more not-newline) "|"
(zero-or-more not-newline) "\n")
(zero-or-more "-") (zero-or-more not-newline) "|"
(zero-or-more not-newline) "\n")
(zero-or-more not-newline) "\n"
(one-or-more
(zero-or-more not-newline) "|"
(zero-or-more not-newline) "\n") (zero-or-more not-newline) "\n"
(message) line-end))
:modes pug-mode)

(flycheck-define-checker puppet-parser
"A Puppet DSL syntax checker using puppet's own parser.

Expand Down
9 changes: 5 additions & 4 deletions test/flycheck-test.el
Expand Up @@ -3282,10 +3282,6 @@ Why not:
'(8 5 warning "discarding unexpected <spam>"
:checker html-tidy)))

(flycheck-ert-def-checker-test jade jade nil
(flycheck-ert-should-syntax-check
"language/jade.jade" 'jade-mode
'(2 nil error "unexpected token \"indent\"" :checker jade)))

(defconst flycheck-test-javascript-modes '(js-mode
js2-mode
Expand Down Expand Up @@ -3542,6 +3538,11 @@ Why not:
'(26 12 error "TRUE, FALSE and NULL must be lowercase; expected \"false\" but found \"FALSE\""
:id "Generic.PHP.LowerCaseConstant.Found" :checker php-phpcs)))

(flycheck-ert-def-checker-test pug pug nil
(flycheck-ert-should-syntax-check
"language/pug.pug" 'pug-mode
'(2 1 error "unexpected token \"indent\"" :checker pug)))

(flycheck-ert-def-checker-test processing processing syntax-error
(flycheck-ert-should-syntax-check
"language/processing/syntax_error/syntax_error.pde" 'processing-mode
Expand Down
@@ -1,6 +1,6 @@
doctype html
html
head
title Jade Examples
title Pug Examples
body
h1 Markup example

0 comments on commit 58abe05

Please sign in to comment.