unused/unused.cabal
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

109 lines
4.1 KiB
Plaintext

name: unused
version: 0.3.0.0
synopsis: A command line tool to identify unused code.
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
category: Development
build-type: Simple
-- extra-source-files:
cabal-version: >=1.10
data-files: data/config.yml
library
hs-source-dirs: src
exposed-modules: Unused.TermSearch
, Unused.TermSearch.Types
, Unused.TermSearch.Internal
, Unused.Parser
, Unused.Types
, Unused.Util
, Unused.Regex
, Unused.Aliases
, Unused.ResponseFilter
, Unused.ResultsClassifier
, Unused.ResultsClassifier.Types
, Unused.ResultsClassifier.Config
, Unused.Grouping
, Unused.Grouping.Internal
, Unused.Grouping.Types
, Unused.LikelihoodCalculator
, Unused.Cache
, Unused.Cache.DirectoryFingerprint
, Unused.Cache.FindArgsFromIgnoredPaths
, Unused.TagsSource
, Unused.CLI
, Unused.CLI.Search
, Unused.CLI.Util
, Unused.CLI.Views
, Unused.CLI.Views.NoResultsFound
, Unused.CLI.Views.AnalysisHeader
, Unused.CLI.Views.MissingTagsFileError
, Unused.CLI.Views.InvalidConfigError
, Unused.CLI.Views.SearchResult
, Unused.CLI.Views.SearchResult.ColumnFormatter
, Unused.CLI.ProgressIndicator
, Unused.CLI.ProgressIndicator.Internal
, Unused.CLI.ProgressIndicator.Types
other-modules: Paths_unused
build-depends: base >= 4.7 && < 5
, process
, containers
, filepath
, directory
, regex-tdfa
, terminal-progress-bar
, ansi-terminal
, unix
, parallel-io
, yaml
, bytestring
, text
, unordered-containers
, cassava
, vector
, mtl
, transformers
ghc-options: -Wall -Werror -O2
default-language: Haskell2010
executable unused
hs-source-dirs: app
main-is: Main.hs
ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Werror -O2
build-depends: base
, unused
, optparse-applicative
, mtl
, transformers
default-language: Haskell2010
test-suite unused-test
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Spec.hs
build-depends: base
, unused
, hspec
, containers
other-modules: Unused.ParserSpec
, Unused.ResponseFilterSpec
, Unused.TypesSpec
, Unused.LikelihoodCalculatorSpec
, Unused.Grouping.InternalSpec
, Unused.TermSearch.InternalSpec
, Unused.UtilSpec
, Unused.Cache.FindArgsFromIgnoredPathsSpec
, Unused.AliasesSpec
, Paths_unused
ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Werror
default-language: Haskell2010
source-repository head
type: git
location: https://github.com/joshuaclayton/unused