Skip to content

Commit 406adc0

Browse files
committed
[Fix #140] Expand the tools section
1 parent 998af55 commit 406adc0

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

README.adoc

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2449,7 +2449,17 @@ core functionality, and
24492449
https://github.com/stuartsierra/reloaded[reloaded] provides leiningen
24502450
integration.
24512451

2452-
== Lint Tools
2452+
== Tools
2453+
2454+
One problem with style guides is that it's often hard to remember all the guidelines
2455+
and to apply them consistently. We're only humans, after all. Fortunately,
2456+
there are a bunch of tools that can do most of the work for us.
2457+
2458+
TIP: It's a great idea run such tools as part of your continuous integration (CI).
2459+
This ensure that all the code in one project is consistent with the style you're
2460+
aiming for.
2461+
2462+
=== Lint Tools
24532463

24542464
There are some lint tools created by the Clojure community that might aid you
24552465
in your endeavor to write idiomatic Clojure code.
@@ -2464,6 +2474,19 @@ function or macro.
24642474
a wide number of discouraged patterns and suggests improvements, based on this
24652475
style guide.
24662476

2477+
=== Code Formatters
2478+
2479+
While most Clojure editors and IDEs can format the code, according to the layout guidelines
2480+
outlined here, it's always handy to have some command-line code formatting tools. There are
2481+
a couple of options for Clojure that do a great job when it comes to formatting the code
2482+
as suggested in this guide:
2483+
2484+
* https://github.com/weavejester/cljfmt[cljfmt]
2485+
* https://github.com/kkinnear/zprint[zprint] (the documentation for configuring it to use the community formatting rules is https://github.com/kkinnear/zprint/blob/master/doc/options/community.md[here])
2486+
2487+
NOTE: When it comes to editors - Emacs's `clojure-mode` by default will format the code exactly as outlined in the guide.
2488+
Other editors might require some configuration tweaking to produce the same results.
2489+
24672490
== History
24682491

24692492
This guide was started in 2013 by https://github.com/bbatsov[Bozhidar Batsov], following the

0 commit comments

Comments
 (0)