-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Quick overview of linting tools I use for my Clojure projects, Joker and Eastwood. Joker is simpler to use, thanks to the clojure-lint layer. It does use an external binary, which I placed on my existing executable path. Joker uses a sub-set of Clojure so it may give a few inaccuracies, these are usually false positives on things like macros. There is a way to tell joker to ignore certain symbols though. Still a bit of work to do on these sections, but they cover the basics.
- Loading branch information
1 parent
3486561
commit 5106f52
Showing
6 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Eastwood | ||
|
||
> #### TODO::Work in progress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Linting - automatically highlighting code issues | ||
|
||
> #### TODO::Work in progress | ||
Common linting tools includes | ||
|
||
* [Joker](https://github.com/candid82/joker) - standalone tool, simple to use, not Clojure complete though. | ||
* [Eastwood](https://github.com/jonase/eastwood) - leiningen plugin | ||
* [squiggly-clojure](https://github.com/clojure-emacs/squiggly-clojure) to run Eastwood automatically from Emacs (repeatedly reloads your code in the repl, so need to ensure your code is happy with that). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Joker | ||
|
||
> ####TODO::Work in progress | ||
To use Joker with Spacemacs you should | ||
* Install Joker | ||
* Ensure Joker is on the executable path in Emacs | ||
* Add `clojure-lint` layer to `.spacemacs` | ||
|
||
|
||
|
||
## Removing false positives | ||
|
||
Create a .joker file in the project root and add the fully qualified name of known macros | ||
|
||
Here's from a small rum project: | ||
|
||
```clojure | ||
{:known-macros [rum.core/defc | ||
rum.core/defcc | ||
rum.core/defcs]} | ||
``` |