Title: Add plugin/extension system for custom error rules
Problem
Contributing patterns requires editing lib/database.json. Teams need a safer, extensible way to add rules.
Proposed change
Support external plugin files or a plugin folder (e.g., .errlens/plugins/*.json) that are loaded at runtime with a simple plugin schema.
Files to add/change
lib/plugin-loader.js (new) - loads and validates plugin files
- update
lib/matcher.js to merge plugin patterns at startup
- add docs/examples in
examples/plugins/
Tasks
- Define plugin schema (name, patterns, priority).
- Load plugins from configured paths and merge with DB.
- Add security note in docs: only load local/trusted plugins.
Acceptance criteria
- Dropping a JSON plugin file results in its patterns being considered in
analyze results.
Labels: enhancement, community
Title: Add plugin/extension system for custom error rules
Problem
Contributing patterns requires editing
lib/database.json. Teams need a safer, extensible way to add rules.Proposed change
Support external plugin files or a plugin folder (e.g.,
.errlens/plugins/*.json) that are loaded at runtime with a simple plugin schema.Files to add/change
lib/plugin-loader.js(new) - loads and validates plugin fileslib/matcher.jsto merge plugin patterns at startupexamples/plugins/Tasks
Acceptance criteria
analyzeresults.Labels: enhancement, community