UNPKG

mcp-server-semgrep

Version:

MCP Server for Semgrep Integration - static code analysis with AI

23 lines (22 loc) 623 B
rules: - id: channel-guarded-with-mutex pattern-either: - pattern: | $MUX.Lock() $VALUE <- $CHANNEL $MUX.Unlock() - pattern: | $MUX.Lock() $VALUE = <- $CHANNEL $MUX.Unlock() message: >- Detected a channel guarded with a mutex. Channels already have an internal mutex, so this is unnecessary. Remove the mutex. See https://hackmongo.com/page/golang-antipatterns/#guarded-channel for more information. languages: [go] severity: WARNING metadata: category: best-practice technology: - go