CI: force .ocamlformat files to be up to date

parent e52613b6
......@@ -56,6 +56,7 @@ check_linting:
script:
- src/tooling/lint.sh check.ci
- src/tooling/lint.sh check_scripts
- src/tooling/lint.sh check.ocamlformat
check_python_linting:
<<: *build_definition
......
......@@ -8,6 +8,7 @@ Where <action> can be:
* update.ocamlformat: update all the \`.ocamlformat\` files and
git-commit (requires clean repo).
* check.ocamlformat: check the above does nothing.
* check.dune: check formatting while assuming running under Dune's
rule (\`dune build @runtest_lint\`).
* check.ci: check formatting using git (for GitLabCI's verbose run).
......@@ -89,7 +90,6 @@ update_all_dot_ocamlformats () {
esac
git add "$ofmt"
done
git commit -m 'Update .ocamlformat files'
}
check_with_dune () {
......@@ -146,7 +146,11 @@ files=$(echo "$files" | sed "s/\S\+\.pp\.mli\?\b//g")
case "$action" in
"update.ocamlformat" )
update_all_dot_ocamlformats ;;
update_all_dot_ocamlformats
git commit -m 'Update .ocamlformat files' ;;
"check.ocamlformat" )
update_all_dot_ocamlformats
git diff --name-only HEAD --exit-code ;;
"check.dune" )
check_with_dune $files ;;
"check.ci" )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment