Remove jade checker and replace it with pug checker

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
parent 7a7a358b
......@@ -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:
......
......@@ -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")
......@@ -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")
......
......@@ -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`,
......@@ -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`.
......
......@@ -197,7 +197,6 @@ attention to case differences."
haskell-ghc
haskell-hlint
html-tidy
jade
javascript-eslint
javascript-jshint
javascript-gjslint
......@@ -214,6 +213,7 @@ attention to case differences."
php-phpmd
php-phpcs
processing
pug
puppet-parser
puppet-lint
python-flake8
......@@ -7372,20 +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)
......@@ -7777,6 +7763,32 @@ 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" "-p" (eval (expand-file-name (buffer-file-name))))
:standard-input t
:error-patterns
;; errors with includes/extends (e.g. missing files)
((error "Error: " (message) (zero-or-more not-newline) "\n"
(zero-or-more not-newline) "at "
(zero-or-more not-newline) " line " line)
;; syntax/runtime errors (e.g. type errors, bad indentation, etc.)
(error line-start
(optional "Type") "Error: " (file-name) ":" line (optional ":" 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.
......
......@@ -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
......@@ -3548,6 +3544,22 @@ Why not:
'(4 2 error "Syntax error, maybe a missing semicolon?"
:checker processing)))
(flycheck-ert-def-checker-test pug pug syntax-error
(flycheck-ert-should-syntax-check
"language/pug/pug.pug" 'pug-mode
'(2 1 error "unexpected token \"indent\"" :checker pug)))
(flycheck-ert-def-checker-test pug pug include-extends-error
(flycheck-ert-should-syntax-check
"language/pug/pug-extends.pug" 'pug-mode
'(1 nil error "the \"basedir\" option is required to use includes and extends with \"absolute\" paths"
:checker pug)))
(flycheck-ert-def-checker-test pug pug type-error
(flycheck-ert-should-syntax-check
"language/pug/pug-runtime-error.pug" 'pug-mode
'(5 nil error "Cannot read property 'bar' of undefined" :checker pug)))
;; N.B. the puppet 4 and 3 tests are mutually exclusive
;; due to one having column and the other not
(flycheck-ert-def-checker-test puppet-parser puppet parser-error-puppet-4
......
extends /foo/bar/baz.pug
block content
h2 This is content
doctype html
html
head
body
h1=foo.bar
doctype html
html
head
title Jade Examples
title Pug Examples
body
h1 Markup example
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment