feat: Add answer for Q2.3 and configure pre-commit with flake8

Signed-off-by: Klagarge <remi@heredero.ch>
This commit is contained in:
2025-04-13 13:58:20 +02:00
parent 5c7bbac1c5
commit b3f3ce0b16
3 changed files with 12 additions and 0 deletions

View File

@@ -9,3 +9,6 @@
# Answers - Part 2
## Q2.1
Solution is to add a `rule` section to add condition to trigger the pipeline. It's what is implemented for the `docker-build` job. Another option is to use an `only` section to trigger the pipeline only if the change is made in a specific branch. It's what is implemented for the `pages` job.
## Q2.3
We can use a pre-commit that runs the linter before committing. This ensures that the code is linted before it is committed, which can help catch errors and improve code quality. However, this approach can be time-consuming and may require additional setup.