Commit d4c302c0 authored by William Cummings's avatar William Cummings Committed by Sebastian Wiesner

Add new racket checker

Closes GH-799 and closes GH-873
parent 5e0d9485
......@@ -64,6 +64,7 @@ substantial code to Flycheck:
* [Tomoya Tanjo](
* [Victor Deryagin](
* [Vlatko Basic](
* [William Cummings](
* [William Xu](
* [Yannick Roehlly](
* [Yasuyuki Oka](
......@@ -21,6 +21,7 @@ now for questions and discussions about development. [GH-820]
* New syntax checkers:
* Processing [GH-793] [GH-812]
* Racket [GH-799] [GH-873]
* New features:
......@@ -33,6 +33,7 @@
(depends-on "php-mode")
(depends-on "processing-mode")
(depends-on "puppet-mode")
(depends-on "racket-mode")
(depends-on "rhtml-mode")
(depends-on "rpm-spec-mode")
(depends-on "rust-mode")
......@@ -30,6 +30,7 @@
@item @ref{Puppet}
@item @ref{Python}
@item @ref{R}
@item @ref{Racket}
@item @ref{RPM Spec}
@item @ref{reStructuredText}
@item @ref{Ruby}
......@@ -629,6 +629,14 @@ selects the linters to use.
@end itemize
@flyc{racket} (syntax checker with @code{raco expand}, requires the
@code{compiler-lib} package)
@end itemize
@flyclanguage{RPM Spec}
......@@ -224,6 +224,7 @@ attention to case differences."
......@@ -7669,6 +7670,30 @@ See URL `'."
;; Don't check ESS files which do not contain R
:predicate (lambda () (equal ess-language "S")))
(flycheck-define-checker racket
"A Racket syntax checker with `raco expand'.
The `compiler-lib' racket package is required for this syntax
See URL `'."
:command ("raco" "expand" source-inplace)
(lambda ()
(let ((raco (flycheck-checker-executable 'racket)))
(call-process raco nil t nil "expand")
(goto-char (point-min))
(not (looking-at-p (rx bol (1+ not-newline)
"Unrecognized command: expand"
(lambda (errors)
(flycheck-sanitize-errors (flycheck-increment-error-columns errors)))
((error line-start (file-name) ":" line ":" column ":" (message) line-end))
:modes racket-mode)
(flycheck-define-checker rpm-rpmlint
"A RPM SPEC file syntax checker using rpmlint.
......@@ -4020,6 +4020,12 @@ Why not:
'(4 6 warning "Do not use absolute paths." :checker r-lintr)
'(7 5 error "unexpected end of input" :checker r-lintr))))
(flycheck-ert-def-checker-test racket racket nil
(skip-unless (funcall (flycheck-checker-get 'racket 'predicate)))
"language/racket.rkt" 'racket-mode
'(4 3 error "read: expected a `)' to close `('" :checker racket)))
(flycheck-ert-def-checker-test rpm-rpmlint rpm nil
"language/rpm.spec" '(sh-mode rpm-spec-mode)
(define listener (tcp-listen 12345))
(let echo-server ()
(define-values (in out) (tcp-accept listener))
(thread (lambda () (copy-port in out)
(close-output-port out))
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