-
Notifications
You must be signed in to change notification settings - Fork 196
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
Please, can we bless HLint GitHub action #1311
Comments
& I promise to provide continuous support to the GitHub Action chosen/made & would communicate/work on integrating it into |
Sounds like a great idea! My preference would be to work with whichever existing HLint action is the "best" and get that into Haskell-CI, rather than forking and creating something anew. |
Yes - I agree. |
@rwe, what would you say about it? |
Well, I'd be tickled if anyone finds those useful. (The one in @Anton-Latukha's screenshot is mine, based on the presence of that silly field separator in the message 😊). I created https://github.com/rwe/actions-hlint-setup and https://github.com/rwe/actions-hlint-run primarily as an exercise to gain familiarity with GitHub Actions' capabilities. They were integrated initially over into the https://github.com/agda/agda repository, but I haven't advertised them at all. And although they haven't been updated in about a year—so maybe there are better ways of doing things now?—it's pretty dirt simple and so probably an ok place to start. As you noted, they're already MIT-licensed and so free to use. Let me know how I can help. |
Your action works nicely in HNix for some time. I searched the Internet for HLint automation & your action was the best thing. I have some skin in the game - implemented several GitHub actions myself, for example "composite type" action & a Docker action, but so far not done it in JS way - that is one of "why" I am interested to participate in this. About types of actions:All that is officially said in the difference between them is: https://docs.github.com/en/actions/creating-actions/about-custom-actions & Internet is not healful to analyze what type is most suitable. |
I understood that HLS support of HLint - of course has much more important, but GitHub support also has an important sides to it in maintaining the public projectsHLS guys already did the main work. - HLS loads HLint & people should project recommendations during contributions to projects. But I know a lot of people who turn off linting fully & ... say bad things about it. From a person that written a book on Haskell & understands something about Haskell design - almost all (& hidden ones) HLint rules I find useful, for me not use HLint suggestions is ... strange approach. But that those people turn off HLint does not mean that the project maintainers do not have right to maintain projects - they separately have own rights & responsibility to control the quality of code. Linting at least reduces the code that is redundant & simplifies it. From my point of view - HLint rules also teach. Especially important thing is that Action is making a soft suggestions to people - which is a subtle detail that in a Wu-Wei manner, as HLS HLint automation also produces huge results for ecosystem. CI HLint done in proper way (& we can supply those defaults) doesn't guards the process, & maintainer does not need to ask the contributor to turn on the linter & force to do something (the art of PR process is how to not force people, while also receive enough to have a good I want to spread the HLint use & so people contribute a lot of different kinds of suggestions to it. |
Thank you every for participating in this. Our dialog produced fruits. Process is moved further upstream, so scope of the process now there ⬆️. |
History context: 1. https://github.com/rwe/actions-hlint-setup 2. ndmitchell/hlint#1311 3. haskell#81 4. current merger of "unrelated repo histories", current branch & further merge request
History context: 1. https://github.com/rwe/actions-hlint-run 2. ndmitchell/hlint#1311 3. haskell#81 4. current merger of "unrelated repo histories", current branch 5. Merge request: haskell#85 ...
Sounds like it would be useful to add a short section in the readme, perhaps under https://github.com/ndmitchell/hlint#running-with-continuous-integration, that says what the recommended HLint is? |
Good idea. Currently, action is stuck in merge limbo for some time. I try to further the agenda & waiting until somebody comes around to work with me on the merging process there. |
FYI, I created a little https://gist.github.com/Profpatsch/9af96a9773fe18825221eb55b4f4fbd5 |
Thanks @Profpatsch. Should that be an output format produced by hlint natively - e.g. |
History context: 1. https://github.com/rwe/actions-hlint-setup 2. ndmitchell/hlint#1311 3. haskell/actions#81 4. current merger of "unrelated repo histories", current branch & further merge request
History context: 1. https://github.com/rwe/actions-hlint-run 2. ndmitchell/hlint#1311 3. haskell/actions#81 4. current merger of "unrelated repo histories", current branch 5. Merge request: haskell/actions#85 ...
History context: 1. https://github.com/rwe/actions-hlint-setup 2. ndmitchell/hlint#1311 3. haskell/actions#81 4. current merger of "unrelated repo histories", current branch & further merge request
History context: 1. https://github.com/rwe/actions-hlint-run 2. ndmitchell/hlint#1311 3. haskell/actions#81 4. current merger of "unrelated repo histories", current branch 5. Merge request: haskell/actions#85 ...
History context: 1. https://github.com/rwe/actions-hlint-setup 2. ndmitchell/hlint#1311 3. haskell/actions#81 4. current merger of "unrelated repo histories", current branch & further merge request
History context: 1. https://github.com/rwe/actions-hlint-run 2. ndmitchell/hlint#1311 3. haskell/actions#81 4. current merger of "unrelated repo histories", current branch 5. Merge request: haskell/actions#85 ...
In Open Source projects, the main CI pass for HLint is
Haskell-CI
.Rarely do I see HLint configured in the projects CI, especially as a separate workflow.
The main path I see CIs use HLint is through
Haskell-CI
autogeneration.The
Haskell-CI
autogeneration has a problem - it generates only 1 workflow. And that workflow installs & runs HLint in a manual way internally inside the workflow. That is a primitive approach that:has severe limitations
Workflow gets forked into builds through internal build matrix. So
ci.yml
runs N, in big projects - ~10 times, for example for every GHC-version x platform. And that means for every of 10 builds - the HLint set up is downloaded & run & then run HLint runs 10 times per commit push.As recently in HLS - the CI stops all-together for all PRs, because build nodes spamming the same actions (as there ~10 times per commit push) - some service metric quotas somewhere are hit & providers block further requests - which blocks all CI builds for everybody in the project. On quotas - Travis & Docker Hub & Nix installation had networking disconnects & addresses unreachable, GitHub & Hackage & free-provided CDNs are also - no different, quotas are hit from time to time during proactive development, & I think we must preserve the free lunch for projects & the bandwidth of Hackage & especially when doing that is more robust & effective.
Additionally - afaik
Haskell-CI
currently does not expose the HLint suggestions into the interface of a PR review process - soHLint
runs are disjointed from review processes. Either HLint silently suggests stuff inside the build logs with green status, or can gets configured to throw exit code & aborts the whole build/CI workflow because of 1 code suggestion, it is "either" - because GitHub CI provides only 2 build states - green or red - there is no orange/yellow-middle states or optional checks in it.The proper way of providing the HLint into CI - would be suiting of HLint setup for particular CIs.
Currently, there is no official way of providing HLint into GitHub CI, - except for
curl -sSL https://raw.github.com/ndmitchell/hlint/master/misc/run.sh | sh -s .
- which has the exact effects described above.Other ways of using HLint in GitHub CI are not known. There are 3 automations/"actions":
ndmitchell/neil
hlint/.github/workflows/ci.yml
Line 38 in 918d3b9
The last two have project patch review integration, so CI provides information in patch review:
^ I gradually discourage usage of concrete
[]
type for singletons in the HNix project, so the migrations of the codebase to the proper container types for stuff would be easier.But both of those automations are pretty dormant projects & unofficial ones. It is hard to automate
Haskell-CI
for every particular platform, but if the platform has standard automations for CI workflows - it can be automated easily:Haskell-CI
would only need to create a separate file as simple as this workflow, and HLint is cached over all runs, & it would run once per git push & provide patch review information.Plans upon plans:
Haskell-CI
can standardize on that action for GitHub....
it gets easier for `Haskell-CI` to maintain the GitHub automation, all GitHub Haskell projects get faster & nonblocking HLint automation that helps contributors & maintainers with review information, as new shiny easy automation it which gets picked-up by maintainers - the quality of code improves, the coding styles improve:
Of course, everyone tunes HLint to the project, we just try to provide an easy time for us & everyone with it.
What do the project authors think about this?
The text was updated successfully, but these errors were encountered: