Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joelittlejohn/lein-project-clean
A lein plugin to tidy/refactor source files in a project via refactor-nrepl middleware
https://github.com/joelittlejohn/lein-project-clean
clojure lein lein-plugin nrepl refactoring
Last synced: 2 months ago
JSON representation
A lein plugin to tidy/refactor source files in a project via refactor-nrepl middleware
- Host: GitHub
- URL: https://github.com/joelittlejohn/lein-project-clean
- Owner: joelittlejohn
- License: epl-1.0
- Created: 2016-11-16T00:47:55.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-12T10:10:47.000Z (over 6 years ago)
- Last Synced: 2024-10-07T17:36:47.157Z (3 months ago)
- Topics: clojure, lein, lein-plugin, nrepl, refactoring
- Language: Clojure
- Size: 14.6 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lein-project-clean
A lein plugin to tidy/refactor source files in a project via refactor-nrepl middleware. This plugin uses refactor-nrepl's library of refactorings and Yannick Scherer's excellent [rewrite-clj](https://github.com/xsc/rewrite-clj).
## Usage
Put
![](https://clojars.org/lein-project-clean/latest-version.svg)
into the `:plugins` vector of your `:user` profile.
In a project you want to clean:
$ lein project-clean
## Project clean-up tasks that this plugin runs
* Clean ns declarations in all Clojure files in source-paths and test-paths (sort, standardise and remove redundant 'requires', see [refactor-nrepl's clean-ns](https://github.com/clojure-emacs/refactor-nrepl/blob/a9d5dcf20e9657fa8afd7ffd609ff6c284ad893a/src/refactor_nrepl/ns/clean_ns.clj))
## Todo
* Allow config options to be supplied, e.g. whether to use the prefix form
* Add a 'dry run' mode that doesn't rewrite files
* Add more clean-up tasks## License
Copyright © 2016 Joe Littlejohn
Distributed under the Eclipse Public License either version 1.0 or (at
your option) any later version.