UNPKG

mcp-server-semgrep

Version:

MCP Server for Semgrep Integration - static code analysis with AI

30 lines (29 loc) 760 B
rules: - id: code-after-unconditional-return pattern: | return ... $S message: code after return statement will not be executed languages: [python] severity: WARNING metadata: category: maintainability technology: - python - id: return-not-in-function patterns: - pattern-not-inside: | def $F(...): ... # TODO: first pattern should just automatically include this one - pattern-not-inside: | def $F(...) -> $Y: ... - pattern: return ... message: "`return` only makes sense inside a function" languages: [python] severity: WARNING metadata: category: maintainability technology: - python