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

Add support for NumericUnderscores extensions from CLI/config #1435

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

friedbrice
Copy link

Closes #1434

@friedbrice
Copy link
Author

@ndmitchell Is there a different way you'd like me to approach this problem? I'm happy to rework this.

concatMap suggestUnderscore . universeBi
else
const []
where
moduleExtensions = toList (extensions $ modComments modu)
activeExtensions = hlintExtensions modu <> toList moduleExtensions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the toList here is redundant - you've already called toList inside moduleExtensions, right?

src/GHC/All.hs Outdated Show resolved Hide resolved
@friedbrice
Copy link
Author

Thanks, @googleson78! I'll start working on a patch.

@ndmitchell
Copy link
Owner

Sorry it took me so disastrously long to get to this diff - it feel off my radar. I updated the merge conflicts, but didn't test after (did it in the github UI).

I can see how this would apply to people using the API, but as far as I can tell, this won't have any impact on the command line users? Or are you expecting that this will be used through the Haskell IDE?

@friedbrice
Copy link
Author

friedbrice commented Apr 19, 2023

@ndmitchell it works using our .hlint.yaml file. If it doesn't work for CLI uses, then that's an oversight on my part that I need to fix.

Edit to add: Here's a snippet of our .hlint.yaml, and it works as intended.

- arguments:
  - -XQuasiQuotes
  - -XTypeApplications
  - -XNumericUnderscores
  - -XNoForeignFunctionInterface
  - -XOverloadedRecordDot

@friedbrice
Copy link
Author

Sorry I let this sit for so long. Thank y'all.

@parsonsmatt
Copy link

@ndmitchell anything we can do to get this ready to merge?

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.

HLint seems to ignore -XNumericUnderscores
4 participants