MCPcopy Create free account
hub / github.com/driangle/taskmd / warnUnknownScope

Function warnUnknownScope

apps/cli/internal/cli/scope_filter.go:29–42  ·  view source on GitHub ↗

warnUnknownScope prints a warning to stderr if the scope pattern doesn't match any configured scope in .taskmd.yaml.

(scope string)

Source from the content-addressed store, hash-verified

27// warnUnknownScope prints a warning to stderr if the scope pattern doesn't match
28// any configured scope in .taskmd.yaml.
29func warnUnknownScope(scope string) {
30 known := loadScopesConfig()
31 if known == nil {
32 return
33 }
34
35 for name := range known {
36 if filter.MatchScope(scope, name) {
37 return
38 }
39 }
40
41 fmt.Fprintf(os.Stderr, "Warning: scope %q does not match any configured scope\n", scope)
42}
43
44// loadScopesConfig reads the scopes map from .taskmd.yaml configuration.
45func loadScopesConfig() map[string]bool {

Callers 1

applyShortcutFiltersFunction · 0.85

Calls 1

loadScopesConfigFunction · 0.85

Tested by

no test coverage detected