dakrone / lein-bikeshed

A Leiningen plugin designed to tell you your code is bad, and that you should feel bad
176 stars 23 forks source link

*.cljs files are not found #15

Closed BenjaminVanRyseghem closed 10 years ago

BenjaminVanRyseghem commented 10 years ago

To reproduce it, create an empty clj/cljs project

$ lein new cljs-kickoff test

If you then run lein bikeshed -v, the output is:

Checking whether you keep up with your docstrings.
0/4 [0.00%] functions have docstrings.

Methods without docstrings:
#'test.server/-main
#'test.server/app
#'test.server/handler
#'test.server/render-app

If then you remove the src/clj folder, running again the last command gives the ouput:

Checking whether you keep up with your docstrings.
Sorry, I wasn't able to read your source files - #<ArithmeticException java.lang.ArithmeticException: Divide by zero>
dakrone commented 10 years ago

When running the lein command, the kickoff template isn't found, is that a template you installed locally?

BenjaminVanRyseghem commented 10 years ago

I updated my first comment, the template name is cljs-kickoff[1]

[1] https://github.com/konrad-garus/cljs-kickoff

dakrone commented 10 years ago

Pushed a fix for this, thanks for the report!

BenjaminVanRyseghem commented 10 years ago

Thanks. But besides that, no cljs function is found, or?

dakrone commented 10 years ago

Currently cljs files are checked for 80 chars, trailing whitespace, blank lines, and with-var-root, but they aren't checked for docstrings because it requires (require 'namespace), which fails for cljs files when running in the JVM.

An alternative could be added that reads the file without requiring it, but I haven't added it yet.

BenjaminVanRyseghem commented 10 years ago

Ok :)

But in the method count (4 here) the cljs functions are not counted (I will open another ticket ^^)