Joshua Clayton
86146ad4a4
Update cabal file to reflect proper information
2016-05-11 05:28:01 -04:00
Joshua Clayton
2650e1f040
Improve likelihood calculation and include reasons for evaluation
...
Why?
====
A simple calculation ("yes, this should be removed" or "no, this is
probably fine") is frankly not enough information for someone evaluating
their codebase to understand why we made the decision.
This introduces a removal reason, so a user understands why we ranked it
the way we did, and adds additional logic around a method and its tests
to determine if a method exists and is only being used in the tests (if
so, it should probably be deleted).
This is done with an Occurrances record, which is created for total
files, test code, and non-test code. The test code logic is somewhat
naive but works in most cases. It doesn't ensure a particular directory,
in the case that tests live alongside source code (e.g. Go), and
captures RSpec cases as well.
2016-05-11 05:18:55 -04:00
Joshua Clayton
cbd5af5954
Add notes about the test suite
2016-05-10 21:03:56 -04:00
Joshua Clayton
64cea7b146
Include usage image
2016-05-10 17:24:28 -04:00
Joshua Clayton
4947e54f27
Better manage column formatting
...
Why?
====
Formatting each column requires context on the column, as well as
information on alignment. This extracts the column formatting logic to a
specific formatter.
ColumnFormatter is coupled to the order of columns/data displayed to the
user.
2016-05-10 06:37:31 -04:00
Joshua Clayton
11d35a6263
Hook into interrupt to trigger other behavior
...
Why?
====
Unused hides the cursor and potentially does other things to the window that
may leave it in an odd state. This introduces a hook to run any state
cleanup, including re-enabling the cursor, when a user sends a SIGINT to
the program.
2016-05-10 05:35:28 -04:00
Joshua Clayton
5952306873
Run optimizations
2016-05-09 08:29:09 -04:00
Joshua Clayton
6883fc8e01
Cover all possible RemovalLikelihoods when rendering results
2016-05-09 08:15:54 -04:00
Joshua Clayton
3b627ee1c3
Allow multiple matches with single-occurring appropriate tokens
2016-05-08 22:25:48 -04:00
Joshua Clayton
f7a2e1a287
Add Hspec and tests around parsing
2016-05-08 06:54:34 -04:00
Joshua Clayton
7756359eda
Increase the spinner speed
2016-05-07 16:49:55 -04:00
Joshua Clayton
ba8159f08d
Ignore file and directory patterns
2016-05-07 16:28:41 -04:00
Joshua Clayton
ee1c4cd0f6
Add flag to filter by likelihood
2016-05-07 16:25:54 -04:00
Joshua Clayton
cb6eb12af4
Add switch to display all term results
2016-05-07 16:18:49 -04:00
Joshua Clayton
4fc984ce75
Fully extract parseSearchRunner
2016-05-07 16:07:43 -04:00
Joshua Clayton
9436f733b2
Extract option filtering to separate function
2016-05-07 15:39:09 -04:00
Joshua Clayton
8fe09791c0
Extract updateMatches
2016-05-07 15:10:26 -04:00
Joshua Clayton
95b4e13173
Remove unnecessary additional filter by matching paths
...
This additional filter can be removed as filtering out matches by
matching path already occurs
2016-05-07 14:53:12 -04:00
Joshua Clayton
bfca8cae19
Error on warnings
2016-05-07 06:23:38 -04:00
Joshua Clayton
53bd914fd9
Remove unnecessary dependency on mtl
2016-05-07 06:10:19 -04:00
Joshua Clayton
1f5db58f5e
Move additional functionality out of Types and into separate modules
2016-05-07 06:10:15 -04:00
Joshua Clayton
a924cb99f3
Extract ProgressBar to have a similar interface to Spinner
2016-05-06 21:43:22 -04:00
Joshua Clayton
0f4e056641
Introduce a Spinner when no progress bar is displayed
...
Why?
====
With a spinner in place, there's visual indication that something's
happening.
2016-05-06 17:25:20 -04:00
Joshua Clayton
3a63276834
Pull whitespace handling to each searcher
2016-05-06 17:24:17 -04:00
Joshua Clayton
e895420eb5
Use startProgress with incProgress instead of a state transformer
2016-05-06 11:29:53 -04:00
Joshua Clayton
88a1be8c32
Hide cursor while analysis is being run
2016-05-06 05:24:00 -04:00
Joshua Clayton
4175effffb
hlint suggestions
2016-05-05 18:06:25 -04:00
Joshua Clayton
e34f6951f1
Add optparse-applicative for flags
...
This introduces the optparse-applicative library for parsing out any
subcommands/flags/args. Currently only supports --no-progress (-P).
2016-05-05 17:53:53 -04:00
Joshua Clayton
6781ba1f5b
Move resetScreen out of case statement
2016-05-04 23:01:00 -04:00
Joshua Clayton
dbee79e525
append (++) is not commutative
2016-05-04 22:25:00 -04:00
Joshua Clayton
558c4ed2f4
Remove unnecessary parens
2016-05-04 21:26:01 -04:00
Joshua Clayton
50399ec4b1
Add number of files and number of occurrences
2016-05-04 20:51:41 -04:00
Joshua Clayton
00c239fddb
Don't recalculate metadata on matches when organizing by directory
2016-05-04 06:01:17 -04:00
Joshua Clayton
961585ce6e
Follow naming conventions for record fields
2016-05-03 22:13:01 -04:00
Joshua Clayton
67e52ed017
Initial pass at RemovalLikelihood calculator
2016-05-03 21:41:03 -04:00
Joshua Clayton
02f90fdb7d
Left-align and pad widths for term column
2016-05-03 09:59:06 -04:00
Joshua Clayton
49b7b65b17
Improve output by grouping by directory structure
2016-05-03 05:22:50 -04:00
Joshua Clayton
30b00225f4
TermResults should derive from Show
2016-05-03 05:19:48 -04:00
Joshua Clayton
e64db21f9e
Point-free filter lambdas
2016-05-03 05:17:20 -04:00
Joshua Clayton
f5394e4b36
Clear screen before displaying matches
2016-05-03 05:13:58 -04:00
Joshua Clayton
31a569eef9
Support [] and JavaScript (which uses periods)
2016-05-03 05:05:55 -04:00
Joshua Clayton
3ddf0631a9
Display progress bar when running ag
2016-05-02 06:05:31 -04:00
Joshua Clayton
dcfaa9355e
Refactor in preparation for progress bar
2016-05-02 06:03:26 -04:00
Joshua Clayton
6ee18cf1c9
Extract error printing to separate function
2016-05-01 06:20:47 -04:00
Joshua Clayton
8f5446a414
Move parsing response entirely to Parser
2016-05-01 05:40:30 -04:00
Joshua Clayton
d0fcb42535
Ignore tmp
2016-05-01 05:25:50 -04:00
Joshua Clayton
c9b4f4cf37
Update README with how to install binary
2016-05-01 04:48:35 -04:00
Joshua Clayton
447943f401
Extract aggregate data structure
2016-04-30 09:57:46 -04:00
Joshua Clayton
9f006ffd3c
Filter results to matches with one file and one occurrence
2016-04-30 05:49:04 -04:00
Joshua Clayton
fa0e34c843
Add a bit more to the README
2016-04-29 05:55:09 -04:00