mcp-server-semgrep
Version:
MCP Server for Semgrep Integration - static code analysis with AI
24 lines (23 loc) • 592 B
YAML
rules:
- id: missing-hash-with-eq
patterns:
- pattern-not-inside: |
class A(...):
...
def __hash__(self):
...
...
def __eq__(self, $O):
...
- pattern: |
class A(...):
...
def __eq__(self, $O): ...
...
message: "Class `$A` has defined `__eq__` which means it should also have defined `__hash__`; "
languages: [python]
severity: WARNING
metadata:
category: best-practice
technology:
- python