Initial upload: ErrorFix CLI with rule engine and pattern matching
Some checks failed
CI / test (push) Has been cancelled

This commit is contained in:
2026-02-01 03:56:30 +00:00
parent 2662d20369
commit b16aab682c

89
rules/tools/common.yaml Normal file
View File

@@ -0,0 +1,89 @@
- id: git-merge-conflict
name: "Git Merge Conflict"
pattern: "CONFLICT \\\\((content)\\\\): Merge conflict in (?P<file>[^\\\\s]+)"
fix: "Open {file} and resolve the merge conflict. Remove the conflict markers (<<<<<<, =======, >>>>>>>) and keep the desired changes."
description: "A merge conflict was detected"
severity: error
tool: git
tags: [git, merge, conflict]
priority: 10
- id: git-not-a-repository
name: "Git Not a Repository"
pattern: "fatal: not a git repository"
fix: "Run 'git init' to initialize a new repository, or navigate to a directory that is a git repository."
description: "Not in a git repository"
severity: error
tool: git
tags: [git, repository]
priority: 9
- id: git-remote-error
name: "Git Remote Error"
pattern: "fatal: remote (?P<remote>[a-zA-Z_][a-zA-Z0-9_]*) already exists"
fix: "Remove the existing remote with: git remote remove {remote}"
description: "A remote with the same name already exists"
severity: error
tool: git
tags: [git, remote]
priority: 8
- id: docker-container-exists
name: "Docker Container Already Exists"
pattern: "Error response from daemon: Conflict. The container name '(?P<container>[^']+)' is already in use"
fix: "Remove the existing container: docker rm {container} or use a different name."
description: "A container with the same name already exists"
severity: error
tool: docker
tags: [docker, container, name]
priority: 9
- id: docker-image-not-found
name: "Docker Image Not Found"
pattern: "Error: (?P<image>[a-zA-Z_/-]+):(?P<tag>[a-zA-Z0-9.-]+) not found"
fix: "Pull the image or build it: docker pull {image}:{tag}"
description: "A Docker image could not be found"
severity: error
tool: docker
tags: [docker, image, pull]
priority: 9
- id: make-target-not-found
name: "Make Target Not Found"
pattern: "make: \\\\*\\\\* No rule to make target '(?P<target>[^']+)'"
fix: "Check if the target exists in your Makefile. Common targets: all, clean, install."
description: "No rule to make the specified target"
severity: error
tool: make
tags: [make, target]
priority: 8
- id: make-command-not-found
name: "Make Command Failed"
pattern: "make: (?P<command>[^']+): (Command not found|No such file or directory)"
fix: "Install the required command or check your PATH environment variable."
description: "A command required by make could not be found"
severity: error
tool: make
tags: [make, command]
priority: 8
- id: npm-package-not-found
name: "NPM Package Not Found"
pattern: "npm ERR! 404 (?P<package>[a-z@/-]+) is not in this registry"
fix: "Check the package name for typos. The package may have been unpublished or renamed."
description: "An NPM package was not found"
severity: error
tool: npm
tags: [npm, package, registry]
priority: 9
- id: npm-missing-script
name: "NPM Missing Script"
pattern: "npm ERR! Missing script: (?P<script>[a-z-]+)"
fix: "Add the script '{script}' to your package.json"
description: "An NPM script is missing from package.json"
severity: error
tool: npm
tags: [npm, script]
priority: 8