Add formatting test option
brunocastroibarburu94 opened this issue · comments
I believe that JuliaFormatter can be used as part of the CICD pipeline of production code, we want to put a test indicating that the code submitted for a Merge Request satisfies a style guide.
Would it be possible to have a function that indicates if any file is going to be formatted and if it does it fails, or outputes the number of files that are going to be formatted without actually formatted. Ideally with links to the files and lines that may be affected by the automated formatting.
This is similar to what package black can do in Python.
Perhaps this is already out there but I coudn't find how to use JuliaFormatter or any other tool for that matter for this.
Cheers!
there are some workflows already in a bunch of repos that do exactly this. Off the top of my head I think Trixi.jl folks have this setup
also the SciML repos have this
Superb, for future reference in case anyone else needs it I will leave the link to SciML workflow. Thanks @domluna!