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

CI: add hlint workflow #2537

Merged
merged 5 commits into from
Dec 25, 2021

Conversation

Anton-Latukha
Copy link
Collaborator

@Anton-Latukha Anton-Latukha commented Dec 24, 2021

As I understand, CI installs executable & runs it.

HLint gives the same output regardless of the GHC versions, so there is no reason to run it inside GHC matrix. In fact HLint executable installed does not need GHC at all.

@Anton-Latukha
Copy link
Collaborator Author

[skip circleci]

@Anton-Latukha
Copy link
Collaborator Author

Anton-Latukha commented Dec 24, 2021

It is a great moment to do a workflow change in HLint, because currently there are no hints, because all of them were cleared in #2523 which just merged. (& note that I reproduce the scope that old fmt.sh checks in.

For example, after syncing GHC 9.2 PR to master - inside PR there is also: https://github.com/haskell/haskell-language-server/runs/4629194854?check_suite_focus=true no hints under the old way of running workflow.

@Anton-Latukha Anton-Latukha force-pushed the 2021-12-25-add-hlint-workflow branch from 7037565 to 7239dfb Compare December 24, 2021 23:35
Comment on lines 208 to 209
hoverInfo ast = (Just range, prettyNames ++ pTypes)
hoverInfo ast = (Just range, prettyNames ++ [] ++ pTypes)
where
Copy link
Collaborator Author

@Anton-Latukha Anton-Latukha Dec 24, 2021

Choose a reason for hiding this comment

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

Here I specifically produced a Lint suggestion:
Screenshot-2021-12-25-01:54:48

So currently in all controlled files HLint is clean & HLint would show suggestions only in the files that PR chages.

Copy link
Collaborator Author

@Anton-Latukha Anton-Latukha Dec 25, 2021

Choose a reason for hiding this comment

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

Kept this open to show that the workflow works.

@pepeiborra
Copy link
Collaborator

I like this. Will wait for @jneira to share his thoughts and approve.

Also need to add the new workflow to the GitHub PR requirements.

@Anton-Latukha
Copy link
Collaborator Author

Anton-Latukha commented Dec 25, 2021

Of course with availability to use different levels of messaging, the levels for hints can be tuned.

@Anton-Latukha Anton-Latukha force-pushed the 2021-12-25-add-hlint-workflow branch 2 times, most recently from 84ab085 to bf4e6fb Compare December 25, 2021 12:15
Copy link
Member

@jneira jneira left a comment

Choose a reason for hiding this comment

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

great, I like see this in another workflow, as it can be setup and run independently,
thanks!

@jneira jneira added the merge me Label to trigger pull request merge label Dec 25, 2021
@mergify mergify bot merged commit 3e17c4f into haskell:master Dec 25, 2021
@Anton-Latukha Anton-Latukha deleted the 2021-12-25-add-hlint-workflow branch December 25, 2021 18:58
@jneira
Copy link
Member

jneira commented Dec 25, 2021

hlint workflow added to required checks to merge

@Anton-Latukha
Copy link
Collaborator Author

We not see warning suggestions because #2523 covered all warning suggestions which current HLint setup monitors.

Workflow blocks on error severity just as before it was blocking inside test, but now it also presents warning level messages.

It is the same setup, but now information messages are not hidden inside build, but shown in review. Which motivates people to follow even soft linter suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Label to trigger pull request merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants