Commit 757c3264 authored by ptrv's avatar ptrv Committed by Sebastian Wiesner

Add syntax checker for processing

Closes GH-793 and closes GH-812
parent 4d184f59
master (in development)
=======================
- New syntax checkers:
- Processing [GH-793] [GH-812]
- Improvements:
- Map error IDs from flake8-pep257 to Flycheck error levels
......
......@@ -29,6 +29,7 @@
(depends-on "lua-mode")
(depends-on "mmm-mode")
(depends-on "php-mode")
(depends-on "processing-mode")
(depends-on "puppet-mode")
(depends-on "rhtml-mode")
(depends-on "rpm-spec-mode")
......
......@@ -556,6 +556,14 @@ The coding standard for PHP CodeSniffer, either as name of a built-in
standard, or as path to a standard specification.
@end table
@flyclanguage Processing
@itemize
@item
@flyc{processing} (using the @uref{https://processing.org/,Processing
command-line tool})
@end itemize
@flyclanguage{Puppet}
@itemize
......
......@@ -216,6 +216,7 @@ attention to case differences."
php
php-phpmd
php-phpcs
processing
puppet-parser
puppet-lint
python-flake8
......@@ -7249,6 +7250,23 @@ See URL `http://pear.php.net/package/PHP_CodeSniffer/'."
(flycheck-remove-error-file-names "STDIN" errors)))
:modes (php-mode php+-mode))
(flycheck-define-checker processing
"Processing command line tool.
See https://github.com/processing/processing/wiki/Command-Line"
:command ("processing-java" "--force"
;; Don't change the order of these arguments, processing is pretty
;; picky
(eval (concat "--sketch=" (file-name-directory (buffer-file-name))))
(eval (concat "--output=" (flycheck-temp-dir-system)))
"--build")
:error-patterns
((error line-start (file-name) ":" line ":" column
(zero-or-more (or digit ":")) (message) line-end))
:modes processing-mode
;; This syntax checker needs a file name
:predicate (lambda () (buffer-file-name)))
(flycheck-define-checker puppet-parser
"A Puppet DSL syntax checker using puppet's own parser.
......
......@@ -4412,6 +4412,12 @@ 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 processing processing syntax-error
(flycheck-ert-should-syntax-check
"language/processing/syntax_error/syntax_error.pde" 'processing-mode
'(4 2 error "Syntax error, maybe a missing semicolon?"
:checker processing)))
(flycheck-ert-def-checker-test puppet-parser puppet parser-error
(flycheck-ert-should-syntax-check
"language/puppet/parser-error.pp" 'puppet-mode
......
void setup(){
size(100, 100);
background(100)
}
void draw(){
}
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