hlint icon indicating copy to clipboard operation
hlint copied to clipboard

how to avoid loading defaults ( default hlint.yaml) ?

Open teto opened this issue 3 years ago • 1 comments

I want to run just this config on the CI and nothing else

- flags:
  - default: true
  - name: [defer-type-errors]

when I start hlint, it loads "global flags" and thus I get many warnings I would rather ignore.

➜ hlint -hbuildlib/ci/.hlint.yaml simwork -v
# Initialise of global flags... took 0.00s
# Config of data/hlint.yaml... took 0.11s
# Config of buildlib/ci/.hlint.yaml... took 0.00s

I know it's possible to ignore hints (https://github.com/ndmitchell/hlint#which-hints-are-used) but I would rather not load defaults as well if possible ?

Also I dont understand what --datadir does ? why hlint looks into data/hlint.yaml ? looks like another potential source of interdeterminism (hlint could run fine on my computer but someone else having a data/hlint.yaml would get a different result).

teto avatar Jan 17 '22 16:01 teto

you can disable the groups defined in the default hlint with things like this in your own hlint.yaml there are a few that are baked into the program. i don't know of a way to just say ignore them all. we did have an issue where people had didn't hlint.yaml files in the data dir, but i think this is supposed to be considered part of your hlint install. so it's basically an installation issue equivalent to having the wrong hlint binary

  - group:
      name: default
      enabled: false

  - group:
      name: attoparsec
      enabled: false

  - group:
      name: lens
      enabled: false

dten avatar Feb 04 '22 12:02 dten