File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -129,6 +129,25 @@ Com o ambiente virtual ativo:
129129pytest --cov=src --cov-report=term-missing
130130```
131131
132+ ## Pre-checks antes do commit
133+
134+ Na raiz do repositorio, execute a verificacao de vulnerabilidades com Trivy:
135+
136+ ``` powershell
137+ trivy fs --scanners vuln --format table --dependency-tree .
138+ ```
139+
140+ Dentro da pasta ` source ` , os mesmos checks de qualidade executados pelo CI sao:
141+
142+ ``` powershell
143+ py -3.14 -m isort --check-only --settings-path ./pyproject.toml ./src
144+ py -3.14 -m black --check --config ./pyproject.toml ./src
145+ py -3.14 -m flake8 --toml-config ./pyproject.toml ./src
146+ $env:MYPYPATH = './src'
147+ py -3.14 -m mypy --config-file ./pyproject.toml ./src
148+ py -3.14 -m bandit -c ./pyproject.toml -r ./src
149+ ```
150+
132151Resultado esperado no estado atual do projeto:
133152
134153- testes unitarios do servico
@@ -151,7 +170,7 @@ Configuracao atual:
151170Executar:
152171
153172``` powershell
154- black src tests
173+ black --config pyproject.toml src
155174```
156175
157176### isort
@@ -166,7 +185,7 @@ Configuracao atual:
166185Executar:
167186
168187``` powershell
169- isort src tests
188+ isort --settings-path pyproject.toml src
170189```
171190
172191### mypy
@@ -183,7 +202,7 @@ Configuracao atual:
183202Executar:
184203
185204``` powershell
186- mypy src
205+ mypy --config-file pyproject.toml src
187206```
188207
189208### Instalar ferramentas de qualidade
You can’t perform that action at this time.
0 commit comments