From fa0e34c843c9925dede9a5338d348082e8ae297c Mon Sep 17 00:00:00 2001 From: Joshua Clayton Date: Fri, 29 Apr 2016 05:55:09 -0400 Subject: [PATCH] Add a bit more to the README --- README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/README.md b/README.md index f21596c..86e85c9 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,40 @@ A command line tool in Haskell to identify unused code. +## Using Unused + +`unused` reads from a pipe expecting a series of tokens to search the codebase +for. + +This could be done with `echo`: + +```sh +echo "module\nimport" | unused +``` + +Or pulling in a ctags file: + +```sh +cat .git/tags | cut -f1 | sort -u | unused +``` + +My end goal is to have the latter rolled up into unused itself, so you can +navigate to a directory, run `unused`, and everything works as expected. + +## Building and Compiling + +This project uses Haskell and Stack. + +Once you have these tools installed: + +```sh +stack setup +stack build +``` + +This will generate a binary in `.stack-work/install/**/**/**/bin` that you'll +want to move to somewhere in your `$PATH`. + ## License Copyright 2016 Josh Clayton. See the [LICENSE](LICENSE).