Formatting checks in CI are broken

There are a couple of issues with the formatting checks in CI.

I reported the issue already here, but due to the auto-closing it looks like this went unnoticed.

It starts with the bin/check-formatting.sh script expecting a path relative to bin, instead of relative to the working directory. The GitHub action calls the script as if the path was expected relative to the working directory. Consequently, nothing is ever really checked.

Then the next issue is that when the script doesn’t find a file it was supposed to check, it just prints a warning and exits with error code zero. This way the wrong relative paths went unnoticed in CI for a while.

I already put up a PR that fixes both issues.

Once the above PR is merged, all following PRs would have a proper formatting check.

Since this has been broking for a while (probably years), quite a few files without proper formatting have accumulated. Now there should be another GH action that checks all files for each commit on the main branch. Unfortunately, there’s another issue that prevents this from happening: The main branch is assumed to be called master, when it’s in fact called main.

I would suggest the following:

  1. We merge the above PR. It would not affect existing files. Only current (not yet merged) and future PRs would be affected. For them the check would run the way it’s supposed to.
  2. I open another PR that properly formats the currently improperly formatted 300+ files in one commit and in another commit fixes the GH workflow to run on main instead of master.

What do you think?

@vaeng @siebenschlaefer Any comment on this? If something is unclear, please let me know and I will try to explain better!

Sorry, I meant to answer, but was totally occupied with the sqlite track.