Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup for flycheck #9

Open
VladimirAlexiev opened this issue Sep 11, 2020 · 0 comments
Open

setup for flycheck #9

VladimirAlexiev opened this issue Sep 11, 2020 · 0 comments

Comments

@VladimirAlexiev
Copy link

Flycheck is a replacement for flymake. Would be good to include this setup:

;; flycheck is a replacement of flymake & smart-compile
;; https://www.masteringemacs.org/article/spotlight-flycheck-a-flymake-replacement

(require 'flycheck)
(flycheck-define-checker rnc-jing
  "RNC syntax checker using jing.
Home: https://github.com/relaxng/jing-trang (was https://jing-trang.googlecode.com).
Binary: https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/jing-trang/jing-20091111.zip.
Manual: https://relaxng.org/jclark/jing.html"
  :command ("java"
            "-Xss8M" ; increase stack size to 8M, else get
            ;; Exception in thread "main" java.lang.StackOverflowError
            ;; at com.thaiopensource.relaxng.pattern.BinaryPattern.checkRecursion(BinaryPattern.java:16)
            "-jar" "c:/prog/jing-20091111/bin/jing.jar"
            "-c" ; RelaxNG Compact
            "-i" ; else any xsd:ID element returns error
            ;; `a "data" or "value" pattern with non-null ID-type must occur as the child of an "attribute" pattern`,
            ;; see http://blog.jclark.com/2009/01/relax-ng-and-xmlid.html 
            source)
  :error-patterns
  ((error line-start (file-name) ":" line ":" column ": " (or "error" "fatal") ": " (message) line-end)
   (error "fatal" ":" (message) line-end)
   (info line-start (file-name) ":" line ":" column ": " (message) line-end))
  :modes rnc-mode)
(add-to-list 'flycheck-checkers 'rnc-jing)

And then disable flymake, see next issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant