Inspection Profiles
Inspection profiles define which checks are performed when analyzing your code.
How Profiles Work
Inspection profiles are XML files that define which code inspections are enabled and their severity levels. JetBrains IDEs use these profiles to determine what issues to report during code analysis.
Creating a Custom Profile
- Open your JetBrains IDE
- Go to Settings → Editor → Inspections
- Configure inspections according to your needs
- Export the profile via Manage → Export
- Save the XML file to your project (e.g., in
.idea/inspectionProfiles/
) - Reference it using the
FORCE_PROFILE_PATH
environment variable
Using a Profile
The MCP server uses inspection profiles in the following way:
// The tool analyzes files with configured profiles
const result = await get_jetbrains_code_inspections({
path: '/path/to/file.ts',
});
Profile Configuration
Important: Automatic profile detection based on file extension has been removed. The system now uses:
- Custom profile specified via
FORCE_PROFILE_PATH
environment variable - Project defaults using the
-e
flag when no profile is specified - No automatic detection - Either provide an explicit profile path or use project defaults
Best Practices
- Consistency: Use the same profile for the entire project
- Performance: Disable unnecessary inspections
- Evolution: Update profiles regularly
- Documentation: Document reasons for specific configurations
Environment Variable Configuration
You can control profile behavior with these environment variables:
FORCE_PROFILE_PATH
: Force a specific inspection profile pathEXCLUDE_INSPECTIONS
: Comma-separated inspection codes to excludeONLY_INSPECTIONS
: Comma-separated inspection codes to include only
Example:
export EXCLUDE_INSPECTIONS="SpellCheckingInspection,TodoComment"
export ONLY_INSPECTIONS="TypeScriptValidateTypes,UnusedDeclaration"