Skip to content

Commit faa6bdb

Browse files
committed
docs: trivy and pre req steps
1 parent 1b60eed commit faa6bdb

1 file changed

Lines changed: 22 additions & 3 deletions

File tree

README.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,25 @@ Com o ambiente virtual ativo:
129129
pytest --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+
132151
Resultado esperado no estado atual do projeto:
133152

134153
- testes unitarios do servico
@@ -151,7 +170,7 @@ Configuracao atual:
151170
Executar:
152171

153172
```powershell
154-
black src tests
173+
black --config pyproject.toml src
155174
```
156175

157176
### isort
@@ -166,7 +185,7 @@ Configuracao atual:
166185
Executar:
167186

168187
```powershell
169-
isort src tests
188+
isort --settings-path pyproject.toml src
170189
```
171190

172191
### mypy
@@ -183,7 +202,7 @@ Configuracao atual:
183202
Executar:
184203

185204
```powershell
186-
mypy src
205+
mypy --config-file pyproject.toml src
187206
```
188207

189208
### Instalar ferramentas de qualidade

0 commit comments

Comments
 (0)