malloc47 / how-to-ns

A Clojure linter for Stuart Sierra's how-to-ns standard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how-to-ns

how-to-ns is a Clojure linter (as a Leiningen plugin) for Stuart Sierra's how-to-ns standard.

So far it is somewhat hacky and only has the particular features that I want.

Obtention

Add [com.gfredericks/how-to-ns "0.1.3"] to the :plugins vector of your project.clj or :user profile.

Usage

To lint the ns forms, printing diffs wherever there are problems:

lein how-to-ns check

To fix the ns forms that don't pass the linter:

lein how-to-ns fix

Customization

Add a :how-to-ns entry (to project.clj or the :user profile) with any of the following options:

{:require-docstring?      true
 :sort-clauses?           true
 :allow-refer-all?        false
 :allow-extra-clauses?    false
 :align-clauses?          false
 :import-square-brackets? false}

Things it doesn't do until somebody makes it do them

  • preserve comments or any other irregular whitespace
  • support cljc

License

Copyright © 2016 Gary Fredericks

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

About

A Clojure linter for Stuart Sierra's how-to-ns standard

License:Eclipse Public License 1.0


Languages

Language:Clojure 100.0%