{"record":{"id":"bd30149de749531a","repo":"larksuite/cli","slug":"args-field-s-s-conflicts-with-host-s-flag","errorCode":null,"errorMessage":"Args field %s (--%s) conflicts with host %s flag","messagePattern":"Args field (.+?) \\(--(.+?)\\) conflicts with host (.+?) flag","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"shortcuts/common/typed_external.go","lineNumber":138,"sourceCode":"func validateExternalFlagNamespace(command *compiledCommand) error {\n\treserved := map[string]string{\n\t\t\"as\":           \"identity selection\",\n\t\t\"dry-run\":      \"dry-run execution\",\n\t\t\"flag-name\":    \"schema inspection\",\n\t\t\"format\":       \"output formatting\",\n\t\t\"help\":         \"Cobra help\",\n\t\t\"jq\":           \"output filtering\",\n\t\t\"json\":         \"JSON output shorthand\",\n\t\t\"page-all\":     \"pagination\",\n\t\t\"page-delay\":   \"pagination\",\n\t\t\"page-limit\":   \"pagination\",\n\t\t\"print-schema\": \"schema inspection\",\n\t\t\"profile\":      \"profile selection\",\n\t\t\"yes\":          \"high-risk confirmation\",\n\t}\n\tfor _, field := range command.fields {\n\t\tif role, exists := reserved[field.name]; exists {\n\t\t\treturn fmt.Errorf(\"Args field %s (--%s) conflicts with host %s flag\", field.goName, field.name, role)\n\t\t}\n\t\tfor _, alias := range field.cli.Aliases {\n\t\t\tif role, exists := reserved[alias.Name]; exists {\n\t\t\t\treturn fmt.Errorf(\"Args field %s (--%s) alias --%s conflicts with host %s flag\", field.goName, field.name, alias.Name, role)\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n","sourceCodeStart":120,"sourceCodeEnd":148,"githubUrl":"https://github.com/larksuite/cli/blob/7fd6ef3c07182257ce776cdc5a614e122d5bd4b3/shortcuts/common/typed_external.go#L120-L148","documentation":"validateExternalFlagNamespace: a shortcut Args field mounts a flag whose name is in the host-reserved set (as, dry-run, format, help, jq, json, page-*, print-schema, profile, yes, ...); the reason names which host facility owns the name.","triggerScenarios":"Thrown at shortcuts/common/typed_external.go:138 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Rename the business flag to a non-reserved name"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7fd6ef3c07182257ce776cdc5a614e122d5bd4b3","analyzedAt":"2026-09-04T21:17:44.649Z","contentChangedAt":"2026-09-04T21:17:44.649Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}