@@ -409,9 +409,9 @@ images:
409
409
# 🔍 LINTING & STATIC ANALYSIS
410
410
# =============================================================================
411
411
# help: 🔍 LINTING & STATIC ANALYSIS
412
- # help: TARGET=<path> - Override default target (mcpgateway tests )
412
+ # help: TARGET=<path> - Override default target (mcpgateway)
413
413
# help: Usage Examples:
414
- # help: make lint - Run all linters on default targets (mcpgateway tests )
414
+ # help: make lint - Run all linters on default targets (mcpgateway)
415
415
# help: make lint TARGET=myfile.py - Run file-aware linters on specific file
416
416
# help: make lint myfile.py - Run file-aware linters on a file (shortcut)
417
417
# help: make lint-quick myfile.py - Fast linters only (ruff, black, isort)
@@ -452,7 +452,7 @@ images:
452
452
# help: vulture - Dead code detection
453
453
454
454
# Allow specific file/directory targeting
455
- DEFAULT_TARGETS := mcpgateway tests
455
+ DEFAULT_TARGETS := mcpgateway
456
456
TARGET ?= $(DEFAULT_TARGETS )
457
457
458
458
# Add dummy targets for file arguments passed to lint commands only
@@ -3660,14 +3660,14 @@ semgrep: ## 🔍 Security patterns & anti-patterns
3660
3660
@test -d " $( VENV_DIR) " || $(MAKE ) venv
3661
3661
@/bin/bash -c " source $( VENV_DIR) /bin/activate && \
3662
3662
python3 -m pip install -q semgrep && \
3663
- $(VENV_DIR ) /bin/semgrep --config=auto mcpgateway tests --exclude-rule python.lang.compatibility.python37.python37-compatibility-importlib2 || true"
3663
+ $(VENV_DIR ) /bin/semgrep --config=auto $( TARGET ) --exclude-rule python.lang.compatibility.python37.python37-compatibility-importlib2 || true"
3664
3664
3665
3665
dodgy : # # 🔐 Suspicious code patterns
3666
3666
@echo " 🔐 dodgy - scanning for hardcoded secrets..."
3667
3667
@test -d " $( VENV_DIR) " || $(MAKE ) venv
3668
3668
@/bin/bash -c " source $( VENV_DIR) /bin/activate && \
3669
3669
python3 -m pip install -q dodgy && \
3670
- $(VENV_DIR ) /bin/dodgy mcpgateway tests || true"
3670
+ $(VENV_DIR ) /bin/dodgy $( TARGET ) || true"
3671
3671
3672
3672
dlint : # # 📏 Python best practices
3673
3673
@echo " 📏 dlint - checking Python best practices..."
@@ -3681,8 +3681,8 @@ pyupgrade: ## ⬆️ Upgrade Python syntax
3681
3681
@test -d " $( VENV_DIR) " || $(MAKE ) venv
3682
3682
@/bin/bash -c " source $( VENV_DIR) /bin/activate && \
3683
3683
python3 -m pip install -q pyupgrade && \
3684
- find mcpgateway tests -name ' *.py' -exec $(VENV_DIR ) /bin/pyupgrade --py312-plus --diff {} + || true"
3685
- @echo " 💡 To apply changes, run: find mcpgateway tests -name '*.py' -exec $( VENV_DIR) /bin/pyupgrade --py312-plus {} +"
3684
+ find $( TARGET ) -name ' *.py' -exec $(VENV_DIR ) /bin/pyupgrade --py312-plus --diff {} + || true"
3685
+ @echo " 💡 To apply changes, run: find $( TARGET ) -name '*.py' -exec $( VENV_DIR) /bin/pyupgrade --py312-plus {} +"
3686
3686
3687
3687
interrogate : # # 📝 Docstring coverage
3688
3688
@echo " 📝 interrogate - checking docstring coverage..."
@@ -3804,12 +3804,12 @@ security-report: ## 📊 Generate comprehensive security repo
3804
3804
@echo " ## Code Security Patterns (semgrep)" >> $(DOCS_DIR ) /docs/security/report.md
3805
3805
@/bin/bash -c " source $( VENV_DIR) /bin/activate && \
3806
3806
python3 -m pip install -q semgrep && \
3807
- $(VENV_DIR ) /bin/semgrep --config=auto mcpgateway tests --quiet || true" >> $( DOCS_DIR) /docs/security/report.md 2>&1
3807
+ $(VENV_DIR ) /bin/semgrep --config=auto $( TARGET ) --quiet || true" >> $( DOCS_DIR) /docs/security/report.md 2>&1
3808
3808
@echo " " >> $(DOCS_DIR ) /docs/security/report.md
3809
3809
@echo " ## Suspicious Code Patterns (dodgy)" >> $(DOCS_DIR ) /docs/security/report.md
3810
3810
@/bin/bash -c " source $( VENV_DIR) /bin/activate && \
3811
3811
python3 -m pip install -q dodgy && \
3812
- $(VENV_DIR ) /bin/dodgy mcpgateway tests || true" >> $( DOCS_DIR) /docs/security/report.md 2>&1
3812
+ $(VENV_DIR ) /bin/dodgy $( TARGET ) || true" >> $( DOCS_DIR) /docs/security/report.md 2>&1
3813
3813
@echo " " >> $(DOCS_DIR ) /docs/security/report.md
3814
3814
@echo " ## DevSkim Security Anti-patterns" >> $(DOCS_DIR ) /docs/security/report.md
3815
3815
@if command -v devskim > /dev/null 2>&1 || [ -f " $$ HOME/.dotnet/tools/devskim" ]; then \
@@ -3825,7 +3825,7 @@ security-fix: ## 🔧 Auto-fix security issues where possi
3825
3825
@echo " ➤ Upgrading Python syntax with pyupgrade..."
3826
3826
@/bin/bash -c " source $( VENV_DIR) /bin/activate && \
3827
3827
python3 -m pip install -q pyupgrade && \
3828
- find mcpgateway tests -name ' *.py' -exec $(VENV_DIR ) /bin/pyupgrade --py312-plus {} +"
3828
+ find $( TARGET ) -name ' *.py' -exec $(VENV_DIR ) /bin/pyupgrade --py312-plus {} +"
3829
3829
@echo " ➤ Updating dependencies to latest secure versions..."
3830
3830
@/bin/bash -c " source $( VENV_DIR) /bin/activate && \
3831
3831
python3 -m pip install --upgrade pip setuptools && \
0 commit comments