Setup pre-commit code quality gate
A source code check should be implemented to analyze quality and complexity at the pre-commit stage. It should be integrated in the Gitlab CI with its own runner and write the results to an artifact.
Steps
-
Initial commit with suggested hooks implemented run on entire code -
Assess revealed issues from report and fix them -> erroneous commits should not be blocked -
Merge clean branch to main -> erroneous commits should be blocked and checks should only run on changed files
This will use the pre-commit package.
Edited by Jennifer Lisa Wenzel