Update docs for 0.1.0
This commit is contained in:
parent
575b64a599
commit
804e8bccf2
1 changed files with 20 additions and 7 deletions
27
README.md
27
README.md
|
@ -4,9 +4,9 @@
|
||||||
|
|
||||||
*There's a function for that!*
|
*There's a function for that!*
|
||||||
|
|
||||||
`kibit` is a static code analyzer for Clojure. It uses
|
`kibit` is a static code analyzer for Clojure, ClojureScript, [cljx](https://github.com/lynaghk/cljx)
|
||||||
[`core.logic`](https://github.com/clojure/core.logic) to search for
|
and other Clojure variants. It uses [`core.logic`](https://github.com/clojure/core.logic)
|
||||||
patterns of code that could be rewritten with a more idiomatic function
|
to search for patterns of code that could be rewritten with a more idiomatic function
|
||||||
or macro. For example if kibit finds the code
|
or macro. For example if kibit finds the code
|
||||||
|
|
||||||
```clojure
|
```clojure
|
||||||
|
@ -29,13 +29,26 @@ profile. Then you can run
|
||||||
|
|
||||||
$ lein kibit
|
$ lein kibit
|
||||||
|
|
||||||
to analyze your namespaces. You can analyze individual files by
|
to analyze a Leiningen project's namespaces. Kibit can analyze individual files or folders (even if there is no Leiningen `project.clj`)
|
||||||
running
|
by running:
|
||||||
|
|
||||||
|
$ lein kibit path/to/some/file.clj #or
|
||||||
|
$ lein kibit path/to/src/
|
||||||
|
|
||||||
$ lein kibit path/to/some/file.clj
|
|
||||||
|
|
||||||
If you want to know how the Kibit rule system works there are some slides available at [http://jonase.github.io/kibit-demo/](http://jonase.github.io/kibit-demo/).
|
If you want to know how the Kibit rule system works there are some slides available at [http://jonase.github.io/kibit-demo/](http://jonase.github.io/kibit-demo/).
|
||||||
|
|
||||||
|
## Exit codes
|
||||||
|
|
||||||
|
If `lein kibit` returns any suggestions to forms then it's exit code will be 1. Otherwise it will exit 0. This can be useful to add in a build step for automated testing.
|
||||||
|
|
||||||
|
|
||||||
|
$lein kibit
|
||||||
|
... suggestions follow
|
||||||
|
|
||||||
|
$echo $?
|
||||||
|
1
|
||||||
|
|
||||||
## Reporters
|
## Reporters
|
||||||
|
|
||||||
Kibit comes with two reporters, the default plaintext reporter, and a GitHub Flavoured Markdown reporter. To specify a reporter, use the `-r` or `--reporter` commandline argument. For example:
|
Kibit comes with two reporters, the default plaintext reporter, and a GitHub Flavoured Markdown reporter. To specify a reporter, use the `-r` or `--reporter` commandline argument. For example:
|
||||||
|
@ -51,7 +64,7 @@ Kibit comes with two reporters, the default plaintext reporter, and a GitHub Fla
|
||||||
```clojure
|
```clojure
|
||||||
(if true (do (println "hi")))
|
(if true (do (println "hi")))
|
||||||
```
|
```
|
||||||
|
|
||||||
----
|
----
|
||||||
##### `test/project/core.clj:32`
|
##### `test/project/core.clj:32`
|
||||||
Consider using:
|
Consider using:
|
||||||
|
|
Loading…
Reference in a new issue