Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hlint suggestions, update hlint.yaml #6680

Merged
merged 2 commits into from
Sep 13, 2020
Merged

Fix hlint suggestions, update hlint.yaml #6680

merged 2 commits into from
Sep 13, 2020

Conversation

despresc
Copy link
Contributor

Since .hlint.yaml is in the repo, I thought I might fix the suggestions that it gives.

One of these changes is slightly non-trivial, changing

  where
    parseEmptyCell = optional spaces >> return emptyCell <* optional spaces

to

  where
    parseEmptyCell = spaces $> emptyCell

in Readers.LaTeX (line 2190). Since spaces is just the normal parsec one re-exported from Parsing, that should be equivalent.

Most suggestions were redundant brackets. Some required
LambdaCase.

The .hlint.yaml file had a small typo, and didn't ignore camelCase
suggestions in certain modules.
@jgm
Copy link
Owner

jgm commented Sep 12, 2020

I'm pretty impressed that hlint saw that those were equivalent.

@despresc
Copy link
Contributor Author

That was me, actually. hlint gave a different suggestion for that line, and I noticed the redundancy.

@despresc
Copy link
Contributor Author

(That was the only non-hlint thing done, other than adding some modules to "ignore: use camelCase").

Not totally sure why it's failing to build.

@jgm
Copy link
Owner

jgm commented Sep 12, 2020

Build failures are because of warnings (CI uses -Werror for the pandoc package).
For example:


160
src/Text/Pandoc/Readers/LaTeX.hs:34:1: warning: [-Wunused-imports]
161
    The import of ‘<$’ from module ‘Data.Functor’ is redundant
162
   |
163
34 | import Data.Functor (($>), (<$))
164
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

You can look through the build logs if you follow the Details links for the CI.

@despresc
Copy link
Contributor Author

I see, that's a bit earlier in the run. For some reason stack and ghcid aren't reporting that warning to me. Normally I fix them all.

@jgm
Copy link
Owner

jgm commented Sep 13, 2020

You can get different warnings for different compiler versions, so that may be the issue.

@jgm jgm merged commit cae155b into jgm:master Sep 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants