feat: adds --test flag in yr fmt
Adds -t/--test flag in yr fmt which returns an error code if formatting made changes on the file.
This feature exists in a few other language formatting tools (jsonnet, terraform, gofmt) which is useful as part of stylistic CI/CD checks
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
Signed the Google CLA, should be ready for a maintainer review, thanks! 👍
In https://github.com/VirusTotal/yara-x/commit/4b0889938df1feff849e6c9cdd4d84ab59eeec86 I made multiple changes to the fmt command. Now it always exits with error code 0 if files didn't change or 1 if otherwise.
Makes sense, thanks for including the feature in your changes. 👍