mirror of
https://github.com/mandiant/capa.git
synced 2025-12-12 15:49:46 -08:00
move flake8 config to its own config file
This commit is contained in:
16
.github/flake8.ini
vendored
Normal file
16
.github/flake8.ini
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
[flake8]
|
||||
max-line-length = 120
|
||||
|
||||
extend-ignore =
|
||||
# E203: whitespace before ':' (black does this)
|
||||
E203,
|
||||
# F401: `foo` imported but unused (prefer ruff)
|
||||
F401,
|
||||
# F811 Redefinition of unused `foo` (prefer ruff)
|
||||
F811,
|
||||
# E501 line too long (prefer black)
|
||||
E501,
|
||||
# B010 Do not call setattr with a constant attribute value
|
||||
B010,
|
||||
# G200 Logging statement uses exception in arguments
|
||||
G200
|
||||
@@ -62,7 +62,6 @@ repos:
|
||||
hooks:
|
||||
- id: ruff
|
||||
name: ruff
|
||||
# ruff is fast, so run during commit
|
||||
stages: [commit, push]
|
||||
language: system
|
||||
entry: ruff
|
||||
@@ -80,21 +79,12 @@ repos:
|
||||
hooks:
|
||||
- id: flake8
|
||||
name: flake8
|
||||
# flake8 is kinda slow, so only run upon push, or like:
|
||||
#
|
||||
# pre-commit run flake8 --hook-stage push
|
||||
stages: [commit, push]
|
||||
language: system
|
||||
entry: flake8
|
||||
args:
|
||||
- "--max-line-length=120"
|
||||
# E203: whitespace before ':' (black does this)
|
||||
# F401: `foo` imported but unused (prefer ruff)
|
||||
# F811 Redefinition of unused `foo` (prefer ruff)
|
||||
# E501 line too long (prefer black)
|
||||
# B010 Do not call setattr with a constant attribute value
|
||||
# G200 Logging statement uses exception in arguments
|
||||
- "--extend-ignore=E203,F401,F811,E501,B010,G200"
|
||||
- "--config"
|
||||
- ".github/flake8.ini"
|
||||
- "--extend-exclude"
|
||||
- "capa/render/proto/capa_pb2.py"
|
||||
- "capa/"
|
||||
|
||||
Reference in New Issue
Block a user