Commit 582c4b5a authored by Sebastian Wiesner's avatar Sebastian Wiesner

Add syntax checker for SCSS [#103]

parent 1f513f3a
......@@ -16,5 +16,6 @@
(depends-on "php-mode")
(depends-on "php+-mode")
(depends-on "sass-mode")
(depends-on "scss-mode")
(depends-on "go-mode")
(depends-on "rust-mode"))
......@@ -37,6 +37,7 @@ Features
- Ruby
- Rust
- Sass
- SCSS
- Shell scripts (Bash, Dash and Zsh)
- TeX/LaTeX
- XML
......
......@@ -412,6 +412,17 @@ space
@comment node-name, next, previous, up
@unnumberedsec master (unreleased)
@itemize @bullet
@item
New syntax checkers:
@itemize @bullet
@item
@ghissue{103, SCSS using @command{scss}}
@end itemize
@end itemize
@c Local Variables:
@c mode: texinfo
@c TeX-master: "flycheck"
......
......@@ -23,6 +23,7 @@ order of their appearance in the default value of
@iflyc ruby
@iflyc rust-rustc
@iflyc sass
@iflyc scss
@iflyc sh
@iflyc tex-chktex
@iflyc tex-lacheck
......
No preview for this file type
......@@ -100,6 +100,7 @@ buffer-local wherever it is set."
ruby
rust-rustc
sass
scss
sh
tex-chktex
tex-lacheck
......@@ -2439,6 +2440,19 @@ See URL `http://sass-lang.com'."
error))
:modes 'sass-mode)
(flycheck-declare-checker scss
"A SCSS syntax checker using the SCSS compiler.
See URL `http://sass-lang.com'."
:command '("scss" "-c" source)
:error-patterns
'(("^Syntax error on line \\(?2:[0-9]+\\): \\(?4:.*\\)$" error)
("^WARNING on line \\(?2:[0-9]+\\) of \\(?1:.*\\):\r?\n\\(?4:.*\\)$"
warning)
("^Syntax error: \\(?4:.*\\)\r?\n on line \\(?2:[0-9]+\\) of \\(?1:.*\\)$"
error))
:modes 'scss-mode)
(flycheck-declare-checker sh
"A POSIX Shell syntax checker using the dash executable.
......
#container {
&.error {
c olor: red;
}
}
\ No newline at end of file
;;; test-scss.el --- Test the Sass checker -*- lexical-binding: t; -*-
;; Copyright (c) 2013 Sebastian Wiesner <lunaryorn@gmail.com>,
;;
;; Author: Sebastian Wiesner <lunaryorn@gmail.com>,
;; URL: https://github.com/lunaryorn/flycheck
;; This file is not part of GNU Emacs.
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Code:
(require 'ert)
(require 'flycheck)
(require 'scss-mode nil t)
(ert-deftest checker-scss-invalid-css ()
:expected-result (flycheck-testsuite-fail-unless-checker 'scss)
(flycheck-testsuite-should-syntax-check
"invalid-css.scss" 'scss-mode nil
'(3 nil "Invalid CSS after \" c olor:\": expected pseudoclass or pseudoelement, was \" red;\"" error)))
;; Local Variables:
;; coding: utf-8
;; End:
;;; test-scss.el ends here
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