Skip to main content
Glama

protolint-mcp

by yoheimuta
rules.go884 B
package config import "github.com/yoheimuta/protolint/internal/stringsutil" // Rules represents the enabled rule set. type Rules struct { NoDefault bool `yaml:"no_default" json:"no_default" toml:"no_default"` AllDefault bool `yaml:"all_default" json:"all_default" toml:"all_default"` Add []string `yaml:"add" json:"add" toml:"add"` Remove []string `yaml:"remove" json:"remove" toml:"remove"` } func (r Rules) shouldSkipRule( ruleID string, defaultRuleIDs []string, ) bool { var ruleIDs []string if !r.NoDefault { ruleIDs = append(ruleIDs, defaultRuleIDs...) } for _, add := range r.Add { ruleIDs = append(ruleIDs, add) } var newRuleIDs []string for _, id := range ruleIDs { if !stringsutil.ContainsStringInSlice(id, r.Remove) { newRuleIDs = append(newRuleIDs, id) } } return !stringsutil.ContainsStringInSlice(ruleID, newRuleIDs) }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yoheimuta/protolint'

If you have feedback or need assistance with the MCP directory API, please join our Discord server