speed47 / spectre-meltdown-checker

Reptar, Downfall, Zenbleed, ZombieLoad, RIDL, Fallout, Foreshadow, Spectre, Meltdown vulnerability/mitigation checker for Linux & BSD
3.85k stars 476 forks source link

Improve code quality by using standard tools to format and analyse for PRs #429

Open thomasmerz opened 2 years ago

thomasmerz commented 2 years ago

Your spectre-meltdown-checker.sh is already shellcheck'ed, but you don't have a GitHub Action to enforce this before a Pull Requests can be merged.

And I have seen, that you are doing some "low-level" / very simple format-checking. I suggest to use shfmt which formats shell programs. This can also be enforced by a GitHub Action before a Pull Request can be merged.

If you @speed47 agree I will make a PR with my suggestion regarding a nice GitHub Action for every push on this script and on every PR.

speed47 commented 2 years ago

Yes, that would be a good idea! You'll probably have to find out which shfmt parameters work best to avoid rewriting the entire script (I don't want to lose all the git blame usefulness), and mainly ensure that future PR just respect the current coding style.

That's also why I always left tabs (I usually use spaces!), because I noticed that too late and didn't want to rewrite the entire git history :)

thomasmerz commented 2 years ago

Challenge accepted 👍🏻 This might take some time, because it's not in a hurry and I'll be looking for some "creative time"…

thomasmerz commented 2 years ago

@speed47 , can you please review my PR #435 and merge if you are satisfied? Thanks a lot 👍

thomasmerz commented 1 year ago

Ping @speed47