You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This should probably be a separate GHA. The formatter should fail if something is found so the contributor can fix it themselves. Several tracks follow that setup. (@BNAndras)
Add a GitHub action that checks the following:
Whether any source files have not been formatted. The current version of odinfmt only writes the correctly formatted file to stdout, or it overwrites the source file if the -w flag is specified. However, diff <(odinfmt $F | perl -pe 'chomp if eof') $F correctly returns a status code of 0 if a file is correctly formatted, or 1 if not. The GHA could check for formatting errors and advise the contributor to run odinfmt on the file (or bin/format-all.sh to fix all source files).
Whether config files are correctly formatted (configlet fmt). This could prompt the contributor to run configlet fmt -u to update the offending files.
The text was updated successfully, but these errors were encountered:
Add a GitHub action that checks the following:
odinfmt
only writes the correctly formatted file tostdout
, or it overwrites the source file if the-w
flag is specified. However,diff <(odinfmt $F | perl -pe 'chomp if eof') $F
correctly returns a status code of 0 if a file is correctly formatted, or 1 if not. The GHA could check for formatting errors and advise the contributor to runodinfmt
on the file (orbin/format-all.sh
to fix all source files).configlet fmt
). This could prompt the contributor to runconfiglet fmt -u
to update the offending files.The text was updated successfully, but these errors were encountered: