Qodana Code Inspector
This skill runs Qodana static analysis on the current project and returns parsed inspection results in an easy-to-read format. It supports all JetBrains Qodana linters for comprehensive multi-language code analysis.
When to Use
Use this skill when you need to:
- Find code quality issues (unused code, redundant constructs, etc.)
- Detect potential bugs and problematic code patterns
- Check for JetBrains IDE inspections (IntelliJ IDEA, PyCharm, WebStorm, etc.)
- Get a list of issues to fix in the codebase
- Analyze code changes after modifications
- Perform language-specific static analysis across your tech stack
How to Use
Basic Usage
Run full project inspection (specify the appropriate linter for your project):
# Java/Kotlin project
bash .claude/skills/qodana-inspect/scripts/run-qodana.sh --linter qodana-jvm-community
# Python project
bash .claude/skills/qodana-inspect/scripts/run-qodana.sh --linter qodana-python-community
# TypeScript/JavaScript project
bash .claude/skills/qodana-inspect/scripts/run-qodana.sh --linter qodana-js
Incremental Analysis
Analyze only changes since a specific commit:
bash .claude/skills/qodana-inspect/scripts/run-qodana.sh --linter <linter-name> --diff-start <commit-hash>
Help
View all available linters and options:
bash .claude/skills/qodana-inspect/scripts/run-qodana.sh --help
Platform Fixes (Automatic)
The skill includes automatic platform-specific fixes for known Qodana issues. These fixes are applied automatically before analysis based on the selected linter.
PyCharm/Python Platform Fix
Issue: Qodana native mode for Python may fail to create jdk.table.xml, causing it to not recognize installed libraries from virtual environments (bug QD-11375).
Automatic Fix: When using qodana-python or qodana-python-community linters, the skill:
- Detects if
jdk.table.xml is missing in Qodana's config directory
- Extracts Python SDK configuration from
.idea/misc.xml
- Automatically generates
jdk.table.xml with proper paths to:
- Virtual environment site-packages
- Python standard library
- Python DLLs
Result: Eliminates false positives like:
PyTypeHintsInspection errors on valid PEP 604 union types (dict | None)
PyClassHasNoInitInspection errors on @dataclass classes
- Import resolution errors for installed packages
This fix is transparent and requires no user configuration. If the project has .idea/misc.xml with a configured Python SDK, the fix applies automatically.
Future Platform Fixes
The architecture supports adding fixes for other platforms:
- IntelliJ IDEA (JVM projects)
- WebStorm (JavaScript/TypeScript)
- Rider (.NET projects)
Output Format
The script returns results grouped by file:
=== FILE: src/main/kotlin/example/Example.kt ===
[HIGH] UnusedSymbol
Location: line 45, column 13
Message: Variable 'unusedVar' is never used
Code:
val unusedVar = "test"
---
[MODERATE] NamingConvention
Location: line 52, column 9
Message: Property name should follow naming convention
Code:
private val MyProperty = "value"
=== FILE: src/main/kotlin/example/Another.kt ===
...
Severity Levels
- HIGH: Important issues (unused code, potential bugs, API problems)
- MODERATE: Style and convention issues
- INFO: Informational notices
Available Linters
JVM Ecosystem
- qodana-jvm-community - Java, Kotlin, Groovy (Community, free)
- qodana-jvm - Java, Kotlin, Groovy (Ultimate, paid)
- qodana-jvm-android - Android development (Community, free)
- qodana-android - Android development (Ultimate, paid)
Web Development
- qodana-js - JavaScript, TypeScript (Ultimate, paid)
- qodana-php - PHP, JavaScript, TypeScript (Ultimate, paid)
.NET & C/C++
- qodana-cdnet - C#, VB.NET (Community, free)
- qodana-dotnet - C#, VB.NET, C, C++ (Ultimate, paid)
- qodana-clang - C, C++ (Community, free)
- qodana-cpp - C, C++ (Ultimate, paid)
Other Languages
- qodana-python-community - Python (Community, free)
- qodana-python - Python (Ultimate, paid)
- qodana-go - Go (Ultimate, paid)
- qodana-ruby - Ruby (Ultimate, paid)
Technical Details
- Mode: Native (no Docker required, uses
--within-docker=false)
- Output: Parsed SARIF JSON format
- Results location:
- Windows:
~/AppData/Local/JetBrains/Qodana/*/results/
- macOS:
~/Library/Caches/JetBrains/Qodana/*/results/
- Linux:
~/.cache/JetBrains/Qodana/*/results/
Requirements
- Qodana CLI must be installed (
qodana command available)
jq must be installed for JSON parsing
- Appropriate linter must be specified for the project's programming language
Notes
- Full scan typically takes 30 seconds to several minutes depending on project size
- Incremental scan with
--diff-start takes longer (analyzes two project states)
- Results include exact line/column numbers and code snippets for context
- Script filters out Qodana progress messages, showing only final results
- Cross-platform support: Windows, macOS, Linux
Limitations
- Quick-Fix auto-correction is not available in Community Edition linters
- You must manually fix identified issues using Edit tool
- Use code context and snippets provided in output to understand and fix problems
- Ultimate linters (qodana-jvm, qodana-js, qodana-python, etc.) require a license
1---2name: qodana-inspect3description: Run Qodana code inspection and get parsed results. Use when you need to analyze code quality, find unused code, detect potential bugs, or check for JetBrains IDE inspections. Supports all major programming languages (Java, Kotlin, Python, JavaScript, TypeScript, C#, C++, Go, Ruby, PHP). Returns structured list of problems grouped by file with severity, location, and code snippets.4---5
6# Qodana Code Inspector
7
8This skill runs Qodana static analysis on the current project and returns parsed inspection results in an easy-to-read format. It supports all JetBrains Qodana linters for comprehensive multi-language code analysis.
9
10## When to Use
11
12Use this skill when you need to:
13- Find code quality issues (unused code, redundant constructs, etc.)
14- Detect potential bugs and problematic code patterns
15- Check for JetBrains IDE inspections (IntelliJ IDEA, PyCharm, WebStorm, etc.)
16- Get a list of issues to fix in the codebase
17- Analyze code changes after modifications
18- Perform language-specific static analysis across your tech stack
19
20## How to Use
21
22### Basic Usage
23
24Run full project inspection (specify the appropriate linter for your project):
25
26```bash
27# Java/Kotlin project
28bash .claude/skills/qodana-inspect/scripts/run-qodana.sh --linter qodana-jvm-community
29
30# Python project
31bash .claude/skills/qodana-inspect/scripts/run-qodana.sh --linter qodana-python-community
32
33# TypeScript/JavaScript project
34bash .claude/skills/qodana-inspect/scripts/run-qodana.sh --linter qodana-js
35```
36
37### Incremental Analysis
38
39Analyze only changes since a specific commit:
40
41```bash
42bash .claude/skills/qodana-inspect/scripts/run-qodana.sh --linter <linter-name> --diff-start <commit-hash>
43```
44
45### Help
46
47View all available linters and options:
48
49```bash
50bash .claude/skills/qodana-inspect/scripts/run-qodana.sh --help
51```
52
53## Platform Fixes (Automatic)
54
55The skill includes automatic platform-specific fixes for known Qodana issues. These fixes are applied automatically before analysis based on the selected linter.
56
57### PyCharm/Python Platform Fix
58
59**Issue:** Qodana native mode for Python may fail to create `jdk.table.xml`, causing it to not recognize installed libraries from virtual environments (bug QD-11375).
60
61**Automatic Fix:** When using `qodana-python` or `qodana-python-community` linters, the skill:
621. Detects if `jdk.table.xml` is missing in Qodana's config directory
632. Extracts Python SDK configuration from `.idea/misc.xml`
643. Automatically generates `jdk.table.xml` with proper paths to:
65 - Virtual environment site-packages
66 - Python standard library
67 - Python DLLs
68
69**Result:** Eliminates false positives like:
70- `PyTypeHintsInspection` errors on valid PEP 604 union types (`dict | None`)
71- `PyClassHasNoInitInspection` errors on `@dataclass` classes
72- Import resolution errors for installed packages
73
74This fix is transparent and requires no user configuration. If the project has `.idea/misc.xml` with a configured Python SDK, the fix applies automatically.
75
76### Future Platform Fixes
77
78The architecture supports adding fixes for other platforms:
79- IntelliJ IDEA (JVM projects)
80- WebStorm (JavaScript/TypeScript)
81- Rider (.NET projects)
82
83## Output Format
84
85The script returns results grouped by file:
86
87```
88=== FILE: src/main/kotlin/example/Example.kt ===
89
90[HIGH] UnusedSymbol
91Location: line 45, column 13
92Message: Variable 'unusedVar' is never used
93Code:
94val unusedVar = "test"
95
96---
97
98[MODERATE] NamingConvention
99Location: line 52, column 9
100Message: Property name should follow naming convention
101Code:
102private val MyProperty = "value"
103
104=== FILE: src/main/kotlin/example/Another.kt ===
105...
106```
107
108## Severity Levels
109
110- **HIGH**: Important issues (unused code, potential bugs, API problems)
111- **MODERATE**: Style and convention issues
112- **INFO**: Informational notices
113
114## Available Linters
115
116### JVM Ecosystem
117- **qodana-jvm-community** - Java, Kotlin, Groovy (Community, free)
118- **qodana-jvm** - Java, Kotlin, Groovy (Ultimate, paid)
119- **qodana-jvm-android** - Android development (Community, free)
120- **qodana-android** - Android development (Ultimate, paid)
121
122### Web Development
123- **qodana-js** - JavaScript, TypeScript (Ultimate, paid)
124- **qodana-php** - PHP, JavaScript, TypeScript (Ultimate, paid)
125
126### .NET & C/C++
127- **qodana-cdnet** - C#, VB.NET (Community, free)
128- **qodana-dotnet** - C#, VB.NET, C, C++ (Ultimate, paid)
129- **qodana-clang** - C, C++ (Community, free)
130- **qodana-cpp** - C, C++ (Ultimate, paid)
131
132### Other Languages
133- **qodana-python-community** - Python (Community, free)
134- **qodana-python** - Python (Ultimate, paid)
135- **qodana-go** - Go (Ultimate, paid)
136- **qodana-ruby** - Ruby (Ultimate, paid)
137
138## Technical Details
139
140- **Mode**: Native (no Docker required, uses `--within-docker=false`)
141- **Output**: Parsed SARIF JSON format
142- **Results location**:
143 - Windows: `~/AppData/Local/JetBrains/Qodana/*/results/`
144 - macOS: `~/Library/Caches/JetBrains/Qodana/*/results/`
145 - Linux: `~/.cache/JetBrains/Qodana/*/results/`
146
147## Requirements
148
149- Qodana CLI must be installed (`qodana` command available)
150- `jq` must be installed for JSON parsing
151- Appropriate linter must be specified for the project's programming language
152
153## Notes
154
155- Full scan typically takes 30 seconds to several minutes depending on project size
156- Incremental scan with `--diff-start` takes longer (analyzes two project states)
157- Results include exact line/column numbers and code snippets for context
158- Script filters out Qodana progress messages, showing only final results
159- Cross-platform support: Windows, macOS, Linux
160
161## Limitations
162
163- Quick-Fix auto-correction is not available in Community Edition linters
164- You must manually fix identified issues using Edit tool
165- Use code context and snippets provided in output to understand and fix problems
166- Ultimate linters (qodana-jvm, qodana-js, qodana-python, etc.) require a license