clojure-emacs / squiggly-clojure

Flycheck checker for Clojure, using eastwood and core.typed.
GNU General Public License v3.0
204 stars 25 forks source link

flycheck logs errors on project.clj files #15

Closed tanzoniteblack closed 9 years ago

tanzoniteblack commented 9 years ago

Getting the following errors in project.clj files:

Error from syntax checker clojure-cider-eastwood: Form #[257 \300\301"\207 [format (do (require 'squiggly-clojure.core) (squiggly-clojure.core/check-ew '%s))] 4 

(fn NS)] of checker clojure-cider-eastwood failed: class java.lang.NullPointerException

Presumably this is because in the average project, we don't actually have the lein bits available to compile a project.clj file. Should we consider treating project.clj files specially so we don't have error messages showing up in the minibuffer/Messages every time we make changes to project.clj?

pnf commented 9 years ago

Maybe, but eastwood should probably fail more gracefully. Also, I haven't seen this, nor has anyone else reported it, so it's not every project.clj that fails. Can you verify that it still NPEs when invoked directly from the REPL? If it does, I'm probably going to recommend opening an issue with eastwood, who will probably want to see the actual project.clj.

magnars commented 9 years ago

This happens to me too. Just haven't found the will to report it myself.

pnf commented 9 years ago

Did you try reproducing it squigglessly?


Sent from my VAX-11/780

On Jan 9, 2015, at 14:55, Magnar Sveen notifications@github.com wrote:

This happens to me too. Just haven't found the will to report it myself.

— Reply to this email directly or view it on GitHub.

magnars commented 9 years ago

How would you do that? There's no namespaces that corresponds with project.clj

pnf commented 9 years ago

I see what you mean. Leaving aside the mystery of why I haven't seen the NPE, I've added (clojure-find-ns) to the checker predicate, so flycheck is effectively turned off in project.clj and any other file without a namespace.

magnars commented 9 years ago

Great! :-)