{"record":{"id":"be5fe280391d15ca","repo":"plandex-ai/plandex","slug":"failed-to-check-if-s-is-ignored-v","errorCode":null,"errorMessage":"failed to check if %s is ignored: %v","messagePattern":"failed to check if (.+?) is ignored: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/cli/lib/context_load.go","lineNumber":220,"sourceCode":"\t\t\ttoLoadMapPaths = uncachedMapPaths\n\t\t\tinputFilePaths = toLoadMapPaths\n\t\t}\n\n\t\tif len(inputFilePaths) > 0 {\n\t\t\tbaseDir := fs.GetBaseDirForFilePaths(inputFilePaths)\n\n\t\t\tpaths, err := fs.GetProjectPaths(baseDir)\n\t\t\tif err != nil {\n\t\t\t\tonErr(fmt.Errorf(\"failed to get project paths: %v\", err))\n\t\t\t}\n\n\t\t\tif !params.ForceSkipIgnore {\n\t\t\t\tvar filteredPaths []string\n\t\t\t\tfor _, inputFilePath := range inputFilePaths {\n\t\t\t\t\tif _, ok := paths.ActivePaths[inputFilePath]; !ok {\n\t\t\t\t\t\tignored, reason, err := fs.IsIgnored(paths, inputFilePath, baseDir)\n\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\tonErr(fmt.Errorf(\"failed to check if %s is ignored: %v\", inputFilePath, err))\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ignored {\n\t\t\t\t\t\t\tignoredPaths[inputFilePath] = reason\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfilteredPaths = append(filteredPaths, inputFilePath)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tinputFilePaths = filteredPaths\n\n\t\t\t}\n\n\t\t\tif params.NamesOnly {\n\t\t\t\t// \"params.NamesOnly\" => we create directory-tree contexts (ContextDirectoryTreeType)\n\t\t\t\t// Partial skipping of subpaths\n\t\t\t\tfor _, inputFilePath := range inputFilePaths {\n\t\t\t\t\tcomposite := strings.Join([]string{string(shared.ContextDirectoryTreeType), inputFilePath}, \"|\")\n\t\t\t\t\tif existsByComposite[composite] != nil {","sourceCodeStart":202,"sourceCodeEnd":238,"githubUrl":"https://github.com/plandex-ai/plandex/blob/e2d772072efadbe41d2946d97d79be55532dbab5/app/cli/lib/context_load.go#L202-L238","documentation":"For input paths not found in paths.ActivePaths, MustLoadContext calls fs.IsIgnored to determine whether ignore rules exclude the file; this error means that ignore check failed for the specific path (the path is interpolated into the message). It aborts the load since ignore status can't be determined.","triggerScenarios":"fs.IsIgnored(paths, inputFilePath, baseDir) returns an error — typically an unreadable or malformed ignore file (.gitignore/.plandexignore) referenced while evaluating the path, or a path/stat error on the file.","commonSituations":"Corrupt or syntactically broken .gitignore lines; ignore file without read permission; loading a path inside a directory the user can't read; symlinks pointing to inaccessible targets.","solutions":["Fix the malformed/unreadable .gitignore or .plandexignore entry implicated in the wrapped error","Check file and directory permissions for the reported path","Remove broken symlinks from the project","Use --skip-ignore/-f to bypass ignore checking if rules are known-good"],"exampleFix":"// before\nignored, reason, err := fs.IsIgnored(paths, inputFilePath, baseDir)\nif err != nil {\n\tonErr(fmt.Errorf(\"failed to check if %s is ignored: %v\", inputFilePath, err))\n}\n// after\nignored, reason, err := fs.IsIgnored(paths, inputFilePath, baseDir)\nif err != nil {\n\tfmt.Fprintf(os.Stderr, \"warning: could not check ignore status for %s: %v; including anyway\\n\", inputFilePath, err)\n\tignored = false\n}","handlingStrategy":"fallback","validationCode":"// pre-check that the ignore files readable in the base dir\nfor _, f := range []string{\".gitignore\", \".plandexignore\"} {\n\tp := filepath.Join(baseDir, f)\n\tif _, err := os.Stat(p); err == nil {\n\t\tif fh, err := os.Open(p); err != nil { return fmt.Errorf(\"%s unreadable: %w\", p, err) } else { fh.Close() }\n\t}\n}","typeGuard":"// Go: distinguish ignore-decision from failure\nfunc isIgnoredSafe(paths *fs.ProjectPaths, path, baseDir string) (ignored bool, ok bool) {\n\tig, reason, err := fs.IsIgnored(paths, path, baseDir)\n\tif err != nil { return false, false }\n\t_ = reason\n\treturn ig, true\n}","tryCatchPattern":"// Go: warn-and-include on ignore-check failure\nignored, reason, err := fs.IsIgnored(paths, inputFilePath, baseDir)\nif err != nil {\n\tlog.Printf(\"warning: ignore check failed for %s (%v); including file\", inputFilePath, err)\n\tfilteredPaths = append(filteredPaths, inputFilePath)\n\tcontinue\n}","preventionTips":["Lint .gitignore/.plandexignore for syntax errors after edits","Remove symlinks pointing to inaccessible targets","Keep ignore files world-readable within the project","Use --skip-ignore only when rules are known-good"],"tags":["filesystem","gitignore","cli","local"],"backgroundTag":"gitignore-parse-failed","analyzedSha":"e2d772072efadbe41d2946d97d79be55532dbab5","analyzedAt":"2026-09-05T20:56:53.631Z","contentChangedAt":"2026-09-05T20:56:53.631Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}