Skip to content

Commit

Permalink
Whitespace clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
tomfaulhaber committed Sep 13, 2015
1 parent c271a55 commit bf96032
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/autodoc/autodoc.clj
@@ -1,5 +1,5 @@
(ns autodoc.autodoc
(:use
(:use
[clojure.pprint :only (cl-format)]
[clojure.java.io :only [file make-parents]]
[clojure.tools.namespace :only [find-namespaces-in-dir]]
Expand All @@ -15,7 +15,7 @@

(defn make-doc-dir [] (make-parents (file (params :output-path) "foo")))

(defn build-html
(defn build-html
"Build the documentation (default command)"
[& _]
(make-doc-dir)
Expand All @@ -26,16 +26,16 @@
(let [ns-info (do-collect nil)]
(make-all-pages ns-info)))

(defn sym-to-var [sym]
(defn sym-to-var [sym]
(find-var (symbol "autodoc.autodoc" (name sym))))

(declare commands)

(defn help
"Print this help message"
[& _]
(cl-format true
"Usage: autodoc [params] cmd args~%~%")
(cl-format true
"Usage: autodoc [params] cmd args~%~%")
;; TODO: We should have a fixed width tab (~20t) between the terms below, but something's funky
(cl-format true "Available commands:~%~:{ ~a: ~a~%~}~%"
(for [cmd commands]
Expand All @@ -61,15 +61,15 @@
(if (and (params :root) (> (count (params :source-path)) 0))
(update-in params [:source-path]
#(vec (for [path %]
(if (.startsWith path (params :root))
(if (.startsWith path (params :root))
(.substring path (inc (count (params :root))))
path))))
params))

;;; We really shouldn't be special-casing this!
(defn has-branches? []
(not (let [branches (params :branches)]
(and (== (count branches) 1)
(and (== (count branches) 1)
(nil? (ffirst branches))))))

(defn autodoc
Expand All @@ -85,11 +85,11 @@
(throw (FileNotFoundException. (str "Parameter file \"" f "\" doesn't exist."))))
(params-from-file f (myparams :param-key))))
(merge-params (clean-params myparams))
(if (has-branches?)
(if (has-branches?)
(do
(copy-statics)
(gen-branch-docs))
(do
(do
(when (nil? (params :namespaces-to-document))
(merge-params {:namespaces-to-document
(map
Expand All @@ -106,7 +106,7 @@

(defn -main [& args]
(try
(if-let [[params args] (try
(if-let [[params args] (try
(process-command-line args)
(catch RuntimeException e
(println (.getMessage e))
Expand Down

0 comments on commit bf96032

Please sign in to comment.