Merge branch 'feat/8-Q2.3'
feat: Add answer for Q2.3 and configure pre-commit with flake8 See merge request Klagarge/mse2425-grp09!12
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -7,3 +7,5 @@ __pycache__/
|
||||
src/.pdm-python
|
||||
src/htmlcov
|
||||
src/.env
|
||||
|
||||
.env
|
||||
|
7
.pre-commit-config.yaml
Normal file
7
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
repos:
|
||||
- repo: https://github.com/pycqa/flake8
|
||||
rev: '6.1.0' # Use the latest stable version
|
||||
hooks:
|
||||
- id: flake8
|
||||
additional_dependencies: []
|
||||
args: [--config=tox.ini] # Use the same config as in CI
|
@@ -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.
|
||||
|
Reference in New Issue
Block a user