UNPKG

mcp-server-semgrep

Version:

MCP Server for Semgrep Integration - static code analysis with AI

18 lines (17 loc) 469 B
rules: - id: cannot-cache-generators patterns: - pattern-inside: | @functools.lru_cache(...) def $FUNC(...): ... yield ... - pattern: functools.lru_cache(...) message: Generators can only be consumed once, so in most cases, caching them will cause an error when the already-consumed generator is retrieved from cache. languages: - python severity: WARNING metadata: category: correctness technology: [python]