ci: format TOML files using taplo and enforced CI formatting
Pull Request Checklist
Please confirm the following before requesting review:
- [X] I have disclosed my use of AI in the body of this PR.
- [X] I have read CONTRIBUTING.md and rebased my branch to produce hygienic commits.
In this PR, I have used ChatGPT to research available formatting tools, compared them and identified best fit for this issue #1016
The PR aims to close #1016 by formatting and sorting the TOML files in the repository and introduced a check on CI to enforce formatting. taplo is used for this and ensured consistent whitespace, indentation, and ordering across all TOML files.
Added to the GitHub Actions workflow to run taplo format --check on pull requests and pushes to main. This will ensure future PRs don’t introduce formatting inconsistencies in TOML files.
Pull Request Test Coverage Report for Build 17336950193
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
Details
- 0 of 0 changed or added relevant lines in 0 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage remained the same at 85.916%
| Totals | |
|---|---|
| Change from base Build 17332008623: | 0.0% |
| Covered Lines: | 8168 |
| Relevant Lines: | 9507 |
💛 - Coveralls
this will probably generate conflicts for some other PRs, to help merge this with minimum friction please also split it into two commits, one to apply the formatting, which includes the precise command to run (look into bitcoin core's scripted diffs for a standard way to do this), and then the small commit to enforce. this way rebasing it can be automated to avoid conflicts (by replacing the pick abc123, the formatting commit, with an exec taplo format $( git ls-files | grep '\.toml$' ) && git commit -a -C abc123)
There are some unintended changes caused in some rust files. I will undo then and improve the commits asap
see https://github.com/jonatack/bitcoin-development/blob/master/scripted-diffs.md for a description, it just makes it easier to verify that large diffs do exactly what they are supposed to
the first one is not a scripted diff as it can't be recreated by just running the command, if i switch to it reset all the toml files to be as they were in the previous commit apart from the taplo.toml file that is introduced, i still can't reproduce the diff exactly since there is some reordering presumably by cargo sort
sorry to be a stickler about this but there are multiple PRs that are already open that change dependencies and therefore will conflict with this PR, to avoid blocking those PRs i prefer if we wait with merging this one, making it really a scripted diff means it's trivial to rebase this commit without having to deal with conflicts when it's time to do so
if you prefer i could do this for you and rebase it when it's time to merge this (i could also add the flake stuff)
Sure @nothingmuch Thank you
Couple weeks without activity on this PR. @Cyber-Lord / @nothingmuch Are you still planning on working on this?
This PR was effectively folded into #1221... Thanks @Cyber-Lord and sorry for taking so long to merge your changes