Commit 49e8f999 authored by Grégoire Locqueville's avatar Grégoire Locqueville

Improved weeder.toml

Since Weeder can't deal with TH, we make a guess about what symbols TH
depends on, based on whether they contain underscores and whether they're
in a module named `TH`

Also, we're now properly using using regular expressions.
parent 38ff735d
Pipeline #7131 passed with stages
in 40 minutes and 29 seconds
type-class-roots = true type-class-roots = true
# The elements of the `roots` list are symbols that we're telling Weeder to
# treat as necessary, meaning it will try to flag neither those nor their
# dependencies
roots = [ '^Main\.main$' roots = [ '^Main\.main$'
, '^Paths_.*' , '^Paths_.*'
...@@ -7,13 +11,30 @@ roots = [ '^Main\.main$' ...@@ -7,13 +11,30 @@ roots = [ '^Main\.main$'
# avoid removing something that might have value, but TODO we should # avoid removing something that might have value, but TODO we should
# clarify what the purpose of each is, and whether the main source tree # clarify what the purpose of each is, and whether the main source tree
# is the right place for them (rather than, say, in the tests) # is the right place for them (rather than, say, in the tests)
, 'CLI.FilterTermsAndCooc.testCorpus' , '^CLI\.FilterTermsAndCooc\.testCorpus$'
, 'CLI.FilterTermsAndCooc.testTermList' , '^CLI\.FilterTermsAndCooc\.testTermList$'
# Useful in the REPL. TODO go through each function in this module --- # Useful in the REPL. TODO go through each function in this module ---
# I don't think we need that many variations around `runCmd`? # I don't think we need that many variations around `runCmd`?
, 'Gargantext.API.Dev.*' , '^Gargantext\.API\.Dev\.[^\.]+$'
# This is for debugging the TSV parser in the REPL # This is for debugging the TSV parser in the REPL
, 'Gargantext.API.Ngrams.List.importTsvFile' , '^Gargantext\.API\.Ngrams\.List\.importTsvFile$'
# Template Haskell
# Weeder is not smart enough to know what functions will be used by
# Template Haskell, so we have to add those.
# Rather than explicitly specify all Template Haskell functions,
# we get a first approximation by matching:
# - Names that contain an underscore, to ignore datatype fields
, '.*_.*'
# - Modules named `TH`
, '.+\.TH\.[^\.]+$'
# Then we add the symbols that the previous patterns failed to capture:
, '^Gargantext\.API\.Ngrams\.Types\.add$'
, '^Gargantext\.API\.Ngrams\.Types\.rem$'
] ]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment