@codacy/tools-dummy-1
v0.2.0
Published
Dummy tool adapter — reference implementation for Codacy tool adapters
Readme
@codacy/tools-dummy-1
Table of Contents
Overview
Reference implementation of the ToolAdapter contract. Uses the CLI execution strategy to spawn a bundled Node.js script (src/bin/dummy-tool.js) that detects TODO comments, console.log calls, and empty catch blocks in JavaScript/TypeScript files.
Not a real analysis tool — exists solely as a template for building new adapters and as a smoke test for the pipeline.
| Property | Value |
|----------|-------|
| Tool ID | dummy-1 |
| Strategy | CLI (bundled script) |
| Languages | All |
| Binary | node dist/bin/dummy-tool.js |
Patterns
| Pattern ID | Description |
|------------|-------------|
| dummy-1_TODO | TODO comment detected |
| dummy-1_console-log | console.log call |
| dummy-1_empty-catch | Empty catch block |
Updating patterns
This adapter has hardcoded patterns (no patterns.json from the Codacy API). To add a new pattern:
- Add detection logic in
src/bin/dummy-tool.js - Add the pattern ID to the adapter metadata
- Add a test fixture that triggers the new pattern
Development
pnpm build # Builds adapter + copies dummy-tool.js to dist/bin/
pnpm test # Runs all tests