MCPcopy Create free account
hub / github.com/Effect-TS/tsgo / IsSkipFile

Method IsSkipFile

internal/directives/parser.go:235–244  ·  view source on GitHub ↗

IsSkipFile returns true if a skip-file directive applies to the given rule. Unlike IsSuppressed, this only considers true file-level skip-file directives.

(ruleName string)

Source from the content-addressed store, hash-verified

233// IsSkipFile returns true if a skip-file directive applies to the given rule.
234// Unlike IsSuppressed, this only considers true file-level skip-file directives.
235func (ds *DirectiveSet) IsSkipFile(ruleName string) bool {
236 ruleLower := strings.ToLower(ruleName)
237 for _, rs := range ds.fileLevel {
238 ruleNameLower := strings.ToLower(rs.Rule)
239 if ruleNameLower == ruleLower || ruleNameLower == "*" {
240 return true
241 }
242 }
243 return false
244}
245
246// GetEffectiveSeverityAndMarkUsed returns the effective severity and marks the directive as used
247// if it affected the result. This is used to track unused directives for warnings.

Calls

no outgoing calls