serokell / universum

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

[#279] Fix some HLint rules #280

Closed Sorokin-Anton closed 1 year ago

Sorokin-Anton commented 1 year ago

Description

Problem: As in #277, some of our HLint rules have parenthesized lhs, e.g.

- warn: {lhs: (maybe pass f m), rhs: Universum.whenJust m f}

Such rules are triggering only on parnthisized code, e.g. rule above is not triggering on x = maybe pass f m. Of course, we want to suggest whenJust in this case.

Solution: Remove extra parenthesis in such rules, test this solves issue and is not leading to false reports. Tested using HLint 3.5 (lastest) and 3.3.6

Related issues(s)

Fixed #279

✓ Checklist for your Pull Request

Ideally a PR has all of the checkmarks set.

If something in this list is irrelevant to your PR, you should still set this checkmark indicating that you are sure it is dealt with (be that by irrelevance).

Related changes (conditional)

Stylistic guide (mandatory)