2016-04-28 12:37:06 +03:00
|
|
|
name: unused
|
|
|
|
version: 0.1.0.0
|
2016-05-11 12:28:01 +03:00
|
|
|
synopsis: A command line tool to identify unused code.
|
2016-04-28 12:37:06 +03:00
|
|
|
description: Please see README.md
|
|
|
|
homepage: https://github.com/joshuaclayton/unused#readme
|
|
|
|
license: MIT
|
|
|
|
license-file: LICENSE
|
|
|
|
author: Josh Clayton
|
|
|
|
maintainer: sayhi@joshuaclayton.me
|
|
|
|
copyright: 2016 Josh Clayton
|
2016-05-11 12:28:01 +03:00
|
|
|
category: Development
|
2016-04-28 12:37:06 +03:00
|
|
|
build-type: Simple
|
|
|
|
-- extra-source-files:
|
|
|
|
cabal-version: >=1.10
|
|
|
|
|
|
|
|
library
|
|
|
|
hs-source-dirs: src
|
2016-04-29 00:42:58 +03:00
|
|
|
exposed-modules: Unused.TermSearch
|
2016-04-29 05:21:18 +03:00
|
|
|
, Unused.Parser
|
2016-05-12 20:47:32 +03:00
|
|
|
, Unused.Parser.Internal
|
2016-04-29 05:21:18 +03:00
|
|
|
, Unused.Types
|
2016-04-29 16:58:03 +03:00
|
|
|
, Unused.Util
|
2016-05-03 13:41:18 +03:00
|
|
|
, Unused.Regex
|
2016-05-07 12:56:46 +03:00
|
|
|
, Unused.ResponseFilter
|
|
|
|
, Unused.DirectoryGrouping
|
|
|
|
, Unused.LikelihoodCalculator
|
2016-05-05 05:55:09 +03:00
|
|
|
, Unused.CLI
|
|
|
|
, Unused.CLI.Search
|
|
|
|
, Unused.CLI.SearchError
|
|
|
|
, Unused.CLI.SearchResult
|
2016-05-09 16:31:06 +03:00
|
|
|
, Unused.CLI.SearchResult.ColumnFormatter
|
2016-05-05 05:55:09 +03:00
|
|
|
, Unused.CLI.SearchWithProgress
|
|
|
|
, Unused.CLI.SearchWithoutProgress
|
|
|
|
, Unused.CLI.Util
|
2016-05-06 23:11:09 +03:00
|
|
|
, Unused.CLI.Spinner
|
2016-05-07 00:22:27 +03:00
|
|
|
, Unused.CLI.ProgressBar
|
2016-04-28 12:37:06 +03:00
|
|
|
build-depends: base >= 4.7 && < 5
|
2016-04-29 00:42:58 +03:00
|
|
|
, process
|
2016-04-29 05:21:18 +03:00
|
|
|
, parsec
|
2016-04-29 12:28:03 +03:00
|
|
|
, containers
|
2016-04-30 23:05:12 +03:00
|
|
|
, filepath
|
2016-05-03 13:41:18 +03:00
|
|
|
, regex-tdfa
|
2016-05-05 05:55:09 +03:00
|
|
|
, terminal-progress-bar
|
|
|
|
, ansi-terminal
|
2016-05-10 00:45:42 +03:00
|
|
|
, unix
|
2016-05-11 12:32:42 +03:00
|
|
|
ghc-options: -Wall -Werror -O2
|
2016-04-28 12:37:06 +03:00
|
|
|
default-language: Haskell2010
|
|
|
|
|
|
|
|
executable unused
|
|
|
|
hs-source-dirs: app
|
|
|
|
main-is: Main.hs
|
2016-05-09 15:29:09 +03:00
|
|
|
ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Werror -O2
|
2016-04-28 12:37:06 +03:00
|
|
|
build-depends: base
|
|
|
|
, unused
|
2016-05-05 05:55:09 +03:00
|
|
|
, optparse-applicative
|
2016-04-28 12:37:06 +03:00
|
|
|
default-language: Haskell2010
|
|
|
|
|
|
|
|
test-suite unused-test
|
|
|
|
type: exitcode-stdio-1.0
|
|
|
|
hs-source-dirs: test
|
|
|
|
main-is: Spec.hs
|
|
|
|
build-depends: base
|
|
|
|
, unused
|
2016-05-08 13:29:55 +03:00
|
|
|
, hspec
|
|
|
|
, containers
|
|
|
|
other-modules: Unused.ParserSpec
|
2016-05-12 20:47:32 +03:00
|
|
|
, Unused.Parser.InternalSpec
|
2016-05-08 13:29:55 +03:00
|
|
|
, Unused.ResponseFilterSpec
|
|
|
|
, Unused.TypesSpec
|
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-08 15:16:32 +03:00
|
|
|
, Unused.LikelihoodCalculatorSpec
|
2016-05-07 13:23:38 +03:00
|
|
|
ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Werror
|
2016-04-28 12:37:06 +03:00
|
|
|
default-language: Haskell2010
|
|
|
|
|
|
|
|
source-repository head
|
|
|
|
type: git
|
|
|
|
location: https://github.com/joshuaclayton/unused
|