-
Notifications
You must be signed in to change notification settings - Fork 43
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: improve linting #580
ci: improve linting #580
Conversation
828e817
to
9824a55
Compare
Rewrote the whole thing, main commit:
|
How slow you ask? ~4 minutes without |
1263590
to
ea22cc1
Compare
It does make it easier to zero-in on the problematic part, without being flooded with all the traces. And avoid the need GA horrible slow search mechanism. I agree that it would be better if there was a way to create already opened groups (for those containing errors). Let's see if annotation created by problem matchers can help (but there's a stupidly low limit of 10 annotations max in the summary…). |
But the summary is showing more than 10… Maybe 10 errors and 10 warnings? But if you look at the PR diff, there are some annotations there, now! |
There are definitively more than 10 warnings in the log, so yeah, 10 max annotations for each type in the summary. |
I was going to say adding problem matchers to the lint check on koreader & koreader-base would be nice too, but I remembered we're using CircleCI. :P |
d034734
to
d4efaaa
Compare
I suppose they could still be helpful in time, and in any case the collapsing (and slow search) aren't an issue when running the lint locally. What do you think @poire-z? |
No annotation for |
PS typo in the first commit message: "may brake" (break) |
.github/workflows/build.yml
Outdated
@@ -35,7 +35,10 @@ jobs: | |||
sudo dpkg -i *.deb | |||
|
|||
- name: Checkout | |||
uses: actions/checkout@v2 | |||
uses: actions/checkout@v4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not really clear to me why that dependabot thing automatically shows up in some repos and has to be explicitly set up in others.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To receive Dependabot alerts, you must first enable Dependabot alerts in this repository’s settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like back in 2022 it just showed up out of the blue without being (explicitly) enabled on for example repos with a requirements.txt (i.e., Python).
But anyway, my implicit point was provided that thing is set to open its trap at most once a week it could keep an eye on trivialities like the version of the checkout action.
D'oh! /o\ |
d4efaaa
to
0e33c4c
Compare
It does not look like clicking on the annotation link to the workflow log get you to the line that created the annotation (in the PR diff). And there's another 10 max limit there too. ;( |
I have to say I'm somewhat surprised they'd even add that. But presumably it's different for paying customers. |
I probably won't install and run any lint stuff, so I'll be using Github/CircleCI CIs to check how I did :) Does this mean that ALL our warnings are resolved ?! And any new one shouted by CI will be to solve ? Do all/most warnings get some |
Previously, the exit codes of clang-tidy / cppcheck were ignored, so the workflow would fail only on linting the hyphenation patterns or CSS files. Annotations don't fail the workflow, a non-zero exit code by one of the linters does. So this warning in #582 for example would not fail the job. With cppcheck, some warnings still result in a non-zero exit code, which is the case with the remaining failures. Those will have to be addressed. It's similar zlib related code in all 3 instances (in |
Good to go ? Or still working on it? |
This one is ready. |
Or should we wait until the PR that fixes the warnings is ready ? Seeing the CI failure just below? |
I think it's better to merge this now, since that's the whole point: improve linting. And then fix the CI failures in subsequent PR(s). |
You'll be ready soon with your other PR ? Otherwise, we'll keep getting failures, and it will be hard to notice that any other new PR introduce some new ones or bugs because of the noise. |
Let's wait a little then, I want to address your comments about asserts. |
0e33c4c
to
f579333
Compare
I've added This can be merged. |
A little git rebase with my date update & sleep trick to update the commits from Jul 23 to 28 svp ? |
- fix cppcheck & clang-tidy configurations to avoid parsing, processing, and/or spurious errors. - parallelize all checks to speed up linting (which is much slower now that cppcheck & clang-tidy can actually do their jobs). - always lint all files (we care about), instead of trying to determine what changed: even if a source file, say `crengine/src/lvtinydom.cpp`, was not changed in a PR, some change to included headers may break something that could be detected by one of the checks. - plus colors, groups and error annotations on Github Actions!
f579333
to
5521d18
Compare
Done. |
Cf. #579 (comment).
This change is