Add incremental manifest-time code quality checks and JS duplicate method detection

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-12-26 21:49:28 +00:00
parent 0ea0341aeb
commit b54484c7ed
32 changed files with 589 additions and 113 deletions

View File

@@ -92,6 +92,28 @@ abstract class CodeQualityRule_Abstract
{
return false;
}
/**
* Whether this rule checks files incrementally or needs cross-file context
*
* This method is only relevant for rules where is_called_during_manifest_scan() = true.
*
* INCREMENTAL (true - default):
* - Rule checks each file independently
* - Only changed files are passed during incremental manifest rebuilds
* - More efficient for per-file validation rules
*
* CROSS-FILE (false):
* - Rule needs to see relationships between files or check the full manifest
* - Runs once per manifest build with access to all files via Manifest::get_all()
* - Use for rules that validate naming across files, check for duplicates, etc.
*
* @return bool True for per-file rules, false for cross-file rules
*/
public function is_incremental(): bool
{
return true;
}
/**
* Get default severity for this rule