Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.mkdn
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ Support for new languages
npm -g install csslint
* RPM Specfile support has been added by running rpmlint if it's available.
* gettext() .po file support has been provided by msgfmt if it's available.
* [MetaJS](https://github.com/dogada/metajs) support has been added by running `metajs` if it's available:

npm -g install metajs

Other bug fixes
---------------
Expand Down
12 changes: 12 additions & 0 deletions flymake.el
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ are the string substitutions (see `format')."
("\\.p[ml]\\'" flymake-perl-init)
("\\.php[345]?\\'" flymake-php-init)
("\\.js\\'" flymake-javascript-init)
("\\.mjs\\'" flymake-metajs-init)
("\\.css\\'" flymake-css-init)
("\\.h\\'" flymake-master-make-header-init flymake-master-cleanup)
("\\.java\\'" flymake-simple-make-java-init flymake-simple-java-cleanup)
Expand Down Expand Up @@ -1061,6 +1062,8 @@ Convert it to flymake internal format."
("\\(?:Parse\\|Fatal\\) error: \\(.*\\) in \\(.*\\) on line \\([0-9]+\\)" 2 3 nil 1)
;; JSHint/CSSLint
("\\(.+\\): line \\([0-9]+\\), col \\([0-9]+\\), \\(.+\\)" 1 2 3 4)
;; MetaJS
("\\(.+\\):\\([0-9]+\\):\\([0-9]+\\) \\(.+\\)" 1 2 3 4)
;; LaTeX warnings (fileless) ("\\(LaTeX \\(Warning\\|Error\\): .*\\) on input line \\([0-9]+\\)" 20 3 nil 1)
;; gcc after 4.5 (includes column number)
(" *\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)\:\\([0-9]+\\)\:\\([0-9]+\\)\:[ \t\n]*\\(.+\\)"
Expand Down Expand Up @@ -2120,6 +2123,15 @@ wish to have supplied to Perl -I."
(file-name-directory buffer-file-name))))
(list "jshint" (list local-file))))

;;;; metajs-specific init-cleanup routines
(defun flymake-metajs-init ()
(let* ((temp-file (flymake-init-create-temp-buffer-copy
'flymake-create-temp-copy))
(local-file (file-relative-name
temp-file
(file-name-directory buffer-file-name))))
(list "metajs" (list "--lint" local-file))))

;;;; css-specific init-cleanup routines
(defun flymake-css-init ()
(let* ((temp-file (flymake-init-create-temp-buffer-copy
Expand Down