serokell / universum

:milky_way: Prelude written in @Serokell
MIT License
176 stars 26 forks source link

.hlint.yaml is incompatible with lastest hlint / HLS #277

Closed Sorokin-Anton closed 1 year ago

Sorokin-Anton commented 1 year ago

I noticed that after I added hlint rules from .hlint.yaml to my hlint config, there was no hlints in my IDE. Then I checked logs and I've found this:

  Aeson exception:
  Error in $: Error when decoding YAML, Failed to parse <string>:1:21: error: parse error on input
  `(', when parsing:
  Control.Applicative.(<|>)

Looks like hlint 3.5 wants operators without braces in such places, e.g. we should use

- warn: { name: "Use '(<|>)' from Universum"
        , lhs: Control.Applicative.(<|>), rhs: Universum.(<|>) }

instead of

- warn: { name: "Use '(<|>)' from Universum"
        , lhs: (Control.Applicative.<|>), rhs: (Universum.<|>) }

This works well with hlint 3.3.6 too (it's not faqiling and producing this hint in both cases), so I think it's a good idea to update our .hlint.yaml