Clojure library for organizing ns form in a way that whitespace and comments are preserved.
Rules to apply are fully customizable; the default implementation
:require, :require-macros, :use and :use-macros libspecs alphabetically and removes duplicates:import class names alphabetically and removes duplicates:exclude, :only, :refer, :refer-macros and :rename options alphabetically and removes duplicatesAlso available as Leiningen plugin: lein-nsorg
Dependency information:
[nsorg "0.2.0"]
(require '[nsorg.core :as nsorg])
(println (nsorg/rewrite-ns-form "
(ns foo
;; use
(:use [a.c :only [y z x z]]
a
[a.b]
))
"))
(ns foo
;; use
(:use a
[a.b]
[a.c :only [x y z]]
))
Check API documentation for more details.
:refer, :load or :gen-class clausesCopyright © 2018 Immo Heikkinen
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |