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

Add opam checker #1532

Merged
merged 1 commit into from Jan 8, 2019

Conversation

@marsam
Copy link
Contributor

commented Dec 28, 2018

I've added checker for opam files with https://opam.ocaml.org/doc/man/opam-lint.html

tests

make SELECTOR='(tag checker-opam)' integ
cask exec emacs -Q --batch -L .  -l maint/flycheck-compile.el -f flycheck/batch-byte-compile flycheck.el
cask exec emacs -Q --batch -L .  -l maint/flycheck-compile.el -f flycheck/batch-byte-compile flycheck-ert.el
cask exec emacs -Q --batch -L .  --load test/flycheck-test --load test/run.el -f flycheck-run-tests-main '(and (tag external-tool) (tag checker-opam))'
Running tests on Emacs 26.1, built at 2018-12-19
Running 1 tests (2018-12-28 14:34:23-0500)
   passed  1/1  flycheck-define-checker/opam/default

Ran 1 tests, 1 results as expected (2018-12-28 14:34:25-0500)

@marsam marsam force-pushed the marsam:feature/add-opam-lint-checker branch 2 times, most recently from 6bfcf35 to 2d07ec2 Dec 28, 2018

@cpitclaudel
Copy link
Member

left a comment

Thanks! LGTM. Just two small comments.


.. syntax-checker:: opam

Check Nix with `opam lint`_.

This comment has been minimized.

Copy link
@cpitclaudel

cpitclaudel Jan 6, 2019

Member

Should this say check opam rather than Check Nix?
It would help to also detail what Opam is (Opam configuration files?)

This comment has been minimized.

Copy link
@marsam

marsam Jan 8, 2019

Author Contributor

I missed that 😅 , replaced with "Check Opam configuration files"

See URL `https://opam.ocaml.org/doc/man/opam-lint.html'."
:command ("opam" "lint" "-")
:standard-input t
:error-patterns

This comment has been minimized.

Copy link
@cpitclaudel

cpitclaudel Jan 6, 2019

Member

There seems to be a --json option to opam-lint that produces json output, but it can only write to a file, apparently (and it doesn't seem to write all errors). It might be worth asking the OPAM devs to add a new flag to get json output for all errors.

This comment has been minimized.

Copy link
@marsam

marsam Jan 8, 2019

Author Contributor

I think that --json flag just write a log to a file; the closest issue I could find ocaml/opam#3046

@marsam marsam force-pushed the marsam:feature/add-opam-lint-checker branch from 2d07ec2 to aaab5ce Jan 8, 2019

@cpitclaudel cpitclaudel merged commit 6f14c51 into flycheck:master Jan 8, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details
@cpitclaudel

This comment has been minimized.

Copy link
Member

commented Jan 8, 2019

Great job, thanks a lot!

@marsam marsam deleted the marsam:feature/add-opam-lint-checker branch Jan 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.