Permalink
Browse files

Prepare release 0.0.1

  • Loading branch information...
1 parent 266c8f7 commit dc3f098952c3e508df44b099141bf9936c153f1c @jonase committed Apr 19, 2012
Showing with 35 additions and 30 deletions.
  1. +31 −24 README.md
  2. +2 −2 project.clj
  3. +1 −3 src/eastwood/core.clj
  4. +1 −1 src/leiningen/eastwood.clj
View
55 README.md
@@ -1,11 +1,9 @@
# eastwood - a Clojure lint tool
-**Note:** This tool is not yet usable. It's a work in progress.
-
Eastwood is a clojure lint tool which uses the
[analyze](https://github.com/frenchy64/analyze) library to inspect
-namespaces and report anomalies. Currently it works with projects
-running Clojure 1.3.0 and newer.
+namespaces and report possible problems. Currently it should works
+with projects running Clojure 1.3.0 and newer.
## What's there?
@@ -21,36 +19,45 @@ Eastwood warns when it finds
- misplaced docstrings
- keyword typos
-## How to use?
+## Installation
+
+Eastwood is a leiningen plugin. Add `[jonase/eastwood "0.0.1"]` to
+your `:plugins` vector in your `:user` profile (Leiningen 2) or if you
+are using Leiningen 1:
-In the REPL:
+ $ lein plugin install jonase/eastwood 0.0.1
- > (use 'eastwood.core)
- > (lint-ns 'my.namespace)
+## Usage
-If you want to exclude some linters
+Running
- (lint-ns 'my.namespace
- :exclude [:reflection :unused-private-vars])
+ $ lein eastwood
-If you want to run one (or a few) linters:
+in the root of your project will lint your projects namespaces. You
+can also lint your projects dependencies:
- (lint-ns 'my.namespace :only [:misplaced-docstrings])
+ $ lein eastwood '{:namespaces [clojure.set clojure.java.io] :exclude-linters [:unused-fn-args]}'
+ == Linting clojure.set ==
+ {:linter :misplaced-docstring,
+ :msg "Possibly misplaced docstring, #'clojure.set/bubble-max-key",
+ :line 13}
-Available linters include
+ == Linting clojure.java.io ==
+ {:linter :deprecated,
+ :msg
+ "Instance method 'public java.net.URL java.io.File.toURL() throws java.net.MalformedURLException' is deprecated.",
+ :line 50}
- :deprecations
- :reflection
- :misplaced-docstrings
- :unused-locals
- :unused-private-vars
- :naked-use
+Available options are:
-## TODO
+* `:namespaces` Namespaces to lint
+* `:exclude-namespaces` Namespaces to exclude
+* `:linters` Linters to use
+* `:exclude-linters` Linters to exclude
-- Report line numbers.
-- More linters.
-- Lein plugin (will require Leiningen 2.0).
+Note that you can add e.g., `{:eastwood {:exclude-linters
+[:keyword-typos]}}` to `.lein/profiles.clj` to disable linters you
+don't like.
## License
View
4 project.clj
@@ -1,6 +1,6 @@
-(defproject jonase/eastwood "0.0.1-SNAPSHOT"
+(defproject jonase/eastwood "0.0.1"
:description "A Clojure lint tool"
- :dependencies [[analyze "0.1.6-SNAPSHOT"]
+ :dependencies [[analyze "0.1.6"]
[org.clojure/tools.namespace "0.1.2"]
[org.clojars.brenton/google-diff-match-patch "0.1"]]
:eval-in-leiningen true)
View
4 src/eastwood/core.clj
@@ -33,8 +33,7 @@
:deprecations
:unused-fn-args
:keyword-typos
- :unused-private-vars
- :reflection})
+ :unused-private-vars})
(defn- lint [exprs kw]
((linters kw) exprs))
@@ -48,7 +47,6 @@
(println))))
(defn run-eastwood [opts]
- (pp/pprint opts)
(let [namespaces (set (or (:namespaces opts)
(mapcat #(-> % io/file clj-ns/find-namespaces-in-dir)
(:source-paths opts))))
View
2 src/leiningen/eastwood.clj
@@ -5,7 +5,7 @@
(let [project (update-in project
[:dependencies]
conj
- '[jonase/eastwood "0.0.1-SNAPSHOT"])
+ '[jonase/eastwood "0.0.1"])
project (if (contains? project :source-path)
(assoc project :source-paths [(:source-path project)])

0 comments on commit dc3f098

Please sign in to comment.