diff --git a/rules/tools/common.yaml b/rules/tools/common.yaml new file mode 100644 index 0000000..8396562 --- /dev/null +++ b/rules/tools/common.yaml @@ -0,0 +1,89 @@ +- id: git-merge-conflict + name: "Git Merge Conflict" + pattern: "CONFLICT \\\\((content)\\\\): Merge conflict in (?P[^\\\\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[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[^']+)' 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[a-zA-Z_/-]+):(?P[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[^']+)'" + 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 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[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