Skip to content

tests: linters: log a bit more info #53

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

Merged
merged 3 commits into from
Jun 9, 2025

Conversation

matttbe
Copy link
Member

@matttbe matttbe commented Jun 9, 2025

When looking at the logs to make sure everything was working as expected, I thought it would be useful to add a bit more info in the logs:

  • the linter versions: the output can change depending on the version + exit early with an error in case of problem
  • shellcheck: log when a file is (still) shellcheck compliant
  • shellcheck: print the full path instead of only the SHA or the base name using a hack by looking at the linter output.

@matttbe matttbe requested a review from kuba-moo June 9, 2025 08:57
matttbe added 3 commits June 9, 2025 11:00
The linters might show different results depending on the version.

Then, it looks interesting to print these versions to help people
reproducing issues on their side.

If there is an issue to print the version, exit with an error: this will
also help to identify if the linter is missing or if there is something
wrong with it.

Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
To be clearer and to make sure the script is working properly.

Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
It is clearer, and helpful when multiple files have the same base name.

Even more when we only have the SHA to print.

To get that, we can simply use an associative array variable.

While at it, move some code out of the sub-shells, the same way before
and after the patch, to only use these sub-shells when changing
directories.

Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
@kuba-moo
Copy link
Contributor

kuba-moo commented Jun 9, 2025

Thanks!

@kuba-moo kuba-moo merged commit 136a113 into linux-netdev:main Jun 9, 2025
1 check passed
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