Commit Graph

31 Commits

Author SHA1 Message Date
Joshua Clayton
9b1f3be11d
Deprecate this version of Unused
What?
=====

The new version of Unused lives at https://github.com/unused-code/unused

All future work will occur there.
2020-05-27 22:47:40 -04:00
Joshua Clayton
2446faee64
Update copyright year to 2018 2018-08-28 20:52:52 -04:00
Joshua Clayton
789d91b5d9
Bump years 2017-04-24 14:29:05 -07:00
Joshua Clayton
64f62d0141
Allow for rg in addition to ag
Why?
====

rg is oftentimes faster for searching across a codebase than ag;
however, it's newer and potentially more unfamiliar, so ag still remains
the default.

This is an introduction to supporting rg, but without updating the
Homebrew recipe yet. Given a trial run, I can imagine switching to it as
a default eventually.
2017-04-24 06:37:20 -07:00
Benjamin
9248aa929d
Support Docker builds 2016-11-12 06:19:16 -05:00
Josh Clayton
ab06b67ace Add information about download times to README (#79)
closes #78
2016-11-05 06:57:32 -04:00
Darlene Medeiros
0bf2e1d307 Fix markdown link (#75)
The comment about hasktags, between parentheses, was being interpreted as Exuberant Ctags link.
2016-09-18 15:00:34 -04:00
Joe Grossberg
107d1507bf
more newbie- and intermediate-friendly instructions
Outline ctags usage for developers familiar and unfamiliar with the tool

This introduces a new section to "Troubleshooting" outlining ctags
usage, as well as discussing the merits of a repeatable workflow for git
users.
2016-08-30 06:24:04 -04:00
Sean Collins
8b50f5dd68
Add note about generating tags file 2016-08-18 04:45:04 -04:00
Joshua Clayton
c1492e8cb5
Discuss excluding paths in ctags 2016-07-06 06:44:44 -04:00
Joshua Clayton
e1d6143161
Emphasize developers need to ensure removing code won't break things
Unused is not a tool where you can remove code without verifying
behavior still works, since it's most valuable in dynamic languages like
Ruby, Elixir, JavaScript, etc.
2016-07-02 06:58:46 -04:00
Joshua Clayton
40f0158f4d
Outline common troubleshooting scenarios
Common scenarios right now seem to be:

* Issues with the cache, and specifically find
* Seeing no results when results are expected

This discusses a few different reasons for those issues, and ideas of
how a developer might address them.
2016-07-01 06:35:35 -04:00
Joshua Clayton
fa0a947ca8
Update docs around installation/upgrading 2016-06-26 05:13:28 -04:00
Joshua Clayton
8f424ea0e3
Outline installation via Stack
This documents now to install via Stack, by updating the list of known
packages, ensuring at least lts-6.0, and then installing unused
directly.
2016-06-24 09:22:06 -04:00
Joshua Clayton
9c4f411168 Remove reference to unsupported config matcher 2016-06-11 06:05:29 -04:00
Joshua Clayton
58e219eb2e Allow developer-authored configurations
This enables per-user and per-project configs, located in:

* ~/.unused.yml
* APP_ROOT/.unused.yml

Configurations stack upon each other, not replace; unused provides a
very base config, but additional configurations can be defined.

Per-user configs are best used to suit common types of projects at a
generic level. For example, a developer commonly working in Rails
applications might have a config at ~/.unused.yml for patterns like
Policy objects from Pundit, ActiveModel::Serializers, etc.

Per-project config would be less-generic patterns, ones where re-use
isn't likely or applicable.

See unused's global config:
https://github.com/joshuaclayton/unused/blob/master/data/config.yml

The structure is as follows:

    - name: Rails
      autoLowLikelihood:
        - name: Pundit
          pathStartsWith: app/policies
          pathEndsWith: .rb
          termEndsWith: Policy
          classOrModule: true
        - name: Pundit Helpers
          pathStartsWith: app/policies
          allowedTerms:
            - Scope
            - index?
            - new?
            - create?
            - show?
            - edit?
            - destroy?
            - resolve
    - name: Other Language
      autoLowLikelihood:
        - name: Thing
          pathEndsWith: .ex
          classOrModule: true

Name each item, and include an autoLowLikelihood key with multiple named
matchers. Each matcher can look for various formatting aspects,
including termStartsWith, termEndsWith, pathStartsWith, pathEndsWith,
classOrModule, and allowedTerms.
2016-06-10 06:16:41 -04:00
Joshua Clayton
1b945eba18 Update image to demonstrate usage 2016-05-27 06:10:50 -04:00
Joshua Clayton
e006b9c2dd Fix wording around how unused finds tokens to work with 2016-05-23 05:02:54 -04:00
Joshua Clayton
43edf288e2 Attempt to find and load tags automatically
Why?
====

Frequency of a tool's usage is determined by how easy it is to use the
tool. By having to pipe in ctags files all the time, and not provide any
guidance to the user, this program is merely a toy, since it's hard to
get right, and harder to explore.

This modifies the default behavior to look for a ctags file in a few
common locations, and lets the user choose a custom location if she so
chooses.

Resolves #35
2016-05-22 06:06:09 -04:00
Joshua Clayton
3ff26fceea Try to point people in the right direction better 2016-05-12 06:40:29 -04:00
Joshua Clayton
7d2caa3f2d Outline the recommended way of using Unused 2016-05-12 06:38:48 -04:00
Joshua Clayton
731381a0f8 Discuss what it can be used on 2016-05-12 06:37:30 -04:00
Joshua Clayton
95fc86eaef Include TravisCI build status 2016-05-11 23:24:42 -04:00
Joshua Clayton
a18d921f6a Document installation via Homebrew 2016-05-11 22:32:19 -04:00
Joshua Clayton
19b72c123f Update readme to include information about ag 2016-05-11 11:31:52 -04:00
Joshua Clayton
8d5e13c89e Use sensible defaults for the CLI
Why?
====

By default, people want to see an actionable, comprehensive list without
having to pass any flags into the program.

Previously, to see everything with high likelihood you'd need to provide
`-a --likelihood high`. This commit changes the program so that's the default.

It also introduces a `--all-likelihoods` flag (shorthand is `-a`) to see
everything, so if you want to opt into see it, you can. Finally, this
changes `-a` (to see everything) to `-s` (to see only single
occurrences, which was the previous default).
2016-05-11 11:31:52 -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
c9b4f4cf37 Update README with how to install binary 2016-05-01 04:48:35 -04:00
Joshua Clayton
fa0e34c843 Add a bit more to the README 2016-04-29 05:55:09 -04:00
Joshua Clayton
8931c08f93 Initial 2016-04-28 05:37:06 -04:00