More rational to use CI_COMMIT_BRANCH and add doc
I propose to use CI_COMMIT_BRANCH instead of CI_DEFAULT_BRANCH. More rational:
CI_COMMIT_BRANCH: "The commit branch name. Available in branch pipelines, including pipelines for the default branch. Not available in merge request pipelines or tag pipelines."
CI_DEFAULT_BRANCH: "The name of the project’s default branch."
https://docs.gitlab.com/ee/ci/variables/predefined_variables.html
If you use the linter in the pipeline itself with CI_COMMIT_BRANCH, by default the "--ref"'s value will be the actual branch, instead of a constant value / default branch / main branch.
Also as --dry-run is pre-requirement to be able to use --ref argument, I added it to the documentation as example.
Thank you and thanks for the possibility to use branches!
Best Regards, Peter