-
Notifications
You must be signed in to change notification settings - Fork 44
/
Makefile
38 lines (25 loc) · 1.32 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
.PHONY: test test-semgrep-rules test-metadata-rules test-core docs
test: test-semgrep-rules test-yara-rules test-metadata-rules test-core test-reporters coverage-report
type-check:
mypy --install-types --non-interactive guarddog
lint:
flake8 guarddog --count --select=E9,F63,F7,F82 --show-source --statistics --exclude tests/analyzer/sourcecode,tests/analyzer/metadata/resources,evaluator/data
flake8 guarddog --count --max-line-length=120 --statistics --exclude tests/analyzer/sourcecode,tests/analyzer/metadata/resources,evaluator/data --ignore=E203,W503
test-semgrep-rules:
semgrep --metrics off --quiet --test --config guarddog/analyzer/sourcecode tests/analyzer/sourcecode
test-yara-rules:
COVERAGE_FILE=.coverage_yara coverage run -m pytest tests/analyzer/sourcecode
test-metadata-rules:
COVERAGE_FILE=.coverage_metadata coverage run -m pytest tests/analyzer/metadata
test-core:
COVERAGE_FILE=.coverage_core coverage run -m pytest tests/core
test-reporters:
COVERAGE_FILE=.coverage_reporters coverage run -m pytest tests/reporters
coverage-report:
coverage combine .coverage_metadata .coverage_core .coverage_reporters
coverage report
docs:
python scripts/generate-rules-docs.py README.md
update-top-pkg-list:
python -m guarddog.analyzer.metadata.npm.typosquatting
python -m guarddog.analyzer.metadata.pypi.typosquatting