forked from panther-labs/panther-analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (36 loc) · 1.26 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
dirs := $(shell ls | egrep 'policies|rules|helpers|models|templates' | xargs)
ci:
pipenv run $(MAKE) lint test
deps:
pipenv sync --dev
deps-update:
pipenv update
global-helpers-unit-test:
pipenv run python global_helpers/*_test.py
lint: lint-pylint lint-fmt
lint-pylint:
pipenv run bandit -r $(dirs) --skip B101 # allow assert statements in tests
pipenv run pylint $(dirs) \
--disable=missing-docstring,duplicate-code,import-error,fixme,consider-iterating-dictionary,global-variable-not-assigned \
--load-plugins=pylint.extensions.mccabe,pylint_print \
--max-line-length=100
lint-fmt:
@echo Checking python file formatting with the black code style checker
pipenv run black --line-length=100 --check $(dirs)
venv:
pipenv sync --dev
pat-update:
pipenv update panther-analysis-tool
fmt:
pipenv run isort --profile=black $(dirs)
pipenv run black --line-length=100 $(dirs)
install:
pipenv sync --dev
test: global-helpers-unit-test
pipenv run panther_analysis_tool test
docker-build:
docker build -t panther-analysis .
docker-test:
docker run --mount "type=bind,source=${CURDIR},target=/home/panther-analysis" panther-analysis make test
docker-lint:
docker run --mount "type=bind,source=${CURDIR},target=/home/panther-analysis" panther-analysis make lint