Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .deepsource/analyzer/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
build:
cp -r ../../. /app
apk add py-pip
apk add python3-dev py-pip build-base
# install semgrep
mkdir /toolbox/venv
pip install --target=/toolbox/venv semgrep
ls /toolbox/venv
ls /toolbox/venv/bin
ls /toolbox
ls /macrocode
2 changes: 1 addition & 1 deletion .deepsource/analyzer/analyzer.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = "Django smells"
description = "My custom Django rules, written in semgrep"
analysis_command = "PYTHONPATH=/toolbox/venv:$PYTHONPATH python3 /app/analyze.py"
analysis_command = "PATH=/toolbox/venv/bin:$PATH PYTHONPATH=/toolbox/venv:$PYTHONPATH python3 /app/analyze.py"
visibility = "public"
category = "language"
1 change: 1 addition & 0 deletions .deepsource/analyzer/issues/DJ-001.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ A `count()` call performs a `SELECT COUNT(*)` behind the scenes, so you should a
Check the doc for more reference – https://docs.djangoproject.com/en/3.2/ref/models/querysets/#count
"""
recommended = true
weight = 90
1 change: 1 addition & 0 deletions .deepsource/analyzer/issues/DJ-002.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ Entry.objects.latest('pub_date')
Read more about `latest` here – https://docs.djangoproject.com/en/3.2/ref/models/querysets/#latest
"""
recommended = true
weight = 90
2 changes: 1 addition & 1 deletion analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
files_to_analyze = [filename for filename in get_files(codepath) if filename.endswith(".py")]

analysis_command = [
"semgrep",
"/toolbox/venv/bin/semgrep",
"--json",
"-o",
resultpath,
Expand Down