Overview
Filtering helps you focus on relevant issues by:- Excluding entire categories of issues (e.g., all unused code warnings)
- Disabling specific analyzers (e.g., deprecated API checks)
- Hiding issues by severity level (e.g., info and hints)
CLI filter options override configuration file settings. If you specify a filter via CLI, the corresponding config file setting is ignored.
Category filtering
Comma-separated list of issue categories to exclude from reports.
Available category presets
unused preset
unused preset
Excludes all unused code warnings:
unused_variableunused_parameterunused_import- Dead code warnings
undefined preset
undefined preset
Excludes all undefined reference warnings:
undefined_variableundefined_methodundefined_classundefined_constantundefined_function
pocketmine preset
pocketmine preset
Excludes PocketMine-MP specific issues:
- Plugin.yml validation errors
- Event handler issues
- API version problems
- Thread safety violations
- And other PocketMine-specific checks
Individual categories
You can also exclude specific individual categories:Configuration file
Inretina.yml:
Analyzer filtering
Comma-separated list of analyzers to disable during analysis.
Available analyzers
PHP file analyzers
PHP file analyzers
- PhpFile - General PHP file structure and syntax
- PHPStan - Advanced static analysis engine
PocketMine-MP core analyzers
PocketMine-MP core analyzers
- PluginYml - Validates plugin.yml structure and content
- MainClass - Checks main plugin class implementation
- EventHandler - Validates event handler methods
- Listener - Checks listener class registration
- Command - Validates command implementations
- Permission - Checks permission definitions
PocketMine-MP advanced analyzers
PocketMine-MP advanced analyzers
- AsyncTask - Detects async task misuse and thread safety issues
- Scheduler - Validates scheduler usage patterns
- Config - Checks configuration file handling
- Resource - Validates resource file access
- DeprecatedApi - Detects usage of deprecated PocketMine-MP APIs
- ThreadSafety - Identifies thread safety violations
Examples
Disable deprecated API warnings:Configuration file
Inretina.yml:
Severity filtering
Comma-separated list of severity levels to exclude from reports.Valid severity levels:
error, warning, info, hintSeverity levels
error
error
Critical issues that will likely cause runtime failures or crashes. These should always be fixed before deployment.Examples:
- Undefined variables or methods
- Type mismatches
- Invalid plugin.yml structure
warning
warning
Issues that may cause unexpected behavior or are considered bad practices.Examples:
- Unused variables
- Missing return types
- Deprecated API usage
info
info
Informational messages about potential improvements or style recommendations.Examples:
- Code style suggestions
- Performance optimization hints
hint
hint
Minor suggestions that may improve code quality but are not critical.Examples:
- Documentation suggestions
- Alternative implementation hints
Examples
Show only errors and warnings:Configuration file
Inretina.yml:
Combining filters
You can combine multiple filter types for precise control:retina.yml:
Filter precedence
CLI options take precedence over configuration file settings:
- CLI filter options (highest priority)
retina.ymlconfiguration file- Default settings (no filters)
Validation
Retina validates filter configurations before running analysis:- Invalid category names will cause an error
- Invalid analyzer names will cause an error
- Invalid severity levels will cause an error
- Typos in preset names will not match and may cause unexpected results
Use cases
Focus on critical errors only
Focus on critical errors only
Ignore legacy code warnings
Ignore legacy code warnings
CI/CD pipeline - errors and warnings only
CI/CD pipeline - errors and warnings only
New plugin development - all checks enabled
New plugin development - all checks enabled
Gradual adoption - start with PocketMine-specific checks
Gradual adoption - start with PocketMine-specific checks