wahlrecht/qodana.sarif.json

108125 lines
5.9 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"$schema": "https://raw.githubusercontent.com/schemastore/schemastore/master/src/schemas/json/sarif-2.1.0-rtm.5.json",
"version": "2.1.0",
"runs": [
{
"tool": {
"driver": {
"name": "IU",
"fullName": "Qodana",
"version": "232.8660.185",
"rules": [],
"taxa": [
{
"id": "Language injection",
"name": "Language injection"
},
{
"id": "PHP",
"name": "PHP"
},
{
"id": "PHP/PHPDoc",
"name": "PHPDoc",
"relationships": [
{
"target": {
"id": "PHP",
"index": 1,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Spring",
"name": "Spring"
},
{
"id": "Spring/Spring Core",
"name": "Spring Core",
"relationships": [
{
"target": {
"id": "Spring",
"index": 3,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Spring/Spring Core/XML",
"name": "XML",
"relationships": [
{
"target": {
"id": "Spring/Spring Core",
"index": 4,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java",
"name": "Java"
},
{
"id": "Java/Performance",
"name": "Performance",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Spring/Spring Core/Code",
"name": "Code",
"relationships": [
{
"target": {
"id": "Spring/Spring Core",
"index": 4,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Error handling",
"name": "Error handling",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Declaration redundancy",
"name": "Declaration redundancy",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Kotlin",
"name": "Kotlin"
},
{
"id": "Kotlin/Redundant constructs",
"name": "Redundant constructs",
"relationships": [
{
"target": {
"id": "Kotlin",
"index": 11,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Probable bugs",
"name": "Probable bugs",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Android",
"name": "Android"
},
{
"id": "Android/Lint",
"name": "Lint",
"relationships": [
{
"target": {
"id": "Android",
"index": 14,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Android/Lint/Performance",
"name": "Performance",
"relationships": [
{
"target": {
"id": "Android/Lint",
"index": 15,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Spring/Spring Cloud",
"name": "Spring Cloud",
"relationships": [
{
"target": {
"id": "Spring",
"index": 3,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PHP/General",
"name": "General",
"relationships": [
{
"target": {
"id": "PHP",
"index": 1,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Class structure",
"name": "Class structure",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Kotlin/Probable bugs",
"name": "Probable bugs",
"relationships": [
{
"target": {
"id": "Kotlin",
"index": 11,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PHP/Naming conventions",
"name": "Naming conventions",
"relationships": [
{
"target": {
"id": "PHP",
"index": 1,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PHP/Code smell",
"name": "Code smell",
"relationships": [
{
"target": {
"id": "PHP",
"index": 1,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PHP/Code style",
"name": "Code style",
"relationships": [
{
"target": {
"id": "PHP",
"index": 1,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JPA",
"name": "JPA"
},
{
"id": "PHP/Control flow",
"name": "Control flow",
"relationships": [
{
"target": {
"id": "PHP",
"index": 1,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Initialization",
"name": "Initialization",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Sass/SCSS",
"name": "Sass/SCSS"
},
{
"id": "HTML",
"name": "HTML"
},
{
"id": "Cucumber",
"name": "Cucumber"
},
{
"id": "JavaScript and TypeScript",
"name": "JavaScript and TypeScript"
},
{
"id": "JavaScript and TypeScript/Flow type checker",
"name": "Flow type checker",
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript",
"index": 30,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Security",
"name": "Security",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Properties files",
"name": "Properties files"
},
{
"id": "Java/Control flow issues",
"name": "Control flow issues",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Kotlin/Style issues",
"name": "Style issues",
"relationships": [
{
"target": {
"id": "Kotlin",
"index": 11,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PostCSS",
"name": "PostCSS"
},
{
"id": "JavaScript and TypeScript/Bitwise operation issues",
"name": "Bitwise operation issues",
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript",
"index": 30,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Groovy",
"name": "Groovy"
},
{
"id": "Groovy/Naming conventions",
"name": "Naming conventions",
"relationships": [
{
"target": {
"id": "Groovy",
"index": 38,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaScript and TypeScript/General",
"name": "General",
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript",
"index": 30,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Reactive Streams",
"name": "Reactive Streams"
},
{
"id": "Reactive Streams/Common",
"name": "Common",
"relationships": [
{
"target": {
"id": "Reactive Streams",
"index": 41,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Imports",
"name": "Imports",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "General",
"name": "General"
},
{
"id": "Gradle",
"name": "Gradle"
},
{
"id": "Gradle/Probable bugs",
"name": "Probable bugs",
"relationships": [
{
"target": {
"id": "Gradle",
"index": 45,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JVM languages",
"name": "JVM languages"
},
{
"id": "JVM languages/Logging",
"name": "Logging",
"relationships": [
{
"target": {
"id": "JVM languages",
"index": 47,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Numeric issues",
"name": "Numeric issues",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EditorConfig",
"name": "EditorConfig"
},
{
"id": "Android/Lint/Correctness",
"name": "Correctness",
"relationships": [
{
"target": {
"id": "Android/Lint",
"index": 15,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaScript and TypeScript/Validity issues",
"name": "Validity issues",
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript",
"index": 30,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Android/Lint/Interoperability",
"name": "Interoperability",
"relationships": [
{
"target": {
"id": "Android/Lint",
"index": 15,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Serialization issues",
"name": "Serialization issues",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SQL",
"name": "SQL"
},
{
"id": "Kotlin/Other problems",
"name": "Other problems",
"relationships": [
{
"target": {
"id": "Kotlin",
"index": 11,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Groovy/Probable bugs",
"name": "Probable bugs",
"relationships": [
{
"target": {
"id": "Groovy",
"index": 38,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Groovy/GPath",
"name": "GPath",
"relationships": [
{
"target": {
"id": "Groovy",
"index": 38,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Plugin DevKit",
"name": "Plugin DevKit"
},
{
"id": "Plugin DevKit/Workspace model",
"name": "Workspace model",
"relationships": [
{
"target": {
"id": "Plugin DevKit",
"index": 59,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Data flow",
"name": "Data flow",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Ktor",
"name": "Ktor"
},
{
"id": "Velocity",
"name": "Velocity"
},
{
"id": "JPA Buddy",
"name": "JPA Buddy"
},
{
"id": "Android/Lint/Security",
"name": "Security",
"relationships": [
{
"target": {
"id": "Android/Lint",
"index": 15,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Plugin DevKit/Code",
"name": "Code",
"relationships": [
{
"target": {
"id": "Plugin DevKit",
"index": 59,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Code maturity",
"name": "Code maturity",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PHP/PHPDoc/Code style",
"name": "Code style",
"relationships": [
{
"target": {
"id": "PHP/PHPDoc",
"index": 2,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Java language level migration aids",
"name": "Java language level migration aids",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Java language level migration aids/Java 20",
"name": "Java 20",
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids",
"index": 69,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Kotlin/Naming conventions",
"name": "Naming conventions",
"relationships": [
{
"target": {
"id": "Kotlin",
"index": 11,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Ignore",
"name": "Ignore"
},
{
"id": "CSS",
"name": "CSS"
},
{
"id": "CSS/Invalid elements",
"name": "Invalid elements",
"relationships": [
{
"target": {
"id": "CSS",
"index": 73,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PHP/Composer",
"name": "Composer",
"relationships": [
{
"target": {
"id": "PHP",
"index": 1,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaScript and TypeScript/Potentially undesirable code constructs",
"name": "Potentially undesirable code constructs",
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript",
"index": 30,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Finalization",
"name": "Finalization",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Python",
"name": "Python"
},
{
"id": "Java/Logging",
"name": "Logging",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Kubernetes",
"name": "Kubernetes"
},
{
"id": "Hibernate",
"name": "Hibernate"
},
{
"id": "Java/Threading issues",
"name": "Threading issues",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Abstraction issues",
"name": "Abstraction issues",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Android/Lint/Usability",
"name": "Usability",
"relationships": [
{
"target": {
"id": "Android/Lint",
"index": 15,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Groovy/Threading issues",
"name": "Threading issues",
"relationships": [
{
"target": {
"id": "Groovy",
"index": 38,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Kotlin/Migration",
"name": "Migration",
"relationships": [
{
"target": {
"id": "Kotlin",
"index": 11,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Django",
"name": "Django"
},
{
"id": "Google App Engine (Python)",
"name": "Google App Engine (Python)"
},
{
"id": "Java/Verbose or redundant code constructs",
"name": "Verbose or redundant code constructs",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Groovy/Control flow issues",
"name": "Control flow issues",
"relationships": [
{
"target": {
"id": "Groovy",
"index": 38,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "XSLT",
"name": "XSLT"
},
{
"id": "Groovy/Style",
"name": "Style",
"relationships": [
{
"target": {
"id": "Groovy",
"index": 38,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaFX",
"name": "JavaFX"
},
{
"id": "Dockerfile",
"name": "Dockerfile"
},
{
"id": "Java/Javadoc",
"name": "Javadoc",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSP",
"name": "JSP"
},
{
"id": "Java/Visibility",
"name": "Visibility",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Assignment issues",
"name": "Assignment issues",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Concurrency annotation issues",
"name": "Concurrency annotation issues",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/JUnit",
"name": "JUnit",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PHP/Probable bugs",
"name": "Probable bugs",
"relationships": [
{
"target": {
"id": "PHP",
"index": 1,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java EE",
"name": "Java EE"
},
{
"id": "Micronaut",
"name": "Micronaut"
},
{
"id": "UI form",
"name": "UI form"
},
{
"id": "JavaScript and TypeScript/ES2015 migration aids",
"name": "ES2015 migration aids",
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript",
"index": 30,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Naming conventions",
"name": "Naming conventions",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Naming conventions/Method",
"name": "Method",
"relationships": [
{
"target": {
"id": "Java/Naming conventions",
"index": 106,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaScript and TypeScript/DOM issues",
"name": "DOM issues",
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript",
"index": 30,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Code Coverage",
"name": "Code Coverage"
},
{
"id": "Java/Internationalization",
"name": "Internationalization",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaScript and TypeScript/TypeScript",
"name": "TypeScript",
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript",
"index": 30,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "XML",
"name": "XML"
},
{
"id": "Manifest",
"name": "Manifest"
},
{
"id": "Maven",
"name": "Maven"
},
{
"id": "RegExp",
"name": "RegExp"
},
{
"id": "Ant",
"name": "Ant"
},
{
"id": "Java/Java language level migration aids/Java 5",
"name": "Java 5",
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids",
"index": 69,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Angular",
"name": "Angular"
},
{
"id": "Java/Java language level migration aids/Java 8",
"name": "Java 8",
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids",
"index": 69,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PHP/Attributes",
"name": "Attributes",
"relationships": [
{
"target": {
"id": "PHP",
"index": 1,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Modularization issues",
"name": "Modularization issues",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Screen sizes",
"name": "Screen sizes"
},
{
"id": "JavaScript and TypeScript/Potentially confusing code constructs",
"name": "Potentially confusing code constructs",
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript",
"index": 30,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Groovy/Assignment issues",
"name": "Assignment issues",
"relationships": [
{
"target": {
"id": "Groovy",
"index": 38,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Class metrics",
"name": "Class metrics",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Micronaut/Micronaut Data",
"name": "Micronaut Data",
"relationships": [
{
"target": {
"id": "Micronaut",
"index": 103,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Android/Shrinker",
"name": "Shrinker",
"relationships": [
{
"target": {
"id": "Android",
"index": 14,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JVM languages/Test frameworks",
"name": "Test frameworks",
"relationships": [
{
"target": {
"id": "JVM languages",
"index": 47,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaScript and TypeScript/Control flow issues",
"name": "Control flow issues",
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript",
"index": 30,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Reflective access",
"name": "Reflective access",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PHP/PHPUnit",
"name": "PHPUnit",
"relationships": [
{
"target": {
"id": "PHP",
"index": 1,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Code style issues",
"name": "Code style issues",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OpenAPI specifications",
"name": "OpenAPI specifications"
},
{
"id": "JavaScript and TypeScript/Code quality tools",
"name": "Code quality tools",
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript",
"index": 30,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Compose preview",
"name": "Compose preview"
},
{
"id": "Groovy/Potentially confusing code constructs",
"name": "Potentially confusing code constructs",
"relationships": [
{
"target": {
"id": "Groovy",
"index": 38,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RESTful Web Service (JAX-RS)",
"name": "RESTful Web Service (JAX-RS)"
},
{
"id": "Java/Numeric issues/Cast",
"name": "Cast",
"relationships": [
{
"target": {
"id": "Java/Numeric issues",
"index": 49,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Method metrics",
"name": "Method metrics",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Cloning issues",
"name": "Cloning issues",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Plugin DevKit/Description file",
"name": "Description file",
"relationships": [
{
"target": {
"id": "Plugin DevKit",
"index": 59,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/JavaBeans issues",
"name": "JavaBeans issues",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Android/Lint/Productivity",
"name": "Productivity",
"relationships": [
{
"target": {
"id": "Android/Lint",
"index": 15,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaScript and TypeScript/Function metrics",
"name": "Function metrics",
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript",
"index": 30,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSONPath",
"name": "JSONPath"
},
{
"id": "JavaScript and TypeScript/Code style issues",
"name": "Code style issues",
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript",
"index": 30,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PHP/Type compatibility",
"name": "Type compatibility",
"relationships": [
{
"target": {
"id": "PHP",
"index": 1,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HTML/Accessibility",
"name": "Accessibility",
"relationships": [
{
"target": {
"id": "HTML",
"index": 28,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FreeMarker",
"name": "FreeMarker"
},
{
"id": "JSON and JSON5",
"name": "JSON and JSON5"
},
{
"id": "PHP/Regular expressions",
"name": "Regular expressions",
"relationships": [
{
"target": {
"id": "PHP",
"index": 1,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "XPath",
"name": "XPath"
},
{
"id": "JavaScript and TypeScript/Probable bugs",
"name": "Probable bugs",
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript",
"index": 30,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Security",
"name": "Security"
},
{
"id": "Java/Resource management",
"name": "Resource management",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AOP",
"name": "AOP"
},
{
"id": "Plugin DevKit/Plugin descriptor",
"name": "Plugin descriptor",
"relationships": [
{
"target": {
"id": "Plugin DevKit",
"index": 59,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Bean Validation",
"name": "Bean Validation"
},
{
"id": "Java/Inheritance issues",
"name": "Inheritance issues",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Kotlin/Migration/Maven",
"name": "Maven",
"relationships": [
{
"target": {
"id": "Kotlin/Migration",
"index": 86,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Vue",
"name": "Vue"
},
{
"id": "Java/Java language level migration aids/Java 10",
"name": "Java 10",
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids",
"index": 69,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Java language level migration aids/Java 7",
"name": "Java 7",
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids",
"index": 69,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MongoJS",
"name": "MongoJS"
},
{
"id": "Kotlin/Migration/Gradle",
"name": "Gradle",
"relationships": [
{
"target": {
"id": "Kotlin/Migration",
"index": 86,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Memory",
"name": "Memory",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Android/Lint/Accessibility",
"name": "Accessibility",
"relationships": [
{
"target": {
"id": "Android/Lint",
"index": 15,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PHP/Unused symbols",
"name": "Unused symbols",
"relationships": [
{
"target": {
"id": "PHP",
"index": 1,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Markdown",
"name": "Markdown"
},
{
"id": "Groovy/Annotations",
"name": "Annotations",
"relationships": [
{
"target": {
"id": "Groovy",
"index": 38,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Reactive Streams/Reactor",
"name": "Reactor",
"relationships": [
{
"target": {
"id": "Reactive Streams",
"index": 41,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Naming conventions/Class",
"name": "Class",
"relationships": [
{
"target": {
"id": "Java/Naming conventions",
"index": 106,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Structural search",
"name": "Structural search"
},
{
"id": "PHP/Undefined symbols",
"name": "Undefined symbols",
"relationships": [
{
"target": {
"id": "PHP",
"index": 1,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Gradle/Style",
"name": "Style",
"relationships": [
{
"target": {
"id": "Gradle",
"index": 45,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "YAML",
"name": "YAML"
},
{
"id": "Java/Lombok",
"name": "Lombok",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Performance/Embedded",
"name": "Embedded",
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Portability",
"name": "Portability",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HTTP Client",
"name": "HTTP Client"
},
{
"id": "JavaScript and TypeScript/Try statement issues",
"name": "Try statement issues",
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript",
"index": 30,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Test frameworks",
"name": "Test frameworks",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Properties files",
"name": "Properties files",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Android/Lint/Testing",
"name": "Testing",
"relationships": [
{
"target": {
"id": "Android/Lint",
"index": 15,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Java language level migration aids/Java 11",
"name": "Java 11",
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids",
"index": 69,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Kotlin/Java interop issues",
"name": "Java interop issues",
"relationships": [
{
"target": {
"id": "Kotlin",
"index": 11,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Android/Lint/Internationalization",
"name": "Internationalization",
"relationships": [
{
"target": {
"id": "Android/Lint",
"index": 15,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PHP/Code style/PSR-12",
"name": "PSR-12",
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CDI (Contexts and Dependency Injection)",
"name": "CDI (Contexts and Dependency Injection)"
},
{
"id": "Java/Packaging issues",
"name": "Packaging issues",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Spring/Spring AOP",
"name": "Spring AOP",
"relationships": [
{
"target": {
"id": "Spring",
"index": 3,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SQL server",
"name": "SQL server"
},
{
"id": "Groovy/Data flow",
"name": "Data flow",
"relationships": [
{
"target": {
"id": "Groovy",
"index": 38,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Groovy/Error handling",
"name": "Error handling",
"relationships": [
{
"target": {
"id": "Groovy",
"index": 38,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaScript and TypeScript/Async code and promises",
"name": "Async code and promises",
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript",
"index": 30,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaScript and TypeScript/Naming conventions",
"name": "Naming conventions",
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript",
"index": 30,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Groovy/Method metrics",
"name": "Method metrics",
"relationships": [
{
"target": {
"id": "Groovy",
"index": 38,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GRPC requests validity",
"name": "GRPC requests validity"
},
{
"id": "Spring/Spring Boot",
"name": "Spring Boot",
"relationships": [
{
"target": {
"id": "Spring",
"index": 3,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Dependency issues",
"name": "Dependency issues",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaScript and TypeScript/Assignment issues",
"name": "Assignment issues",
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript",
"index": 30,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaScript and TypeScript/Switch statement issues",
"name": "Switch statement issues",
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript",
"index": 30,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Android/Lint/Compliance",
"name": "Compliance",
"relationships": [
{
"target": {
"id": "Android/Lint",
"index": 15,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PHP/Quality tools",
"name": "Quality tools",
"relationships": [
{
"target": {
"id": "PHP",
"index": 1,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Java language level migration aids/Java 9",
"name": "Java 9",
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids",
"index": 69,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Shell script",
"name": "Shell script"
},
{
"id": "Pattern validation",
"name": "Pattern validation"
},
{
"id": "Spring/Spring Data",
"name": "Spring Data",
"relationships": [
{
"target": {
"id": "Spring",
"index": 3,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaScript and TypeScript/Data flow",
"name": "Data flow",
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript",
"index": 30,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Lombok/Redundant definitions",
"name": "Redundant definitions",
"relationships": [
{
"target": {
"id": "Java/Lombok",
"index": 177,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Encapsulation",
"name": "Encapsulation",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Spring/Spring MVC",
"name": "Spring MVC",
"relationships": [
{
"target": {
"id": "Spring",
"index": 3,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CSS/Code style issues",
"name": "Code style issues",
"relationships": [
{
"target": {
"id": "CSS",
"index": 73,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/TestNG",
"name": "TestNG",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Java language level migration aids/Java 19",
"name": "Java 19",
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids",
"index": 69,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaScript and TypeScript/Unused symbols",
"name": "Unused symbols",
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript",
"index": 30,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Compiler issues",
"name": "Compiler issues",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaScript and TypeScript/Imports and dependencies",
"name": "Imports and dependencies",
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript",
"index": 30,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PHP/PHP strict standards",
"name": "PHP strict standards",
"relationships": [
{
"target": {
"id": "PHP",
"index": 1,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Quarkus",
"name": "Quarkus"
},
{
"id": "Less",
"name": "Less"
},
{
"id": "PHP/Error handling",
"name": "Error handling",
"relationships": [
{
"target": {
"id": "PHP",
"index": 1,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Proofreading",
"name": "Proofreading"
},
{
"id": "Oracle",
"name": "Oracle"
},
{
"id": "Internationalization",
"name": "Internationalization"
},
{
"id": "Java/Java language level migration aids/Java 16",
"name": "Java 16",
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids",
"index": 69,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TOML",
"name": "TOML"
},
{
"id": "Spring/Spring Cloud Stream",
"name": "Spring Cloud Stream",
"relationships": [
{
"target": {
"id": "Spring",
"index": 3,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Kotlin/Logging",
"name": "Logging",
"relationships": [
{
"target": {
"id": "Kotlin",
"index": 11,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Groovy/Validity issues",
"name": "Validity issues",
"relationships": [
{
"target": {
"id": "Groovy",
"index": 38,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Bitwise operation issues",
"name": "Bitwise operation issues",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PHP/Replaceable assignments",
"name": "Replaceable assignments",
"relationships": [
{
"target": {
"id": "PHP",
"index": 1,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CSS/Code quality tools",
"name": "Code quality tools",
"relationships": [
{
"target": {
"id": "CSS",
"index": 73,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Thymeleaf",
"name": "Thymeleaf"
},
{
"id": "Java/Java language level migration aids/Java 15",
"name": "Java 15",
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids",
"index": 69,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Docker-compose",
"name": "Docker-compose"
},
{
"id": "RELAX NG",
"name": "RELAX NG"
},
{
"id": "Pyramid",
"name": "Pyramid"
},
{
"id": "Spring/Spring Integration",
"name": "Spring Integration",
"relationships": [
{
"target": {
"id": "Spring",
"index": 3,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaScript and TypeScript/Unit testing",
"name": "Unit testing",
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript",
"index": 30,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MySQL",
"name": "MySQL"
},
{
"id": "Gradle/Validity issues",
"name": "Validity issues",
"relationships": [
{
"target": {
"id": "Gradle",
"index": 45,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CSS/Probable bugs",
"name": "Probable bugs",
"relationships": [
{
"target": {
"id": "CSS",
"index": 73,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Lombok/Redundant modifiers",
"name": "Redundant modifiers",
"relationships": [
{
"target": {
"id": "Java/Lombok",
"index": 177,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Java language level migration aids/Java 14",
"name": "Java 14",
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids",
"index": 69,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Java language level issues",
"name": "Java language level issues",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Version control",
"name": "Version control"
},
{
"id": "Spring/Spring Security",
"name": "Spring Security",
"relationships": [
{
"target": {
"id": "Spring",
"index": 3,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/Probable bugs/Nullability problems",
"name": "Nullability problems",
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Spring/Spring Core/Setup",
"name": "Setup",
"relationships": [
{
"target": {
"id": "Spring/Spring Core",
"index": 4,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Jupyter",
"name": "Jupyter"
},
{
"id": "PostgreSQL",
"name": "PostgreSQL"
},
{
"id": "Kotlin Android",
"name": "Kotlin Android"
},
{
"id": "Qodana",
"name": "Qodana"
},
{
"id": "EL",
"name": "EL"
},
{
"id": "Application servers",
"name": "Application servers"
},
{
"id": "JavaScript and TypeScript/React",
"name": "React",
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript",
"index": 30,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Android/Room",
"name": "Room",
"relationships": [
{
"target": {
"id": "Android",
"index": 14,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Groovy/Other",
"name": "Other",
"relationships": [
{
"target": {
"id": "Groovy",
"index": 38,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Reactive Streams/Mutiny",
"name": "Mutiny",
"relationships": [
{
"target": {
"id": "Reactive Streams",
"index": 41,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Protocol Buffers",
"name": "Protocol Buffers"
},
{
"id": "JavaScript and TypeScript/Node.js",
"name": "Node.js",
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript",
"index": 30,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java/toString() issues",
"name": "toString() issues",
"relationships": [
{
"target": {
"id": "Java",
"index": 6,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Checkstyle",
"name": "Checkstyle"
},
{
"id": "Kotlin/React",
"name": "React",
"relationships": [
{
"target": {
"id": "Kotlin",
"index": 11,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Kotlin/React/Probable bugs",
"name": "Probable bugs",
"relationships": [
{
"target": {
"id": "Kotlin/React",
"index": 265,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Gradle/Best practises",
"name": "Best practises",
"relationships": [
{
"target": {
"id": "Gradle",
"index": 45,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Groovy/Declaration redundancy",
"name": "Declaration redundancy",
"relationships": [
{
"target": {
"id": "Groovy",
"index": 38,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
"extensions": [
{
"name": "org.intellij.intelliLang",
"version": "232.8660.185",
"rules": [
{
"id": "InjectionNotApplicable",
"shortDescription": {
"text": "Injection Annotation not applicable"
},
"fullDescription": {
"text": "Reports when a '@Language' annotation is applied to an element with a type other than 'String' or 'String[]'. Example: '@Language(\"HTML\") int i;' After the quick-fix is applied: 'int i;'",
"markdown": "Reports when a `@Language` annotation is applied to an element with a type other than `String` or `String[]`.\n\n**Example:**\n\n\n @Language(\"HTML\") int i;\n\nAfter the quick-fix is applied:\n\n\n int i;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "InjectionNotApplicable",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Language injection",
"index": 0,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PatternNotApplicable",
"shortDescription": {
"text": "Pattern Annotation not applicable"
},
"fullDescription": {
"text": "Reports when a '@Pattern' annotation is applied to an element with a type other than 'String'. Example: '@Pattern(\"\\\\d\\\\d\") int i;'",
"markdown": "Reports when a `@Pattern` annotation is applied to an element with a type other than `String`.\n\n**Example:**\n\n\n @Pattern(\"\\\\d\\\\d\") int i;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "PatternNotApplicable",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Pattern validation",
"index": 207,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnknownLanguage",
"shortDescription": {
"text": "Unknown Language ID"
},
"fullDescription": {
"text": "Reports when the ID of the language used in a '@Language' annotation is unknown. Example: '@Language(\"HMTL\") String html;'",
"markdown": "Reports when the ID of the language used in a `@Language` annotation is unknown.\n\n**Example:**\n\n\n @Language(\"HMTL\") String html;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "UnknownLanguage",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Language injection",
"index": 0,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PatternValidation",
"shortDescription": {
"text": "Validate annotated patterns"
},
"fullDescription": {
"text": "Reports expressions passed as arguments for '@Pattern' parameters and returned from '@Pattern'-annotated methods that do not match the specified pattern. Example: '@Pattern(\"\\\\d\\\\d-\\\\d\\\\d\\\\d\") String getId() {\n return \"1\";\n }' Use the Flag non compile-time constant expressions option to let the inspection report expressions with an unknown value and offer to add a substitution ('@Subst') annotation.",
"markdown": "Reports expressions passed as arguments for `@Pattern` parameters and returned from `@Pattern`-annotated methods that do not match the specified pattern.\n\n**Example:**\n\n\n @Pattern(\"\\\\d\\\\d-\\\\d\\\\d\\\\d\") String getId() {\n return \"1\";\n }\n\n\nUse the **Flag non compile-time constant expressions** option to let the inspection report expressions with\nan unknown value and offer to add a substitution (`@Subst`) annotation."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PatternValidation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Pattern validation",
"index": 207,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LanguageMismatch",
"shortDescription": {
"text": "Language mismatch"
},
"fullDescription": {
"text": "Reports when the language of a reference does not match the expected language of the usage context. Example: '@Language(\"JavaScript\")\n String JS_CODE = \"var x;\";\n\n @Language(\"XPath\")\n String XPATH_CODE = JS_CODE; // warning here'",
"markdown": "Reports when the language of a reference does not match the expected language of the usage context.\n\nExample:\n\n\n @Language(\"JavaScript\")\n String JS_CODE = \"var x;\";\n\n @Language(\"XPath\")\n String XPATH_CODE = JS_CODE; // warning here\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LanguageMismatch",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Language injection",
"index": 0,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PatternOverriddenByNonAnnotatedMethod",
"shortDescription": {
"text": "Non-annotated Method overrides @Pattern Method"
},
"fullDescription": {
"text": "Reports when a method without any '@Pattern' annotation overrides a '@Pattern' annotated method. This does not prevent error-highlighting inside the editor, however the overriding method will not be checked at runtime. A quick fix is provided to add a '@Pattern' annotation that matches the one from the superclass method. This ensures the runtime-check instrumentation works correctly. Example: 'abstract class Parent {\n abstract @Pattern(\"\\\\d\\\\d-\\\\d\\\\d\\\\d\") String getId();\n }\n class Child extends Parent {\n @Override String getId() { // warning here\n return \"12-345\";\n }\n }'",
"markdown": "Reports when a method without any `@Pattern` annotation overrides a `@Pattern` annotated method. This does not prevent error-highlighting inside the editor, however the overriding method will not be checked at runtime.\n\n\nA quick fix is provided to add a `@Pattern` annotation that matches the one from the superclass method. This ensures the\nruntime-check instrumentation works correctly.\n\n**Example:**\n\n\n abstract class Parent {\n abstract @Pattern(\"\\\\d\\\\d-\\\\d\\\\d\\\\d\") String getId();\n }\n class Child extends Parent {\n @Override String getId() { // warning here\n return \"12-345\";\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PatternOverriddenByNonAnnotatedMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Pattern validation",
"index": 207,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InjectedReferences",
"shortDescription": {
"text": "Injected references"
},
"fullDescription": {
"text": "Reports unresolved references injected by Language Injections. Example: '@Language(\"file-reference\")\n String fileName = \"/home/user/nonexistent.file\"; // highlighted if file doesn't exist'",
"markdown": "Reports unresolved references injected by [Language Injections](https://www.jetbrains.com/help/idea/using-language-injections.html).\n\nExample:\n\n\n @Language(\"file-reference\")\n String fileName = \"/home/user/nonexistent.file\"; // highlighted if file doesn't exist\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "InjectedReferences",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "General",
"index": 44,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.jetbrains.php",
"version": "232.8660.205",
"rules": [
{
"id": "PhpDocDuplicateTypeInspection",
"shortDescription": {
"text": "Type already exists in PHPDoc tag"
},
"fullDescription": {
"text": "Reports duplicate types in PHPDoc comments.",
"markdown": "Reports duplicate types in PHPDoc comments."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpDocDuplicateTypeInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPDoc",
"index": 2,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpNestedTernaryExpressionUsageInspection",
"shortDescription": {
"text": "Nested ternary operator usage"
},
"fullDescription": {
"text": "Reports nested ternary expressions, which are deprecated starting from PHP 7.4.",
"markdown": "Reports nested ternary expressions, which are deprecated starting from PHP 7.4."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "PhpNestedTernaryExpressionUsageInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpConstantNamingConventionInspection",
"shortDescription": {
"text": "Constant name is not following coding convention"
},
"fullDescription": {
"text": "Reports the constants' names that are either too short, too long, or do not follow the specified regular expression pattern. Some coding styles have a special naming convention for constants. Use the inspection options to specify minimum/maximum length and the regular expression expected for constants' names. To ignore the names' length, specify 0. To learn more about regular expressions, refer to the Quick Start guide (regular-expressions.info).",
"markdown": "Reports the constants' names that are either too short, too long, or do not follow the specified regular expression pattern. Some coding styles have a special naming convention for constants.\n\n\nUse the inspection options to specify minimum/maximum length and the regular expression expected for constants' names.\nTo ignore the names' length, specify **0**.\n\n\nTo learn more about regular expressions, refer to the [Quick Start guide (regular-expressions.info)](https://www.regular-expressions.info/quickstart.html)."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpConstantNamingConventionInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Naming conventions",
"index": 21,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpTernaryExpressionCanBeReducedToShortVersionInspection",
"shortDescription": {
"text": "Ternary expression can be replaced with short version"
},
"fullDescription": {
"text": "Reports the '?:' ternary expressions in which the condition and the 'true' statement are matching.",
"markdown": "Reports the `?:` ternary expressions in which the condition and the `true` statement are matching."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpTernaryExpressionCanBeReducedToShortVersionInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpCatchWithInstanceOfCanBeReplacedWithSpecificCatchesInspection",
"shortDescription": {
"text": "'instanceof' checks in 'catch' block can be replaced with specific catches"
},
"fullDescription": {
"text": "Reports the 'instanceof' checks in single 'catch' blocks that could be replaced with multiple 'catch' blocks specific for each exception instance.",
"markdown": "Reports the `instanceof` checks in single `catch` blocks that could be replaced with multiple `catch` blocks specific for each exception instance."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpCatchWithInstanceOfCanBeReplacedWithSpecificCatchesInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpWriteAccessToReferencedArrayValueWithoutUnsetInspection",
"shortDescription": {
"text": "Write access to referenced array value without 'unset'"
},
"fullDescription": {
"text": "Reports the write access expressions on variables that are still referencing the array value previously used in a 'foreach' statement. It is recommended to destroy such references by using 'unset'. See foreach (php.net) and unset (php.net) for details.",
"markdown": "Reports the write access expressions on variables that are still referencing the array value previously used in a `foreach` statement.\n\n\nIt is recommended to destroy such references by using `unset`.\n\n\nSee [foreach (php.net)](https://www.php.net/manual/en/control-structures.foreach.php) and [unset (php.net)](https://www.php.net/manual/en/function.unset.php) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PhpWriteAccessToReferencedArrayValueWithoutUnsetInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Control flow",
"index": 25,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpSameParameterValueInspection",
"shortDescription": {
"text": "Parameter's value is always the same"
},
"fullDescription": {
"text": "Reports the parameters in private methods that have the same value across all method calls.",
"markdown": "Reports the parameters in private methods that have the same value across all method calls."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpSameParameterValueInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDocMissingThrowsInspection",
"shortDescription": {
"text": "Missing @throws tag(s)"
},
"fullDescription": {
"text": "Reports missing PHPDoc '@throws' tags for exceptions thrown by functions or methods. The exception classes added to the Unchecked Exceptions list under Settings | PHP | Analysis are excluded from the inspection scope.",
"markdown": "Reports missing PHPDoc `@throws` tags for exceptions thrown by functions or methods.\n\nThe exception classes added to the **Unchecked Exceptions** list under\n[Settings \\| PHP \\| Analysis](settings://reference.webide.settings.project.settings.php?Unchecked%20Exceptions)\nare excluded from the inspection scope."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpDocMissingThrowsInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPDoc/Code style",
"index": 68,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ComposerJsonFileReferencesInspection",
"shortDescription": {
"text": "Unresolved file references"
},
"fullDescription": {
"text": "Reports unresolved file references in composer.json.",
"markdown": "Reports unresolved file references in composer.json."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ComposerJsonFileReferencesInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Composer",
"index": 75,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpIssetCanCheckNestedAccessDirectlyInspection",
"shortDescription": {
"text": "'isset' can check nested array access and sub properties directly"
},
"fullDescription": {
"text": "Reports constructions like 'isset($a['a']) && isset($a['a']['b']) && isset($b) && isset($b->b)' that can be replaced with 'isset($a['a']['b']) && isset($b->b)'.",
"markdown": "Reports constructions like `isset($a['a']) && isset($a['a']['b']) && isset($b) && isset($b->b)` that can be replaced with `isset($a['a']['b']) && isset($b->b)`."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpIssetCanCheckNestedAccessDirectlyInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpLoopCanBeReplacedWithStdFunctionCallsInspection",
"shortDescription": {
"text": "Loop can be replaced with 'in_array()' or 'array_key_exists()' call"
},
"fullDescription": {
"text": "Reports the 'foreach' loops that can be safely replaced with 'in_array()' or 'array_key_exists()' calls. See in_array (php.net) and array_key_exists (php.net) for details.",
"markdown": "Reports the `foreach` loops that can be safely replaced with `in_array()` or `array_key_exists()` calls.\n\n\nSee [in_array (php.net)](https://www.php.net/manual/en/function.in-array) and [array_key_exists (php.net)](https://www.php.net/manual/en/function.array-key-exists) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpLoopCanBeReplacedWithStdFunctionCallsInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpConstructorStyleInspection",
"shortDescription": {
"text": "Old style constructor"
},
"fullDescription": {
"text": "Reports old-style constructor declarations ('ClassName()') and suggests replacing them with new-style constructors ('__construct()'). Prior to PHP 8.0, old-style constructor syntax used in the classes in the global namespace is treated as deprecated and will result in an 'E_DEPRECATED' error. If both a '__construct()' and a 'ClassName()' method are defined, '__construct()' will be called. In namespaced classes, or any classes as of PHP 8.0, a 'ClassName()' method never has any special meaning and will never be called as a constructor. As a result, the inspection does not report such cases if the PHP language level is set to 8.0 or later. See Constructors and destructors (php.net) for details.",
"markdown": "Reports old-style constructor declarations (`ClassName()`) and suggests replacing them with new-style constructors (`__construct()`).\n\n\nPrior to PHP 8.0, old-style constructor syntax used in the classes in the global namespace is treated as deprecated and will result in an `E_DEPRECATED` error. If both a `__construct()` and a `ClassName()` method are defined, `__construct()` will be called.\n\nIn namespaced classes, or any classes as of PHP 8.0, a `ClassName()` method never has any special meaning and will never be called as a constructor. As a result, the inspection does not report such cases if the PHP language level is set to 8.0 or later.\n\n\nSee [Constructors and destructors (php.net)](https://www.php.net/manual/en/language.oop5.decon.php) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PhpConstructorStyleInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpNonStrictObjectEqualityInspection",
"shortDescription": {
"text": "Non-strict object equality"
},
"fullDescription": {
"text": "Reports the usages of the comparison operator ('==') for comparing object variables. Object variables are compared as follows: When using the comparison operator ('=='), two object instances are considered equal if they have the same attributes and values (values are compared with '=='), and are instances of the same class. When using the identity operator ('==='), object variables are considered identical if and only if they refer to the same instance of the same class. See Comparing Objects (php.net) for details.",
"markdown": "Reports the usages of the comparison operator (`==`) for comparing object variables.\n\n\nObject variables are compared as follows:\n\n* When using the comparison operator (`==`), two object instances are considered equal if they have the same attributes and values (values are compared with `==`), and are instances of the same class.\n* When using the identity operator (`===`), object variables are considered identical if and only if they refer to the same instance of the same class.\n\n\nSee [Comparing Objects (php.net)](http://www.php.net/manual/en/language.oop5.object-comparison.php) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PhpNonStrictObjectEqualityInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUsageOfSilenceOperatorInspection",
"shortDescription": {
"text": "Usage of a silence operator"
},
"fullDescription": {
"text": "Reports the usages of the silence operator ('@'), which is highly discouraged. See Error Control Operators (php.net) for details.",
"markdown": "Reports the usages of the silence operator (`@`), which is highly discouraged.\n\nSee [Error Control Operators (php.net)](https://www.php.net/manual/en/language.operators.errorcontrol.php) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUsageOfSilenceOperatorInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpIntRangesMismatchInspection",
"shortDescription": {
"text": "Number ranges mismatch"
},
"fullDescription": {
"text": "Reports the assignments and return statements whose arguments do not match the expected ranges specified via 'int<min, max>' PHPDoc syntax.",
"markdown": "Reports the assignments and return statements whose arguments do not match the expected ranges specified via `int<min, max>` PHPDoc syntax."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PhpIntRangesMismatchInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPDoc",
"index": 2,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpFieldCanBePromotedInspection",
"shortDescription": {
"text": "Property can be promoted"
},
"fullDescription": {
"text": "Reports the properties that can be replaced with promoted versions. See Constructor Property Promotion (php.net) for details.",
"markdown": "Reports the properties that can be replaced with promoted versions.\n\n\nSee [Constructor Property Promotion (php.net)](https://wiki.php.net/rfc/constructor_promotion) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpFieldCanBePromotedInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpTypedPropertyMightBeUninitializedInspection",
"shortDescription": {
"text": "Typed property might be uninitialized"
},
"fullDescription": {
"text": "Reports the attempts to read from an uninitialized typed property. Such attempts will result in 'TypeError'. Typed properties should be initialized in any of the following ways: by a default value in the constructor by the '__get()' magic getter in-place, at the moment of usage See Uninitialized and Unset Properties (php.net) for details.",
"markdown": "Reports the attempts to read from an uninitialized typed property. Such attempts will result in `TypeError`.\n\n\nTyped properties should be initialized in any of the following ways:\n\n* by a default value\n* in the constructor\n* by the `__get()` magic getter\n* in-place, at the moment of usage\n\n\nSee [Uninitialized and Unset Properties (php.net)](https://wiki.php.net/rfc/typed_properties_v2#uninitialized_and_unset_properties) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PhpTypedPropertyMightBeUninitializedInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Control flow",
"index": 25,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnnecessaryFullyQualifiedNameInspection",
"shortDescription": {
"text": "Unnecessary fully qualified name"
},
"fullDescription": {
"text": "Reports the usages of fully qualified class names, which can be shortened without adding the 'use' statement.",
"markdown": "Reports the usages of fully qualified class names, which can be shortened without adding the `use` statement."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnnecessaryFullyQualifiedNameInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpInconsistentReturnPointsInspection",
"shortDescription": {
"text": "Inconsistent return points"
},
"fullDescription": {
"text": "Reports inconsistencies in function/method exit points. The following types of inconsistencies are reported: The function/method contains the 'return' statements both with and without arguments. The function/method may return a value or otherwise end its execution without returning anything. Technically these are not errors, but practically they usually indicate a programming mistake.",
"markdown": "Reports inconsistencies in function/method exit points.\n\n\nThe following types of inconsistencies are reported:\n\n* The function/method contains the `return` statements both with and without arguments.\n* The function/method may return a value or otherwise end its execution without returning anything.\n\n\nTechnically these are not errors, but practically they usually indicate a programming mistake."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PhpInconsistentReturnPointsInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpInapplicableAttributeTargetDeclarationInspection",
"shortDescription": {
"text": "Non-applicable attribute target declaration"
},
"fullDescription": {
"text": "Reports the attributes that do not have the appropriate 'Attribute::TARGET_*' flag in their arguments declaration. See Attributes (php.net) for details.",
"markdown": "Reports the attributes that do not have the appropriate `Attribute::TARGET_*` flag in their arguments declaration.\n\n\nSee [Attributes (php.net)](https://wiki.php.net/rfc/attributes_v2) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PhpInapplicableAttributeTargetDeclarationInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Attributes",
"index": 120,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpMissingParentCallMagicInspection",
"shortDescription": {
"text": "Missing parent call for magic methods"
},
"fullDescription": {
"text": "Reports the magic methods that do not call their parent magic method.",
"markdown": "Reports the magic methods that do not call their parent magic method."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpMissingParentCallMagicInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpMatchExpressionCanBeReplacedWithTernaryInspection",
"shortDescription": {
"text": "'match' expression can be replace with ternary expression"
},
"fullDescription": {
"text": "Reports the 'match' expressions containing a default arm and a single non-default arm. Such 'match' expressions can be replaced with ternary expressions. See Match expression (php.net) for details.",
"markdown": "Reports the `match` expressions containing a default arm and a single non-default arm. Such `match` expressions can be replaced with ternary expressions.\n\n\nSee [Match expression (php.net)](https://wiki.php.net/rfc/match_expression_v2) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpMatchExpressionCanBeReplacedWithTernaryInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpToStringMayProduceExceptionInspection",
"shortDescription": {
"text": "'__toString' may throw an exception"
},
"fullDescription": {
"text": "Reports the usages of '__toString' that may throw an exception, which is not allowed for PHP language level lower than 7.4.",
"markdown": "Reports the usages of `__toString` that may throw an exception, which is not allowed for PHP language level lower than 7.4."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PhpToStringMayProduceExceptionInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnitDeprecatedExpectExceptionInspection",
"shortDescription": {
"text": "Deprecated expectException usage"
},
"fullDescription": {
"text": "Reports deprecated usages of 'expectException()'. Support for using the 'expectException()' method with '\\PHPUnit\\Framework\\Error\\Deprecated', '\\PHPUnit\\Framework\\Error\\Error', '\\PHPUnit\\Framework\\Error\\Notice', and '\\PHPUnit\\Framework\\Error\\Warning' is deprecated and will be removed in PHPUnit 10. Instead, the 'expectDeprecation()', 'expectError()', 'expectNotice()', and 'expectWarning()' methods should be used. See Testing PHP Errors, Warnings, and Notices (phpunit.readthedocs.io) for details.",
"markdown": "Reports deprecated usages of `expectException()`.\n\n\nSupport for using the `expectException()` method with\n`\\PHPUnit\\Framework\\Error\\Deprecated`,\n`\\PHPUnit\\Framework\\Error\\Error`,\n`\\PHPUnit\\Framework\\Error\\Notice`, and\n`\\PHPUnit\\Framework\\Error\\Warning` is deprecated and will be removed in PHPUnit 10.\n\n\nInstead, the `expectDeprecation()`, `expectError()`, `expectNotice()`, and\n`expectWarning()` methods should be used.\n\n\nSee [Testing PHP Errors, Warnings, and Notices (phpunit.readthedocs.io)](https://phpunit.readthedocs.io/en/stable/writing-tests-for-phpunit.html#testing-php-errors-warnings-and-notices) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnitDeprecatedExpectExceptionInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPUnit",
"index": 131,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpMatchCanBeReplacedWithSwitchStatementInspection",
"shortDescription": {
"text": "'match' can be replaced with 'switch' statement"
},
"fullDescription": {
"text": "Reports the 'match' expressions that can be replaced with 'switch' statements. Note that 'match' expressions use strict type comparison, while 'switch' statements rely on loose comparison. As a result, the expression semantics may change after replacement. See match (php.net) and switch (php.net) for details.",
"markdown": "Reports the `match` expressions that can be replaced with `switch` statements.\n\n\nNote that `match` expressions use strict type comparison, while `switch` statements rely on loose comparison. As a\nresult, the expression semantics may change after replacement.\n\n\nSee [match (php.net)](https://www.php.net/manual/en/control-structures.match.php) and [switch (php.net)](https://www.php.net/manual/en/control-structures.switch.php) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpMatchCanBeReplacedWithSwitchStatementInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDocSignatureIsNotCompleteInspection",
"shortDescription": {
"text": "PHPDoc comment signature is not complete"
},
"fullDescription": {
"text": "Reports the PHPDoc comments that contain at least one '@param' or '@return' tag but are missing some of the '@param' or '@return' tags for parameters or return types specified in the function/method declaration.",
"markdown": "Reports the PHPDoc comments that contain at least one `@param` or `@return` tag but are missing some of the `@param` or `@return` tags for parameters or return types specified in the function/method declaration."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpDocSignatureIsNotCompleteInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPDoc/Code style",
"index": 68,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpAutovivificationOnFalseValuesInspection",
"shortDescription": {
"text": "Automatic conversion of 'false' to array is deprecated"
},
"fullDescription": {
"text": "Reports automatic conversions of 'false' values to arrays. Such expressions are deprecated starting from PHP 8.1. See Deprecate autovivification on false for details.",
"markdown": "Reports automatic conversions of `false` values to arrays. Such expressions are deprecated starting from PHP 8.1.\n\n\nSee [Deprecate autovivification on false](https://wiki.php.net/rfc/autovivification_false) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpAutovivificationOnFalseValuesInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDeprecatedImplodeUsageInspection",
"shortDescription": {
"text": "Deprecated 'implode/join' usage"
},
"fullDescription": {
"text": "Reports deprecated usage of the 'implode' and 'join' functions. Starting from PHP 7.4, using 'implode' and 'join' with an array as the first argument and a string as the second argument is deprecated. See Deprecations for PHP 7.4 (php.net) for details.",
"markdown": "Reports deprecated usage of the `implode` and `join` functions.\n\nStarting from PHP 7.4, using `implode` and `join` with an array as the first argument and a string as the second argument is deprecated.\n\n\nSee [Deprecations for PHP 7.4 (php.net)](https://wiki.php.net/rfc/deprecations_php_7_4#implode_parameter_order_mix) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpDeprecatedImplodeUsageInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDangerousArrayInitializationInspection",
"shortDescription": {
"text": "Dangerous array initialization"
},
"fullDescription": {
"text": "Reports dangerous array initializations (such as '$arr[] = value'). This practice is discouraged because if '$arr' already contains some value (for example, a string from a request variable), then this value will stay in place and '[]' may actually stand for string access operator. It is always preferable to initialize a variable by direct assignment. See Creating/modifying with square bracket syntax (php.net) for details.",
"markdown": "Reports dangerous array initializations (such as `$arr[] = value`).\n\n\nThis practice is discouraged because if `$arr` already contains some value (for example, a string from a request variable), then this value will stay in place and `[]` may actually stand for string access operator. It is always preferable to initialize a variable by direct assignment.\n\nSee [Creating/modifying with square bracket syntax (php.net)](https://www.php.net/manual/en/language.types.array.php#language.types.array.syntax.modifying) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpDangerousArrayInitializationInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpMockeryInvalidMockingMethodInspection",
"shortDescription": {
"text": "Invalid Mockery mocking target"
},
"fullDescription": {
"text": "Reports the methods and classes that are incorrectly mocked in Mockery tests. The following entities are reported: 'private' methods 'protected' methods without appropriate '\\Mockery\\Mock::shouldAllowMockingProtectedMethods' call",
"markdown": "Reports the methods and classes that are incorrectly mocked in Mockery tests.\n\n\nThe following entities are reported:\n\n* `private` methods\n* `protected` methods without appropriate `\\Mockery\\Mock::shouldAllowMockingProtectedMethods` call"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "PhpMockeryInvalidMockingMethodInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPUnit",
"index": 131,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnitDeprecatedCallsIn10VersionInspection",
"shortDescription": {
"text": "Method is deprecated in PHPUnit 10"
},
"fullDescription": {
"text": "Reports the calls to the PHPUnit assertion methods that are removed in PHPUnit 10.",
"markdown": "Reports the calls to the PHPUnit assertion methods that are removed in PHPUnit 10."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PhpUnitDeprecatedCallsIn10VersionInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPUnit",
"index": 131,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpFieldAssignmentTypeMismatchInspection",
"shortDescription": {
"text": "Type mismatch in property assignment"
},
"fullDescription": {
"text": "Reports type violations in properties assignments.",
"markdown": "Reports type violations in properties assignments."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpFieldAssignmentTypeMismatchInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Type compatibility",
"index": 147,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpMissingParentConstructorInspection",
"shortDescription": {
"text": "Missing parent call for constructor"
},
"fullDescription": {
"text": "Reports the constructors that do not call their parent constructor.",
"markdown": "Reports the constructors that do not call their parent constructor."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PhpMissingParentConstructorInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDynamicAsStaticMethodCallInspection",
"shortDescription": {
"text": "Dynamic method called as static"
},
"fullDescription": {
"text": "Reports static calls to dynamic class methods. For classes having the magic method '__callStatic', a separate inspection severity and highlighting level can be set.",
"markdown": "Reports static calls to dynamic class methods.\n\nFor classes having the magic method `__callStatic`, a separate inspection severity and highlighting level can be set."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PhpDynamicAsStaticMethodCallInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpRegExpUnsupportedModifierInspection",
"shortDescription": {
"text": "Unsupported modifier"
},
"fullDescription": {
"text": "Reports the usages of the 'e' modifier in regular expression patterns. In PHP 7.0 and later, such usages are deprecated and will emit an 'E_WARNING'.",
"markdown": "Reports the usages of the `e` modifier in regular expression patterns. In PHP 7.0 and later, such usages are deprecated and will emit an `E_WARNING`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PhpRegExpUnsupportedModifierInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Regular expressions",
"index": 151,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpPassByRefInspection",
"shortDescription": {
"text": "Pass parameter by reference"
},
"fullDescription": {
"text": "Reports the arguments in a function/method call that cannot be passed by reference. Only variables and references returned from functions can be passed by reference. See Passing by Reference (php.net) for details.",
"markdown": "Reports the arguments in a function/method call that cannot be passed by reference.\n\n\nOnly variables and references returned from functions can be passed by reference. See [Passing by Reference (php.net)](https://www.php.net/manual/en/language.references.pass.php#language.references.pass) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "PhpPassByRefInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpTooLongMemberReferenceChainInspection",
"shortDescription": {
"text": "Member reference chain is too long to analyze"
},
"fullDescription": {
"text": "Reports method reference chains that are too long for IDE to analyze.",
"markdown": "Reports method reference chains that are too long for IDE to analyze."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PhpTooLongMemberReferenceChainInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpInArrayCanBeReplacedWithComparisonInspection",
"shortDescription": {
"text": "'in_array' can be replaced with comparison"
},
"fullDescription": {
"text": "Reports the 'in_array()' calls that are provided with a single-element array as the '$haystack' argument. Such calls can be replaced with direct comparisons. See in_array (php.net) for details.",
"markdown": "Reports the `in_array()` calls that are provided with a single-element array as the `$haystack` argument. Such calls can be replaced with direct comparisons.\n\n\nSee [in_array (php.net)](https://www.php.net/manual/en/function.in-array.php) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpInArrayCanBeReplacedWithComparisonInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpModuloByOneInspection",
"shortDescription": {
"text": "Modulo operation with '1' as operand"
},
"fullDescription": {
"text": "Reports the modulo expressions '%' that always evaluate to '0' or '1'.",
"markdown": "Reports the modulo expressions `%` that always evaluate to `0` or `1`."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpModuloByOneInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpArrayPushWithOneElementInspection",
"shortDescription": {
"text": "'array_push()' with single element"
},
"fullDescription": {
"text": "Reports the 'array_push()' calls that are used to add a single element to an array. In such cases, it is recommended to use '$array[] =' instead, which adds no overhead of calling a function. See array_push (php.net) for details.",
"markdown": "Reports the `array_push()` calls that are used to add a single element to an array. In such cases, it is recommended to use `$array[] =` instead, which adds no overhead of calling a function.\n\n\nSee [array_push (php.net)](https://www.php.net/manual/en/function.array-push.php) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpArrayPushWithOneElementInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpRedundantOptionalArgumentInspection",
"shortDescription": {
"text": "Redundant optional argument"
},
"fullDescription": {
"text": "Reports redundant arguments that match the corresponding default values for optional parameters.",
"markdown": "Reports redundant arguments that match the corresponding default values for optional parameters."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpRedundantOptionalArgumentInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpExpectedValuesShouldBeUsedInspection",
"shortDescription": {
"text": "Expected values should be used"
},
"fullDescription": {
"text": "Reports the values in assignment and comparison expressions that should be replaced with one of the expected values (that is, the values specified via the '#[ExpectedValues]' attribute). See Attributes (php.net) for details.",
"markdown": "Reports the values in assignment and comparison expressions that should be replaced with one of the expected values (that is, the values specified via the `#[ExpectedValues]` attribute).\n\n\nSee [Attributes (php.net)](https://wiki.php.net/rfc/attributes_v2) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpExpectedValuesShouldBeUsedInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Attributes",
"index": 120,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnusedFieldDefaultValueInspection",
"shortDescription": {
"text": "Redundant property initializer"
},
"fullDescription": {
"text": "Reports the fields with default initializers that are always overwritten in the class constructor.",
"markdown": "Reports the fields with default initializers that are always overwritten in the class constructor."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnusedFieldDefaultValueInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Unused symbols",
"index": 168,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpNamedArgumentUsageInspection",
"shortDescription": {
"text": "Argument with name identifier"
},
"fullDescription": {
"text": "Reports arguments with name identifiers.",
"markdown": "Reports arguments with name identifiers."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpNamedArgumentUsageInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnnecessaryStaticReferenceInspection",
"shortDescription": {
"text": "Redundant 'static' in final class"
},
"fullDescription": {
"text": "Reports 'static' usages inside final class",
"markdown": "Reports `static` usages inside final class"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnnecessaryStaticReferenceInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpClassCantBeUsedAsAttributeInspection",
"shortDescription": {
"text": "Class cannot be used as attribute"
},
"fullDescription": {
"text": "Reports the attributes that are resolved to a class not annotated with '#[Attribute]'. See Attributes (php.net) for details.",
"markdown": "Reports the attributes that are resolved to a class not annotated with `#[Attribute]`.\n\n\nSee [Attributes (php.net)](https://wiki.php.net/rfc/attributes_v2) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PhpClassCantBeUsedAsAttributeInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Attributes",
"index": 120,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUndefinedCallbackInspection",
"shortDescription": {
"text": "Undefined callback"
},
"fullDescription": {
"text": "Reports the functions, methods, properties, or classes that are referenced from a callback but are not found. Use the options below to customize the inspection: Ignore callback from *_exists and is_callable functions: if selected, the inspection will skip callback references from the 'method_exists', 'function_exists', 'property_exists', 'class_exists' and 'is_callable' functions. Don't report in case of ambiguity: if selected, the inspection will skip the parameters with multiple possible types, for example marked as 'callable|string'.",
"markdown": "Reports the functions, methods, properties, or classes that are referenced from a callback but are not found.\n\nUse the options below to customize the inspection:\n\n* **Ignore callback from \\*_exists and is_callable functions** : if selected, the inspection will skip callback references from the `method_exists`, `function_exists`, `property_exists`, `class_exists` and `is_callable` functions.\n* **Don't report in case of ambiguity** : if selected, the inspection will skip the parameters with multiple possible types, for example marked as `callable|string`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PhpUndefinedCallbackInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Undefined symbols",
"index": 174,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnnecessaryStringCastInspection",
"shortDescription": {
"text": "Redundant cast to string"
},
"fullDescription": {
"text": "Reports the '(string)' casts and 'strval()' calls that are redundant since casting to string is performed implicitly.",
"markdown": "Reports the `(string)` casts and `strval()` calls that are redundant since casting to string is performed implicitly."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnnecessaryStringCastInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDeprecatedAutoloadDeclarationInspection",
"shortDescription": {
"text": "Deprecated '__autoload()' function declaration"
},
"fullDescription": {
"text": "Reports the '__autoload()' function declarations. Starting from PHP 7.4, declaring '__autoload()' functions is deprecated. Starting from PHP 8.0, declaring '__autoload()' functions is forbidden. See __autoload (php.net) for details.",
"markdown": "Reports the `__autoload()` function declarations.\n\n* Starting from PHP 7.4, declaring `__autoload()` functions is deprecated.\n* Starting from PHP 8.0, declaring `__autoload()` functions is forbidden.\n\n\nSee [__autoload (php.net)](https://www.php.net/manual/en/function.autoload.php) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpDeprecatedAutoloadDeclarationInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpMethodNamingConventionInspection",
"shortDescription": {
"text": "Method name is not following coding convention"
},
"fullDescription": {
"text": "Reports the methods' names that are either too short, too long, or do not follow the specified regular expression pattern. Some coding styles have a special naming convention for methods. Use the inspection options to specify minimum/maximum length and the regular expression expected for methods' names. To ignore the names' length, specify 0. To learn more about regular expressions, refer to the Quick Start guide (regular-expressions.info).",
"markdown": "Reports the methods' names that are either too short, too long, or do not follow the specified regular expression pattern. Some coding styles have a special naming convention for methods.\n\n\nUse the inspection options to specify minimum/maximum length and the regular expression expected for methods' names.\nTo ignore the names' length, specify **0**.\n\n\nTo learn more about regular expressions, refer to the [Quick Start guide (regular-expressions.info)](https://www.regular-expressions.info/quickstart.html)."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpMethodNamingConventionInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Naming conventions",
"index": 21,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnusedPrivateMethodInspection",
"shortDescription": {
"text": "Unused private method"
},
"fullDescription": {
"text": "Reports the private methods that are never used.",
"markdown": "Reports the private methods that are never used."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnusedPrivateMethodInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Unused symbols",
"index": 168,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpPregSplitWithoutRegExpInspection",
"shortDescription": {
"text": "'preg_split' can be replaced with 'explode'"
},
"fullDescription": {
"text": "Reports 'preg_split()' calls that can be replaced with 'explode()'.",
"markdown": "Reports `preg_split()` calls that can be replaced with `explode()`."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpPregSplitWithoutRegExpInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnpackingArraysWithStringKeysInspection",
"shortDescription": {
"text": "Unpacking arrays with string keys is forbidden for PHP < 8.1"
},
"fullDescription": {
"text": "Reports array unpacking with string keys in PHP < 8.1 See Array unpacking with string keys for details.",
"markdown": "Reports array unpacking with string keys in PHP \\< 8.1\n\n\nSee [Array unpacking with string keys](https://wiki.php.net/rfc/array_unpacking_string_keys) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "PhpUnpackingArraysWithStringKeysInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpPregMatchRedundantClosureInspection",
"shortDescription": {
"text": "Redundant closure '.*'"
},
"fullDescription": {
"text": "Reports redundant leading and trailing '.*' in pattern for `preg_match` function.",
"markdown": "Reports redundant leading and trailing '.\\*' in pattern for \\`preg_match\\` function."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpPregMatchRedundantClosureInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpAccessingStaticMembersOnTraitInspection",
"shortDescription": {
"text": "Accessing static trait members"
},
"fullDescription": {
"text": "Reports the static member access expressions used on traits. Such direct access is deprecated starting from PHP 8.1. Instead, static members should be accessed on the class that uses the trait. See Deprecations for PHP 8.1: Accessing static members on traits (php.net) for details.",
"markdown": "Reports the static member access expressions used on traits. Such direct access is deprecated starting from PHP 8.1. Instead, static members should be accessed on the class that uses the trait.\n\n\nSee [Deprecations for PHP 8.1: Accessing static members on traits (php.net)](https://wiki.php.net/rfc/deprecations_php_8_1#accessing_static_members_on_traits) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpAccessingStaticMembersOnTraitInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpArraySearchInBooleanContextInspection",
"shortDescription": {
"text": "'array_search()' can be replaced with 'in_array()' call"
},
"fullDescription": {
"text": "Reports the 'array_search()' calls that are only used for checking whether an element exists in array, that is, the expressions like 'if (array_search($a, $b) === false) {}'. Such calls can be safely replaced with 'in_array()' calls.",
"markdown": "Reports the `array_search()` calls that are only used for checking whether an element exists in array, that is, the expressions like `if (array_search($a, $b) === false) {}`. Such calls can be safely replaced with `in_array()` calls."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpArraySearchInBooleanContextInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpMissingVisibilityInspection",
"shortDescription": {
"text": "Missing visibility"
},
"fullDescription": {
"text": "Reports the properties, constants, and methods that are declared without visibility definition. According to PSR-12, visibility MUST be defined on: All properties, All constants if your project's PHP minimum version supports constant visibilities (PHP 7.1 or later), All methods. See PSR-12: Extended Coding Style (php-fig.org) for details.",
"markdown": "Reports the properties, constants, and methods that are declared without visibility definition.\n\nAccording to PSR-12, visibility MUST be defined on:\n\n* All properties,\n* All constants if your project's PHP minimum version supports constant visibilities (PHP 7.1 or later),\n* All methods.\n\n\nSee [PSR-12: Extended Coding Style (php-fig.org)](https://www.php-fig.org/psr/psr-12/#43-properties-and-constants) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpMissingVisibilityInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style/PSR-12",
"index": 188,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnitExpectedExceptionDocTagIsDeprecatedInspection",
"shortDescription": {
"text": "Deprecated exception handling via doc tags"
},
"fullDescription": {
"text": "Reports the usages of the following deprecated PHPUnit doc tags: '@expectedException' '@expectedExceptionMessage' '@expectedExceptionCode' '@expectedExceptionMessageRegExp'",
"markdown": "Reports the usages of the following deprecated PHPUnit doc tags:\n\n* `@expectedException`\n* `@expectedExceptionMessage`\n* `@expectedExceptionCode`\n* `@expectedExceptionMessageRegExp`"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnitExpectedExceptionDocTagIsDeprecatedInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPUnit",
"index": 131,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpNeverTypedFunctionReturnViolationInspection",
"shortDescription": {
"text": "'never'-typed function returns a value"
},
"fullDescription": {
"text": "Reports the functions with the 'never' return type hint that may return some value. Functions with such a return type are not expected to return any value and must prevent the rest of the script execution by either calling 'die()', 'exit()', and so on, or throwing an exception. See noreturn type (php.net) for details.",
"markdown": "Reports the functions with the `never` return type hint that may return some value. Functions with such a return type are not expected to return any value and must prevent the rest of the script execution by either calling `die()`, `exit()`, and so on, or throwing an exception.\n\n\nSee [noreturn type (php.net)](https://wiki.php.net/rfc/noreturn_type) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "PhpNeverTypedFunctionReturnViolationInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/Control flow",
"index": 25,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpInappropriateInheritDocUsageInspection",
"shortDescription": {
"text": "Inappropriate @inheritDoc usage"
},
"fullDescription": {
"text": "Reports inappropriate '@inheritDoc' usages: On non-class members On class members without any super members having a doc comment.",
"markdown": "Reports inappropriate `@inheritDoc` usages:\n\n* On non-class members\n* On class members without any super members having a doc comment."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpInappropriateInheritDocUsageInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPDoc",
"index": 2,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpClassConstantAccessedViaChildClassInspection",
"shortDescription": {
"text": "Class constant referenced via child class"
},
"fullDescription": {
"text": "Reports the class constant references that target the constant from the parent class of the referenced class.",
"markdown": "Reports the class constant references that target the constant from the parent class of the referenced class."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpClassConstantAccessedViaChildClassInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpSwitchStatementWitSingleBranchInspection",
"shortDescription": {
"text": "'switch' with single 'case'"
},
"fullDescription": {
"text": "Reports the 'switch' statements that only contain a single 'case' statement. Such 'switch' statements can be converted into 'if' statements.",
"markdown": "Reports the `switch` statements that only contain a single `case` statement. Such `switch` statements can be converted into `if` statements."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpSwitchStatementWitSingleBranchInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpContinueTargetingSwitchInspection",
"shortDescription": {
"text": "'continue' is targeting 'switch' statement"
},
"fullDescription": {
"text": "Reports the 'continue' statements that are targeting 'switch' statements. In PHP 7.3 and later, such usages are deprecated and will emit an 'E_WARNING', since they are most likely the result of a programming mistake. In PHP, such 'continue' statements are equivalent to 'break', that is, they end the execution of the current 'switch' structure. In other languages, such 'continue' statements behave as 'continue 2' in PHP, that is, they take the execution to a higher level control structure (for example, the next iteration of an outer loop). See continue (php.net), break (php.net), and switch (php.net) for details.",
"markdown": "Reports the `continue` statements that are targeting `switch` statements. In PHP 7.3 and later, such usages are deprecated and will emit an `E_WARNING`, since they are most likely the result of a programming mistake.\n\n* In PHP, such `continue` statements are equivalent to `break`, that is, they end the execution of the current `switch` structure.\n* In other languages, such `continue` statements behave as `continue 2` in PHP, that is, they take the execution to a higher level control structure (for example, the next iteration of an outer loop).\n\n\nSee [continue (php.net)](https://www.php.net/manual/en/control-structures.continue.php), [break (php.net)](https://www.php.net/manual/en/control-structures.break.php), and [switch (php.net)](https://www.php.net/manual/en/control-structures.switch.php) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpContinueTargetingSwitchInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpGetClassCanBeReplacedWithClassNameLiteralInspection",
"shortDescription": {
"text": "'get_class()' call can be replaced with '::class'"
},
"fullDescription": {
"text": "Reports the 'get_class()' calls and suggests replacing them with '::class' when PHP Language level is set to 8.0 or later. See Allow ::class on objects (php.net) for details.",
"markdown": "Reports the `get_class()` calls and suggests replacing them with `::class` when PHP Language level is set to 8.0 or later.\n\n\nSee [Allow ::class on objects (php.net)](https://wiki.php.net/rfc/class_name_literal_on_object) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpGetClassCanBeReplacedWithClassNameLiteralInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUndefinedMethodInspection",
"shortDescription": {
"text": "Undefined method"
},
"fullDescription": {
"text": "Reports the references to class methods that are not defined.",
"markdown": "Reports the references to class methods that are not defined."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpUndefinedMethodInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Undefined symbols",
"index": 174,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpIncompatibleReturnTypeInspection",
"shortDescription": {
"text": "Incompatible return type"
},
"fullDescription": {
"text": "Reports the 'return' statements whose return value type is not compatible with the one declared for a function/method.",
"markdown": "Reports the `return` statements whose return value type is not compatible with the one declared for a function/method."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpIncompatibleReturnTypeInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Type compatibility",
"index": 147,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpMissingStrictTypesDeclarationInspection",
"shortDescription": {
"text": "Missing strict types declaration"
},
"fullDescription": {
"text": "Detects the missing 'declare(strict_types=1)' directive in the file. See Strict typing (php.net) to learn more about why you may need use this directive.",
"markdown": "Detects the missing `declare(strict_types=1)` directive in the file.\n\n\nSee [Strict typing (php.net)](https://www.php.net/manual/en/language.types.declarations.php#language.types.declarations.strict) to learn more about why you may need use this directive."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpMissingStrictTypesDeclarationInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Type compatibility",
"index": 147,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpAssignmentInConditionInspection",
"shortDescription": {
"text": "Assignment in condition"
},
"fullDescription": {
"text": "Reports the assignments that are used in conditional expressions.",
"markdown": "Reports the assignments that are used in conditional expressions."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpAssignmentInConditionInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpRegExpRedundantModifierInspection",
"shortDescription": {
"text": "Redundant modifier"
},
"fullDescription": {
"text": "Reports the 'i' (case insensitivity) modifiers that are used in regular expression patterns containing no letters. Such modifiers are redundant and can be safely removed.",
"markdown": "Reports the `i` (case insensitivity) modifiers that are used in regular expression patterns containing no letters. Such modifiers are redundant and can be safely removed."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpRegExpRedundantModifierInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Regular expressions",
"index": 151,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpCaseWithValueNotFoundInEnumInspection",
"shortDescription": {
"text": "Case with specified value not found in enum"
},
"fullDescription": {
"text": "Reports the arguments of enum's 'from' method calls that are not found in target enum classes. See Enumerations (php.net) for details.",
"markdown": "Reports the arguments of enum's `from` method calls that are not found in target enum classes.\n\n\nSee [Enumerations (php.net)](https://wiki.php.net/rfc/enumerations) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "PhpCaseWithValueNotFoundInEnumInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpArrayAccessCanBeReplacedWithForeachValueInspection",
"shortDescription": {
"text": "Array access can be replaced with 'foreach' value"
},
"fullDescription": {
"text": "Reports the array access expressions inside 'foreach' loops that can be replaced with a 'foreach' value.",
"markdown": "Reports the array access expressions inside `foreach` loops that can be replaced with a `foreach` value."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpArrayAccessCanBeReplacedWithForeachValueInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpLoopCanBeConvertedToArrayFilterInspection",
"shortDescription": {
"text": "Loop can be converted to 'array_filter()' call"
},
"fullDescription": {
"text": "Reports the 'foreach' loops that can be replaced with 'array_filter()' calls.",
"markdown": "Reports the `foreach` loops that can be replaced with `array_filter()` calls."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpLoopCanBeConvertedToArrayFilterInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnitAssertCanBeReplacedWithEmptyInspection",
"shortDescription": {
"text": "Assertion can be replaced with 'assertEmpty/assertNotEmpty'"
},
"fullDescription": {
"text": "Reports the 'assertTrue'/'assertFalse' usages that can be replaced with 'assertEmpty'/'assertNotEmpty' in PHPUnit tests. See assertEmpty (phpunit.readthedocs.io) for details.",
"markdown": "Reports the `assertTrue`/`assertFalse` usages that can be replaced with `assertEmpty`/`assertNotEmpty` in PHPUnit tests.\n\n\nSee [assertEmpty (phpunit.readthedocs.io)](https://phpunit.readthedocs.io/en/stable/assertions.html#assertempty) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnitAssertCanBeReplacedWithEmptyInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPUnit",
"index": 131,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpIgnoredClassAliasDeclaration",
"shortDescription": {
"text": "Ignored class alias declaration"
},
"fullDescription": {
"text": "Reports the class alias declarations that are ignored by the IDE because the actual class declaration with the same FQN exists. The inspection is intended to clarify the IDEs behavior in the cases when both the class and the class alias declarations are present. When several declarations with the same FQN exist, the IDE usually fails to choose a single one between them. This leads to incorrect code completion, erroneous type inference, and so on. Since the class declaration prevails over the class alias declaration, the latter becomes redundant and therefore ignored by the IDE. Note that ignoring class alias declarations does not affect the behavior of the PHP interpreter.",
"markdown": "Reports the class alias declarations that are ignored by the IDE because the actual class declaration with the same FQN exists.\n\n\nThe inspection is intended to clarify the IDE's behavior in the cases when both the class and the class alias declarations are present.\nWhen several declarations with the same FQN exist, the IDE usually fails to choose a single one between them.\nThis leads to incorrect code completion, erroneous type inference, and so on. Since the class declaration prevails\nover the class alias declaration, the latter becomes redundant and therefore ignored by the IDE.\n\n\nNote that ignoring class alias declarations does not affect the behavior of the PHP interpreter."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpIgnoredClassAliasDeclaration",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpStatementHasEmptyBodyInspection",
"shortDescription": {
"text": "Statement has empty body"
},
"fullDescription": {
"text": "Reports the statements that have empty bodies. While occasionally useful, such statements are often the result of typos and may cause confusion.",
"markdown": "Reports the statements that have empty bodies.\n\nWhile occasionally useful, such statements are often the result of typos and may cause confusion."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PhpStatementHasEmptyBodyInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpPureFunctionMayProduceSideEffectsInspection",
"shortDescription": {
"text": "Pure function may produce side effects"
},
"fullDescription": {
"text": "Reports the '#[Pure]' annotations used on functions that may produce side effects.",
"markdown": "Reports the `#[Pure]` annotations used on functions that may produce side effects."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PhpPureFunctionMayProduceSideEffectsInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Attributes",
"index": 120,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpForeachNestedOuterKeyValueVariablesConflictInspection",
"shortDescription": {
"text": "Nested vs outer 'foreach' variables conflict"
},
"fullDescription": {
"text": "Reports the variables that are used as a key or value both by the inner and outer 'foreach' loops. In most cases, this is an error or may result in an error in the future.",
"markdown": "Reports the variables that are used as a key or value both by the inner and outer `foreach` loops. In most cases, this is an error or may result in an error in the future."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpForeachNestedOuterKeyValueVariablesConflictInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpMethodParametersCountMismatchInspection",
"shortDescription": {
"text": "Parameters number mismatch declaration"
},
"fullDescription": {
"text": "Reports the function/method calls that take more parameters than specified in their declaration.",
"markdown": "Reports the function/method calls that take more parameters than specified in their declaration."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpMethodParametersCountMismatchInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpSwitchCaseWithoutDefaultBranchInspection",
"shortDescription": {
"text": "Switch statement without default branch"
},
"fullDescription": {
"text": "Reports the 'switch' statements without a default branch.",
"markdown": "Reports the `switch` statements without a default branch."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpSwitchCaseWithoutDefaultBranchInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LaravelPintValidationInspection",
"shortDescription": {
"text": "Laravel Pint validation"
},
"fullDescription": {
"text": "Reports coding style problems detected by Laravel Pint. The inspection requires Laravel Pint to be properly installed and set up in the IDE under Settings | PHP | Quality Tools | Laravel Pint. To learn more about Laravel Pint installation, see Laravel Pint.",
"markdown": "Reports coding style problems detected by Laravel Pint.\n\n\nThe inspection requires Laravel Pint to be properly installed and set up in the IDE under\n[Settings \\| PHP \\| Quality Tools \\| Laravel Pint](settings://settings.php.quality.tools?Laravel%20Pint).\n\n\nTo learn more about Laravel Pint installation, see [Laravel Pint](https://laravel.com/docs/10.x/pint#installation)."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "LaravelPintValidationInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Quality tools",
"index": 204,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpMultipleClassDeclarationsInspection",
"shortDescription": {
"text": "Multiple class declarations"
},
"fullDescription": {
"text": "Reports the references to classes that have multiple declarations in project files. Use the options below to customize the inspection: Ignore PHPDoc: if selected, the inspection will not report multiple declarations of classes referenced in PHPDoc blocks.",
"markdown": "Reports the references to classes that have multiple declarations in project files.\n\nUse the options below to customize the inspection:\n\n* **Ignore PHPDoc**: if selected, the inspection will not report multiple declarations of classes referenced in PHPDoc blocks."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpMultipleClassDeclarationsInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Undefined symbols",
"index": 174,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnusedSwitchBranchInspection",
"shortDescription": {
"text": "Unused 'switch' branch"
},
"fullDescription": {
"text": "Reports the branches in 'switch' statements that do not belong to the set of enum cases and as a result are never executed. See Enumerations (php.net) for details.",
"markdown": "Reports the branches in `switch` statements that do not belong to the set of enum cases and as a result are never executed.\n\n\nSee [Enumerations (php.net)](https://wiki.php.net/rfc/enumerations) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnusedSwitchBranchInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpLoopCanBeReplacedWithStrRepeatInspection",
"shortDescription": {
"text": "Loop can be replaced with 'str_repeat'"
},
"fullDescription": {
"text": "Reports the 'for' loops that can be safely replaced with 'str_repeat()' calls.",
"markdown": "Reports the `for` loops that can be safely replaced with `str_repeat()` calls."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpLoopCanBeReplacedWithStrRepeatInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnnecessaryCurlyVarSyntaxInspection",
"shortDescription": {
"text": "Unnecessary curly braces syntax for variable"
},
"fullDescription": {
"text": "Reports unnecessary '{' and '}' used for interpolating variables in string literals. See Variable parsing (php.net) for details.",
"markdown": "Reports unnecessary `{` and `}` used for interpolating variables in string literals.\n\n\nSee [Variable parsing (php.net)](https://www.php.net/manual/en/language.types.string.php#language.types.string.parsing) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnnecessaryCurlyVarSyntaxInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDuplicateMatchArmBodyInspection",
"shortDescription": {
"text": "Duplicate arm in 'match' expression"
},
"fullDescription": {
"text": "Reports duplicate bodies in 'match' arms. See Match expression (php.net) for details.",
"markdown": "Reports duplicate bodies in `match` arms.\n\n\nSee [Match expression (php.net)](https://wiki.php.net/rfc/match_expression_v2) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PhpDuplicateMatchArmBodyInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUndefinedFieldInspection",
"shortDescription": {
"text": "Undefined property"
},
"fullDescription": {
"text": "Reports the references to class properties that are not declared. The inspection skips the objects of the 'stdClass' or derived types.",
"markdown": "Reports the references to class properties that are not declared.\n\n\nThe inspection skips the objects of the `stdClass` or derived types."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpUndefinedFieldInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Undefined symbols",
"index": 174,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpPregMatchWithoutEffectiveRegexpInspection",
"shortDescription": {
"text": "'preg_match' can be replaced with 'str_contains'"
},
"fullDescription": {
"text": "Reports the 'preg_match()' calls with 'pattern' arguments that don't use any regexp facilities. Such calls can be replaced with 'str_starts_with()', 'str_ends_with()' or 'str_contains()' calls.",
"markdown": "Reports the `preg_match()` calls with `pattern` arguments that don't use any regexp facilities. Such calls can be replaced with `str_starts_with()`, `str_ends_with()` or `str_contains()` calls."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpPregMatchWithoutEffectiveRegexpInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpIfCanBeReplacedWithMatchExpressionInspection",
"shortDescription": {
"text": "'if' can be replaced with 'match' expression"
},
"fullDescription": {
"text": "Reports the 'if' statements inside 'if-elseif-else' constructs that use strict comparisons ('===') and could be replaced with 'match' expressions.",
"markdown": "Reports the `if` statements inside `if-elseif-else` constructs that use strict comparisons (`===`) and could be replaced with `match` expressions."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpIfCanBeReplacedWithMatchExpressionInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpClassCanBeReadonlyInspection",
"shortDescription": {
"text": "Class can be 'readonly'"
},
"fullDescription": {
"text": "Reports classes which contain only 'readonly' properties.",
"markdown": "Reports classes which contain only `readonly` properties."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpClassCanBeReadonlyInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnusedAliasInspection",
"shortDescription": {
"text": "Unused import"
},
"fullDescription": {
"text": "Reports the imports that are never used.",
"markdown": "Reports the imports that are never used."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnusedAliasInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Unused symbols",
"index": 168,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpIllegalPsrClassPathInspection",
"shortDescription": {
"text": "Class path doesn't match project structure"
},
"fullDescription": {
"text": "Reports the classes with the filepath not following the PSR-0/PSR-4 project structure. You can configure the project vendor roots under Settings/Preferences | Directories. See PSR-0/PSR-4 standards (php-fig.org) for details.",
"markdown": "Reports the classes with the filepath not following the PSR-0/PSR-4 project structure.\n\n\nYou can configure the project vendor roots under **Settings/Preferences \\| Directories**.\n\n\nSee [PSR-0/PSR-4 standards (php-fig.org)](https://www.php-fig.org/psr/psr-4/) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PhpIllegalPsrClassPathInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDefineCanBeReplacedWithConstInspection",
"shortDescription": {
"text": "Define constant name can be replaced with 'const' syntax"
},
"fullDescription": {
"text": "Reports the 'define()' calls that can be replaced with 'const' syntax.",
"markdown": "Reports the `define()` calls that can be replaced with `const` syntax."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpDefineCanBeReplacedWithConstInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpForeachVariableOverwritesAlreadyDefinedVariableInspection",
"shortDescription": {
"text": "'foreach' variable overwrites already defined variable"
},
"fullDescription": {
"text": "Reports the keys and values in 'foreach' loops that are assigned a non-primitive value before the 'foreach' loop and are accessed after it. Such usages may unwillingly overwrite an already defined value and cause latent bugs.",
"markdown": "Reports the keys and values in `foreach` loops that are assigned a non-primitive value before the `foreach` loop and are accessed after it. Such usages may unwillingly overwrite an already defined value and cause latent bugs."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpForeachVariableOverwritesAlreadyDefinedVariableInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Control flow",
"index": 25,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDisabledExtensionStubsInspection",
"shortDescription": {
"text": "Disabled extension stubs"
},
"fullDescription": {
"text": "Reports the usages of classes, functions, and constants, for which the stubs for the corresponding PHP interpreter extensions are disabled. You can configure the set of stubs under Settings | PHP | PHP Runtime. See PhpStorm stubs (blog.jetbrains.com/phpstorm) for details.",
"markdown": "Reports the usages of classes, functions, and constants, for which the stubs for the corresponding PHP interpreter extensions are disabled.\n\n\nYou can configure the set of stubs under\n[Settings \\| PHP \\| PHP Runtime](settings://reference.webide.settings.project.settings.php?PHP%20Runtime).\n\n\nSee [PhpStorm stubs (blog.jetbrains.com/phpstorm)](https://blog.jetbrains.com/phpstorm/2018/03/how-to-provide-stubs-for-phpstorm/) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpDisabledExtensionStubsInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpClosureCanBeConvertedToFirstClassCallableInspection",
"shortDescription": {
"text": "'Closure::fromCallable()' can be converted to the first-class callable syntax"
},
"fullDescription": {
"text": "Reports the 'callable' creation expressions that use 'Closure::fromCallable' but can be replaced with first-class callable syntax 'f(...)' available since PHP 8.1. See First-class callable syntax (php.net) for details.",
"markdown": "Reports the `callable` creation expressions that use `Closure::fromCallable` but can be replaced with first-class callable syntax `f(...)` available since PHP 8.1.\n\n\nSee [First-class callable syntax (php.net)](https://wiki.php.net/rfc/first_class_callable_syntax) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpClosureCanBeConvertedToFirstClassCallableInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpExpressionAlwaysNullInspection",
"shortDescription": {
"text": "Expression is always 'null'"
},
"fullDescription": {
"text": "Reports the variables in 'return' statements that are always 'null'.",
"markdown": "Reports the variables in `return` statements that are always `null`."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpExpressionAlwaysNullInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Control flow",
"index": 25,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDefineConstantNameStartsWithLeadingSlashInspection",
"shortDescription": {
"text": "Constant name defined with a leading slash"
},
"fullDescription": {
"text": "Reports the 'define' constructs in which the constant's FQN starts with a leading slash. Such constants will not be correctly registered by PHP.",
"markdown": "Reports the `define` constructs in which the constant's FQN starts with a leading slash. Such constants will not be correctly registered by PHP."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PhpDefineConstantNameStartsWithLeadingSlashInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnnecessaryParenthesesInspection",
"shortDescription": {
"text": "Unnecessary parentheses"
},
"fullDescription": {
"text": "Reports the expressions containing redundant parenthesis, which can be safely removed.",
"markdown": "Reports the expressions containing redundant parenthesis, which can be safely removed."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnnecessaryParenthesesInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpIfCanBeMergedWithSequentialConditionInspection",
"shortDescription": {
"text": "'if' can be merged with subsequent condition"
},
"fullDescription": {
"text": "Reports the 'if' statements that are followed by 'elseif' or other 'if' statements having the same bodies. Such statements can be merged together.",
"markdown": "Reports the `if` statements that are followed by `elseif` or other `if` statements having the same bodies. Such statements can be merged together."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpIfCanBeMergedWithSequentialConditionInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpReturnDocTypeMismatchInspection",
"shortDescription": {
"text": "Return type in PHPDoc comment does not match the actual return type"
},
"fullDescription": {
"text": "Reports the return types in PHPDoc comments that do not match the actual return type of a function.",
"markdown": "Reports the return types in PHPDoc comments that do not match the actual return type of a function."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpReturnDocTypeMismatchInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPDoc",
"index": 2,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpMissingParamTypeInspection",
"shortDescription": {
"text": "Missing parameter's type declaration"
},
"fullDescription": {
"text": "Reports the parameters that have no type declaration specified.",
"markdown": "Reports the parameters that have no type declaration specified."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpMissingParamTypeInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Type compatibility",
"index": 147,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpNoReturnAttributeCanBeAddedInspection",
"shortDescription": {
"text": "NoReturn attribute can be added"
},
"fullDescription": {
"text": "Reports function without '#[NoReturn]' that are always halting their execution by calling other exitPoint functions attribute.",
"markdown": "Reports function without `#[NoReturn]` that are always halting their execution by calling other exitPoint functions attribute."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PhpNoReturnAttributeCanBeAddedInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Attributes",
"index": 120,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDeprecatedStdLibCallInspection",
"shortDescription": {
"text": "Deprecated Standard Library call"
},
"fullDescription": {
"text": "Reports the calls to Standard PHP Library functions that are deprecated starting from PHP 8.1. The following calls are reported: 'key()', 'current()', 'next()', 'prev()', and 'reset()' calls with objects as arguments. 'mb_check_encoding()' calls without arguments. 'get_class()', 'get_parent_class()' and 'get_called_class()' calls without arguments. 'IntlCalendar::roll()' calls with a Boolean passed as the '$value' argument. 'ctype_*()' calls with non-string arguments. See PHP RFC: Deprecations for PHP 8.1 for details.",
"markdown": "Reports the calls to Standard PHP Library functions that are deprecated starting from PHP 8.1.\n\n\nThe following calls are reported:\n\n* `key()`, `current()`, `next()`, `prev()`, and `reset()` calls with objects as arguments.\n* `mb_check_encoding()` calls without arguments.\n* `get_class()`, `get_parent_class()` and `get_called_class()` calls without arguments.\n* `IntlCalendar::roll()` calls with a Boolean passed as the `$value` argument.\n* `ctype_*()` calls with non-string arguments.\n\n\nSee [PHP RFC: Deprecations for PHP 8.1](https://wiki.php.net/rfc/deprecations_php_8_1) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpDeprecatedStdLibCallInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpForeachArrayIsUsedAsValueInspection",
"shortDescription": {
"text": "Foreach array is used as value"
},
"fullDescription": {
"text": "Reports the variables that are used in a 'foreach' loop as both an array expression and an array's key or value (for example, 'foreach ($items as $items) {}'). Commonly, this is the result of a typing error.",
"markdown": "Reports the variables that are used in a `foreach` loop as both an array expression and an array's key or value (for example, `foreach ($items as $items) {}`).\n\n\nCommonly, this is the result of a typing error."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpForeachArrayIsUsedAsValueInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDuplicateArrayKeysInspection",
"shortDescription": {
"text": "Duplicate array keys"
},
"fullDescription": {
"text": "Reports duplicate keys in array declarations. If multiple elements in the array declaration use the same key, only the last one will be used, and all others will be overwritten.",
"markdown": "Reports duplicate keys in array declarations.\n\nIf multiple elements in the array declaration use the same key, only the last one will be used, and all others will be overwritten."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpDuplicateArrayKeysInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpSignatureMismatchDuringInheritanceInspection",
"shortDescription": {
"text": "Declaration of overridden method should be compatible with parent class"
},
"fullDescription": {
"text": "Reports the overridden methods declarations that are not compatible with the parent class. The inspection is enabled only for the PHP language level lower than 8.0.",
"markdown": "Reports the overridden methods declarations that are not compatible with the parent class. The inspection is enabled only for the PHP language level lower than 8.0."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpSignatureMismatchDuringInheritanceInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHP strict standards",
"index": 219,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpCoveredCharacterInClassInspection",
"shortDescription": {
"text": "Element in class is already covered"
},
"fullDescription": {
"text": "Reports the elements in regular expression character classes that are already covered by another element in the same class. Such elements are redundant and can be safely removed.",
"markdown": "Reports the elements in regular expression character classes that are already covered by another element in the same class. Such elements are redundant and can be safely removed."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpCoveredCharacterInClassInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Regular expressions",
"index": 151,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpCSFixerValidationInspection",
"shortDescription": {
"text": "PHP CS Fixer validation"
},
"fullDescription": {
"text": "Reports coding style problems detected by PHP CS Fixer. The inspection requires PHP CS Fixer to be properly installed and set up in the IDE under Settings | PHP | Quality Tools | PHP CS Fixer. To learn more about installing PHP CS Fixer, see PHP-CS-Fixer installation (GitHub).",
"markdown": "Reports coding style problems detected by PHP CS Fixer.\n\n\nThe inspection requires PHP CS Fixer to be properly installed and set up in the IDE under\n[Settings \\| PHP \\| Quality Tools \\| PHP CS Fixer](settings://settings.php.quality.tools?CS%20Fixer).\n\n\nTo learn more about installing PHP CS Fixer, see [PHP-CS-Fixer installation (GitHub)](https://github.com/FriendsOfPHP/PHP-CS-Fixer#installation)."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpCSFixerValidationInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Quality tools",
"index": 204,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnhandledExceptionInspection",
"shortDescription": {
"text": "Unhandled exception"
},
"fullDescription": {
"text": "Reports the exceptions that are neither enclosed in a 'try-catch' block nor documented via the '@throws' tag.",
"markdown": "Reports the exceptions that are neither enclosed in a `try-catch` block nor documented via the `@throws` tag."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnhandledExceptionInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Error handling",
"index": 222,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpIncludeInspection",
"shortDescription": {
"text": "Unresolved include"
},
"fullDescription": {
"text": "Reports non-resolved 'include', 'include_once', 'require', and 'require_once' expressions.",
"markdown": "Reports non-resolved `include`, `include_once`, `require`, and `require_once` expressions."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpIncludeInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnitAssertEqualsCanBeReplacedWithAssertTrueOrFalseInspection",
"shortDescription": {
"text": "Assertion can be replaced with 'assertTrue/assertFalse'"
},
"fullDescription": {
"text": "Reports the 'assertEquals()' calls with the 'true'/'false' arguments in PHPUnit tests. Such usages can be replaced with 'assertTrue()'/'assertFalse()' calls.",
"markdown": "Reports the `assertEquals()` calls with the `true`/`false` arguments in PHPUnit tests. Such usages can be replaced with `assertTrue()`/`assertFalse()` calls."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnitAssertEqualsCanBeReplacedWithAssertTrueOrFalseInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPUnit",
"index": 131,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpReadonlyPropertyWrittenOutsideDeclarationScopeInspection",
"shortDescription": {
"text": "Write access to 'readonly' property outside of declaration scope"
},
"fullDescription": {
"text": "Reports the write accesses to 'readonly' properties that are made outside the declaration scope. A declaration scope effectively means non-static methods of the class in which a property is declared. See Readonly properties (php.net) for details.",
"markdown": "Reports the write accesses to `readonly` properties that are made outside the declaration scope. A declaration scope effectively means non-static methods of the class in which a property is declared.\n\n\nSee [Readonly properties (php.net)](https://wiki.php.net/rfc/readonly_properties_v2) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "PhpReadonlyPropertyWrittenOutsideDeclarationScopeInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpLoopNeverIteratesInspection",
"shortDescription": {
"text": "Loop does not iterate"
},
"fullDescription": {
"text": "Reports the loop statements whose bodies will execute at most once. The inspection does not report 'foreach' loops with a key or value used inside the loop body. Commonly, such loops are intended to perform an action only on their first iteration (for example, get the first element of an array).",
"markdown": "Reports the loop statements whose bodies will execute at most once.\n\n\nThe inspection does not report `foreach` loops with a key or value used inside the loop body. Commonly, such loops are intended to perform an action only on their first iteration (for example, get the first element of an array)."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpLoopNeverIteratesInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Control flow",
"index": 25,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpVariableNamingConventionInspection",
"shortDescription": {
"text": "Variable name is not following coding convention"
},
"fullDescription": {
"text": "Reports the variables' names that are either too short, too long, or do not follow the specified regular expression pattern. Some coding styles have a special naming convention for variables. Use the inspection options to specify minimum/maximum length and the regular expression expected for variables' names. To ignore the names' length, specify 0. To learn more about regular expressions, refer to the Quick Start guide (regular-expressions.info).",
"markdown": "Reports the variables' names that are either too short, too long, or do not follow the specified regular expression pattern. Some coding styles have a special naming convention for variables.\n\n\nUse the inspection options to specify minimum/maximum length and the regular expression expected for variables' names.\nTo ignore the names' length, specify **0**.\n\n\nTo learn more about regular expressions, refer to the [Quick Start guide (regular-expressions.info)](https://www.regular-expressions.info/quickstart.html)."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpVariableNamingConventionInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Naming conventions",
"index": 21,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpIllegalStringOffsetInspection",
"shortDescription": {
"text": "Illegal string offset"
},
"fullDescription": {
"text": "Reports the usages of non-'integer' offsets in string access expressions such as '$str[42]'. Starting from PHP 5.4, string offsets have to be either integers or integer-like strings. Since it's considered bad practice to use strings as a string offset, the inspection reports them, as well. See String access and modification by character (php.net) for details.",
"markdown": "Reports the usages of non-`integer` offsets in string access expressions such as `$str[42]`.\n\n\nStarting from PHP 5.4, string offsets have to be either integers or integer-like strings.\nSince it's considered bad practice to use strings as a string offset, the inspection reports them, as well.\n\nSee [String access and modification by character (php.net)](https://www.php.net/manual/en/language.types.string.php#language.types.string.substr) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpIllegalStringOffsetInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Type compatibility",
"index": 147,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpMatchExpressionWithOnlyDefaultArmInspection",
"shortDescription": {
"text": "'match' expression has only default arm and should be simplified"
},
"fullDescription": {
"text": "Reports the 'match' expressions only containing a 'default' arm. Such expressions are redundant and should be simplified. See Match expression (php.net) for details.",
"markdown": "Reports the `match` expressions only containing a `default` arm. Such expressions are redundant and should be simplified.\n\n\nSee [Match expression (php.net)](https://wiki.php.net/rfc/match_expression_v2) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpMatchExpressionWithOnlyDefaultArmInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpNonCompoundUseInspection",
"shortDescription": {
"text": "Unnecessary statement use"
},
"fullDescription": {
"text": "Reports the 'use' statements that contain non-fully qualified class names and thus have no effect. The inspection only reports classes imports; functions and constants imports are not considered. See Using namespaces: Aliasing/Importing (php.net) for details.",
"markdown": "Reports the `use` statements that contain non-fully qualified class names and thus have no effect. The inspection only reports classes imports; functions and constants imports are not considered.\n\n\nSee [Using namespaces: Aliasing/Importing (php.net)](http://www.php.net/manual/en/language.namespaces.importing.php#language.namespaces.importing) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PhpNonCompoundUseInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpInvalidInstanceofInspection",
"shortDescription": {
"text": "Argument of 'instanceof' should be only objects or strings"
},
"fullDescription": {
"text": "Reports arguments of 'instanceof' that are not objects or strings",
"markdown": "Reports arguments of 'instanceof' that are not objects or strings"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PhpInvalidInstanceofInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MessDetectorValidationInspection",
"shortDescription": {
"text": "PHP Mess Detector validation"
},
"fullDescription": {
"text": "Reports coding style problems detected by PHP Mess Detector. The inspection requires PHP Mess Detector to be properly installed and set up in the IDE under Settings | PHP | Quality Tools | Mess Detector. To learn more about installing PHP Mess Detector, see PHP Mess Detector installation (phpmd.org) for details. You can use a predefined set of rules or add your own by specifying valid ruleset.xml files. See the rules index (phpmd.org) and How to create a custom rule set (phpmd.org) for details.",
"markdown": "Reports coding style problems detected by PHP Mess Detector.\n\n\nThe inspection requires PHP Mess Detector to be properly installed and set up in the IDE under\n[Settings \\| PHP \\| Quality Tools \\| Mess Detector](settings://settings.php.quality.tools?Mess%20Detector).\n\n\nTo learn more about installing PHP Mess Detector, see [PHP Mess Detector installation (phpmd.org)](https://phpmd.org/download/index.html) for details.\n\n\nYou can use a predefined set of rules or add your own by specifying valid *ruleset.xml* files. See the [rules index (phpmd.org)](https://phpmd.org/rules/index.html) and [How to create a custom rule set (phpmd.org)](https://phpmd.org/documentation/creating-a-ruleset.html) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "MessDetectorValidationInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Quality tools",
"index": 204,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDeprecatedCastInspection",
"shortDescription": {
"text": "Deprecated cast"
},
"fullDescription": {
"text": "Reports deprecated cast expressions: '(unset)' cast expressions, which are deprecated in PHP 7.2 and later. '(real)' cast expressions, which are deprecated in PHP 7.4 and later. See Deprecated features in PHP 7.2.x (php.net) and Deprecations for PHP 7.4 (php.net) for details.",
"markdown": "Reports deprecated cast expressions:\n\n* `(unset)` cast expressions, which are deprecated in PHP 7.2 and later.\n* `(real)` cast expressions, which are deprecated in PHP 7.4 and later.\n\n\nSee [Deprecated features in PHP 7.2.x (php.net)](https://www.php.net/manual/en/migration72.deprecated.php#migration72.deprecated.unset-cast) and [Deprecations for PHP 7.4 (php.net)](https://wiki.php.net/rfc/deprecations_php_7_4#the_real_type) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PhpDeprecatedCastInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnitAssertEqualsInspection",
"shortDescription": {
"text": "Deprecated 'assertEquals/assertNotEquals' usage"
},
"fullDescription": {
"text": "Reports deprecated usages of the 'assertEquals' and 'assertNotEquals' functions with '$delta', '$maxDepth', '$canonicalize', and '$ignoreCase' parameters. The optional '$delta', '$maxDepth', '$canonicalize', and '$ignoreCase' parameters of the 'assertEquals' and 'assertNotEquals' functions are deprecated and will be removed in PHPUnit 9. See Usage of the assertEquals function (phpunit.readthedocs.io) for details.",
"markdown": "Reports deprecated usages of the `assertEquals` and `assertNotEquals` functions with `$delta`, `$maxDepth`, `$canonicalize`, and `$ignoreCase` parameters.\n\nThe optional `$delta`, `$maxDepth`, `$canonicalize`, and `$ignoreCase` parameters\nof the `assertEquals` and `assertNotEquals` functions are deprecated and will be removed in PHPUnit 9.\n\n\nSee [Usage of the assertEquals function (phpunit.readthedocs.io)](https://phpunit.readthedocs.io/en/stable/assertions.html#assertequals) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnitAssertEqualsInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPUnit",
"index": 131,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpRedundantAttributeParenthesisInspection",
"shortDescription": {
"text": "Redundant parentheses in attribute"
},
"fullDescription": {
"text": "Reports empty arguments lists in attributes. See Attributes (php.net) for details.",
"markdown": "Reports empty arguments lists in attributes.\n\n\nSee [Attributes (php.net)](https://wiki.php.net/rfc/attributes_v2) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpRedundantAttributeParenthesisInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Attributes",
"index": 120,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpParameterNameChangedDuringInheritanceInspection",
"shortDescription": {
"text": "Parameter's name changed during inheritance"
},
"fullDescription": {
"text": "Reports the methods' parameters whose names differ from the same parameters defined in parent methods. Starting with PHP 8.0, such code can cause runtime errors.",
"markdown": "Reports the methods' parameters whose names differ from the same parameters defined in parent methods. Starting with PHP 8.0, such code can cause runtime errors."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpParameterNameChangedDuringInheritanceInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpConcatenationWithEmptyStringCanBeInlinedInspection",
"shortDescription": {
"text": "Concatenation to empty string can be merged with assignment"
},
"fullDescription": {
"text": "Reports the '.=' concatenation assignments performed right after assignment to an empty string literal. Such assignments can be merged together.",
"markdown": "Reports the `.=` concatenation assignments performed right after assignment to an empty string literal. Such assignments can be merged together."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpConcatenationWithEmptyStringCanBeInlinedInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnitAssertArrayHasKeyInspection",
"shortDescription": {
"text": "Method 'assertArrayHasKey/assertArrayNotHasKey' can be used instead"
},
"fullDescription": {
"text": "Reports the 'assertTrue()' and 'assertNotTrue()' methods calls that are provided with an 'array_key_exists()' call as an argument. Such calls can be replaced with calls to the dedicated 'assertArrayHasKey()' method. See assertArrayHasKey (phpunit.readthedocs.io) for details.",
"markdown": "Reports the `assertTrue()` and `assertNotTrue()` methods calls that are provided with an `array_key_exists()` call as an argument. Such calls can be replaced with calls to the dedicated `assertArrayHasKey()` method.\n\n\nSee [assertArrayHasKey (phpunit.readthedocs.io)](https://phpunit.readthedocs.io/en/stable/assertions.html#assertarrayhaskey) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnitAssertArrayHasKeyInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPUnit",
"index": 131,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDynamicFieldDeclarationInspection",
"shortDescription": {
"text": "Dynamic property declaration"
},
"fullDescription": {
"text": "Reports the references to dynamic class properties declarations. Such declaration are deprecated starting from PHP 8.2 The inspection skips the objects of the 'stdClass' or derived types.",
"markdown": "Reports the references to dynamic class properties declarations. Such declaration are deprecated starting from PHP 8.2\n\n\nThe inspection skips the objects of the `stdClass` or derived types."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpDynamicFieldDeclarationInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Undefined symbols",
"index": 174,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpVariableVariableInspection",
"shortDescription": {
"text": "Usage of a variable variable"
},
"fullDescription": {
"text": "Reports the usages of variable variables (dynamic variable names such as '$$a').",
"markdown": "Reports the usages of variable variables (dynamic variable names such as `$$a`)."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpVariableVariableInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnnecessarySemicolonInspection",
"shortDescription": {
"text": "Unnecessary semicolon"
},
"fullDescription": {
"text": "Reports unnecessary semicolons.",
"markdown": "Reports unnecessary semicolons."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnnecessarySemicolonInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpCSValidationInspection",
"shortDescription": {
"text": "PHP_CodeSniffer validation"
},
"fullDescription": {
"text": "Reports coding style problems detected by PHP_CodeSniffer. The inspection requires PHP_CodeSniffer to be properly installed and set up in the IDE under Settings | PHP | Quality Tools | PHP_CodeSniffer. To learn more about installing PHP_CodeSniffer, see PHP_CodeSniffer installation (GitHub).",
"markdown": "Reports coding style problems detected by PHP_CodeSniffer.\n\n\nThe inspection requires PHP_CodeSniffer to be properly installed and set up in the IDE under\n[Settings \\| PHP \\| Quality Tools \\| PHP_CodeSniffer](settings://settings.php.quality.tools?PHP_CodeSniffer).\n\n\nTo learn more about installing PHP_CodeSniffer, see [PHP_CodeSniffer installation (GitHub)](https://github.com/squizlabs/PHP_CodeSniffer#installation)."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpCSValidationInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Quality tools",
"index": 204,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpFuncGetArgCanBeReplacedWithParamInspection",
"shortDescription": {
"text": "'func_get_arg()' call can be replaced with parameter access"
},
"fullDescription": {
"text": "Reports the 'func_get_arg()' calls that can be replaced with direct parameter access.",
"markdown": "Reports the `func_get_arg()` calls that can be replaced with direct parameter access."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpFuncGetArgCanBeReplacedWithParamInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnitCoversByAccessModifierIsDeprecatedInspection",
"shortDescription": {
"text": "Deprecated @covers/@uses by access modifier annotation"
},
"fullDescription": {
"text": "Reports the '@covers' and '@uses' PHPUnit doc tags that are using 'ClassName::<*>'. Such annotations won't be supported in PHPUnit 10 and later.",
"markdown": "Reports the `@covers` and `@uses` PHPUnit doc tags that are using `ClassName::<*>`. Such annotations won't be supported in PHPUnit 10 and later."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnitCoversByAccessModifierIsDeprecatedInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPUnit",
"index": 131,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpRandArgumentsInReverseOrderInspection",
"shortDescription": {
"text": "Misordered 'rand' function arguments"
},
"fullDescription": {
"text": "Reports the 'rand($min, $max)' family function calls in which the 'max' argument is less than 'min'. For such functions as 'mt_rand' and 'random_int', this will result in a fatal error.",
"markdown": "Reports the `rand($min, $max)` family function calls in which the `max` argument is less than `min`. For such functions as `mt_rand` and `random_int`, this will result in a fatal error."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "PhpRandArgumentsInReverseOrderInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpAssignmentReplaceableWithPrefixExpressionInspection",
"shortDescription": {
"text": "Assignment can be replaced with increment or decrement"
},
"fullDescription": {
"text": "Reports the assignments that can be replaced with incrementing ('++') or decrementing ('--') operations.",
"markdown": "Reports the assignments that can be replaced with incrementing (`++`) or decrementing (`--`) operations."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpAssignmentReplaceableWithPrefixExpressionInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Replaceable assignments",
"index": 232,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpAttributeIsNotRepeatableInspection",
"shortDescription": {
"text": "Non-repeatable attribute"
},
"fullDescription": {
"text": "Reports repeated attributes without the 'Attribute::IS_REPEATABLE' flag in their arguments declaration. See Attributes (php.net) for details.",
"markdown": "Reports repeated attributes without the `Attribute::IS_REPEATABLE` flag in their arguments declaration.\n\n\nSee [Attributes (php.net)](https://wiki.php.net/rfc/attributes_v2) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PhpAttributeIsNotRepeatableInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Attributes",
"index": 120,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpVarUsageInspection",
"shortDescription": {
"text": "Usage of var"
},
"fullDescription": {
"text": "Reports the usages of the 'var' keyword for declaring class properties. According to PSR-12, the 'var' keyword MUST NOT be used to declare a property. See PSR-12: Extended Coding Style (php-fig.org) for details.",
"markdown": "Reports the usages of the `var` keyword for declaring class properties.\n\nAccording to PSR-12, the `var` keyword MUST NOT be used to declare a property.\n\n\nSee [PSR-12: Extended Coding Style (php-fig.org)](https://www.php-fig.org/psr/psr-12/#43-properties-and-constants) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpVarUsageInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style/PSR-12",
"index": 188,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpSillyAssignmentInspection",
"shortDescription": {
"text": "Redundant assignment"
},
"fullDescription": {
"text": "Reports the assignment statements, in which both sides are equal. Such assignments have no effect and can be removed.",
"markdown": "Reports the assignment statements, in which both sides are equal. Such assignments have no effect and can be removed."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpSillyAssignmentInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpFullyQualifiedNameUsageInspection",
"shortDescription": {
"text": "Fully qualified name usage"
},
"fullDescription": {
"text": "Reports the fully qualified class names that can be shortened by adding the 'use' statement.",
"markdown": "Reports the fully qualified class names that can be shortened by adding the `use` statement."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpFullyQualifiedNameUsageInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpPossiblePolymorphicInvocationInspection",
"shortDescription": {
"text": "Possible polymorphic call"
},
"fullDescription": {
"text": "Reports polymorphic code usages. Such usages are ambiguous and can be potentially inoperable depending on the class instance passed as the argument.",
"markdown": "Reports polymorphic code usages. Such usages are ambiguous and can be potentially inoperable depending on the class instance passed as the argument."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpPossiblePolymorphicInvocationInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Undefined symbols",
"index": 174,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpShortOpenEchoTagInspection",
"shortDescription": {
"text": "Short open 'echo' tag usage"
},
"fullDescription": {
"text": "Reports short PHP 'echo' tag '<?=' usages.",
"markdown": "Reports short PHP `echo` tag `<?=` usages."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpShortOpenEchoTagInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpMissingReturnTypeInspection",
"shortDescription": {
"text": "Missing return type declaration"
},
"fullDescription": {
"text": "Reports the functions that have no return type declaration specified.",
"markdown": "Reports the functions that have no return type declaration specified."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpMissingReturnTypeInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Type compatibility",
"index": 147,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnused",
"shortDescription": {
"text": "Unused declaration"
},
"fullDescription": {
"text": "Reports the classes, methods, functions, constants, or properties that are not used or not reachable from entry points. It also reports all method implementations/overriders. Some unused members might not be reported in the code editor on the fly. Due to performance reasons, a non-private member is checked only when its name rarely occurs in the project. To see all results, run the inspection in batch mode by using Code | Inspect Code... or Code | Run Inspection by Name....",
"markdown": "Reports the classes, methods, functions, constants, or properties that are not used or not reachable from entry points. It also reports all method implementations/overriders.\n\nSome unused members might not be reported in the code editor on the fly. Due to performance reasons, a non-private member is checked only\nwhen its name rarely occurs in the project.\n\nTo see all results, run the inspection in batch mode by using **Code \\| Inspect Code...** or **Code \\| Run Inspection by\nName...**."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnused",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Unused symbols",
"index": 168,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpModifierOrderInspection",
"shortDescription": {
"text": "Order of modifiers"
},
"fullDescription": {
"text": "Reports visibility modifiers that are specified in the incorrect order. According to PSR-12, the correct order is as follows: When present, the 'abstract' and 'final' declarations MUST precede the visibility declaration. When present, the 'static' declaration MUST come after the visibility declaration. See PSR-12: Extended Coding Style (php-fig.org) for details.",
"markdown": "Reports visibility modifiers that are specified in the incorrect order.\n\nAccording to PSR-12, the correct order is as follows:\n\n* When present, the `abstract` and `final` declarations MUST precede the visibility declaration.\n* When present, the `static` declaration MUST come after the visibility declaration.\n\n\nSee [PSR-12: Extended Coding Style (php-fig.org)](https://www.php-fig.org/psr/psr-12/#46-abstract-final-and-static) for\ndetails."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpModifierOrderInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style/PSR-12",
"index": 188,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpImplicitOctalLiteralUsageInspection",
"shortDescription": {
"text": "Implicit octal literal can be replaced with explicit one"
},
"fullDescription": {
"text": "Reports the implicit octal literals such as '071' that could be replaced with explicit ones such as 0o71. Explicit octal literals using the '0o/0O' prefix are supported in PHP 8.1 and later. See Explicit octal integer literal notation (php.net) for details.",
"markdown": "Reports the implicit octal literals such as `071` that could be replaced with explicit ones such as 0o71.\n\n\nExplicit octal literals using the `0o/0O` prefix are supported in PHP 8.1 and later.\n\n\nSee [Explicit octal integer literal notation (php.net)](https://wiki.php.net/rfc/explicit_octal_notation) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpImplicitOctalLiteralUsageInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpVarExportUsedWithoutReturnArgumentInspection",
"shortDescription": {
"text": "'var_export' or 'print_r' call is used without 'return' argument"
},
"fullDescription": {
"text": "Reports 'var_export()' and 'print_r()' calls without the 'return' argument when their results are explicitly used. Such calls most probably are a mistake, because 'var_export'/'print_r' always returns 'null'/'true' if no 'argument' is specified.",
"markdown": "Reports `var_export()` and `print_r()` calls without the `return` argument when their results are explicitly used. Such calls most probably are a mistake, because `var_export`/`print_r` always returns `null`/`true` if no `argument` is specified."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PhpVarExportUsedWithoutReturnArgumentInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpPropertyNamingConventionInspection",
"shortDescription": {
"text": "Property name is not following coding convention"
},
"fullDescription": {
"text": "Reports the properties' names that are either too short, too long, or do not follow the specified regular expression pattern. Some coding styles have a special naming convention for properties. Use the inspection options to specify minimum/maximum length and the regular expression expected for properties' names. To ignore the names' length, specify 0. To learn more about regular expressions, refer to the Quick Start guide (regular-expressions.info).",
"markdown": "Reports the properties' names that are either too short, too long, or do not follow the specified regular expression pattern. Some coding styles have a special naming convention for properties.\n\n\nUse the inspection options to specify minimum/maximum length and the regular expression expected for properties' names.\nTo ignore the names' length, specify **0**.\n\n\nTo learn more about regular expressions, refer to the [Quick Start guide (regular-expressions.info)](https://www.regular-expressions.info/quickstart.html)."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpPropertyNamingConventionInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Naming conventions",
"index": 21,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpNamedArgumentMightBeUnresolvedInspection",
"shortDescription": {
"text": "Named argument may be unresolved"
},
"fullDescription": {
"text": "Reports the named arguments in method calls that might be unresolved depending on a specific class instance within the hierarchy.",
"markdown": "Reports the named arguments in method calls that might be unresolved depending on a specific class instance within the hierarchy."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PhpNamedArgumentMightBeUnresolvedInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpEchoOpenTagInspection",
"shortDescription": {
"text": "Open 'echo' tag usage"
},
"fullDescription": {
"text": "Reports the '<?php echo' usages that can be replaced with a short tag '<?='.",
"markdown": "Reports the `<?php echo` usages that can be replaced with a short tag `<?=`."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpEchoOpenTagInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnitAssertContainsInspection",
"shortDescription": {
"text": "Deprecated 'assertContains/assertNotContains' usage"
},
"fullDescription": {
"text": "Reports the deprecated 'assertContains()' and 'assertNotContains()' calls with the string '$needle' and '$ignoreCase' arguments. The string '$needle' and optional boolean '$ignoreCase' parameters of the 'assertContains()' and 'assertNotContains()' functions are deprecated and removed in PHPUnit 9. For assertions that operate on strings, the specific 'assertStringContainsString()', 'assertStringContainsStringIgnoringCase()', 'assertStringNotContainsString()', and 'assertStringNotContainsStringIgnoringCase()' methods should be used. See Usage of the assertEquals function (phpunit.readthedocs.io) for details.",
"markdown": "Reports the deprecated `assertContains()` and `assertNotContains()` calls with the string `$needle` and `$ignoreCase` arguments.\n\n\nThe string `$needle` and optional boolean `$ignoreCase` parameters\nof the `assertContains()` and `assertNotContains()` functions are deprecated and removed in PHPUnit 9. For assertions that operate on strings, the specific\n`assertStringContainsString()`, `assertStringContainsStringIgnoringCase()`, `assertStringNotContainsString()`, and\n`assertStringNotContainsStringIgnoringCase()` methods should be used.\n\n\nSee [Usage of the assertEquals function (phpunit.readthedocs.io)](https://phpunit.readthedocs.io/en/stable/assertions.html) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnitAssertContainsInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPUnit",
"index": 131,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnnecessaryDoubleQuotesInspection",
"shortDescription": {
"text": "Unnecessary double quotes"
},
"fullDescription": {
"text": "Reports double-quoted string literals that do not contain string interpolation, escape sequences, or single quotes.",
"markdown": "Reports double-quoted string literals that do not contain string interpolation, escape sequences, or single quotes."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnnecessaryDoubleQuotesInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDivisionByZeroInspection",
"shortDescription": {
"text": "Division by zero"
},
"fullDescription": {
"text": "Reports division by zero or modulo by zero.",
"markdown": "Reports division by zero or modulo by zero."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "PhpDivisionByZeroInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpArrayShapeCanBeAddedInspection",
"shortDescription": {
"text": "'#[ArrayShape]' attribute can be added"
},
"fullDescription": {
"text": "Reports the methods and functions that are returning arrays with known non-trivial keys. Suggests specifying the shape of the returned array via the '#[ArrayShape]' attribute or an array shape in the PHPDoc comment.",
"markdown": "Reports the methods and functions that are returning arrays with known non-trivial keys. Suggests specifying the shape of the returned array via the `#[ArrayShape]` attribute or an array shape in the PHPDoc comment."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpArrayShapeCanBeAddedInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Attributes",
"index": 120,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpRedundantCatchClauseInspection",
"shortDescription": {
"text": "Redundant catch clause"
},
"fullDescription": {
"text": "Reports the 'catch' clauses with exceptions that are never thrown from the corresponding 'try' block.",
"markdown": "Reports the `catch` clauses with exceptions that are never thrown from the corresponding `try` block."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PhpRedundantCatchClauseInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Error handling",
"index": 222,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnnecessaryLeadingBackslashInUseStatementInspection",
"shortDescription": {
"text": "Unnecessary leading '\\' in 'use' statement"
},
"fullDescription": {
"text": "Reports the 'use' statements with an unnecessary leading '\\'. For namespaced names (fully qualified namespace names containing a namespace separator, such as 'Foo\\Bar' as opposed to global names that do not, such as 'FooBar'), the leading backslash is unnecessary and not recommended, as import names must be fully qualified and are not processed relative to the current namespace. See Using namespaces: Aliasing/Importing (php.net) for details.",
"markdown": "Reports the `use` statements with an unnecessary leading `\\`.\n\n\nFor namespaced names (fully qualified namespace names containing a namespace separator, such as `Foo\\Bar` as opposed to global names that do not, such as `FooBar`), the leading backslash is unnecessary and not recommended, as import names must be fully qualified and are not processed relative to the current namespace.\n\n\nSee [Using namespaces: Aliasing/Importing (php.net)](https://www.php.net/manual/en/language.namespaces.importing.php) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnnecessaryLeadingBackslashInUseStatementInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpArgumentWithoutNamedIdentifierInspection",
"shortDescription": {
"text": "Argument without name identifier"
},
"fullDescription": {
"text": "Reports arguments without name identifiers.",
"markdown": "Reports arguments without name identifiers."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpArgumentWithoutNamedIdentifierInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpMethodOrClassCallIsNotCaseSensitiveInspection",
"shortDescription": {
"text": "Case mismatch in method call or class usage"
},
"fullDescription": {
"text": "Reports the usages of functions, methods, classes, and namespaces that do not match the case used in their declarations.",
"markdown": "Reports the usages of functions, methods, classes, and namespaces that do not match the case used in their declarations."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpMethodOrClassCallIsNotCaseSensitiveInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpAttributeCanBeAddedToOverriddenMemberInspection",
"shortDescription": {
"text": "Attribute can be added to overriding member "
},
"fullDescription": {
"text": "Reports the methods' and parameters' attributes that can be propagated to overriding methods/parameters. See Attributes (php.net) for details.",
"markdown": "Reports the methods' and parameters' attributes that can be propagated to overriding methods/parameters.\n\n\nSee [Attributes (php.net)](https://wiki.php.net/rfc/attributes_v2) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PhpAttributeCanBeAddedToOverriddenMemberInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Attributes",
"index": 120,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnnecessaryBoolCastInspection",
"shortDescription": {
"text": "Redundant cast to boolean"
},
"fullDescription": {
"text": "Reports the '(bool)'/'(boolean)' casts and 'boolval()' calls that are redundant since casting to 'bool' is performed implicitly.",
"markdown": "Reports the `(bool)`/`(boolean)` casts and `boolval()` calls that are redundant since casting to `bool` is performed implicitly."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnnecessaryBoolCastInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnusedMatchConditionInspection",
"shortDescription": {
"text": "Unused 'match' condition"
},
"fullDescription": {
"text": "Reports the conditions in 'match' expressions that will never be matched. Similarly to PHP Engine behavior, the inspection uses strict comparison ('===') to check the types in 'match' conditions against the 'match' argument type, regardless of the 'strict_types' directive. Since no type coercion occurs, some conditions may be non-matched due to non-matching types. See Match expression (php.net) for details.",
"markdown": "Reports the conditions in `match` expressions that will never be matched.\n\n\nSimilarly to PHP Engine behavior, the inspection uses strict comparison (`===`) to check the types in `match` conditions against the `match` argument type, regardless of the `strict_types` directive. Since no type coercion occurs, some conditions may be non-matched due to non-matching types.\n\n\nSee [Match expression (php.net)](https://wiki.php.net/rfc/match_expression_v2) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnusedMatchConditionInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpInternalEntityUsedInspection",
"shortDescription": {
"text": "Usage of internal entity"
},
"fullDescription": {
"text": "Reports the usages of the entities that are marked as '@internal' and are located in different source roots. The usages located in the same source root are not reported. In most cases, the reported usages should be removed or replaced with other constructs.",
"markdown": "Reports the usages of the entities that are marked as `@internal` and are located in different source roots. The usages located in the same source root are not reported.\n\n\nIn most cases, the reported usages should be removed or replaced with other constructs."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PhpInternalEntityUsedInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpNamedArgumentsWithChangedOrderInspection",
"shortDescription": {
"text": "Named arguments order does not match parameters order"
},
"fullDescription": {
"text": "Reports named argument with order that does not match parameter order",
"markdown": "Reports named argument with order that does not match parameter order"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpNamedArgumentsWithChangedOrderInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpConcatenationWithArithmeticInspection",
"shortDescription": {
"text": "Concatenation with arithmetic usage"
},
"fullDescription": {
"text": "Reports the string concatenation expressions that are used together with '+', '-', '<<', and '>>' operators. Starting with PHP 8, the concatenation operation has lower precedence and such expressions can thus produce unexpected results. See Concatenation precedence (php.net) for details.",
"markdown": "Reports the string concatenation expressions that are used together with `+`, `-`, `<<`, and `>>` operators. Starting with PHP 8, the concatenation operation has lower precedence and such expressions can thus produce unexpected results.\n\n\nSee [Concatenation precedence (php.net)](https://wiki.php.net/rfc/concatenation_precedence) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpConcatenationWithArithmeticInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnitAssertCanBeReplacedWithFailInspection",
"shortDescription": {
"text": "Assertion can be replaced with 'fail'"
},
"fullDescription": {
"text": "Reports the 'assertTrue()'/'assertFalse()' calls with the 'false'/'true' arguments in PHPUnit tests. Such usages can be replaced with 'fail()' calls to indicate that a test is expected to fail.",
"markdown": "Reports the `assertTrue()`/`assertFalse()` calls with the `false`/`true` arguments in PHPUnit tests. Such usages can be replaced with `fail()` calls to indicate that a test is expected to fail."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnitAssertCanBeReplacedWithFailInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPUnit",
"index": 131,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnusedLocalVariableInspection",
"shortDescription": {
"text": "Unused local variable"
},
"fullDescription": {
"text": "Reports the variables that are considered unused in the following cases: The value of the variable is not used anywhere or is overwritten immediately. The reference stored in the variable is not used anywhere or is overwritten immediately.",
"markdown": "Reports the variables that are considered unused in the following cases:\n\n* The value of the variable is not used anywhere or is overwritten immediately.\n* The reference stored in the variable is not used anywhere or is overwritten immediately."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnusedLocalVariableInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Unused symbols",
"index": 168,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpAssignmentReplaceableWithOperatorAssignmentInspection",
"shortDescription": {
"text": "Assignment can be replaced with operator assignment"
},
"fullDescription": {
"text": "Reports the assignments that can be replaced with combined operator assignments (for example, '+=').",
"markdown": "Reports the assignments that can be replaced with combined operator assignments (for example, `+=`)."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpAssignmentReplaceableWithOperatorAssignmentInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Replaceable assignments",
"index": 232,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpSwitchWithCommonPartsInspection",
"shortDescription": {
"text": "'switch' with common parts"
},
"fullDescription": {
"text": "Reports the 'switch' statements with duplicated common parts.",
"markdown": "Reports the 'switch' statements with duplicated common parts."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpSwitchWithCommonPartsInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Control flow",
"index": 25,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpParameterByRefIsNotUsedAsReferenceInspection",
"shortDescription": {
"text": "Unnecessary pass-by-ref"
},
"fullDescription": {
"text": "Reports the variables that are passed by reference to a function/method but are not modified in the function/method body. In such cases, the '&' in parameter's declaration can be safely removed. See Passing by Reference (php.net) for details.",
"markdown": "Reports the variables that are passed by reference to a function/method but are not modified in the function/method body. In such cases, the `&` in parameter's declaration can be safely removed.\n\n\nSee [Passing by Reference (php.net)](https://www.php.net/manual/en/language.references.pass.php) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpParameterByRefIsNotUsedAsReferenceInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpExceptionImmediatelyRethrownInspection",
"shortDescription": {
"text": "Exception is immediately rethrown"
},
"fullDescription": {
"text": "Reports the 'catch' statements that only rethrow a caught exception, which is located in a class hierarchy different from the subsequent exception types.",
"markdown": "Reports the `catch` statements that only rethrow a caught exception, which is located in a class hierarchy different from the subsequent exception types."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpExceptionImmediatelyRethrownInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpPropertyOnlyWrittenInspection",
"shortDescription": {
"text": "Property usages have same access"
},
"fullDescription": {
"text": "Reports the private properties that are: written but never read read but never written",
"markdown": "Reports the private properties that are:\n\n* written but never read\n* read but never written"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PhpPropertyOnlyWrittenInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpInvalidStringOffsetUsageInspection",
"shortDescription": {
"text": "Invalid string offset usage"
},
"fullDescription": {
"text": "Reports invalid string offset usages that will result in a runtime error. The following usages are reported: Using string offsets as objects or arrays Unsetting string offsets via 'unset' Passing string offsets by reference Creating references to or from string offsets Incrementing or decrementing string offsets Using combined operator assignments such as '+=' or '.=' on string offsets Assigning string offsets with empty strings or strings with length >1",
"markdown": "Reports invalid string offset usages that will result in a runtime error.\n\n\nThe following usages are reported:\n\n* Using string offsets as objects or arrays\n* Unsetting string offsets via `unset`\n* Passing string offsets by reference\n* Creating references to or from string offsets\n* Incrementing or decrementing string offsets\n* Using combined operator assignments such as `+=` or `.=` on string offsets\n* Assigning string offsets with empty strings or strings with length \\>1"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "PhpInvalidStringOffsetUsageInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpArrayFilterCanBeConvertedToLoopInspection",
"shortDescription": {
"text": "'array_filter()' call can be converted to loop"
},
"fullDescription": {
"text": "Reports the 'array_filter()' calls that can be replaced with 'foreach' loops.",
"markdown": "Reports the `array_filter()` calls that can be replaced with `foreach` loops."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpArrayFilterCanBeConvertedToLoopInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnitDeprecatedDataProviderSignatureInspection",
"shortDescription": {
"text": "Deprecated usage of data provider since PHPUnit 10"
},
"fullDescription": {
"text": "Reports the references to functions/methods in the '@dataProvider' PHPDoc tag that are resolved to non-static or non-public methods. Usage of these methods as PHPUnit data providers is deprecated starting from PHPUnit 10.",
"markdown": "Reports the references to functions/methods in the `@dataProvider` PHPDoc tag that are resolved to non-static or non-public methods. Usage of these methods as PHPUnit data providers is deprecated starting from PHPUnit 10."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnitDeprecatedDataProviderSignatureInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPUnit",
"index": 131,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpArrayFillCanBeConvertedToLoopInspection",
"shortDescription": {
"text": "'array_fill' can be converted to loop"
},
"fullDescription": {
"text": "Reports the 'array_fill()' calls that can be replaced with 'foreach' loops.",
"markdown": "Reports the `array_fill()` calls that can be replaced with `foreach` loops."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpArrayFillCanBeConvertedToLoopInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpMissingDocCommentInspection",
"shortDescription": {
"text": "Missing PHPDoc comment"
},
"fullDescription": {
"text": "Reports non-fully typed elements without a PHPDoc comment or with a PHPDoc comment only containing the '@noinspection' tag. You can use the Enforce PHPDoc Comment inspection to report fully typed elements.",
"markdown": "Reports non-fully typed elements without a PHPDoc comment or with a PHPDoc comment only containing the `@noinspection` tag.\n\nYou can use the *Enforce PHPDoc Comment* inspection to report fully typed elements."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpMissingDocCommentInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPDoc/Code style",
"index": 68,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUndefinedGotoLabelInspection",
"shortDescription": {
"text": "Undefined goto label"
},
"fullDescription": {
"text": "Reports the 'goto' labels that are not found in the current scope. The target 'goto' label must reside in the same file and context: you cannot jump into or out of a function or method, and cannot jump into a loop or switch structure. See goto (php.net) for details.",
"markdown": "Reports the `goto` labels that are not found in the current scope.\n\n\nThe target `goto` label must reside in the same file and context: you cannot jump into or out of a function or method, and cannot jump into a loop or switch structure.\n\n\nSee [goto (php.net)](https://www.php.net/manual/en/control-structures.goto.php) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpUndefinedGotoLabelInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Undefined symbols",
"index": 174,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDeprecatedPartiallySupportedCallableInspection",
"shortDescription": {
"text": "Deprecated partially supported callables"
},
"fullDescription": {
"text": "Reports deprecated usage of callables that are supported by 'call_user_func($callable)', but not by '$callable()'. Starting from PHP 8.2, the following callables are deprecated: '\"self::method\"'\n'\"parent::method\"'\n'\"static::method\"'\n'[\"self\", \"method\"]'\n'[\"parent\", \"method\"]'\n'[\"static\", \"method\"]'\n'[\"Foo\", \"Bar::method\"]'\n'[new Foo, \"Bar::method\"]' See Deprecate partially supported callables (php.net) for details.",
"markdown": "Reports deprecated usage of callables that are supported by `call_user_func($callable)`, but not by `$callable()`.\n\nStarting from PHP 8.2, the following callables are deprecated:\n\n \"self::method\"\n \"parent::method\"\n \"static::method\"\n [\"self\", \"method\"]\n [\"parent\", \"method\"]\n [\"static\", \"method\"]\n [\"Foo\", \"Bar::method\"]\n [new Foo, \"Bar::method\"]\n\n\nSee [Deprecate partially supported callables (php.net)](https://wiki.php.net/rfc/deprecate_partially_supported_callables) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PhpDeprecatedPartiallySupportedCallableInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpArrayToStringConversionInspection",
"shortDescription": {
"text": "Array to string conversion"
},
"fullDescription": {
"text": "Reports array to string conversions, that is, the arrays that are provided in the contexts where a string is expected. Prior to PHP 8.0, this would lead to a 'E_NOTICE' level error. In PHP 8.0, an 'E-WARNING' is emitted.",
"markdown": "Reports array to string conversions, that is, the arrays that are provided in the contexts where a string is expected.\n\n\nPrior to PHP 8.0, this would lead to a `E_NOTICE` level error. In PHP 8.0, an `E-WARNING` is emitted."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PhpArrayToStringConversionInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpConstantReassignmentInspection",
"shortDescription": {
"text": "Constant reassignment"
},
"fullDescription": {
"text": "Reports reassignments of constants. Since constants cannot be changed, such assignments will have no effect and will emit an 'E_NOTICE' (in PHP 7.4 and earlier) or 'E_WARNING' (in PHP 8.0 and later).",
"markdown": "Reports reassignments of constants.\n\n\nSince constants cannot be changed, such assignments will have no effect and will emit an `E_NOTICE` (in PHP 7.4 and earlier) or `E_WARNING` (in PHP 8.0 and later)."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PhpConstantReassignmentInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpToStringReturnInspection",
"shortDescription": {
"text": "Method '__toString' return type"
},
"fullDescription": {
"text": "Reports the '__toString' methods that do not return 'string'. Prior to PHP 7.4, this would lead to a fatal 'E_RECOVERABLE_ERROR' level error. In PHP 7.4, a fatal non-recoverable 'ERROR' is thrown. In PHP 8.0, the return value follows the standard PHP type semantics and will be coerced into a string if possible and if strict typing is disabled. See __toString (php.net) for details.",
"markdown": "Reports the `__toString` methods that do not return `string`.\n\nPrior to PHP 7.4, this would lead to a fatal `E_RECOVERABLE_ERROR` level error. In PHP 7.4, a fatal non-recoverable `ERROR` is thrown. In PHP 8.0, the return value follows the standard PHP type semantics and will be coerced into a string if possible and if strict typing is disabled.\n\n\nSee [__toString (php.net)](https://www.php.net/manual/en/language.oop5.magic.php#language.oop5.magic.tostring) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "PhpToStringReturnInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpParamsInspection",
"shortDescription": {
"text": "Parameter type"
},
"fullDescription": {
"text": "Reports the parameters passed to a function call, whose types do not match the ones specified in the function definition via type declaration or the PHPDoc '@param' tag. See Type declarations (php.net) and @param (phpdoc.org) for details.",
"markdown": "Reports the parameters passed to a function call, whose types do not match the ones specified in the function definition via type declaration or the PHPDoc `@param` tag.\n\nSee [Type declarations (php.net)](http://php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration) and\n[@param (phpdoc.org)](https://docs.phpdoc.org/guide/references/phpdoc/tags/param.html#param) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpParamsInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Type compatibility",
"index": 147,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpCastIsUnnecessaryInspection",
"shortDescription": {
"text": "Type cast is unnecessary"
},
"fullDescription": {
"text": "Reports the type cast operators used on the values that are already of the corresponding type. Such operators are redundant and can be safely removed. See Type juggling (php.net) for details.",
"markdown": "Reports the type cast operators used on the values that are already of the corresponding type. Such operators are redundant and can be safely removed.\n\n\nSee [Type juggling (php.net)](https://www.php.net/manual/en/language.types.type-juggling.php) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpCastIsUnnecessaryInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpArrayUsedOnlyForWriteInspection",
"shortDescription": {
"text": "Array used only with write access"
},
"fullDescription": {
"text": "Reports local arrays that are only updated, but never queried.",
"markdown": "Reports local arrays that are only updated, but never queried."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpArrayUsedOnlyForWriteInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpPowCallCanBeReplacedWithOperatorInspection",
"shortDescription": {
"text": "'pow()' call can be replaced with '**' operator"
},
"fullDescription": {
"text": "Reports the 'pow()' calls that can be replaced with the '**' operator, which adds no overhead of calling a function. See Power operator (php.net) for details.",
"markdown": "Reports the `pow()` calls that can be replaced with the `**` operator, which adds no overhead of calling a function.\n\n\nSee [Power operator (php.net)](https://wiki.php.net/rfc/pow-operator) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpPowCallCanBeReplacedWithOperatorInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpArrayKeyDoesNotMatchArrayShapeInspection",
"shortDescription": {
"text": "Array key does not match array shape "
},
"fullDescription": {
"text": "Reports the array keys that do not match the keys specified via the '#[ArrayShape]' attribute.",
"markdown": "Reports the array keys that do not match the keys specified via the `#[ArrayShape]` attribute."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PhpArrayKeyDoesNotMatchArrayShapeInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Attributes",
"index": 120,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpComposerExtensionStubsInspection",
"shortDescription": {
"text": "Extension is missing in composer.json"
},
"fullDescription": {
"text": "Reports the usages of classes, functions, and constants from the PHP extensions not specified in composer.json. If an extension is listed in the 'require-dev' section of composer.json, the inspection reports the corresponding symbols' usages located outside of the folders marked as test roots.",
"markdown": "Reports the usages of classes, functions, and constants from the PHP extensions not specified in *composer.json* . If an extension is listed in the `require-dev` section of *composer.json*, the inspection reports the corresponding symbols' usages located outside of the folders marked as test roots."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PhpComposerExtensionStubsInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Composer",
"index": 75,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnusedParameterInspection",
"shortDescription": {
"text": "Unused parameter"
},
"fullDescription": {
"text": "Reports the parameters that are considered unused in the following cases: The parameter is passed by value, and the value is not used anywhere or is overwritten immediately. The parameter is passed by reference, and the reference is not used anywhere or is overwritten immediately.",
"markdown": "Reports the parameters that are considered unused in the following cases:\n\n* The parameter is passed by value, and the value is not used anywhere or is overwritten immediately.\n* The parameter is passed by reference, and the reference is not used anywhere or is overwritten immediately."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnusedParameterInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Unused symbols",
"index": 168,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpPregMatchReplaceWithComparisonInspection",
"shortDescription": {
"text": "'preg_match()' can be replaced with comparison"
},
"fullDescription": {
"text": "Reports the 'preg_match()' calls that are provided with a string argument starting with '^' (Start of String anchor) and ending with '$' (End of String anchor). Such calls can be replaced with a comparison operation.",
"markdown": "Reports the `preg_match()` calls that are provided with a string argument starting with `^` (Start of String anchor) and ending with `$` (End of String anchor). Such calls can be replaced with a comparison operation."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpPregMatchReplaceWithComparisonInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpMethodMayBeInaccessibleInLateStaticBindingInspection",
"shortDescription": {
"text": "Private method may be inaccessible during late static binding call"
},
"fullDescription": {
"text": "Reports the late static binding method calls (that is, performed via 'static::') that may be resolved to inaccessible private methods from child classes. See Late Static Bindings (php.net) for details.",
"markdown": "Reports the late static binding method calls (that is, performed via `static::`) that may be resolved to inaccessible private methods from child classes.\n\n\nSee [Late Static Bindings (php.net)](https://www.php.net/manual/en/language.oop5.late-static-bindings.php) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpMethodMayBeInaccessibleInLateStaticBindingInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpClassConstantCanBeFinalInspection",
"shortDescription": {
"text": "Class constant can be 'final'"
},
"fullDescription": {
"text": "Reports the non-'final' class constants that are not redefined in child classes. In PHP 8.1 and later, such constants can be made 'final'. See Final class constants (php.net) for details.",
"markdown": "Reports the non-`final` class constants that are not redefined in child classes. In PHP 8.1 and later, such constants can be made `final`.\n\n\nSee [Final class constants (php.net)](https://wiki.php.net/rfc/final_class_const) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpClassConstantCanBeFinalInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpRedundantArrayCallInForeachIteratedValueInspection",
"shortDescription": {
"text": "Redundant 'array_values' call on a value iterated in 'foreach'"
},
"fullDescription": {
"text": "Reports the 'array_values()' calls inside 'foreach' loops in which the iterated value is used without a key. Such calls are redundant and can be safely removed.",
"markdown": "Reports the `array_values()` calls inside `foreach` loops in which the iterated value is used without a key. Such calls are redundant and can be safely removed."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpRedundantArrayCallInForeachIteratedValueInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpArrayModificationWillNotHaveEffectInspection",
"shortDescription": {
"text": "Modification of the array returned from function by value won't have any effect"
},
"fullDescription": {
"text": "Reports call to a function that returns array by value, which makes the assignment operation non-working. Return by reference shall be used instead. For example: '<?php\nclass A {\n private $values = [];\n public function getValues() {\n return $this->values;\n }\n}\n$config = new A();\n$config->getValues()['a'] = 'a';'",
"markdown": "Reports call to a function that returns array by value, which makes the assignment operation non-working. Return by reference shall be used instead.\n\n**For example:**\n\n\n <?php\n class A {\n private $values = [];\n public function getValues() {\n return $this->values;\n }\n }\n $config = new A();\n $config->getValues()['a'] = 'a';\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PhpArrayModificationWillNotHaveEffectInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUndefinedVariableInspection",
"shortDescription": {
"text": "Undefined variable"
},
"fullDescription": {
"text": "Produces two types of warnings: Undefined variable: the variable's definition is not found in the project files, configured include paths, or among the PHP predefined variables. Variable might have not been defined: there are one or more paths to reach the line with the variable usage without defining it. Use the options below to customize the inspection: Report that variable is probably undefined: clear the checkbox to disable the Variable might have not been defined warnings. Enable inspection in global space: by default, the inspection is enabled for global space. Clear the checkbox to only report undefined variables from functions' local scope. Search for variable's definition outside the current file: if selected, the IDE reports a global variable as undefined only in case there are no 'include' or 'require' statements in the current file and the variable's definition cannot be found in the project. Note that the IDE does not examine the actual content of included files but only checks the presence of 'include' or 'require' statements. Otherwise, if not selected, the IDE searches for the variable's definition only in the current file and ignores the 'include' or 'require' statements if any.",
"markdown": "Produces two types of warnings:\n\n* *Undefined variable*: the variable's definition is not found in the project files, configured include paths, or among the PHP predefined variables.\n* *Variable might have not been defined*: there are one or more paths to reach the line with the variable usage without defining it.\n\n\nUse the options below to customize the inspection:\n\n* **Report that variable is probably undefined** : clear the checkbox to disable the *Variable might have not been defined* warnings.\n* **Enable inspection in global space**: by default, the inspection is enabled for global space. Clear the checkbox to only report undefined variables from functions' local scope.\n*\n **Search for variable's definition outside the current file** : if selected, the IDE reports a global variable as undefined only in case there are no `include` or `require` statements in the current file and the variable's definition cannot be found in the project. Note that the IDE does not examine the actual content of included files but only checks the presence of `include` or `require` statements.\n\n\n Otherwise, if not selected, the IDE searches for the variable's definition only in the current file and ignores the `include` or `require` statements if any."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "PhpUndefinedVariableInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/Undefined symbols",
"index": 174,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpPrivateFieldCanBeLocalVariableInspection",
"shortDescription": {
"text": "Private property can be local"
},
"fullDescription": {
"text": "Reports the private properties that are used only in a single method. Such properties can be replaced with local variables.",
"markdown": "Reports the private properties that are used only in a single method. Such properties can be replaced with local variables."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpPrivateFieldCanBeLocalVariableInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpMethodMayBeStaticInspection",
"shortDescription": {
"text": "Method can be made 'static'"
},
"fullDescription": {
"text": "Reports the methods that don't use any instance references and thus may be converted to static methods.",
"markdown": "Reports the methods that don't use any instance references and thus may be converted to static methods."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpMethodMayBeStaticInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDeprecatedDollarBraceStringInterpolationInspection",
"shortDescription": {
"text": "Deprecated '${' string interpolation"
},
"fullDescription": {
"text": "Reports '${var}' and '${expr}' interpolations in strings. Such interpolations are deprecated starting from PHP 8.2. See Deprecate ${} string interpolation (php.net) for details.",
"markdown": "Reports `${var}` and `${expr}` interpolations in strings. Such interpolations are deprecated starting from PHP 8.2.\n\n\nSee [Deprecate ${} string interpolation (php.net)](https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PhpDeprecatedDollarBraceStringInterpolationInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUndefinedFunctionInspection",
"shortDescription": {
"text": "Undefined function"
},
"fullDescription": {
"text": "Reports the references to functions that are not defined in the project files, configured include paths, or among the PHP predefined functions.",
"markdown": "Reports the references to functions that are not defined in the project files, configured include paths, or among the PHP predefined functions."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpUndefinedFunctionInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Undefined symbols",
"index": 174,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpSecondWriteToReadonlyPropertyInspection",
"shortDescription": {
"text": "Second write to 'readonly' property"
},
"fullDescription": {
"text": "Reports reassignments of 'readonly' properties. Such properties cannot be modified after initialization. See Readonly properties (php.net) for details.",
"markdown": "Reports reassignments of `readonly` properties. Such properties cannot be modified after initialization.\n\n\nSee [Readonly properties (php.net)](https://wiki.php.net/rfc/readonly_properties_v2) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "PhpSecondWriteToReadonlyPropertyInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpPureAttributeCanBeAddedInspection",
"shortDescription": {
"text": "'#[Pure]' attribute can be added"
},
"fullDescription": {
"text": "Reports the functions that are non-trivially pure. Such functions have other functions calls in their body, but all such calls do not produce any side effects.",
"markdown": "Reports the functions that are non-trivially pure. Such functions have other functions calls in their body, but all such calls do not produce any side effects."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpPureAttributeCanBeAddedInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Attributes",
"index": 120,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpVarTagWithoutVariableNameInspection",
"shortDescription": {
"text": "Type tag without variable name"
},
"fullDescription": {
"text": "Reports the PHPDoc type tags ('@var','@type','@param') that are provided without a specified variable/parameter name. Such tags do not provide any type information for expressions and should be either deleted or expanded to include a concrete variable name for which the type is provided.",
"markdown": "Reports the PHPDoc type tags (`@var`,`@type`,`@param`) that are provided without a specified variable/parameter name. Such tags do not provide any type information for expressions and should be either deleted or expanded to include a concrete variable name for which the type is provided."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpVarTagWithoutVariableNameInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPDoc",
"index": 2,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDeprecatedAssertDeclarationInspection",
"shortDescription": {
"text": "Deprecated 'assert()' function declaration"
},
"fullDescription": {
"text": "Reports the 'assert()' function declarations. Declaring the 'assert()' function is global namespace is forbidden. Starting from PHP 7.3, declaring the 'assert()' function in non-global namespace is deprecated. See assert (php.net) for details.",
"markdown": "Reports the `assert()` function declarations.\n\n* Declaring the `assert()` function is global namespace is forbidden.\n* Starting from PHP 7.3, declaring the `assert()` function in non-global namespace is deprecated.\n\n\nSee [assert (php.net)](https://www.php.net/manual/en/function.assert.php) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "PhpDeprecatedAssertDeclarationInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpIfWithCommonPartsInspection",
"shortDescription": {
"text": "'if' with common parts"
},
"fullDescription": {
"text": "Reports the 'if' statements with duplicated common parts.",
"markdown": "Reports the `if` statements with duplicated common parts."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpIfWithCommonPartsInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Control flow",
"index": 25,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpStaticAsDynamicMethodCallInspection",
"shortDescription": {
"text": "Static method called as dynamic"
},
"fullDescription": {
"text": "Reports dynamic calls to static class methods. If the target has the magic method '__call', a separate inspection severity and highlighting level can be set.",
"markdown": "Reports dynamic calls to static class methods.\n\nIf the target has the magic method `__call`, a separate inspection severity and highlighting level can be set."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpStaticAsDynamicMethodCallInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpOverridingMethodVisibilityInspection",
"shortDescription": {
"text": "Method visibility should not be overridden"
},
"fullDescription": {
"text": "Checks that the methods don't override visibility. Overriding a 'protected' method with a 'public' method in a child class makes this method accessible from everywhere. This violates the encapsulation principle and is considered bad practice. See Method Visibility (php.net) for details.",
"markdown": "Checks that the methods don't override visibility.\n\n\nOverriding a `protected` method with a `public` method in a child class makes this method accessible from everywhere.\nThis violates the encapsulation principle and is considered bad practice.\n\n\nSee [Method Visibility (php.net)](https://www.php.net/manual/en/language.oop5.visibility.php#language.oop5.visiblity-methods) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpOverridingMethodVisibilityInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpClassNamingConventionInspection",
"shortDescription": {
"text": "Class name is not following coding convention"
},
"fullDescription": {
"text": "Reports the classes' names that are either too short, too long, or do not follow the specified regular expression pattern. Some coding styles have a special naming convention for classes. Use the inspection options to specify minimum/maximum length and the regular expression expected for classes' names. To ignore the names' length, specify 0. To learn more about regular expressions, refer to the Quick Start guide (regular-expressions.info).",
"markdown": "Reports the classes' names that are either too short, too long, or do not follow the specified regular expression pattern. Some coding styles have a special naming convention for classes.\n\n\nUse the inspection options to specify minimum/maximum length and the regular expression expected for classes' names.\nTo ignore the names' length, specify **0**.\n\n\nTo learn more about regular expressions, refer to the [Quick Start guide (regular-expressions.info)](https://www.regular-expressions.info/quickstart.html)."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpClassNamingConventionInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Naming conventions",
"index": 21,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnreachableStatementInspection",
"shortDescription": {
"text": "Unreachable statement"
},
"fullDescription": {
"text": "Reports the statements that cannot be reached.",
"markdown": "Reports the statements that cannot be reached."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PhpUnreachableStatementInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Control flow",
"index": 25,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnitUndefinedDataProviderInspection",
"shortDescription": {
"text": "Undefined PHPUnit data provider"
},
"fullDescription": {
"text": "Reports the references to functions/methods in the '@dataProvider' PHPDoc tag that are not resolved. Note that when resolving 'dataProvider', PHPUnit doesn't take 'use' statements into account.",
"markdown": "Reports the references to functions/methods in the `@dataProvider` PHPDoc tag that are not resolved.\n\nNote that when resolving `dataProvider`, PHPUnit doesn't take `use` statements into account."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PhpUnitUndefinedDataProviderInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPUnit",
"index": 131,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpArrayIsAlwaysEmptyInspection",
"shortDescription": {
"text": "Array is always empty at the point of access"
},
"fullDescription": {
"text": "Reports the iterated/accessed arrays that are known to be empty at the point of access.",
"markdown": "Reports the iterated/accessed arrays that are known to be empty at the point of access."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpArrayIsAlwaysEmptyInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpNonCanonicalElementsOrderInspection",
"shortDescription": {
"text": "Non-canonical order of elements"
},
"fullDescription": {
"text": "Reports the PHPDoc tags that have elements listed in non-canonical order. For example, for such tags as '@property', '@param', or '@var', the inspection will report the usages of '[name] [\"Type\"]' instead of '[\"Type\"] [name]'.",
"markdown": "Reports the PHPDoc tags that have elements listed in non-canonical order.\n\nFor example, for such tags as `@property`, `@param`, or `@var`, the inspection will report the usages of `[name] [\"Type\"]` instead of `[\"Type\"] [name]`."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpNonCanonicalElementsOrderInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPDoc/Code style",
"index": 68,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpAbstractStaticMethodInspection",
"shortDescription": {
"text": "Static function should not be abstract"
},
"fullDescription": {
"text": "Reports the static methods that are declared as abstract.",
"markdown": "Reports the static methods that are declared as abstract."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpAbstractStaticMethodInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHP strict standards",
"index": 219,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpRedundantTypeInUnionTypeInspection",
"shortDescription": {
"text": "Type declaration is redundant and could be simplified"
},
"fullDescription": {
"text": "Reports union type declarations that contain redundant types, for example, a union type that contains both the class alias and the original class. See Union Types RFC: Duplicate and redundant types (php.net) for details.",
"markdown": "Reports union type declarations that contain redundant types, for example, a union type that contains both the class alias and the original class.\n\n\nSee [Union Types RFC: Duplicate and redundant types (php.net)](https://wiki.php.net/rfc/union_types_v2#duplicate_and_redundant_types) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpRedundantTypeInUnionTypeInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Type compatibility",
"index": 147,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpRedundantAssignmentToPromotedFieldInspection",
"shortDescription": {
"text": "Redundant assignment to promoted property"
},
"fullDescription": {
"text": "Reports redundant assignments to class properties that duplicate automatic assignments performed through promoted constructor parameters. See Constructor Property Promotion (php.net) for details.",
"markdown": "Reports redundant assignments to class properties that duplicate automatic assignments performed through promoted constructor parameters.\n\n\nSee [Constructor Property Promotion (php.net)](https://wiki.php.net/rfc/constructor_promotion) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpRedundantAssignmentToPromotedFieldInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpStrictComparisonWithOperandsOfDifferentTypesInspection",
"shortDescription": {
"text": "Strict comparison of operands with incompatible types"
},
"fullDescription": {
"text": "Reports the '===' or '!==' strict comparisons used on operands with incompatible types. See PHP type comparison tables (php.net) for details.",
"markdown": "Reports the `===` or `!==` strict comparisons used on operands with incompatible types.\n\n\nSee [PHP type comparison tables (php.net)](https://www.php.net/manual/en/types.comparisons.php) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PhpStrictComparisonWithOperandsOfDifferentTypesInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDeprecationInspection",
"shortDescription": {
"text": "Deprecated"
},
"fullDescription": {
"text": "Reports the usages of deprecated entities. In most cases, such usages should be removed or replaced with other constructs.",
"markdown": "Reports the usages of deprecated entities.\n\n\nIn most cases, such usages should be removed or replaced with other constructs."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpDeprecationInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpNestedDirNameCallsCanBeReplacedWithLevelParameterInspection",
"shortDescription": {
"text": "Nested 'dirname()' call can be replaced with 'levels' parameter usage"
},
"fullDescription": {
"text": "Reports the nested 'dirname()' calls that can be omitted by using the 'levels' parameter instead.",
"markdown": "Reports the nested `dirname()` calls that can be omitted by using the `levels` parameter instead."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpNestedDirNameCallsCanBeReplacedWithLevelParameterInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpTraitsUseListInspection",
"shortDescription": {
"text": "One-per-line trait uses"
},
"fullDescription": {
"text": "Reports the cases of several traits being imported via a single 'use' statement. According to PSR-12, each individual trait imported into a class MUST be included one-per-line, and each inclusion MUST have its own 'use' import statement. See PSR-12: Extended Coding Style (php-fig.org) for details.",
"markdown": "Reports the cases of several traits being imported via a single `use` statement.\n\n\nAccording to PSR-12, each individual trait imported into a class MUST be included one-per-line, and each inclusion MUST have its own `use` import statement.\n\n\nSee [PSR-12: Extended Coding Style (php-fig.org)](https://www.php-fig.org/psr/psr-12/#42-using-traits) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpTraitsUseListInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style/PSR-12",
"index": 188,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpObjectFieldsAreOnlyWrittenInspection",
"shortDescription": {
"text": "Local object is used only for writing properties"
},
"fullDescription": {
"text": "Reports the variable assignments to new objects that are used only for writing the object's properties without observable side effects.",
"markdown": "Reports the variable assignments to new objects that are used only for writing the object's properties without observable side effects."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpObjectFieldsAreOnlyWrittenInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpOptionalBeforeRequiredParametersInspection",
"shortDescription": {
"text": "Optional before required parameter"
},
"fullDescription": {
"text": "Reports the optional parameters that appear before the required parameters in a function/method declaration. See Default argument values (php.net) for details.",
"markdown": "Reports the optional parameters that appear before the required parameters in a function/method declaration.\n\n\nSee [Default argument values (php.net)](http://www.php.net/manual/en/functions.arguments.php#functions.arguments.default) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpOptionalBeforeRequiredParametersInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDocRedundantThrowsInspection",
"shortDescription": {
"text": "Redundant @throws tag(s)"
},
"fullDescription": {
"text": "Reports '@throws' tags for exceptions that are not thrown by the function or method. The exception classes added to the Unchecked Exceptions list under Settings | PHP | Analysis are excluded from the inspection scope.",
"markdown": "Reports `@throws` tags for exceptions that are not thrown by the function or method.\n\nThe exception classes added to the **Unchecked Exceptions** list under\n[Settings \\| PHP \\| Analysis](settings://reference.webide.settings.project.settings.php?Unchecked%20Exceptions)\nare excluded from the inspection scope."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpDocRedundantThrowsInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPDoc",
"index": 2,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpArrayMapCanBeConvertedToLoopInspection",
"shortDescription": {
"text": "'array_map()' call can be converted to loop"
},
"fullDescription": {
"text": "Reports the 'array_map()' calls that can be replaced with 'foreach' loops.",
"markdown": "Reports the `array_map()` calls that can be replaced with `foreach` loops."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpArrayMapCanBeConvertedToLoopInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpNullIsNotCompatibleWithParameterInspection",
"shortDescription": {
"text": "'null' is not compatible with parameter's declared type"
},
"fullDescription": {
"text": "Reports the variables that are initialised via passing them by reference to a parameter incompatible with 'null'.",
"markdown": "Reports the variables that are initialised via passing them by reference to a parameter incompatible with `null`."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "PhpNullIsNotCompatibleWithParameterInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/Type compatibility",
"index": 147,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpPregReplaceWithEmptyReplacementInspection",
"shortDescription": {
"text": "'preg_replace()' can be replaced with '(l|r)trim' call"
},
"fullDescription": {
"text": "Reports the 'preg_replace()' calls with empty 'replacement'. Such calls can be replaced with '(l|r)trim' calls.",
"markdown": "Reports the `preg_replace()` calls with empty `replacement`. Such calls can be replaced with `(l|r)trim` calls."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpPregReplaceWithEmptyReplacementInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpRedundantClosingTagInspection",
"shortDescription": {
"text": "Redundant closing tag"
},
"fullDescription": {
"text": "Reports PHP closing tag '?>' usages, which are redundant in files containing only PHP code.",
"markdown": "Reports PHP closing tag `?>` usages, which are redundant in files containing only PHP code."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpRedundantClosingTagInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpExpressionWithSameOperandsInspection",
"shortDescription": {
"text": "Logical expression has same operands"
},
"fullDescription": {
"text": "Reports the expressions that use the same operands, but should rather use different operands (for example, '$var == $var'). These include comparison, logical, null-coalescing, subtraction, and division expressions.",
"markdown": "Reports the expressions that use the same operands, but should rather use different operands (for example, `$var == $var`). These include comparison, logical, null-coalescing, subtraction, and division expressions."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpExpressionWithSameOperandsInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpArithmeticTypeCheckInspection",
"shortDescription": {
"text": "Arithmetic operation with unsupported operands"
},
"fullDescription": {
"text": "Reports arithmetic and bitwise expressions with unsupported operands. Starting with PHP 8.0, using the arithmetic and bitwise operators '+', '-', '*', '/', '**', '%', '<<', '>>', '&', '|', '^', '~', '++', '--' when one of the operands is an array, resource, or non-overloaded object will result in a 'TypeError'. The only exception is the 'array + array' merge operation, which remains supported. See PHP's internal test source for the complete list of operations.",
"markdown": "Reports arithmetic and bitwise expressions with unsupported operands.\n\n\nStarting with PHP 8.0, using the arithmetic and bitwise operators `+`, `-`, `*`, `/`, `**`, `%`, `<<`, `>>`, `&`, `|`, `^`, `~`, `++`, `--`\nwhen one of the operands is an array, resource, or non-overloaded object will result in a `TypeError`. The only exception is the\n`array + array` merge operation, which remains supported.\n\n\nSee [PHP's internal test source](https://github.com/php/php-src/blob/master/Zend/tests/operator_unsupported_types.phpt) for the complete list of operations."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "PhpArithmeticTypeCheckInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/Type compatibility",
"index": 147,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpRedundantVariableDocTypeInspection",
"shortDescription": {
"text": "Redundant @var tag"
},
"fullDescription": {
"text": "Reports the '@var' tags for variables whose type is already inferred from source code.",
"markdown": "Reports the `@var` tags for variables whose type is already inferred from source code."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpRedundantVariableDocTypeInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPDoc",
"index": 2,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpObjectShapeCanBeAddedInspection",
"shortDescription": {
"text": "ObjectShape can be added"
},
"fullDescription": {
"text": "Reports public properties of an object with specified types. Suggests specifying the shape of the returned object via the '#[ObjectShape]' attribute or an object shape in the PHPDoc comment. Example: '$a = new stdClass();\n $a->name = \"name\";\n $a->age = 2;' After the quick-fix is applied: '/** @var $a object{name: string, age: int} */\n $a = new stdClass();\n $a->name = \"name\";\n $a->age = 2;'",
"markdown": "Reports public properties of an object with specified types. Suggests specifying the shape of the returned object via the `#[ObjectShape]` attribute or an object shape in the PHPDoc comment.\n\n**Example:**\n\n\n $a = new stdClass();\n $a->name = \"name\";\n $a->age = 2;\n\nAfter the quick-fix is applied:\n\n\n /** @var $a object{name: string, age: int} */\n $a = new stdClass();\n $a->name = \"name\";\n $a->age = 2;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpObjectShapeCanBeAddedInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPDoc",
"index": 2,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpInvalidMagicMethodModifiersInspection",
"shortDescription": {
"text": "Invalid magic method modifiers"
},
"fullDescription": {
"text": "Reports the magic methods that are not declared as public or are declared as static.",
"markdown": "Reports the magic methods that are not declared as public or are declared as static."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpInvalidMagicMethodModifiersInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpWrongCatchClausesOrderInspection",
"shortDescription": {
"text": "Wrong catch clauses order"
},
"fullDescription": {
"text": "Reports the exceptions that are already caught by a preceding exception and the exceptions that are caught twice. The 'catch' clauses must be ordered from more specific to more generic ones. Otherwise, some exceptions may not be caught by the most specific handler. See Exceptions (php.net) for details.",
"markdown": "Reports the exceptions that are already caught by a preceding exception and the exceptions that are caught twice.\n\n\nThe `catch` clauses must be ordered from more specific to more generic ones. Otherwise, some exceptions may not be caught by the most specific handler.\n\n\nSee [Exceptions (php.net)](http://www.php.net/manual/en/language.exceptions.php) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpWrongCatchClausesOrderInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Error handling",
"index": 222,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpRangesInClassCanBeMergedInspection",
"shortDescription": {
"text": "Ranges in class can be merged"
},
"fullDescription": {
"text": "Reports the alphabetic ranges or characters in regular expression character classes that only adjust the already existing ranges. Such elements can be merged with the adjusted ranges.",
"markdown": "Reports the alphabetic ranges or characters in regular expression character classes that only adjust the already existing ranges. Such elements can be merged with the adjusted ranges."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpRangesInClassCanBeMergedInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Regular expressions",
"index": 151,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDuplicateMatchConditionInspection",
"shortDescription": {
"text": "Duplicate condition"
},
"fullDescription": {
"text": "Reports duplicate conditions in 'match' expressions. See Match expression (php.net) for details.",
"markdown": "Reports duplicate conditions in `match` expressions.\n\n\nSee [Match expression (php.net)](https://wiki.php.net/rfc/match_expression_v2) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpDuplicateMatchConditionInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDuplicateSwitchCaseBodyInspection",
"shortDescription": {
"text": "Duplicate branch in switch statement"
},
"fullDescription": {
"text": "Reports the 'switch' statements containing the same code in different branches.",
"markdown": "Reports the `switch` statements containing the same code in different branches."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PhpDuplicateSwitchCaseBodyInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpCombineMultipleIssetCallsIntoOneInspection",
"shortDescription": {
"text": "Multiple 'isset' calls can be replaced with one"
},
"fullDescription": {
"text": "Reports multiple 'isset()' checks that can be replaced with a single one.",
"markdown": "Reports multiple `isset()` checks that can be replaced with a single one."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpCombineMultipleIssetCallsIntoOneInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpSuperClassIncompatibleWithInterfaceInspection",
"shortDescription": {
"text": "Method declaration in parent class is incompatible with implemented interface"
},
"fullDescription": {
"text": "Reports the methods declarations in parent classes that are incompatible with implemented interfaces.",
"markdown": "Reports the methods declarations in parent classes that are incompatible with implemented interfaces."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "PhpSuperClassIncompatibleWithInterfaceInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnitMisorderedAssertEqualsArgumentsInspection",
"shortDescription": {
"text": "Misordered PHPUnit equality assertion method arguments"
},
"fullDescription": {
"text": "Reports the calls to PHPUnit equality assertion methods (such as 'assertEquals()', 'assertNotEquals()', 'assertSame()', and so on) that have a non-literal as the expected result argument and a literal as the actual result argument. Such calls will behave fine for assertions that pass, but may produce confusing error reports if their expected and actual arguments differ. See assertEquals for details.",
"markdown": "Reports the calls to PHPUnit equality assertion methods (such as `assertEquals()`, `assertNotEquals()`, `assertSame()`, and so on) that have a non-literal as the expected result argument and a literal as the actual result argument. Such calls will behave fine for assertions that pass, but may produce confusing error reports if their expected and actual arguments differ.\n\n\nSee [assertEquals](https://phpunit.readthedocs.io/en/stable/assertions.html#assertequals) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnitMisorderedAssertEqualsArgumentsInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPUnit",
"index": 131,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpNotInstalledPackagesInspection",
"shortDescription": {
"text": "Non-installed Composer packages"
},
"fullDescription": {
"text": "Reports the Composer packages that are required in composer.json but are not installed.",
"markdown": "Reports the Composer packages that are required in *composer.json* but are not installed."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpNotInstalledPackagesInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Composer",
"index": 75,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDuplicateCaseInspection",
"shortDescription": {
"text": "Duplicate case in switch statement"
},
"fullDescription": {
"text": "Reports duplicate 'case' expressions in 'switch' statements. If a 'switch' statement contains multiple duplicate 'case' expressions, only the first one is executed.",
"markdown": "Reports duplicate `case` expressions in `switch` statements.\n\nIf a `switch` statement contains multiple duplicate `case` expressions, only the first one is executed."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpDuplicateCaseInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpRedundantIntersectionTypeInspection",
"shortDescription": {
"text": "Redundant intersection type"
},
"fullDescription": {
"text": "Reports the intersection type declarations that contain redundant types, for example, an intersection type that contains both the parent class and its subclass. See PHP RFC: Pure intersection types (php.net) for details.",
"markdown": "Reports the intersection type declarations that contain redundant types, for example, an intersection type that contains both the parent class and its subclass.\n\n\nSee [PHP RFC: Pure intersection types (php.net)](https://wiki.php.net/rfc/pure-intersection-types) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpRedundantIntersectionTypeInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Type compatibility",
"index": 147,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpArrayIndexImmediatelyRewrittenInspection",
"shortDescription": {
"text": "Array index is immediately rewritten "
},
"fullDescription": {
"text": "Reports the write expressions on array indexes which are immediately overwritten before being accessed.",
"markdown": "Reports the write expressions on array indexes which are immediately overwritten before being accessed."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpArrayIndexImmediatelyRewrittenInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpCurlyBraceAccessSyntaxUsageInspection",
"shortDescription": {
"text": "Curly brace access syntax usage"
},
"fullDescription": {
"text": "Reports the usages of curly brace syntax for accessing array elements and string offsets.",
"markdown": "Reports the usages of curly brace syntax for accessing array elements and string offsets."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "PhpCurlyBraceAccessSyntaxUsageInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpRegExpInvalidDelimiterInspection",
"shortDescription": {
"text": "Invalid delimiter"
},
"fullDescription": {
"text": "Reports invalid delimiters in regular expressions in two cases: 1. If a delimiter is an alphanumeric or a backslash. 2. If a delimiter is used in a regular expression pattern.",
"markdown": "Reports invalid delimiters in regular expressions in two cases: 1. If a delimiter is an alphanumeric or a backslash. 2. If a delimiter is used in a regular expression pattern."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PhpRegExpInvalidDelimiterInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Regular expressions",
"index": 151,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUndefinedNamespaceInspection",
"shortDescription": {
"text": "Undefined namespace"
},
"fullDescription": {
"text": "Reports the references to a namespace that is not found.",
"markdown": "Reports the references to a namespace that is not found."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpUndefinedNamespaceInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Undefined symbols",
"index": 174,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpLanguageLevelInspection",
"shortDescription": {
"text": "Language level"
},
"fullDescription": {
"text": "Reports the language features used in source code that are not supported for the selected language level. For example, union types can be used only in PHP 8.0 and later.",
"markdown": "Reports the language features used in source code that are not supported for the selected language level.\n\nFor example, union types can be used only in PHP 8.0 and later."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "PhpLanguageLevelInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpCommentCanBeReplacedWithNamedArgumentInspection",
"shortDescription": {
"text": "Comment can be replaced with named argument"
},
"fullDescription": {
"text": "Reports the inline comments before arguments in function calls that only contain the name of the parameter and thus serve as hints. In PHP 8.0 and later, named arguments can be used instead. See Named arguments (php.net) for details.",
"markdown": "Reports the inline comments before arguments in function calls that only contain the name of the parameter and thus serve as hints. In PHP 8.0 and later, named arguments can be used instead.\n\n\nSee [Named arguments (php.net)](https://wiki.php.net/rfc/match_expression_v2) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpCommentCanBeReplacedWithNamedArgumentInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpNestedMinMaxCallInspection",
"shortDescription": {
"text": "Nested 'min/max' call"
},
"fullDescription": {
"text": "Reports nested 'min'/'max' calls. Since the 'min'/'max' functions accept any number of arguments, such nested calls are redundant.",
"markdown": "Reports nested `min`/`max` calls. Since the `min`/`max` functions accept any number of arguments, such nested calls are redundant."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpNestedMinMaxCallInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpPluralMixedCanBeReplacedWithArrayInspection",
"shortDescription": {
"text": "'mixed' type can be replaced with 'array'"
},
"fullDescription": {
"text": "Reports the 'mixed[]' usages in PHPDoc blocks that can be safely replaced with 'array'.",
"markdown": "Reports the `mixed[]` usages in PHPDoc blocks that can be safely replaced with `array`."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpPluralMixedCanBeReplacedWithArrayInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDuplicatedCharacterInStrFunctionCallInspection",
"shortDescription": {
"text": "Duplicate character in function call"
},
"fullDescription": {
"text": "Reports duplicate characters provided in the 'characters' argument of functions like 'ltrim' or 'str_words_counts'. Such duplicates are most probably a mistake and can be safely removed.",
"markdown": "Reports duplicate characters provided in the `characters` argument of functions like `ltrim` or `str_words_counts`. Such duplicates are most probably a mistake and can be safely removed."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpDuplicatedCharacterInStrFunctionCallInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpAccessStaticViaInstanceInspection",
"shortDescription": {
"text": "Class static member accessed via instance"
},
"fullDescription": {
"text": "Reports references to static methods and fields via a class instance rather than the class itself. Even though referring to static members via instance variables is allowed by PHP, this makes the code confusing, as the reader may think that the result of the method depends on the instance. The quick-fix replaces the instance variable with the class name. Example: 'class StaticClass {\n public static function someStaticFunction(): int\n {\n return 3;\n }\n\n }\n\n $var = new StaticClass\n $var::someStaticFunction();' After the quick-fix is applied: 'StaticClass::someStaticFunction()'",
"markdown": "Reports references to static methods and fields via a class instance rather than the class itself.\n\nEven though referring to static members via instance variables is allowed by PHP,\nthis makes the code confusing, as the reader may think that the result of the method depends on the instance.\n\nThe quick-fix replaces the instance variable with the class name.\n\nExample:\n\n\n class StaticClass {\n public static function someStaticFunction(): int\n {\n return 3;\n }\n\n }\n\n $var = new StaticClass\n $var::someStaticFunction();\n\nAfter the quick-fix is applied:\n\n\n StaticClass::someStaticFunction()\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpAccessStaticViaInstanceInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnusedPrivateFieldInspection",
"shortDescription": {
"text": "Unused private property"
},
"fullDescription": {
"text": "Reports the private properties that are never used.",
"markdown": "Reports the private properties that are never used."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnusedPrivateFieldInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Unused symbols",
"index": 168,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpSingleStatementWithBracesInspection",
"shortDescription": {
"text": "Single-statement body with braces"
},
"fullDescription": {
"text": "Reports the control structures (such as loops or conditionals) whose bodies are enclosed in braces but only contain a single child statement. Using braces in such cases is not necessary. See Control structures (php.net) for details.",
"markdown": "Reports the control structures (such as loops or conditionals) whose bodies are enclosed in braces but only contain a single child statement. Using braces in such cases is not necessary.\n\n\nSee [Control structures (php.net)](https://www.php.net/manual/en/language.control-structures.php) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpSingleStatementWithBracesInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnnecessaryElseBranchInspection",
"shortDescription": {
"text": "Unnecessary 'else' branch"
},
"fullDescription": {
"text": "Reports the 'else' branches in 'if' statements whose bodies always execute a terminating statement such as 'return' or 'throw'. Such branches are redundant and can be safely omitted.",
"markdown": "Reports the `else` branches in `if` statements whose bodies always execute a terminating statement such as `return` or `throw`. Such branches are redundant and can be safely omitted."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnnecessaryElseBranchInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Control flow",
"index": 25,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpPointlessBooleanExpressionInConditionInspection",
"shortDescription": {
"text": "Pointless boolean expression inside 'if' condition"
},
"fullDescription": {
"text": "Reports the boolean expressions inside 'if' conditions that contain '$expr == true' or '$expr == false'. Such expressions can be simplified to 'if($expr)' and 'if(!expr)'.",
"markdown": "Reports the boolean expressions inside `if` conditions that contain `$expr == true` or `$expr == false`. Such expressions can be simplified to `if($expr)` and `if(!expr)`."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpPointlessBooleanExpressionInConditionInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpToStringImplementationInspection",
"shortDescription": {
"text": "Method '__toString' implementation"
},
"fullDescription": {
"text": "Reports the attempts to convert the objects having no '__toString' method implementation to 'string'. Prior to PHP 7.4, this would lead to a fatal 'E_RECOVERABLE_ERROR' level error. In PHP 7.4, a fatal non-recoverable 'ERROR' is thrown. In PHP 8.0, the return value follows the standard PHP type semantics and will be coerced into a string if possible and if strict typing is disabled. If the Check __toString exists for each expression type option is enabled, the inspection will check all possible types of the expression and report if at least one of them doesn't contain the '__toString' method implementation. See __toString (php.net) for details.",
"markdown": "Reports the attempts to convert the objects having no `__toString` method implementation to `string`.\n\n\nPrior to PHP 7.4, this would lead to a fatal `E_RECOVERABLE_ERROR` level error. In PHP 7.4, a fatal non-recoverable `ERROR` is thrown. In PHP 8.0, the return value follows the standard PHP type semantics and will be coerced into a string if possible and if strict typing is disabled.\n\n\nIf the **Check __toString exists for each expression type** option is enabled, the inspection will check all possible types of the expression and\nreport if at least one of them doesn't contain the `__toString` method implementation.\n\n\nSee [__toString (php.net)](https://www.php.net/manual/en/language.oop5.magic.php#language.oop5.magic.tostring) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpToStringImplementationInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnitInvalidMockingEntityInspection",
"shortDescription": {
"text": "Invalid PHPUnit mocking target"
},
"fullDescription": {
"text": "Reports the methods and classes that are incorrectly mocked in PHPUnit tests. The following entities are reported: Enums and 'final' classes 'private', 'static', or 'final' methods Duplicate methods provided in the mocked methods lists via 'addMethods()', 'onlyMethods()', 'setMethods()', and so on.",
"markdown": "Reports the methods and classes that are incorrectly mocked in PHPUnit tests.\n\n\nThe following entities are reported:\n\n* Enums and `final` classes\n* `private`, `static`, or `final` methods\n* Duplicate methods provided in the mocked methods lists via `addMethods()`, `onlyMethods()`, `setMethods()`, and so on."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "PhpUnitInvalidMockingEntityInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPUnit",
"index": 131,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpRedeclarationStdlibFunctionInspection",
"shortDescription": {
"text": "Redeclaration of standard library function"
},
"fullDescription": {
"text": "Reports the redeclaration of standard library functions. Functions from the standard library cannot be redeclared in user code.",
"markdown": "Reports the redeclaration of standard library functions. Functions from the standard library cannot be redeclared in user code."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "PhpRedeclarationStdlibFunctionInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpClassImplementsSolelyTraversableInspection",
"shortDescription": {
"text": "Class can't implement Traversable directly"
},
"fullDescription": {
"text": "Reports the classes that are implementing the 'Traversable' interface alone, not as part of 'Iterator' or 'IteratorAggregate' interfaces. The 'Traversable' interface is an internal engine interface; it cannot be implemented in PHP scripts. See The Traversable interface (php.net) for details.",
"markdown": "Reports the classes that are implementing the `Traversable` interface alone, not as part of `Iterator` or `IteratorAggregate` interfaces.\n\n\nThe `Traversable` interface is an internal engine interface; it cannot be implemented in PHP scripts. See [The Traversable interface (php.net)](https://www.php.net/manual/en/class.traversable.php) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "PhpClassImplementsSolelyTraversableInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpPromotedFieldUsageInspection",
"shortDescription": {
"text": "Promoted property usage"
},
"fullDescription": {
"text": "Reports properties declared through promoted constructor parameters. Using promoted properties is only possible since PHP 8.0. In earlier PHP versions, it leads to a parse error. See Constructor Property Promotion (php.net) for details.",
"markdown": "Reports properties declared through promoted constructor parameters.\n\n\nUsing promoted properties is only possible since PHP 8.0. In earlier PHP versions, it leads to a parse error.\n\n\nSee [Constructor Property Promotion (php.net)](https://wiki.php.net/rfc/constructor_promotion) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpPromotedFieldUsageInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDocFieldTypeMismatchInspection",
"shortDescription": {
"text": "Type doesn't match property's declared type"
},
"fullDescription": {
"text": "Reports the properties' types in PHPDoc '@var' tags that do not match the declared type of a property.",
"markdown": "Reports the properties' types in PHPDoc `@var` tags that do not match the declared type of a property."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpDocFieldTypeMismatchInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPDoc",
"index": 2,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpFunctionNamingConventionInspection",
"shortDescription": {
"text": "Function name is not following coding convention"
},
"fullDescription": {
"text": "Reports the functions' names that are either too short, too long, or do not follow the specified regular expression pattern. Some coding styles have a special naming convention for functions. Use the inspection options to specify minimum/maximum length and the regular expression expected for functions' names. To ignore the names' length, specify 0. To learn more about regular expressions, refer to the Quick Start guide (regular-expressions.info).",
"markdown": "Reports the functions' names that are either too short, too long, or do not follow the specified regular expression pattern. Some coding styles have a special naming convention for functions.\n\n\nUse the inspection options to specify minimum/maximum length and the regular expression expected for functions' names.\nTo ignore the names' length, specify **0**.\n\n\nTo learn more about regular expressions, refer to the [Quick Start guide (regular-expressions.info)](https://www.regular-expressions.info/quickstart.html)."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpFunctionNamingConventionInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Naming conventions",
"index": 21,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpIssetCanBeReplacedWithCoalesceInspection",
"shortDescription": {
"text": "'isset' can be replaced with coalesce"
},
"fullDescription": {
"text": "Reports the conditions using 'isset' that can be safely replaced with expressions using the '??' null coalesce operator. See Null coalesce operator (php.net) for details.",
"markdown": "Reports the conditions using `isset` that can be safely replaced with expressions using the `??` null coalesce operator.\n\n\nSee [Null coalesce operator (php.net)](https://wiki.php.net/rfc/isset_ternary) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpIssetCanBeReplacedWithCoalesceInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpVoidFunctionResultUsedInspection",
"shortDescription": {
"text": "Invalid function result used"
},
"fullDescription": {
"text": "Reports the usages of a 'void' or 'never' function's return value. Since 'void' functions do not have a return value and 'never' functions terminate execution or throw an exception, such usages are most likely a programming mistake.",
"markdown": "Reports the usages of a `void` or `never` function's return value.\n\n\nSince `void` functions do not have a return value and `never` functions terminate execution or throw an exception, such usages are most likely a programming mistake."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpVoidFunctionResultUsedInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnitCoversFunctionWithoutScopeResolutionOperatorInspection",
"shortDescription": {
"text": "Covered function reference is provided without ::"
},
"fullDescription": {
"text": "Reports the references to functions/methods in the '@covers' PHPDoc tags that are not prepended with the scope resolution operator ('::').",
"markdown": "Reports the references to functions/methods in the `@covers` PHPDoc tags that are not prepended with the scope resolution operator (`::`)."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnitCoversFunctionWithoutScopeResolutionOperatorInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPUnit",
"index": 131,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpArrayAccessOnIllegalTypeInspection",
"shortDescription": {
"text": "Array offset access on illegal type"
},
"fullDescription": {
"text": "Reports the array offset access expressions that are used on illegal types.",
"markdown": "Reports the array offset access expressions that are used on illegal types."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PhpArrayAccessOnIllegalTypeInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Type compatibility",
"index": 147,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpLoopCanBeConvertedToArrayFillInspection",
"shortDescription": {
"text": "Loop can be converted to 'array_fill()' call"
},
"fullDescription": {
"text": "Reports the 'for' loops that can be replaced with 'array_fill()' calls.",
"markdown": "Reports the `for` loops that can be replaced with `array_fill()` calls."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpLoopCanBeConvertedToArrayFillInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUndefinedClassConstantInspection",
"shortDescription": {
"text": "Undefined class constant"
},
"fullDescription": {
"text": "Reports the references to class constants that are not declared.",
"markdown": "Reports the references to class constants that are not declared."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "PhpUndefinedClassConstantInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/Undefined symbols",
"index": 174,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUselessTrailingCommaInspection",
"shortDescription": {
"text": "Useless trailing comma"
},
"fullDescription": {
"text": "Reports the trailing commas in parameters lists and closures' 'use' lists that do not bring any benefit. In a single-line list, a trailing comma is redundant and can be removed. In a multiline list, if no line break is provided after a trailing comma, it becomes impossible to easily add, remove, or move lines.",
"markdown": "Reports the trailing commas in parameters lists and closures' `use` lists that do not bring any benefit.\n\n* In a single-line list, a trailing comma is redundant and can be removed.\n* In a multiline list, if no line break is provided after a trailing comma, it becomes impossible to easily add, remove, or move lines."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUselessTrailingCommaInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpRedundantDefaultBreakContinueArgumentInspection",
"shortDescription": {
"text": "Redundant 'continue/break' argument"
},
"fullDescription": {
"text": "Reports the redundant '1' argument of 'continue' and 'break' statements. Since this argument is optional and its default value is '1', such usages can be omitted. See continue (php.net) and break (php.net) for details.",
"markdown": "Reports the redundant `1` argument of `continue` and `break` statements. Since this argument is optional and its default value is `1`, such usages can be omitted.\n\n\nSee [continue (php.net)](https://www.php.net/manual/en/control-structures.continue.php) and [break (php.net)](https://www.php.net/manual/en/control-structures.break.php) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpRedundantDefaultBreakContinueArgumentInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpRedundantMethodOverrideInspection",
"shortDescription": {
"text": "Redundant method override"
},
"fullDescription": {
"text": "Reports the overriding methods that only consist of a single call to the parent method.",
"markdown": "Reports the overriding methods that only consist of a single call to the parent method."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpRedundantMethodOverrideInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpArrayAppendUsingCountInspection",
"shortDescription": {
"text": "Using 'count()' as index for appending value to array"
},
"fullDescription": {
"text": "Reports the 'count($array)' calls that are used as an array index for appending an element to the array: '$array[count($array)] = 42'. In such cases, it is recommended to use square bracket syntax ('$array[] = 42') instead, which adds no overhead of calling a function.",
"markdown": "Reports the `count($array)` calls that are used as an array index for appending an element to the array: `$array[count($array)] = 42`. In such cases, it is recommended to use square bracket syntax (`$array[] = 42`) instead, which adds no overhead of calling a function."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpArrayAppendUsingCountInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpSwitchCanBeReplacedWithMatchExpressionInspection",
"shortDescription": {
"text": "'switch' can be replaced with 'match' expression"
},
"fullDescription": {
"text": "Reports 'switch' statements that could be replaced with 'match' expression",
"markdown": "Reports 'switch' statements that could be replaced with 'match' expression"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpSwitchCanBeReplacedWithMatchExpressionInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpFormatFunctionParametersMismatchInspection",
"shortDescription": {
"text": "Format function parameters mismatch"
},
"fullDescription": {
"text": "Reports the arguments of a format function (such as 'printf' or 'sprintf') that are not mapped to any parameters or specification conversions. See printf (php.net) and sprintf (php.net) for details.",
"markdown": "Reports the arguments of a format function (such as `printf` or `sprintf`) that are not mapped to any parameters or specification conversions.\n\n\nSee [printf (php.net)](https://www.php.net/manual/en/function.printf.php) and [sprintf (php.net)](https://www.php.net/manual/en/function.sprintf.php) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpFormatFunctionParametersMismatchInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpTernaryExpressionCanBeReplacedWithConditionInspection",
"shortDescription": {
"text": "Ternary expression can be replaced with condition"
},
"fullDescription": {
"text": "Reports the ternary expressions specified as 'condition ? true : false' that can be safely replaced with just 'condition'.",
"markdown": "Reports the ternary expressions specified as `condition ? true : false` that can be safely replaced with just `condition`."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpTernaryExpressionCanBeReplacedWithConditionInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnitAssertCountInspection",
"shortDescription": {
"text": "Usage 'assertCount/assertSameSize' methods instead of assertEquals"
},
"fullDescription": {
"text": "Reports alternative usage of the 'assertEquals' and 'assertNotEquals' methods with 'count' function as a parameter See Usage of the assertCount for details. See Usage of the assertSameSize for details.",
"markdown": "Reports alternative usage of the `assertEquals` and `assertNotEquals` methods with `count` function as a parameter\n\n\nSee [Usage of the assertCount](https://phpunit.readthedocs.io/en/stable/assertions.html#assertcount) for details.\n\n\nSee [Usage of the assertSameSize](https://hotexamples.com/examples/-/PHPUnit_Framework_Assert/assertSameSize/php-phpunit_framework_assert-assertsamesize-method-examples.html) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnitAssertCountInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPUnit",
"index": 131,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpShortOpenTagInspection",
"shortDescription": {
"text": "Short open tag usage"
},
"fullDescription": {
"text": "Reports short PHP opening tag '<?' usages. Since short tags can be disabled in the PHP interpreter configuration, using them may lead to code compatibility issues. See PHP tags (php.net) for details.",
"markdown": "Reports short PHP opening tag `<?` usages. Since short tags can be disabled in the PHP interpreter configuration, using them may lead to code compatibility issues.\n\n\nSee [PHP tags (php.net)](https://www.php.net/manual/en/language.basic-syntax.phptags.php#language.basic-syntax.phptags) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PhpShortOpenTagInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpElementIsNotAvailableInCurrentPhpVersionInspection",
"shortDescription": {
"text": "Element is not available in configured PHP version"
},
"fullDescription": {
"text": "Reports the usages of entities which were introduced in PHP version later than configured one.",
"markdown": "Reports the usages of entities which were introduced in PHP version later than configured one."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "PhpElementIsNotAvailableInCurrentPhpVersionInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpMissingParentCallCommonInspection",
"shortDescription": {
"text": "Missing parent call for method"
},
"fullDescription": {
"text": "Reports the methods that do not call their parent method.",
"markdown": "Reports the methods that do not call their parent method."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpMissingParentCallCommonInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpMixedReturnTypeCanBeReducedInspection",
"shortDescription": {
"text": "'mixed' return type can be narrowed"
},
"fullDescription": {
"text": "Reports 'mixed' return types that can be narrowed down to more concrete types.",
"markdown": "Reports 'mixed' return types that can be narrowed down to more concrete types."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpMixedReturnTypeCanBeReducedInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpTraditionalSyntaxArrayLiteralInspection",
"shortDescription": {
"text": "Traditional syntax array literal detected"
},
"fullDescription": {
"text": "Reports traditional array syntax ('array()') usages in array literals and suggests replacing them with short array syntax ('[]').",
"markdown": "Reports traditional array syntax (`array()`) usages in array literals and suggests replacing them with short array syntax (`[]`)."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpTraditionalSyntaxArrayLiteralInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpConditionCheckedByNextConditionInspection",
"shortDescription": {
"text": "Condition inside logical expression checked by subsequent condition"
},
"fullDescription": {
"text": "Reports the conditions inside logical binary expressions that are covered by subsequent conditions and are therefore redundant.",
"markdown": "Reports the conditions inside logical binary expressions that are covered by subsequent conditions and are therefore redundant."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpConditionCheckedByNextConditionInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Control flow",
"index": 25,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpConditionCanBeReplacedWithMinMaxCallInspection",
"shortDescription": {
"text": "Condition can be replaced with 'min()'/'max()' call"
},
"fullDescription": {
"text": "Reports the conditions that perform manual min/max calculation instead of calling 'min'/'max' functions.",
"markdown": "Reports the conditions that perform manual min/max calculation instead of calling `min`/`max` functions."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpConditionCanBeReplacedWithMinMaxCallInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpGotoIntoLoopInspection",
"shortDescription": {
"text": "Goto into loop statement"
},
"fullDescription": {
"text": "Reports the 'goto' labels that are located inside loops or 'switch' statements. See goto (php.net) for details.",
"markdown": "Reports the `goto` labels that are located inside loops or `switch` statements.\n\n\nSee [goto (php.net)](https://www.php.net/manual/en/control-structures.goto.php) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "PhpGotoIntoLoopInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpMissingBreakStatementInspection",
"shortDescription": {
"text": "Missing 'break' statement"
},
"fullDescription": {
"text": "Reports the 'case' clauses in 'switch' statements that do not end with a 'break' or a 'return' statement. If a 'case' clause does not end with 'break' or 'return', its execution can unintentionally fall through the next case.",
"markdown": "Reports the `case` clauses in `switch` statements that do not end with a `break` or a `return` statement.\n\n\nIf a `case` clause does not end with `break` or `return`, its execution can unintentionally fall through the next case."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpMissingBreakStatementInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpSeparateElseIfInspection",
"shortDescription": {
"text": "Else if"
},
"fullDescription": {
"text": "Reports the usages of the 'else if' constructs specified in two words. According to PSR-12, the keyword 'elseif' SHOULD be used instead of 'else if' so that all control keywords look like single words. See PSR-12: Extended Coding Style (php-fig.org) for details.",
"markdown": "Reports the usages of the `else if` constructs specified in two words.\n\nAccording to PSR-12, the keyword `elseif` SHOULD be used instead of `else if` so that all control keywords look like single words.\n\n\nSee [PSR-12: Extended Coding Style (php-fig.org)](https://www.php-fig.org/psr/psr-12/#51-if-elseif-else) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpSeparateElseIfInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style/PSR-12",
"index": 188,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnitTestFailedLineInspection",
"shortDescription": {
"text": "Failed line in test"
},
"fullDescription": {
"text": "Reports failed method calls or assertions in tests. It helps detect the failed line in code faster and start debugging it immediately. Example: 'function test() {\n $this->assertEquals(1,2); //highlighted\n }'",
"markdown": "Reports failed method calls or assertions in tests. It helps detect the failed line in code faster and start debugging it immediately.\n\n**Example:**\n\n\n function test() {\n $this->assertEquals(1,2); //highlighted\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PhpUnitTestFailedLineInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPUnit",
"index": 131,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpEnforceDocCommentInspection",
"shortDescription": {
"text": "Enforce PHPDoc comment"
},
"fullDescription": {
"text": "Reports the elements without a PHPDoc comment or with a PHPDoc comment only containing the '@noinspection' tag. You can use Missing PHPDoc Comment inspection to report only non-fully typed elements.",
"markdown": "Reports the elements without a PHPDoc comment or with a PHPDoc comment only containing the `@noinspection` tag.\n\nYou can use *Missing PHPDoc Comment* inspection to report only non-fully typed elements."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpEnforceDocCommentInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPDoc/Code style",
"index": 68,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDocFinalChecksInspection",
"shortDescription": {
"text": "Overriding method/extending class marked as '@final'"
},
"fullDescription": {
"text": "Reports override of method or extending of class with '@final' in the PHPDoc.",
"markdown": "Reports override of method or extending of class with `@final` in the PHPDoc."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PhpDocFinalChecksInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpImmutablePropertyIsWrittenInspection",
"shortDescription": {
"text": "Immutable property written in invalid scope"
},
"fullDescription": {
"text": "Highlights write access references to properties, for which the write access scope declared via '#[Immutable]' is stricter than the reference scope.",
"markdown": "Highlights write access references to properties, for which the write access scope declared via `#[Immutable]` is stricter than the reference scope."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "PhpImmutablePropertyIsWrittenInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/Attributes",
"index": 120,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpTraitUsageOutsideUseInspection",
"shortDescription": {
"text": "Trait usage is not allowed"
},
"fullDescription": {
"text": "Reports the class references that are resolved to traits but are specified outside 'use' statements. Such usages are most probably the result of a programming mistake, since traits cannot be instantiated and any 'instanceof'-like behaviour is not supported for traits by design. See Traits (php.net) for details.",
"markdown": "Reports the class references that are resolved to traits but are specified outside `use` statements. Such usages are most probably the result of a programming mistake, since traits cannot be instantiated and any `instanceof`-like behaviour is not supported for traits by design.\n\n\nSee [Traits (php.net)](https://www.php.net/manual/en/language.oop5.traits.php) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpTraitUsageOutsideUseInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpStrictTypeCheckingInspection",
"shortDescription": {
"text": "Strict type checking rules violation"
},
"fullDescription": {
"text": "Reports violations of the strict type checking rules. In strict mode, only the variables exactly matching the declaration types are accepted. Strict type-checking mode can be enabled: Per file, if the 'declare(strict_types=1)' directive is specified. The directive must be the first statement in a file, block mode is explicitly disallowed. For all files, if the Enable for all files inspection option is enabled. See Strict typing (php.net) for details.",
"markdown": "Reports violations of the strict type checking rules.\n\n\nIn strict mode, only the variables exactly matching the declaration types are accepted. Strict type-checking mode can be enabled:\n\n* Per file, if the `declare(strict_types=1)` directive is specified. The directive must be the first statement in a file, block mode is explicitly disallowed.\n* For all files, if the **Enable for all files** inspection option is enabled.\n\n\nSee [Strict typing (php.net)](https://www.php.net/manual/en/language.types.declarations.php#language.types.declarations.strict) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "PhpStrictTypeCheckingInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/Type compatibility",
"index": 147,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpForeachOverSingleElementArrayLiteralInspection",
"shortDescription": {
"text": "Foreach over array literal with single element"
},
"fullDescription": {
"text": "Reports the 'foreach' statements that iterate over an array literal containing a single element.",
"markdown": "Reports the `foreach` statements that iterate over an array literal containing a single element."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpForeachOverSingleElementArrayLiteralInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpVariableIsUsedOnlyInClosureInspection",
"shortDescription": {
"text": "Variable is only used inside closure"
},
"fullDescription": {
"text": "Reports variables in closures' 'use' list that are only used inside closure.",
"markdown": "Reports variables in closures' `use` list that are only used inside closure."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpVariableIsUsedOnlyInClosureInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpLongTypeFormInspection",
"shortDescription": {
"text": "Short form of type keywords"
},
"fullDescription": {
"text": "Reports usages of long form type keywords. According to PSR-12, short form of type keywords MUST be used, that is 'bool' instead of 'boolean', 'int' instead of 'integer', and so on. See Keywords and Types (php-fig.org) for details.",
"markdown": "Reports usages of long form type keywords.\n\n\nAccording to PSR-12, short form of type keywords MUST be used, that is `bool` instead of `boolean`, `int` instead of `integer`, and so on.\n\n\nSee [Keywords and Types (php-fig.org)](https://www.php-fig.org/psr/psr-12/#25-keywords-and-types) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpLongTypeFormInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style/PSR-12",
"index": 188,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpClosureCanBeConvertedToShortArrowFunctionInspection",
"shortDescription": {
"text": "Closure can be converted to arrow function"
},
"fullDescription": {
"text": "Reports the anonymous functions that can be transformed to short arrow functions. Support for short arrow functions is available since PHP 7.4. See PHP RFC: Arrow Functions 2.0 (php.net) for details.",
"markdown": "Reports the anonymous functions that can be transformed to short arrow functions. Support for short arrow functions is available since PHP 7.4.\n\n\nSee [PHP RFC: Arrow Functions 2.0 (php.net)](https://wiki.php.net/rfc/arrow_functions_v2) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpClosureCanBeConvertedToShortArrowFunctionInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpFormatCallWithSingleArgumentInspection",
"shortDescription": {
"text": "Format function call with single argument"
},
"fullDescription": {
"text": "Reports the 'sprintf()' and 'vsprintf()' calls with a single argument. Such calls produce no effect and can be safely unwrapped, that is, replaced with the argument itself.",
"markdown": "Reports the `sprintf()` and `vsprintf()` calls with a single argument. Such calls produce no effect and can be safely unwrapped, that is, replaced with the argument itself."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpFormatCallWithSingleArgumentInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpIllegalArrayKeyTypeInspection",
"shortDescription": {
"text": "Illegal array key type"
},
"fullDescription": {
"text": "Reports the array keys that are of illegal type, such as objects or arrays. See Arrays (php.net) for details.",
"markdown": "Reports the array keys that are of illegal type, such as objects or arrays.\n\n\nSee [Arrays (php.net)](http://www.php.net/manual/en/language.types.array.php) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpIllegalArrayKeyTypeInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Type compatibility",
"index": 147,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpWrongStringConcatenationInspection",
"shortDescription": {
"text": "Wrong string concatenation"
},
"fullDescription": {
"text": "Reports the attempts to concatenate strings by using the '+' operator instead of the dot ('.') concatenation operator. Such attempts are most likely a programming mistake.",
"markdown": "Reports the attempts to concatenate strings by using the `+` operator instead of the dot (`.`) concatenation operator. Such attempts are most likely a programming mistake."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpWrongStringConcatenationInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnnecessaryLocalVariableInspection",
"shortDescription": {
"text": "Unnecessary local variable"
},
"fullDescription": {
"text": "Reports the local variables that are used in exit statements, such as 'throw', 'return', or 'yield', immediately after assignment.",
"markdown": "Reports the local variables that are used in exit statements, such as `throw`, `return`, or `yield`, immediately after assignment."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnnecessaryLocalVariableInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpNModifierCanBeReplacedWithNonCapturingGroupInspection",
"shortDescription": {
"text": "'n' modifier can be replaced with non-capturing groups"
},
"fullDescription": {
"text": "Reports 'n' PCRE modifier, that can be replaced with usage of non-capturing groups instead of capturing in regexp pattern.",
"markdown": "Reports `n` PCRE modifier, that can be replaced with usage of non-capturing groups instead of capturing in regexp pattern."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpNModifierCanBeReplacedWithNonCapturingGroupInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpRedundantReadonlyModifierInspection",
"shortDescription": {
"text": "'readonly' modifier is redundant"
},
"fullDescription": {
"text": "Reports 'readonly' modifiers applied to properties in read-only classes. Those modifiers are redundant since all properties in read-only classes are implicitly read-only. See Readonly classes RFC (php.net) for details.",
"markdown": "Reports `readonly` modifiers applied to properties in read-only classes. Those modifiers are redundant since all properties in read-only classes are implicitly read-only.\n\n\nSee [Readonly classes RFC (php.net)](https://wiki.php.net/rfc/readonly_classes#proposal) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpRedundantReadonlyModifierInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnnecessarySpreadOperatorForFunctionCallArgumentInspection",
"shortDescription": {
"text": "Unnecessary spread operator for function call argument"
},
"fullDescription": {
"text": "Reports the usages of the spread operator ('...') on array literals in function call arguments that may be safely unwrapped.",
"markdown": "Reports the usages of the spread operator (`...`) on array literals in function call arguments that may be safely unwrapped."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnnecessarySpreadOperatorForFunctionCallArgumentInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpFieldImmediatelyRewrittenInspection",
"shortDescription": {
"text": "Property is immediately rewritten "
},
"fullDescription": {
"text": "Reports the write expressions on properties which are immediately overwritten before being accessed.",
"markdown": "Reports the write expressions on properties which are immediately overwritten before being accessed."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpFieldImmediatelyRewrittenInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpExpressionWithoutClarifyingParenthesesInspection",
"shortDescription": {
"text": "Expression without clarifying parentheses"
},
"fullDescription": {
"text": "Reports potentially ambiguous expressions and proposes enclosing them in clarifying parentheses.",
"markdown": "Reports potentially ambiguous expressions and proposes enclosing them in clarifying parentheses."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpExpressionWithoutClarifyingParenthesesInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDisabledQualityToolComposerInspection",
"shortDescription": {
"text": "Quality tool inspection is disabled"
},
"fullDescription": {
"text": "Highlights the quality tools' entries in composer.json in case the corresponding code inspections are disabled.",
"markdown": "Highlights the quality tools' entries in *composer.json* in case the corresponding code inspections are disabled."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpDisabledQualityToolComposerInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Composer",
"index": 75,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpArrayIndexResetIsUnnecessaryInspection",
"shortDescription": {
"text": "Array internal pointer reset is unnecessary"
},
"fullDescription": {
"text": "Reports the 'reset($array)' calls on arrays whose internal pointer is already set on the first element. Such calls are redundant and can be safely removed. See reset (php.net) for details.",
"markdown": "Reports the `reset($array)` calls on arrays whose internal pointer is already set on the first element. Such calls are redundant and can be safely removed.\n\n\nSee [reset (php.net)](https://www.php.net/manual/en/function.reset.php) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpArrayIndexResetIsUnnecessaryInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpApplyingEmptyIndexOperatorOnStringInspection",
"shortDescription": {
"text": "Empty index operator not supported for strings"
},
"fullDescription": {
"text": "Reports the usages of empty index operator ('[]') on strings. Starting from PHP 7.1, applying the empty index operator on a string throws a fatal error. See Creating/modifying with square bracket syntax (php.net) for details.",
"markdown": "Reports the usages of empty index operator (`[]`) on strings.\n\n\nStarting from PHP 7.1, applying the empty index operator on a string throws a fatal error.\n\nSee [Creating/modifying with square bracket syntax (php.net)](https://www.php.net/manual/en/language.types.array.php#language.types.array.syntax.modifying) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "PhpApplyingEmptyIndexOperatorOnStringInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpTraitUseRuleInsideDifferentClassUseListInspection",
"shortDescription": {
"text": "Trait use rule resolved to method with different containing class "
},
"fullDescription": {
"text": "Reports the trait method 'use' rules that are resolved to methods from a different containing class rather than the one specified in the 'use' declaration.",
"markdown": "Reports the trait method `use` rules that are resolved to methods from a different containing class rather than the one specified in the `use` declaration."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpTraitUseRuleInsideDifferentClassUseListInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDocSignatureInspection",
"shortDescription": {
"text": "PHPDoc comment matches function/method signature"
},
"fullDescription": {
"text": "Reports the parameters' names and types in a PHPDoc comment that do not match the ones in the function/method declaration.",
"markdown": "Reports the parameters' names and types in a PHPDoc comment that do not match the ones in the function/method declaration."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpDocSignatureInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPDoc",
"index": 2,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpMultipleClassesDeclarationsInOneFile",
"shortDescription": {
"text": "Multiple classes declarations in one file"
},
"fullDescription": {
"text": "Reports multiple class declarations in a single file, which violates the PSR-0/PSR-4 standards. See PSR-0/PSR-4 standards (php-fig.org) for details.",
"markdown": "Reports multiple class declarations in a single file, which violates the PSR-0/PSR-4 standards.\n\n\nSee [PSR-0/PSR-4 standards (php-fig.org)](https://www.php-fig.org/psr/psr-4/) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpMultipleClassesDeclarationsInOneFile",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpArrayWriteIsNotUsedInspection",
"shortDescription": {
"text": "Array write access is not used"
},
"fullDescription": {
"text": "Reports the array write access expressions that are not used in code afterwards. The most common source of such problems is modifying an array passed via a parameter: if an array is passed by value, the change will not be visible outside the function.",
"markdown": "Reports the array write access expressions that are not used in code afterwards. The most common source of such problems is modifying an array passed via a parameter: if an array is passed by value, the change will not be visible outside the function."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpArrayWriteIsNotUsedInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Control flow",
"index": 25,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpReturnValueOfMethodIsNeverUsedInspection",
"shortDescription": {
"text": "Method's return value is never used"
},
"fullDescription": {
"text": "Reports the private methods returning the values that are not used.",
"markdown": "Reports the private methods returning the values that are not used."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpReturnValueOfMethodIsNeverUsedInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnitAssertFileEqualsInspection",
"shortDescription": {
"text": "Deprecated 'assertFileEquals/assertStringEqualsFile' usage"
},
"fullDescription": {
"text": "Reports the deprecated usages of the 'assertFileEquals', 'assertFileNotEquals', 'assertStringEqualsFile', and 'assertStringNotEqualsFile' functions with the '$canonicalize' and '$ignoreCase' parameters. The optional '$canonicalize' and '$ignoreCase' parameters of the 'assertFileEquals' and 'assertFileNotEquals' functions are deprecated and will be removed in PHPUnit 9. See Usage of the assertFileEquals function (phpunit.readthedocs.io) or Usage of the assertFileEquals function (phpunit.readthedocs.io) for details.",
"markdown": "Reports the deprecated usages of the `assertFileEquals`, `assertFileNotEquals`, `assertStringEqualsFile`, and `assertStringNotEqualsFile` functions with the `$canonicalize` and `$ignoreCase` parameters.\n\nThe optional `$canonicalize` and `$ignoreCase` parameters\nof the `assertFileEquals` and `assertFileNotEquals` functions are deprecated and will be removed in PHPUnit 9.\n\n\nSee [Usage of the assertFileEquals function (phpunit.readthedocs.io)](https://phpunit.readthedocs.io/en/stable/assertions.html#assertfileequals) or [Usage of the assertFileEquals function (phpunit.readthedocs.io)](https://phpunit.readthedocs.io/en/stable/assertions.html#assertstringequalsfile) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnitAssertFileEqualsInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPUnit",
"index": 131,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDeprecatedSerializableUsageInspection",
"shortDescription": {
"text": "Deprecated 'Serializable' interface usage"
},
"fullDescription": {
"text": "Reports the usages of deprecated 'Serializable' interface. Starting from PHP 8.1, classes that are non-abstract, implement 'Serializable', and do not implement '__serialize()' and '__unserialize()' will throw a deprecation warning. See Phasing out Serializable (php.net) for details.",
"markdown": "Reports the usages of deprecated `Serializable` interface.\n\n\nStarting from PHP 8.1, classes that are non-abstract, implement `Serializable`, and do not implement `__serialize()`\nand `__unserialize()` will throw a deprecation warning.\n\n\nSee [Phasing out Serializable (php.net)](https://wiki.php.net/rfc/custom_object_serialization) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpDeprecatedSerializableUsageInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpLoopCanBeConvertedToArrayMapInspection",
"shortDescription": {
"text": "Loop can be converted to 'array_map()' call"
},
"fullDescription": {
"text": "Reports the 'foreach' loops that can be replaced with 'array_map()' calls.",
"markdown": "Reports the `foreach` loops that can be replaced with `array_map()` calls."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpLoopCanBeConvertedToArrayMapInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpStrFunctionsInspection",
"shortDescription": {
"text": "'str*()' calls can be replaced with PHP 8 'str_*()' calls"
},
"fullDescription": {
"text": "Reports the 'strpos' and 'substr' functions calls that can be replaced with the 'str_*' functions calls (introduced in PHP 8.0). See str_contains (php.net) and str_starts_with and str_ends_with functions (php.net) for details.",
"markdown": "Reports the `strpos` and `substr` functions calls that can be replaced with the `str_*` functions calls (introduced in PHP 8.0).\n\n\nSee [str_contains (php.net)](https://wiki.php.net/rfc/str_contains) and [str_starts_with and str_ends_with functions (php.net)](https://wiki.php.net/rfc/add_str_starts_with_and_ends_with_functions) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpStrFunctionsInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnnecessaryStopStatementInspection",
"shortDescription": {
"text": "Unnecessary 'return/continue' statement"
},
"fullDescription": {
"text": "Reports unnecessary 'return' and 'continue' statements that can be safely removed.",
"markdown": "Reports unnecessary `return` and `continue` statements that can be safely removed."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnnecessaryStopStatementInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpConditionAlreadyCheckedInspection",
"shortDescription": {
"text": "Condition always evaluates to 'true/false'"
},
"fullDescription": {
"text": "Reports the conditions that are already covered by earlier conditions and thus have no effect as well as the variables that are always true (or always false) when reached.",
"markdown": "Reports the conditions that are already covered by earlier conditions and thus have no effect as well as the variables that are always true (or always false) when reached."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpConditionAlreadyCheckedInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Control flow",
"index": 25,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpBooleanCanBeSimplifiedInspection",
"shortDescription": {
"text": "Boolean expression can be simplified"
},
"fullDescription": {
"text": "Reports the boolean expressions that contain the 'true' or 'false' literals and can be simplified.",
"markdown": "Reports the boolean expressions that contain the `true` or `false` literals and can be simplified."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpBooleanCanBeSimplifiedInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpSuspiciousNameCombinationInspection",
"shortDescription": {
"text": "Suspicious names combination"
},
"fullDescription": {
"text": "Reports the assignments and function calls where the name of the variable or parameter probably doesn't match the name of the assigned or passed value. The following sets of names are supported: 'needle', 'haystack' 'x', 'y' 'top', 'bottom', 'left', 'right' 'year', 'month', 'week', 'day', 'hour', 'minute', 'second'",
"markdown": "Reports the assignments and function calls where the name of the variable or parameter probably doesn't match the name of the assigned or passed value.\n\n\nThe following sets of names are supported:\n\n* `needle`, `haystack`\n* `x`, `y`\n* `top`, `bottom`, `left`, `right`\n* `year`, `month`, `week`, `day`, `hour`, `minute`, `second`"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpSuspiciousNameCombinationInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpStatementWithoutBracesInspection",
"shortDescription": {
"text": "Control statement body without braces"
},
"fullDescription": {
"text": "Reports the control structures (such as loops or conditionals) whose bodies are not enclosed in braces. See Control structures (php.net) for details.",
"markdown": "Reports the control structures (such as loops or conditionals) whose bodies are not enclosed in braces.\n\n\nSee [Control structures (php.net)](https://www.php.net/manual/en/language.control-structures.php) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpStatementWithoutBracesInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpNewClassMissingParameterListInspection",
"shortDescription": {
"text": "Missing parameter list"
},
"fullDescription": {
"text": "Reports missing parameter lists in a classes' instantiations. According to the PSR-12 specification, when instantiating a new class, parentheses MUST always be present even when there are no arguments passed to the constructor. See PSR-12: Extended Coding Style (php-fig.org) for details.",
"markdown": "Reports missing parameter lists in a classes' instantiations.\n\nAccording to the PSR-12 specification, when instantiating a new class, parentheses MUST always be present even when there are no arguments passed to the constructor.\n\n\nSee [PSR-12: Extended Coding Style (php-fig.org)](https://www.php-fig.org/psr/psr-12/#4-classes-properties-and-methods) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpNewClassMissingParameterListInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style/PSR-12",
"index": 188,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpCastIsEvaluableInspection",
"shortDescription": {
"text": "Type cast on a scalar value"
},
"fullDescription": {
"text": "Reports the type casts that can be evaluated in place and suggests replacing them with actual computed values. See Type juggling (php.net) for details.",
"markdown": "Reports the type casts that can be evaluated in place and suggests replacing them with actual computed values.\n\n\nSee [Type juggling (php.net)](https://www.php.net/manual/en/language.types.type-juggling.php) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpCastIsEvaluableInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpInstanceofIsAlwaysTrueInspection",
"shortDescription": {
"text": "Result of 'instanceof' is always 'true'"
},
"fullDescription": {
"text": "Reports the 'instanceof' expressions whose argument is within the hierarchy of the checked variable. Such expressions will always evaluate to 'true'.",
"markdown": "Reports the `instanceof` expressions whose argument is within the hierarchy of the checked variable. Such expressions will always evaluate to `true`."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpInstanceofIsAlwaysTrueInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Control flow",
"index": 25,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpIncorrectMagicMethodSignatureInspection",
"shortDescription": {
"text": "Incorrect magic method signature"
},
"fullDescription": {
"text": "Reports incompatible magic methods signatures. See RFC: Ensure correct signatures of magic methods (php.net) for details.",
"markdown": "Reports incompatible magic methods signatures.\n\n\nSee [RFC: Ensure correct signatures of magic methods (php.net)](https://wiki.php.net/rfc/magic-methods-signature) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "PhpIncorrectMagicMethodSignatureInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnitMissingTargetForTestInspection",
"shortDescription": {
"text": "Missing target element for PHPUnit test"
},
"fullDescription": {
"text": "Reports the test classes and methods, for which no corresponding production classes or methods were found.",
"markdown": "Reports the test classes and methods, for which no corresponding production classes or methods were found."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpUnitMissingTargetForTestInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPUnit",
"index": 131,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDuplicateCatchBodyInspection",
"shortDescription": {
"text": "Duplicate branch in 'catch' statement"
},
"fullDescription": {
"text": "Reports 'catch' statements with duplicated bodies.",
"markdown": "Reports `catch` statements with duplicated bodies."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpDuplicateCatchBodyInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpPropertyCanBeReadonlyInspection",
"shortDescription": {
"text": "Property can be 'readonly'"
},
"fullDescription": {
"text": "Reports the private promoted properties that are never written to. In PHP 8.1 and later, such properties can be declared 'readonly'. See Readonly properties (php.net) for details.",
"markdown": "Reports the private promoted properties that are never written to. In PHP 8.1 and later, such properties can be declared `readonly`.\n\n\nSee [Readonly properties (php.net)](https://wiki.php.net/rfc/readonly_properties_v2) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PhpPropertyCanBeReadonlyInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpArrayTraversableCanBeReplacedWithIterableInspection",
"shortDescription": {
"text": "Type hint 'array|Traversable' can be replaced with 'iterable'"
},
"fullDescription": {
"text": "Reports the 'array|Traversable' type hints that can be replaced with 'iterable'.",
"markdown": "Reports the `array|Traversable` type hints that can be replaced with `iterable`."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpArrayTraversableCanBeReplacedWithIterableInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpNullSafeOperatorCanBeUsedInspection",
"shortDescription": {
"text": "Nullsafe operator '?->' can be used"
},
"fullDescription": {
"text": "Reports the null-checking conditional expressions that can be safely replaced with the '?->' nullsafe operator.",
"markdown": "Reports the null-checking conditional expressions that can be safely replaced with the `?->` nullsafe operator."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpNullSafeOperatorCanBeUsedInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style",
"index": 23,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpLineCommentWillBeParsedAsAttributeInspection",
"shortDescription": {
"text": "Comment is parsed as attribute in PHP 8.0"
},
"fullDescription": {
"text": "Reports line comments starting with '#['. In PHP 8.0 and later, such comments are parsed as attributes. See Attributes (php.net) for details.",
"markdown": "Reports line comments starting with `#[`. In PHP 8.0 and later, such comments are parsed as attributes.\n\n\nSee [Attributes (php.net)](https://wiki.php.net/rfc/attributes_v2) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PhpLineCommentWillBeParsedAsAttributeInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Attributes",
"index": 120,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnpackedArgumentTypeMismatchInspection",
"shortDescription": {
"text": "Invalid type of unpacked argument"
},
"fullDescription": {
"text": "Reports unpacked function arguments and array elements whose type is neither 'array' nor 'Traversable'. Starting with PHP 8.0, such usages will result in 'Fatal error'.",
"markdown": "Reports unpacked function arguments and array elements whose type is neither `array` nor `Traversable`.\n\n\nStarting with PHP 8.0, such usages will result in `Fatal error`."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpUnpackedArgumentTypeMismatchInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUnitAssertTrueWithIncompatibleTypeArgumentInspection",
"shortDescription": {
"text": "'assertTrue()' with incompatible argument type"
},
"fullDescription": {
"text": "Reports the PHPUnit 'assertTrue()' calls whose arguments are of incompatible types. Since the 'assertTrue()' method relies on strict types comparison with 'true', such assertions will always fail.",
"markdown": "Reports the PHPUnit `assertTrue()` calls whose arguments are of incompatible types. Since the `assertTrue()` method relies on strict types comparison with `true`, such assertions will always fail."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PhpUnitAssertTrueWithIncompatibleTypeArgumentInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPUnit",
"index": 131,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpDuplicateOperandInComparisonInspection",
"shortDescription": {
"text": "Duplicate operand in comparison"
},
"fullDescription": {
"text": "Reports duplicate operands in binary expressions ('+', '-', '*', '/', '&&', '||', and '.') that are in turn used inside comparison expressions. Such operands do not affect the comparison result and can be safely removed.",
"markdown": "Reports duplicate operands in binary expressions (`+`, `-`, `*`, `/`, `&&`, `||`, and `.`) that are in turn used inside comparison expressions. Such operands do not affect the comparison result and can be safely removed."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpDuplicateOperandInComparisonInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUndefinedClassInspection",
"shortDescription": {
"text": "Undefined class"
},
"fullDescription": {
"text": "Reports the references to classes whose declarations are not found in the project files, configured include paths, or among the PHP predefined classes. Use the options below to customize the inspection: Ignore PHPDoc: if selected, the inspection will not report the undefined classes referenced in PHPDoc blocks.",
"markdown": "Reports the references to classes whose declarations are not found in the project files, configured include paths, or among the PHP predefined classes.\n\nUse the options below to customize the inspection:\n\n* **Ignore PHPDoc**: if selected, the inspection will not report the undefined classes referenced in PHPDoc blocks."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpUndefinedClassInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Undefined symbols",
"index": 174,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpCompoundNamespaceDepthInspection",
"shortDescription": {
"text": "Compound namespace depth is more than 2"
},
"fullDescription": {
"text": "Reports the usages of compound namespaces whose depth exceeds two levels. According to PSR-12, compound namespaces with a depth of more than two MUST NOT be used. See PSR-12: Extended Coding Style (php-fig.org) for details.",
"markdown": "Reports the usages of compound namespaces whose depth exceeds two levels.\n\nAccording to PSR-12, compound namespaces with a depth of more than two MUST NOT be used.\n\n\nSee [PSR-12: Extended Coding Style (php-fig.org)](https://www.php-fig.org/psr/psr-12/#3-declare-statements-namespace-and-import-statements) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpCompoundNamespaceDepthInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code style/PSR-12",
"index": 188,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUndefinedConstantInspection",
"shortDescription": {
"text": "Undefined constant"
},
"fullDescription": {
"text": "Reports the references to constants that are not found in the project files, configured include paths, or among the PHP predefined constants.",
"markdown": "Reports the references to constants that are not found in the project files, configured include paths, or among the PHP predefined constants."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpUndefinedConstantInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Undefined symbols",
"index": 174,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpUncoveredEnumCasesInspection",
"shortDescription": {
"text": "Some enum cases are uncovered"
},
"fullDescription": {
"text": "Reports the 'match' expressions that don't cover all 'enum' cases in 'match' arm conditions.",
"markdown": "Reports the `match` expressions that don't cover all `enum` cases in `match` arm conditions."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PhpUncoveredEnumCasesInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpRedundantDocCommentInspection",
"shortDescription": {
"text": "Redundant PHPDoc comment"
},
"fullDescription": {
"text": "Reports PHPDoc comments or their parts that contain the information already provided in declarations.",
"markdown": "Reports PHPDoc comments or their parts that contain the information already provided in declarations."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpRedundantDocCommentInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "PHP/PHPDoc",
"index": 2,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpComposerDuplicatedRequirementInspection",
"shortDescription": {
"text": "Duplicate package entries in composer.json"
},
"fullDescription": {
"text": "Reports duplicate package entries in the 'require' and 'require-dev' sections of composer.json.",
"markdown": "Reports duplicate package entries in the `require` and `require-dev` sections of *composer.json*."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpComposerDuplicatedRequirementInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Composer",
"index": 75,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpExpressionResultUnusedInspection",
"shortDescription": {
"text": "Expression result unused"
},
"fullDescription": {
"text": "Reports the expressions that are calculated, but the calculation result is not used anywhere. Such errors can be caused, for example, by misspelling the '=' operator as '=='.",
"markdown": "Reports the expressions that are calculated, but the calculation result is not used anywhere.\n\nSuch errors can be caused, for example, by misspelling the `=` operator as `==`."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpExpressionResultUnusedInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Probable bugs",
"index": 101,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpIdempotentOperationInspection",
"shortDescription": {
"text": "Idempotent operation in binary expression"
},
"fullDescription": {
"text": "Reports the binary expression operands that do not change the expression result (such as '+ 0' or '. \"\"') and are therefore redundant.",
"markdown": "Reports the binary expression operands that do not change the expression result (such as `+ 0` or `. \"\"`) and are therefore redundant."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpIdempotentOperationInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpLoopCanBeReplacedWithImplodeInspection",
"shortDescription": {
"text": "Loop can be replaced with 'implode()'"
},
"fullDescription": {
"text": "Reports the 'foreach' loops that can be safely replaced with 'implode()' calls. See implode (php.net) for details.",
"markdown": "Reports the `foreach` loops that can be safely replaced with `implode()` calls.\n\n\nSee [implode (php.net)](https://www.php.net/manual/en/function.implode.php) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpLoopCanBeReplacedWithImplodeInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpHierarchyChecksInspection",
"shortDescription": {
"text": "Class hierarchy checks"
},
"fullDescription": {
"text": "Checks the classes' hierarchy: abstract methods implementation, the compatibility of implementing/overriding methods with their declarations in parent classes, and properties' types redeclarations. All reported violations result in PHP fatal errors. It is not recommended disabling or suppressing this inspection.",
"markdown": "Checks the classes' hierarchy: abstract methods implementation, the compatibility of implementing/overriding methods with their declarations in parent classes, and properties' types redeclarations.\n\nAll reported violations result in PHP fatal errors. It is not recommended disabling or suppressing this inspection."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "PhpHierarchyChecksInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PHP/General",
"index": 18,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpMissingFieldTypeInspection",
"shortDescription": {
"text": "Missing property's type declaration"
},
"fullDescription": {
"text": "Reports the properties that have no type declaration.",
"markdown": "Reports the properties that have no type declaration."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpMissingFieldTypeInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Type compatibility",
"index": 147,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpTooManyParametersInspection",
"shortDescription": {
"text": "Too many parameters in function declaration"
},
"fullDescription": {
"text": "Reports the function/method declarations with the number of parameters exceeding the specified limit.",
"markdown": "Reports the function/method declarations with the number of parameters exceeding the specified limit."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PhpTooManyParametersInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "PHP/Code smell",
"index": 22,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpWrongForeachArgumentTypeInspection",
"shortDescription": {
"text": "Invalid argument supplied for 'foreach()'"
},
"fullDescription": {
"text": "Reports the 'foreach' constructs used on variables of the 'string', 'float', 'int', or 'boolean' type. See foreach (php.net) for details.",
"markdown": "Reports the `foreach` constructs used on variables of the `string`, `float`, `int`, or `boolean` type.\n\n\nSee [foreach (php.net)](http://www.php.net/manual/en/control-structures.foreach.php) for details."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpWrongForeachArgumentTypeInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PHP/Type compatibility",
"index": 147,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.spring",
"version": "232.8660.185",
"rules": [
{
"id": "SpringBeanConstructorArgInspection",
"shortDescription": {
"text": "Incorrect constructor injection in XML Spring bean"
},
"fullDescription": {
"text": "Reports Spring '<bean>' using constructor-based dependency injection. The inspection triggers when it can't find an appropriate constructor or factory method for '<bean>' with the configured '<constructor-arg>' tags and defined 'autowire' policy. Example: 'public class MyComponent {\n // constructor\n public MyComponent(MyBean bean) {}\n // factory method\n public static MyComponent getInstance(String name, int port) {\n }' '<beans>\n <bean class=\"beans.MyComponent\" id=\"foo\"> <!-- reports \"No matching constructor found in class 'MyComponent\" -->\n <constructor-arg ref=\"myBean\"/>\n <constructor-arg value=\"123\"/>\n </bean>\n\n <bean class=\"beans.MyComponent\" factory-method=\"getInstance\"> <!-- reports \"No matching factory method found in class\" -->\n <constructor-arg value=\"123\"/>\n </bean>\n </beans>'",
"markdown": "Reports Spring `<bean>` using constructor-based dependency injection.\n\nThe inspection triggers when it can't find an appropriate constructor or factory method for `<bean>` with the configured\n`<constructor-arg>` tags and defined `autowire` policy.\n\n**Example:**\n\n\n public class MyComponent {\n // constructor\n public MyComponent(MyBean bean) {}\n // factory method\n public static MyComponent getInstance(String name, int port) {\n }\n\n\n <beans>\n <bean class=\"beans.MyComponent\" id=\"foo\"> <!-- reports \"No matching constructor found in class 'MyComponent\" -->\n <constructor-arg ref=\"myBean\"/>\n <constructor-arg value=\"123\"/>\n </bean>\n\n <bean class=\"beans.MyComponent\" factory-method=\"getInstance\"> <!-- reports \"No matching factory method found in class\" -->\n <constructor-arg value=\"123\"/>\n </bean>\n </beans>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringBeanConstructorArgInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/XML",
"index": 5,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringTestingSqlInspection",
"shortDescription": {
"text": "Invalid @Sql and @SqlGroup configurations"
},
"fullDescription": {
"text": "Reports unresolved file references in the 'scripts' attributes of the @Sql annotation and the corresponding aliased attributes of the '@Sql' meta annotations. Example: '@SqlGroup({\n @Sql(\"not-found\"), // reports \"Cannot resolve file 'not-found\"\n @Sql(\"found.sql\")\n })\n public class MyTestWithSqlData {...}'",
"markdown": "Reports unresolved file references in the `scripts` attributes of the\n[@Sql](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/test/context/jdbc/Sql.html)\nannotation and the corresponding aliased attributes of the `@Sql` meta annotations.\n\n**Example:**\n\n\n @SqlGroup({\n @Sql(\"not-found\"), // reports \"Cannot resolve file 'not-found\"\n @Sql(\"found.sql\")\n })\n public class MyTestWithSqlData {...}\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringTestingSqlInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/Code",
"index": 8,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringJavaAutowiredFieldsWarningInspection",
"shortDescription": {
"text": "Non recommended 'field' injections"
},
"fullDescription": {
"text": "Reports injected or autowired fields in Spring components. The quick-fix suggests the recommended constructor-based dependency injection in beans and assertions for mandatory fields. Example: 'class MyComponent {\n @Inject MyCollaborator collaborator; // injected field\n\n public void myBusinessMethod() {\n collaborator.doSomething(); // throws NullPointerException\n }\n}' After applying the quick-fix: 'class MyComponent {\n\n private final MyCollaborator collaborator;\n\n @Inject\n public MyComponent(MyCollaborator collaborator) {\n Assert.notNull(collaborator, \"MyCollaborator must not be null!\");\n this.collaborator = collaborator;\n }\n\n public void myBusinessMethod() {\n collaborator.doSomething(); // now this call is safe\n }\n}'",
"markdown": "Reports injected or autowired fields in Spring components.\n\nThe quick-fix suggests the recommended constructor-based dependency injection in beans\nand assertions for mandatory fields.\n\n**Example:**\n\n\n class MyComponent {\n @Inject MyCollaborator collaborator; // injected field\n\n public void myBusinessMethod() {\n collaborator.doSomething(); // throws NullPointerException\n }\n }\n\n<br />\n\nAfter applying the quick-fix:\n\n\n class MyComponent {\n\n private final MyCollaborator collaborator;\n\n @Inject\n public MyComponent(MyCollaborator collaborator) {\n Assert.notNull(collaborator, \"MyCollaborator must not be null!\");\n this.collaborator = collaborator;\n }\n\n public void myBusinessMethod() {\n collaborator.doSomething(); // now this call is safe\n }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "SpringJavaAutowiredFieldsWarningInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/Code",
"index": 8,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ContextComponentScanInconsistencyInspection",
"shortDescription": {
"text": "Invalid filter definition in XML-based component scans"
},
"fullDescription": {
"text": "Reports inconsistent <filter> definitions in <component-scan> of XML application contexts. Example: 'public class NonAnnotationTypeClass {}' '<beans>\n <ctx:component-scan base-package=\"com.my.company\">\n <ctx:exclude-filter expression=\"com.my.company.anno.NonAnnotationTypeClass\" type=\"annotation\"/>\n </ctx:component-scan>\n </beans>' In this example, 'NonAnnotationTypeClass' is expected to be an annotation type.",
"markdown": "Reports inconsistent **\\<filter\\>** definitions in **\\<component-scan\\>** of XML application contexts.\n\n**Example:**\n\n\n public class NonAnnotationTypeClass {}\n\n\n <beans>\n <ctx:component-scan base-package=\"com.my.company\">\n <ctx:exclude-filter expression=\"com.my.company.anno.NonAnnotationTypeClass\" type=\"annotation\"/>\n </ctx:component-scan>\n </beans>\n\nIn this example, `NonAnnotationTypeClass` is expected to be an annotation type."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "ContextComponentScanInconsistencyInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/XML",
"index": 5,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UtilSchemaInspection",
"shortDescription": {
"text": "Incorrectly configured 'util' schema beans defined in XML application context"
},
"fullDescription": {
"text": "Reports incorrect schema beans defined in XML application contexts. '<beans ... xmlns:util=\"https://www.springframework.org/schema/util\">\n <bean class=\"MyBean\" id=\"myBean\"/>\n <bean class=\"ErrTypeBean\" id=\"errTypeBean\"/>\n <util:list list-class=\"java.lang.String\"/> // reports \"Class must be inheritor of 'java.util.List'\"\n <util:set value-type=\"MyBean\">\n <ref bean=\"fooBean\"/>\n <ref bean=\"errTypeBean\"/> // reports \"Cannot be added in collection of 'MyBean' type\"\n </util:set>\n </beans>'",
"markdown": "Reports incorrect [schema beans](https://www.springframework.org/schema/util) defined in XML application contexts.\n\n\n <beans ... xmlns:util=\"https://www.springframework.org/schema/util\">\n <bean class=\"MyBean\" id=\"myBean\"/>\n <bean class=\"ErrTypeBean\" id=\"errTypeBean\"/>\n <util:list list-class=\"java.lang.String\"/> // reports \"Class must be inheritor of 'java.util.List'\"\n <util:set value-type=\"MyBean\">\n <ref bean=\"fooBean\"/>\n <ref bean=\"errTypeBean\"/> // reports \"Cannot be added in collection of 'MyBean' type\"\n </util:set>\n </beans>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "UtilSchemaInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/XML",
"index": 5,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringContextConfigurationInspection",
"shortDescription": {
"text": "Invalid @ContextConfiguration"
},
"fullDescription": {
"text": "Reports incorrect Spring context configurations. Unresolved files and directories in 'locations' attributes and corresponding aliased attributes of '@ContextConfiguration' meta annotations Missing default application context file For more information, see @ContextConfiguration. Example: '@ContextConfiguration(locations = \"classpath:META-INF/unknown-context.xml\") // reports \"Cannot resolve file 'unknown-context.xml'\"\n class MyTests {...}'",
"markdown": "Reports incorrect Spring context configurations.\n\n* Unresolved files and directories in `locations` attributes and corresponding aliased attributes of `@ContextConfiguration` meta annotations\n* Missing default application context file\n\nFor more information, see [@ContextConfiguration](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/test/context/ContextConfiguration.html).\n\n**Example:**\n\n\n @ContextConfiguration(locations = \"classpath:META-INF/unknown-context.xml\") // reports \"Cannot resolve file 'unknown-context.xml'\"\n class MyTests {...}\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringContextConfigurationInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/Code",
"index": 8,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringElStaticFieldInjectionInspection",
"shortDescription": {
"text": "Incorrect injecting of SpEL in a static field"
},
"fullDescription": {
"text": "Reports attempts to inject Spring Expression Language (SpEL) into static fields ('null' value is injected). Example: '@Controller\npublic class MyController {\n @Value(\"#{systemProperties['some.key']}\") // Injection to static fields is not allowed\n static String spelWithDefaultValue;\n}'",
"markdown": "Reports attempts to inject Spring Expression Language (SpEL) into static fields ('null' value is injected).\n\n**Example:**\n\n\n @Controller\n public class MyController {\n @Value(\"#{systemProperties['some.key']}\") // Injection to static fields is not allowed\n static String spelWithDefaultValue;\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringElStaticFieldInjectionInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core",
"index": 4,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringElInspection",
"shortDescription": {
"text": "Incorrect Spring Expression Language (SpEl) syntax"
},
"fullDescription": {
"text": "Reports syntax errors in the Spring Expression Language (SpEL) code, such as unresolved references and invalid locations. Example: '@Controller\npublic class MyController {\n @Value(\"#{T(java.lang.Math).unknown()}\") // Cannot resolve property or method 'unknown'\n public void setValue(String s) {}\n}'",
"markdown": "Reports syntax errors in the Spring Expression Language (SpEL) code, such as unresolved references and invalid locations.\n\n**Example:**\n\n\n @Controller\n public class MyController {\n @Value(\"#{T(java.lang.Math).unknown()}\") // Cannot resolve property or method 'unknown'\n public void setValue(String s) {}\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringElInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core",
"index": 4,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringLookupInjectionInspection",
"shortDescription": {
"text": "Incorrectly referenced bean in @Lookup annotation of Spring component"
},
"fullDescription": {
"text": "Reports incorrect bean references in the 'value' parameter of the @Lookup annotation. Example: '@Component public class FooBean {...}\n @Component public class OtherBean {...}\n\n @Component public class MyComponent {\n @Lookup(\"fooBean\")\n public FooBean fooBean() {...}\n\n @Lookup(\"fooBean\") // reports \"Bean must be of 'OtherBean' type\"\n public OtherBean otherBean() {...}\n\n @Lookup(\"unknown\") // reports \"Cannot resolve bean 'unknown'\"\n public OtherBean fooBean() {...}\n }'",
"markdown": "Reports incorrect bean references in the `value` parameter of the\n[@Lookup](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/beans/factory/annotation/Lookup.html)\nannotation.\n\n**Example:**\n\n\n @Component public class FooBean {...}\n @Component public class OtherBean {...}\n\n @Component public class MyComponent {\n @Lookup(\"fooBean\")\n public FooBean fooBean() {...}\n\n @Lookup(\"fooBean\") // reports \"Bean must be of 'OtherBean' type\"\n public OtherBean otherBean() {...}\n\n @Lookup(\"unknown\") // reports \"Cannot resolve bean 'unknown'\"\n public OtherBean fooBean() {...}\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringLookupInjectionInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/Code",
"index": 8,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringXmlModelInspection",
"shortDescription": {
"text": "Incorrect Spring Core XML-based application context"
},
"fullDescription": {
"text": "Reports issues with the Spring Framework XML-based application context: Unresolved bean references Missing required tags or attributes Incorrect property types Inconsistent 'enum' properties Incorrect types of referenced beans",
"markdown": "Reports issues with the [Spring Framework](https://spring.io/projects/spring-framework) XML-based application context:\n\n* Unresolved bean references\n* Missing required tags or attributes\n* Incorrect property types\n* Inconsistent `enum` properties\n* Incorrect types of referenced beans"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringXmlModelInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/XML",
"index": 5,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringTransactionalMethodCallsInspection",
"shortDescription": {
"text": "@Transactional self-invocation method calls"
},
"fullDescription": {
"text": "Using @Transactional: In proxy mode (which is the default), only external method calls coming in through the proxy are intercepted. This means that self-invocation (in effect, a method within the target object calling another method of the target object) does not lead to an actual transaction at runtime even if the invoked method is marked with @Transactional.",
"markdown": "[Using\n@Transactional](https://docs.spring.io/spring-framework/docs/current/reference/html/data-access.html#transaction-declarative-annotations): In proxy mode (which is the default), only external method calls coming in through the proxy are intercepted. This means that self-invocation (in effect, a method within the target object calling another method of the target object) does not lead to an actual transaction at runtime even if the invoked method is marked with @Transactional."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringTransactionalMethodCallsInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/Code",
"index": 8,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringJavaInjectionPointsAutowiringInspection",
"shortDescription": {
"text": "Incorrect autowiring in Spring bean components"
},
"fullDescription": {
"text": "Reports autowiring problems on injection points of Spring beans @Component, @Service, and so on. More than one bean of 'concrete' type No beans of 'concrete' type No bean with qualifier Incorrect usages of '@Autowired' on Spring bean constructors Injected or autowired fields/methods in classes that are not valid Spring beans Example: 'public interface FooInterface {...}\n @Component public class FooBean implements FooInterface {...}\n @Component public class OtherBean implements FooInterface {...}\n\n@Component\npublic class MyComponent {\n\t@Autowired\n\tFooInterface foo; // \"Could not autowire. There is more than one bean of 'FooInterface' type.\n // Beans: fooBean(FooBean.java), otherBean(OtherBean.java)\"\n}' Example: '@Component\npublic class MyComponent {\n\t@Autowired\n\tpublic MyComponent(BarBean bean) {...} // reports 'Only one @Autowired constructor is allowed'\n\n\t@Autowired\n\tpublic MyComponent(FooBean bean) {...} // reports 'Only one @Autowired constructor is allowed'\n}\n\n@Component\npublic class MyFactory { // reports ' No matching @Autowired constructor'\n\tpublic MyFactory(String str) {...}\n\tpublic MyFactory(int count) {...}\n}' Example: 'public class FooBeanClass {\n @Autowired // reports 'Autowired members must be defined in valid Spring beans: @Component, @Service, and so on'\n ServiceBean bean;\n }'",
"markdown": "Reports autowiring problems on injection points of Spring beans\n[@Component](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/stereotype/Component.html),\n[@Service](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/stereotype/Service.html),\nand so on.\n\n* More than one bean of 'concrete' type\n* No beans of 'concrete' type\n* No bean with qualifier\n* Incorrect usages of `@Autowired` on Spring bean constructors\n* Injected or autowired fields/methods in classes that are not valid Spring beans\n\n**Example:**\n\n\n public interface FooInterface {...}\n @Component public class FooBean implements FooInterface {...}\n @Component public class OtherBean implements FooInterface {...}\n\n @Component\n public class MyComponent {\n \t@Autowired\n \tFooInterface foo; // \"Could not autowire. There is more than one bean of 'FooInterface' type.\n // Beans: fooBean(FooBean.java), otherBean(OtherBean.java)\"\n }\n\n**Example:**\n\n\n @Component\n public class MyComponent {\n \t@Autowired\n \tpublic MyComponent(BarBean bean) {...} // reports 'Only one @Autowired constructor is allowed'\n\n \t@Autowired\n \tpublic MyComponent(FooBean bean) {...} // reports 'Only one @Autowired constructor is allowed'\n }\n\n @Component\n public class MyFactory { // reports ' No matching @Autowired constructor'\n \tpublic MyFactory(String str) {...}\n \tpublic MyFactory(int count) {...}\n }\n\n**Example:**\n\n\n public class FooBeanClass {\n @Autowired // reports 'Autowired members must be defined in valid Spring beans: @Component, @Service, and so on'\n ServiceBean bean;\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringJavaInjectionPointsAutowiringInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/Code",
"index": 8,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MissingAspectjAutoproxyInspection",
"shortDescription": {
"text": "Missing aspectj-autoproxy"
},
"fullDescription": {
"text": "Reports '@Aspect' annotations in Spring versions earlier than 2.5 if there is no <aop:aspectj-autoproxy/> element in the XML configuration. Example: '@Aspect // '@AspectJ support isn't enabled\nclass MyAspect {\n ...\n}' '<beans>\n <!-- <aop:aspectj-autoproxy/> -->\n</beans>'",
"markdown": "Reports `@Aspect` annotations in Spring versions earlier than 2.5\nif there is no **\\<aop:aspectj-autoproxy/\\>** element in the XML configuration.\n\n**Example:**\n\n\n @Aspect // '@AspectJ support isn't enabled\n class MyAspect {\n ...\n }\n\n\n <beans>\n <!-- <aop:aspectj-autoproxy/> -->\n </beans>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "MissingAspectjAutoproxyInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring AOP",
"index": 191,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InjectionValueTypeInspection",
"shortDescription": {
"text": "Unassignable injection point type in XML application context"
},
"fullDescription": {
"text": "Reports invalid injection point types (properties and constructor arguments). The following injection point types are allowed: 'ref', 'idref', any collection type, inner beans, and so on. Example: 'public class InjectionValueTypes{\n public List<MyBean> setListBeans() {...}\n public MyBean setMyBean() {...}\n }\n }' '<beans>\n <bean class=\"MyBean\" id=\"myBean\"/>\n <bean class=\"ErrTypeBean\" id=\"errTypeBean\"/>\n <bean class=\"InjectionValueTypes\" id=\"kt\">\n <property name=\"myBean\" ref=\"errTypeBean\"/>\n <!-- reports \"Property of 'MyBean' type cannot be injected by 'ErrTypeBean'\" -->\n <property name=\"listBeans\">\n <list>\n <idref local=\"myBean\"/>\n <ref bean=\"myBean\"/>\n <ref bean=\"errTypeBean\"/> <!-- reports \"Cannot be added in collection of 'MyBean' type\" -->\n <bean class=\"ErrTypeBean\"/> <!-- reports \"Bean must be of 'MyBean' type\" -->\n </list>\n </property>\n </bean>\n </beans>'",
"markdown": "Reports invalid injection point types (properties and constructor arguments).\n\nThe following injection point types are allowed: `ref`, `idref`, any collection type, inner beans, and so on.\n\n**Example:**\n\n\n public class InjectionValueTypes{\n public List<MyBean> setListBeans() {...}\n public MyBean setMyBean() {...}\n }\n }\n\n\n <beans>\n <bean class=\"MyBean\" id=\"myBean\"/>\n <bean class=\"ErrTypeBean\" id=\"errTypeBean\"/>\n <bean class=\"InjectionValueTypes\" id=\"kt\">\n <property name=\"myBean\" ref=\"errTypeBean\"/>\n <!-- reports \"Property of 'MyBean' type cannot be injected by 'ErrTypeBean'\" -->\n <property name=\"listBeans\">\n <list>\n <idref local=\"myBean\"/>\n <ref bean=\"myBean\"/>\n <ref bean=\"errTypeBean\"/> <!-- reports \"Cannot be added in collection of 'MyBean' type\" -->\n <bean class=\"ErrTypeBean\"/> <!-- reports \"Bean must be of 'MyBean' type\" -->\n </list>\n </property>\n </bean>\n </beans>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "InjectionValueTypeInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/XML",
"index": 5,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringCacheAnnotationsOnInterfaceInspection",
"shortDescription": {
"text": "Cache* annotations defined on interfaces/interface methods"
},
"fullDescription": {
"text": "Reports '@Cache*' annotations on interfaces. You should annotate only concrete classes (and methods of concrete classes) with '@Cache*'. Annotating an interface (or an interface method) with '@Cache*' requires using interface-based proxies. Since Java annotations are not inherited from interfaces, the proxying and weaving infrastructure will not be able to recognize the caching settings when using class-based proxies ('proxy-target-class=\"true\"') or the weaving-based aspect ('mode=\"aspectj\"'). As a result, the object will not be wrapped in a caching proxy.",
"markdown": "Reports `@Cache*` annotations on interfaces.\n\nYou should annotate only concrete classes (and methods of concrete classes) with `@Cache*`.\nAnnotating an interface (or an interface method) with `@Cache*` requires using interface-based proxies.\nSince Java annotations are not inherited from interfaces, the proxying and weaving infrastructure will not be able to recognize the caching settings\nwhen using class-based proxies (`proxy-target-class=\"true\"`) or the weaving-based aspect (`mode=\"aspectj\"`).\nAs a result, the object will not be wrapped in a caching proxy."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringCacheAnnotationsOnInterfaceInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/Code",
"index": 8,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JdkProxiedBeanTypeInspection",
"shortDescription": {
"text": "Incorrect JDK-proxied bean type"
},
"fullDescription": {
"text": "Reports incorrectly configured JDK-proxied bean types. For more information, see JDK- and CGLIB-based proxies.",
"markdown": "Reports incorrectly configured JDK-proxied bean types.\n\nFor more information, see [JDK- and CGLIB-based proxies](https://docs.spring.io/spring-framework/docs/current/reference/html/core.html#aop-pfb-proxy-types)."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "JdkProxiedBeanTypeInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring AOP",
"index": 191,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringXmlAutowiringInspection",
"shortDescription": {
"text": "Incorrect XML Spring bean autowiring"
},
"fullDescription": {
"text": "Reports incorrect autowiring of Spring beans configured in XML application contexts. Example: 'public interface FooInterface {...}\n@Component public class FooBean implements FooInterface {...}\n@Component public class OtherBean implements FooInterface {...}\n\n@Component\npublic class MyComponent {\n\t public void setFooInterface(FooInterface foo) {...}\n}' '<beans>\n\t<bean class=\"beans.OtherBean\" id=\"otherBean\"/>\n\t<bean class=\"beans.FooBean\" id=\"fooBean\"/>\n\n\t<bean autowire=\"byType\" class=\"beans.MyComponent\" id=\"foo\"/> <!-- reports \"Could not autowire. There is more than one bean of 'FooInterface' type. -->\n <!-- Beans: otherBean,fooBean. Properties: 'fooInterface' \" -->\n</beans>'",
"markdown": "Reports incorrect autowiring of Spring beans configured in XML application contexts.\n\n**Example:**\n\n\n public interface FooInterface {...}\n @Component public class FooBean implements FooInterface {...}\n @Component public class OtherBean implements FooInterface {...}\n\n @Component\n public class MyComponent {\n \t public void setFooInterface(FooInterface foo) {...}\n }\n\n\n <beans>\n \t<bean class=\"beans.OtherBean\" id=\"otherBean\"/>\n \t<bean class=\"beans.FooBean\" id=\"fooBean\"/>\n\n \t<bean autowire=\"byType\" class=\"beans.MyComponent\" id=\"foo\"/> <!-- reports \"Could not autowire. There is more than one bean of 'FooInterface' type. -->\n <!-- Beans: otherBean,fooBean. Properties: 'fooInterface' \" -->\n </beans>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringXmlAutowiringInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/XML",
"index": 5,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringConfigurationProxyMethods",
"shortDescription": {
"text": "@Configuration proxyMethods usage warnings"
},
"fullDescription": {
"text": "Reports warnings on incorrectly used proxy methods. Spring Framework 5.2 has introduced an optimization for @Configuration class processing that can be enabled via an attribute @Configuration(proxyBeanMethods = false). If you disable 'proxyBeanMethods', the proxy instances are no longer created and calling the method invokes it again (returning a new instance every time). As a result, you have no guarantee that you're actually injecting the corresponding bean in the context. Incorrect bean method call example: '@Configuration(proxyBeanMethods = false)\nclass TestConfiguration {\n @Bean\n public FirstBean firstBean() {\n return new FirstBean();\n }\n\n @Bean\n public SecondBean secondBean() {\n return new SecondBean(firstBean()); // -> incorrect call\n }\n}' You can set 'proxyBeanMethods' to true or rewrite the code as follows: '@Configuration(proxyBeanMethods = false)\nclass TestConfiguration {\n @Bean\n public FirstBean firstBean() {\n return new FirstBean();\n }\n\n @Bean\n public SecondBean secondBean(FirstBean someBean) { // -> correct injected instance\n return new SecondBean(someBean);\n }\n}' Also, the inspection checks '@Bean' method calls in a class without the '@Configuration' stereotype (in \"bean lite mode\"): '@Component\nclass TestComponent {\n @Bean\n public FirstBean firstBean() {\n return new FirstBean();\n }\n\n @Bean\n public SecondBean secondBean() {\n return new SecondBean(firstBean()); // -> incorrect call\n }\n}'",
"markdown": "Reports warnings on incorrectly used proxy methods. Spring Framework 5.2 has introduced an optimization for @Configuration class processing that can be enabled via an attribute @Configuration(proxyBeanMethods = false).\n\n\nIf you disable `proxyBeanMethods`,\nthe proxy instances are no longer created and calling the method invokes it again (returning a new instance every time).\nAs a result, you have no guarantee that you're actually injecting the corresponding bean in the context.\n\nIncorrect bean method call example:\n\n\n @Configuration(proxyBeanMethods = false)\n class TestConfiguration {\n @Bean\n public FirstBean firstBean() {\n return new FirstBean();\n }\n\n @Bean\n public SecondBean secondBean() {\n return new SecondBean(firstBean()); // -> incorrect call\n }\n }\n\nYou can set `proxyBeanMethods` to true or rewrite the code as follows:\n\n\n @Configuration(proxyBeanMethods = false)\n class TestConfiguration {\n @Bean\n public FirstBean firstBean() {\n return new FirstBean();\n }\n\n @Bean\n public SecondBean secondBean(FirstBean someBean) { // -> correct injected instance\n return new SecondBean(someBean);\n }\n }\n\nAlso, the inspection checks `@Bean` method calls in a class without the `@Configuration` stereotype (in \"bean lite mode\"):\n\n\n @Component\n class TestComponent {\n @Bean\n public FirstBean firstBean() {\n return new FirstBean();\n }\n\n @Bean\n public SecondBean secondBean() {\n return new SecondBean(firstBean()); // -> incorrect call\n }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringConfigurationProxyMethods",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/Code",
"index": 8,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnparsedCustomBeanInspection",
"shortDescription": {
"text": "Unparsed custom Spring beans"
},
"fullDescription": {
"text": "Reports unknown Spring bean types that have not yet been parsed or if a bean uses an unsupported tag for the custom namespace.",
"markdown": "Reports unknown Spring bean types that have not yet been parsed or if a bean uses an unsupported tag for the custom namespace."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "UnparsedCustomBeanInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/XML",
"index": 5,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringXmlAutowireExplicitlyInspection",
"shortDescription": {
"text": "Unnecessary autowired dependency in XML application context"
},
"fullDescription": {
"text": "Reports 'autowire' attributes in '<bean>' elements and suggests to explicitly inject bean properties if possible. Example: 'public class MyComponent {\n public void setOtherBean(OtherBean bean){...}\n }' '<beans>\n <bean class=\"beans.OtherBean\" id=\"bar\"/>\n <bean autowire=\"byType\" class=\"beans.MyComponent\"/>\n <!-- \"Unnecessary autowired dependency\" -->\n <!-- suggests \"Make autowired dependency explicit\" -->\n </beans>' After applying the quick-fix: '<beans>\n <bean class=\"beans.OtherBean\" id=\"bar\"/>\n <bean class=\"beans.MyComponent\" id=\"foo\">\n <property name=\"otherBean\" ref=\"otherBean\"/>\n </bean>\n </beans>'",
"markdown": "Reports `autowire` attributes in `<bean>` elements and suggests to explicitly inject bean properties if possible.\n\n**Example:**\n\n\n public class MyComponent {\n public void setOtherBean(OtherBean bean){...}\n }\n\n\n <beans>\n <bean class=\"beans.OtherBean\" id=\"bar\"/>\n <bean autowire=\"byType\" class=\"beans.MyComponent\"/>\n <!-- \"Unnecessary autowired dependency\" -->\n <!-- suggests \"Make autowired dependency explicit\" -->\n </beans>\n\nAfter applying the quick-fix:\n\n\n <beans>\n <bean class=\"beans.OtherBean\" id=\"bar\"/>\n <bean class=\"beans.MyComponent\" id=\"foo\">\n <property name=\"otherBean\" ref=\"otherBean\"/>\n </bean>\n </beans>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringXmlAutowireExplicitlyInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/XML",
"index": 5,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringTestingDirtiesContextInspection",
"shortDescription": {
"text": "Invalid @DirtiesContext 'mode' configuration"
},
"fullDescription": {
"text": "Reports incorrect 'mode' configuration in the @DirtiesContext annotation. Example: '@ContextConfiguration\n @DirtiesContext(methodMode = MethodMode.AFTER_METHOD, // Setting the method mode on an annotated test class has no meaning. For class-level control, use classMode instead.\n hierarchyMode = DirtiesContext.HierarchyMode.CURRENT_LEVEL) // hierarchyMode should be used when the context is configured as part of a hierarchy via @ContextHierarchy\n public class MyTest {\n @DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS, // Setting the class mode on an annotated test method has no meaning. For method-level control use methodMode instead..\n hierarchyMode = DirtiesContext.HierarchyMode.CURRENT_LEVEL) // hierarchyMode should be used when the context is configured as part of a hierarchy via @ContextHierarchy\n public void testFoo() {...}\n }'",
"markdown": "Reports incorrect 'mode' configuration in the\n[@DirtiesContext](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/test/annotation/DirtiesContext.html)\nannotation.\n\n**Example:**\n\n\n @ContextConfiguration\n @DirtiesContext(methodMode = MethodMode.AFTER_METHOD, // Setting the method mode on an annotated test class has no meaning. For class-level control, use classMode instead.\n hierarchyMode = DirtiesContext.HierarchyMode.CURRENT_LEVEL) // hierarchyMode should be used when the context is configured as part of a hierarchy via @ContextHierarchy\n public class MyTest {\n @DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS, // Setting the class mode on an annotated test method has no meaning. For method-level control use methodMode instead..\n hierarchyMode = DirtiesContext.HierarchyMode.CURRENT_LEVEL) // hierarchyMode should be used when the context is configured as part of a hierarchy via @ContextHierarchy\n public void testFoo() {...}\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringTestingDirtiesContextInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/Code",
"index": 8,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringPlaceholdersInspection",
"shortDescription": {
"text": "Unresolved placeholders configured in the Spring XML application context"
},
"fullDescription": {
"text": "Reports unresolved placeholders configured in Spring XML contexts. Example: '<beans>\n <ctx:property-placeholder location=\"application.properties\"/>\n\n <bean class=\"beans.ServerComponent\">\n <property name=\"serverName\" value=\"${server.name}}\"/>\n <property name=\"port\" value=\"${unknown.property}}\"/> <!-- reports \"Cannot resolve property key\" -->\n </bean>\n </beans>'",
"markdown": "Reports unresolved placeholders configured in Spring XML contexts.\n\n**Example:**\n\n\n <beans>\n <ctx:property-placeholder location=\"application.properties\"/>\n\n <bean class=\"beans.ServerComponent\">\n <property name=\"serverName\" value=\"${server.name}}\"/>\n <property name=\"port\" value=\"${unknown.property}}\"/> <!-- reports \"Cannot resolve property key\" -->\n </bean>\n </beans>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringPlaceholdersInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/XML",
"index": 5,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringCacheableMethodCallsInspection",
"shortDescription": {
"text": "@Cacheable self-invocation method calls"
},
"fullDescription": {
"text": "Using @Cacheable: In proxy mode (which is the default), only external method calls coming in through the proxy are intercepted. This means that self-invocation, in effect, a method within the target object calling another method of the target object, will not lead to an actual caching at runtime even if the invoked method is marked with @Cacheable",
"markdown": "[Using @Cacheable](https://docs.spring.io/spring-framework/reference/integration/cache/annotations.html): In proxy mode (which is the default), only external method calls coming in through the proxy are intercepted. This means that self-invocation, in effect, a method within the target object calling another method of the target object, will not lead to an actual caching at runtime even if the invoked method is marked with @Cacheable"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringCacheableMethodCallsInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/Code",
"index": 8,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringBeanLookupMethodInspection",
"shortDescription": {
"text": "Incorrectly configured XML bean lookup-method"
},
"fullDescription": {
"text": "Reports incorrect <lookup-method> for a bean in XML application contexts. Example: 'public abstract class FooLookupBean {\n protected abstract FooBean createCommand();\n private FooBean createCommand() {...}\n protected static FooBean createCommandStatic() {...}\n protected abstract FooBean createWithArgs(String foo);\n protected abstract OtherBean createOtherBean();\n }' '<beans>\n <bean class=\"FooLookupBean\" id=\"lookupTest\">\n <lookup-method bean=\"fooBean\" name=\"createCommand\"/>\n <!-- private -->\n <lookup-method bean=\"fooBean\" name=\"createCommand\"/> <!-- \"Method must be public or protected\" -->\n <!-- static -->\n <lookup-method bean=\"fooBean\" name=\"createCommandStatic\"/> <!-- Static method not allowed here -->\n <!-- with arguments -->\n <lookup-method bean=\"fooBean\" name=\"createWithArgs\"/> <!-- Method must have no parameters -->\n <!-- not exist -->\n <lookup-method bean=\"fooBean\" name=\"unknown\"/> <!-- unknown method -->\n <!-- mismatch -->\n <lookup-method bean=\"fooBean\" name=\"createOtherBean\"/> <!-- Lookup method return type does not match the 'FooBean' bean class -->\n </bean>\n\n <bean class=\"FooBean\" id=\"fooBean\"/>\n <bean class=\"OtherBean\" id=\"otherBean\"/>\n </beans>'",
"markdown": "Reports incorrect **\\<lookup-method\\>** for a bean in XML application contexts.\n\n**Example:**\n\n\n public abstract class FooLookupBean {\n protected abstract FooBean createCommand();\n private FooBean createCommand() {...}\n protected static FooBean createCommandStatic() {...}\n protected abstract FooBean createWithArgs(String foo);\n protected abstract OtherBean createOtherBean();\n }\n \n\n <beans>\n <bean class=\"FooLookupBean\" id=\"lookupTest\">\n <lookup-method bean=\"fooBean\" name=\"createCommand\"/>\n <!-- private -->\n <lookup-method bean=\"fooBean\" name=\"createCommand\"/> <!-- \"Method must be public or protected\" -->\n <!-- static -->\n <lookup-method bean=\"fooBean\" name=\"createCommandStatic\"/> <!-- Static method not allowed here -->\n <!-- with arguments -->\n <lookup-method bean=\"fooBean\" name=\"createWithArgs\"/> <!-- Method must have no parameters -->\n <!-- not exist -->\n <lookup-method bean=\"fooBean\" name=\"unknown\"/> <!-- unknown method -->\n <!-- mismatch -->\n <lookup-method bean=\"fooBean\" name=\"createOtherBean\"/> <!-- Lookup method return type does not match the 'FooBean' bean class -->\n </bean>\n\n <bean class=\"FooBean\" id=\"fooBean\"/>\n <bean class=\"OtherBean\" id=\"otherBean\"/>\n </beans>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringBeanLookupMethodInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/XML",
"index": 5,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AbstractBeanReferencesInspection",
"shortDescription": {
"text": "Incorrect reference to abstract bean"
},
"fullDescription": {
"text": "Reports referenced abstract beans. Abstract beans can be used only as template bean definitions, that is, parents for child definitions. Trying to use such an abstract parent bean on its own by referring to it as a ref property of another bean, or by calling 'getBean()' with the parent bean id, will result in an error. Example: '<bean abstract=\"true\" id=\"parentBeanWithoutClass\"/>\n <bean class=\"com.my.company.FooBean\" id=\"childBean\" parent=\"parentBeanWithoutClass\">\n <!-- properties -->\n </bean>' In this example, the parent bean can't be instantiated on its own since it is incomplete and explicitly marked as abstract.",
"markdown": "Reports referenced abstract beans.\n\nAbstract beans can be used only as template bean definitions, that is, parents for child definitions.\nTrying to use such an abstract parent bean on its own by referring to it as a ref property of another bean,\nor by calling `getBean()` with the parent bean id, will result in an error.\n\n**Example:**\n\n\n <bean abstract=\"true\" id=\"parentBeanWithoutClass\"/>\n <bean class=\"com.my.company.FooBean\" id=\"childBean\" parent=\"parentBeanWithoutClass\">\n <!-- properties -->\n </bean>\n\nIn this example, the parent bean can't be instantiated on its own since it is incomplete and explicitly marked as abstract."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "AbstractBeanReferencesInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/XML",
"index": 5,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringBeanInstantiationInspection",
"shortDescription": {
"text": "Invalid non-abstract bean instantiation"
},
"fullDescription": {
"text": "Reports instantiation errors on interface/abstract class <bean> declarations. Example: '<beans>\n <bean class=\"java.util.List\"/>\n <!-- reports 'Interface not allowed for non-abstract beans' -->\n </beans>'",
"markdown": "Reports instantiation errors on interface/abstract class **\\<bean\\>** declarations.\n\n**Example:**\n\n\n <beans>\n <bean class=\"java.util.List\"/>\n <!-- reports 'Interface not allowed for non-abstract beans' -->\n </beans>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringBeanInstantiationInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/XML",
"index": 5,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RequiredBeanTypeInspection",
"shortDescription": {
"text": "Incorrect injected bean type"
},
"fullDescription": {
"text": "Reports incorrect types of custom schema bean injections defined in the XML application context. Example: 'public class SimpleBean{}' '<beans ...>\n <bean class=\"SimpleBean\" id=\"simpleBean\"/>\n <mvc:annotation-driven\n conversion-service=\"simpleBean\" <!-- reports \"Bean must be of 'org.springframework.core.convert.ConversionService' type\" -->\n message-codes-resolver=\"simpleBean\" <!-- reports 'Bean must be of org.springframework.validation.MessageCodesResolver' type\" -->\n validator=\"simpleBean\" <!-- reports \"Bean must be of 'org.springframework.validation.Validator' type\" -->\n />\n </beans>'",
"markdown": "Reports incorrect types of custom schema bean injections defined in the XML application context.\n\n**Example:**\n\n\n public class SimpleBean{}\n\n\n <beans ...>\n <bean class=\"SimpleBean\" id=\"simpleBean\"/>\n <mvc:annotation-driven\n conversion-service=\"simpleBean\" <!-- reports \"Bean must be of 'org.springframework.core.convert.ConversionService' type\" -->\n message-codes-resolver=\"simpleBean\" <!-- reports 'Bean must be of org.springframework.validation.MessageCodesResolver' type\" -->\n validator=\"simpleBean\" <!-- reports \"Bean must be of 'org.springframework.validation.Validator' type\" -->\n />\n </beans>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "RequiredBeanTypeInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/XML",
"index": 5,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringScopesInspection",
"shortDescription": {
"text": "Unknown <bean> scope"
},
"fullDescription": {
"text": "Reports unknown values of the 'scope' attribute in '<bean>' elements. Example: '<beans>\n <bean class=\"beans.FooComponent\" id=\"foo\" scope=\"unknown\"/>\n <!-- reports \"Cannot resolve symbol 'unknown'\" >\n <bean class=\"beans.BarComponent\" id=\"bar\" scope=\"prototype\"/>\n </beans>'",
"markdown": "Reports unknown values of the `scope` attribute in `<bean>` elements.\n\n**Example:**\n\n\n <beans>\n <bean class=\"beans.FooComponent\" id=\"foo\" scope=\"unknown\"/>\n <!-- reports \"Cannot resolve symbol 'unknown'\" >\n <bean class=\"beans.BarComponent\" id=\"bar\" scope=\"prototype\"/>\n </beans>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringScopesInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/XML",
"index": 5,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringPublicFactoryMethodInspection",
"shortDescription": {
"text": "Incorrect non-public method referenced in \"factory-method\" attribute"
},
"fullDescription": {
"text": "Reports non-public methods referenced in the 'factory-method' attributes of <bean> elements. Example: 'public class MyFactory {\n private static FooBean createBean() {...}\n }\n}' '<beans>\n <bean class=\"MyFactory\" factory-method=\"createBean\"/>\n // reports \"Factory method 'createBean' should be public\"\n</beans>'",
"markdown": "Reports non-public methods referenced in the `factory-method` attributes of **\\<bean\\>** elements.\n\n**Example:**\n\n\n public class MyFactory {\n private static FooBean createBean() {...}\n }\n }\n\n\n <beans>\n <bean class=\"MyFactory\" factory-method=\"createBean\"/>\n // reports \"Factory method 'createBean' should be public\"\n </beans>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringPublicFactoryMethodInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/XML",
"index": 5,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringAopWarningsInspection",
"shortDescription": {
"text": "Incorrect Spring AOP aspect or pointcut element"
},
"fullDescription": {
"text": "Reports incorrect aspects and pointcuts. When some AOP advice matches an aspect bean, it can lead to runtime errors. Example: '<beans>\n <aop:config>\n <aop:pointcut expression=\"args()\"/> <!-- Pointcut should have id -->\n <aop:aspect/> <!-- 'ref' attribute should be defined -->\n </aop:config>\n</beans>\n\n<beans>\n <bean id=\"aspect1\" class=\"Aspect1\"/>\n <bean id=\"aspect2\" class=\"Aspect2\"/>\n <aop:config>\n <aop:aspect ref=\"aspect1\"> <!-- Some advices are matching this bean -->\n <aop:before method=\"xxx\" pointcut=\"execution(* foo())\"/>\n </aop:aspect>\n <aop:aspect ref=\"aspect2\">\n <aop:before method=\"xxx\" pointcut=\"execution(* foo())\"/>\n </aop:aspect>\n </aop:config>\n</beans>'",
"markdown": "Reports incorrect aspects and pointcuts.\nWhen some AOP advice matches an aspect bean, it can lead to runtime errors.\n\n**Example:**\n\n\n <beans>\n <aop:config>\n <aop:pointcut expression=\"args()\"/> <!-- Pointcut should have id -->\n <aop:aspect/> <!-- 'ref' attribute should be defined -->\n </aop:config>\n </beans>\n\n <beans>\n <bean id=\"aspect1\" class=\"Aspect1\"/>\n <bean id=\"aspect2\" class=\"Aspect2\"/>\n <aop:config>\n <aop:aspect ref=\"aspect1\"> <!-- Some advices are matching this bean -->\n <aop:before method=\"xxx\" pointcut=\"execution(* foo())\"/>\n </aop:aspect>\n <aop:aspect ref=\"aspect2\">\n <aop:before method=\"xxx\" pointcut=\"execution(* foo())\"/>\n </aop:aspect>\n </aop:config>\n </beans>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringAopWarningsInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring AOP",
"index": 191,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringRequiredAnnotationInspection",
"shortDescription": {
"text": "@Required Spring bean property is not injected"
},
"fullDescription": {
"text": "Reports '@Required' setter bean properties that are not injected or autowired. Example: '<beans>\n <bean class=\"beans.MyComponent\" id=\"foo\"/>\n <!-- reports \"Required properties missing: 'port'\" -->\n</beans>' 'public class MyComponent {\n @Required\n public void setPort(int port) // reports \"Required property 'port' is not injected\"\n {...}\n}'",
"markdown": "Reports `@Required` setter bean properties that are not injected or autowired.\n\n**Example:**\n\n\n <beans>\n <bean class=\"beans.MyComponent\" id=\"foo\"/>\n <!-- reports \"Required properties missing: 'port'\" -->\n </beans>\n\n\n public class MyComponent {\n @Required\n public void setPort(int port) // reports \"Required property 'port' is not injected\"\n {...}\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringRequiredAnnotationInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/Code",
"index": 8,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringCacheableComponentsInspection",
"shortDescription": {
"text": "Incorrectly configured 'caching' annotation"
},
"fullDescription": {
"text": "Reports incorrect 'caching' annotations: '@Cacheable', '@CacheEvict', '@CachePut', '@CacheConfig', and so on. Example: '@org.springframework.stereotype.Component\npublic class MyCacheManager implements CacheManager {...}\n\npublic class MyConfiguration {\n @Cacheable(value = \"a\",\n cacheResolver =\"myCacheManager\") // reports \"Bean must be of 'org.springframework.cache.interceptor.CacheResolver' type\"\n public String getCache(String isbn) {...}\n\n @Cacheable(value = \"abc\",\n private String getAbc() // reports \"Caching annotations should be defined on public methods\"\n {...}\n}'",
"markdown": "Reports incorrect 'caching' annotations: `@Cacheable`, `@CacheEvict`, `@CachePut`, `@CacheConfig`, and so on.\n\n**Example:**\n\n\n @org.springframework.stereotype.Component\n public class MyCacheManager implements CacheManager {...}\n\n public class MyConfiguration {\n @Cacheable(value = \"a\",\n cacheResolver =\"myCacheManager\") // reports \"Bean must be of 'org.springframework.cache.interceptor.CacheResolver' type\"\n public String getCache(String isbn) {...}\n\n @Cacheable(value = \"abc\",\n private String getAbc() // reports \"Caching annotations should be defined on public methods\"\n {...}\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringCacheableComponentsInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/Code",
"index": 8,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringFactoryMethodInspection",
"shortDescription": {
"text": "Incorrectly defined method referenced in \"factory-method\" attribute"
},
"fullDescription": {
"text": "Reports incorrect method references in the 'factory-method' attribute of the '<bean>' element. Example: 'public class MyFactory {\npublic static FooBean createBean() {}\n}' '<beans>\n <bean class=\"MyFactory\" id=\"factory\"/>\n <bean factory-bean=\"factory\" factory-method=\"createBean\"/> <!-- Factory method 'createBean' must not be static -->\n</beans>'",
"markdown": "Reports incorrect method references in the `factory-method` attribute of the `<bean>` element.\n\n**Example:**\n\n\n public class MyFactory {\n public static FooBean createBean() {}\n }\n\n\n <beans>\n <bean class=\"MyFactory\" id=\"factory\"/>\n <bean factory-bean=\"factory\" factory-method=\"createBean\"/> <!-- Factory method 'createBean' must not be static -->\n </beans>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringFactoryMethodInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/XML",
"index": 5,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringComponentScan",
"shortDescription": {
"text": "Invalid package in @ComponentScan or its meta annotation"
},
"fullDescription": {
"text": "Reports unresolved packages in @ComponentScan annotations and corresponding aliased attributes of '@ComponentScan' meta annotations. Example: '@ComponentScan(basePackages = {\n \"com.my.company\",\n \"com.unknown\" // reports \"'Cannot resolve package 'unknown'\"\n }) +\n @Configuration +\n public class MyConfiguration {}'",
"markdown": "Reports unresolved packages in\n[@ComponentScan](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/context/annotation/ComponentScan.html)\nannotations and corresponding aliased attributes of `@ComponentScan` meta annotations. \n\n**Example:**\n\n\n @ComponentScan(basePackages = {\n \"com.my.company\",\n \"com.unknown\" // reports \"'Cannot resolve package 'unknown'\"\n }) +\n @Configuration +\n public class MyConfiguration {}\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringComponentScan",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/Code",
"index": 8,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ScheduledMethodInspection",
"shortDescription": {
"text": "Incorrect @Scheduled method signature"
},
"fullDescription": {
"text": "Reports incorrect @Scheduled methods. According to Spring Documentation, methods to be scheduled must return void and must not expect any arguments. If the method needs to interact with other objects from the Application Context, they should be provided through dependency injection.",
"markdown": "Reports incorrect [@Scheduled](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/scheduling/annotation/Scheduled.html) methods.\n\nAccording to Spring Documentation, methods to be scheduled must return void and must not expect any arguments.\nIf the method needs to interact with other objects from the Application Context,\nthey should be provided through dependency injection."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ScheduledMethodInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/Code",
"index": 8,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringTestingTransactionalInspection",
"shortDescription": {
"text": "Invalid transactional lifecycle method declaration"
},
"fullDescription": {
"text": "Reports invalid transactional lifecycle method declarations annotated with @BeforeTransaction and @AfterTransaction in testing classes annotated as @Transactional. Annotated methods must have no arguments and no return type. Example: '@ContextConfiguration\n @Transactional\n public class AbstractShowcaseTest {\n @BeforeTransaction // Expected method return type is 'void'\n public boolean setupData() {...}\n\n @AfterTransaction // Wrong number of arguments\n public void disposeData(boolean a) throws Exception {...}\n }'",
"markdown": "Reports invalid transactional lifecycle method declarations annotated with\n[@BeforeTransaction](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/test/context/transaction/BeforeTransaction.html)\nand [@AfterTransaction](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/test/context/transaction/AfterTransaction.html)\nin testing classes annotated as\n[@Transactional](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/transaction/annotation/Transactional.html).\n\nAnnotated methods must have no arguments and no return type.\n\n**Example:**\n\n\n @ContextConfiguration\n @Transactional\n public class AbstractShowcaseTest {\n @BeforeTransaction // Expected method return type is 'void'\n public boolean setupData() {...}\n\n @AfterTransaction // Wrong number of arguments\n public void disposeData(boolean a) throws Exception {...}\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringTestingTransactionalInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/Code",
"index": 8,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AsyncMethodInspection",
"shortDescription": {
"text": "Incorrect @Async method signature"
},
"fullDescription": {
"text": "Reports incorrect return types of @Async methods. For target method signatures, any parameter types are allowed. However, the return type should be either 'void' or Future. It is also possible to return the more specific ListenableFuture or CompletableFuture types, which allow for richer interaction with the asynchronous task and for immediate composition with further processing steps.",
"markdown": "Reports incorrect return types of [@Async](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/scheduling/annotation/Async.html) methods.\n\nFor target method signatures, any parameter types are allowed.\nHowever, the return type should be either `void` or [Future](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Future.html).\nIt is also possible to return the more specific [ListenableFuture](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/util/concurrent/ListenableFuture.html) or [CompletableFuture](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html) types,\nwhich allow for richer interaction with the asynchronous task and for immediate composition with further processing steps."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "AsyncMethodInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/Code",
"index": 8,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringFacetProgrammaticInspection",
"shortDescription": {
"text": "Spring facet programmatic configuration"
},
"fullDescription": {
"text": "Checks programmatic Spring context code setup in Spring facet.",
"markdown": "Checks programmatic Spring context code setup in Spring facet."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "SpringFacetProgrammaticInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/Setup",
"index": 250,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringBeanAttributesInspection",
"shortDescription": {
"text": "Conflicting Spring bean attribute"
},
"fullDescription": {
"text": "Reports configuration conflicts on '<bean>' attributes. Example: '<beans>\n <bean class=\"java.lang.String\" factory-bean=\"factoryBean\"/>\n <!-- Exactly one of 'class' or 'factory-bean' is required -->\n <bean factory-bean=\"factoryBean\" id=\"missingFactoryMethod\"/> <!-- When factory-bean exists, factory-method is required -->\n\n <!-- Attribute abstract with default value 'false' is superfluous -->\n <bean abstract=\"false\" id=\"superfluousDefaultAttributeAbstract\"/>\n\n <!-- Attribute scope with default value 'singleton' is superfluous -->\n <bean id=\"superfluousDefaultAttributeScope\" scope=\"singleton\"/>\n\n <bean class=\"java.lang.StringBuilder\">\n <property name=\"length\">\n <!-- Attributes id, name, and scope are superfluous -->\n <bean id=\"beanId\" name=\"beanName\" scope=\"prototype\"/>\n </property>\n </bean>\n </beans>'",
"markdown": "Reports configuration conflicts on `<bean>` attributes.\n\n**Example:**\n\n\n <beans>\n <bean class=\"java.lang.String\" factory-bean=\"factoryBean\"/>\n <!-- Exactly one of 'class' or 'factory-bean' is required -->\n <bean factory-bean=\"factoryBean\" id=\"missingFactoryMethod\"/> <!-- When factory-bean exists, factory-method is required -->\n\n <!-- Attribute abstract with default value 'false' is superfluous -->\n <bean abstract=\"false\" id=\"superfluousDefaultAttributeAbstract\"/>\n\n <!-- Attribute scope with default value 'singleton' is superfluous -->\n <bean id=\"superfluousDefaultAttributeScope\" scope=\"singleton\"/>\n\n <bean class=\"java.lang.StringBuilder\">\n <property name=\"length\">\n <!-- Attributes id, name, and scope are superfluous -->\n <bean id=\"beanId\" name=\"beanName\" scope=\"prototype\"/>\n </property>\n </bean>\n </beans>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringBeanAttributesInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/XML",
"index": 5,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringInactiveProfileHighlightingInspection",
"shortDescription": {
"text": "Inactive profile highlighting"
},
"fullDescription": {
"text": "Reports inactive profiles in the Spring XML application contexts. Example: '<!-- active profile 'DEV' is chosen for this application context -->\n <beans profile=\"DEV\">\n <bean class=\"MyFactory\" factory-method=\"createBean\"/>\n </beans>\n <!-- content of this tag is highlighted as 'unused' -->\n <beans profile=\"TESTS\">\n <bean class=\"MyTestFactory\" factory-method=\"createBean\"/>\n </beans>\n <!-- end of 'unused' section -->\n </beans>'",
"markdown": "Reports inactive profiles in the Spring XML application contexts.\n\n**Example:**\n\n\n <!-- active profile 'DEV' is chosen for this application context -->\n <beans profile=\"DEV\">\n <bean class=\"MyFactory\" factory-method=\"createBean\"/>\n </beans>\n <!-- content of this tag is highlighted as 'unused' -->\n <beans profile=\"**TESTS**\">\n <bean class=\"MyTestFactory\" factory-method=\"createBean\"/>\n </beans>\n <!-- end of 'unused' section -->\n </beans>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringInactiveProfileHighlightingInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/XML",
"index": 5,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringInjectionValueStyleInspection",
"shortDescription": {
"text": "Injection value in XML application context violates conventions"
},
"fullDescription": {
"text": "Reports properties configured via '<value>' or '<ref>' sub-elements and offers to replace them with the corresponding attributes. Example: '<beans>\n <bean class=\"MyBean\" id=\"myBean\"/>\n\n <bean class=\"MyFactory\">\n <property name=\"bean\">\n <ref bean=\"myBean\"/> <!-- reports 'Usage of explicit <ref> element' -->\n </property>\n </bean>\n </beans>' After applying the quick-fix: '<beans>\n <bean class=\"MyBean\" id=\"myBean\"/>\n <bean class=\"MyFactory\">\n <property name=\"bean\" ref=\"myBean\"/>\n </bean>\n </beans>'",
"markdown": "Reports properties configured via `<value>` or `<ref>` sub-elements and offers to replace them with the corresponding attributes.\n\n**Example:**\n\n\n <beans>\n <bean class=\"MyBean\" id=\"myBean\"/>\n\n <bean class=\"MyFactory\">\n <property name=\"bean\">\n <ref bean=\"myBean\"/> <!-- reports 'Usage of explicit <ref> element' -->\n </property>\n </bean>\n </beans>\n\nAfter applying the quick-fix:\n\n\n <beans>\n <bean class=\"MyBean\" id=\"myBean\"/>\n <bean class=\"MyFactory\">\n <property name=\"bean\" ref=\"myBean\"/>\n </bean>\n </beans>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringInjectionValueStyleInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/XML",
"index": 5,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringEventListenerInspection",
"shortDescription": {
"text": "Incorrectly configured @EventListener methods"
},
"fullDescription": {
"text": "Reports incorrect @EventListener methods. Example: '@Configuration @ComponentScan\n open class Config\n\n data class MyEvent(val string: String)\n\n @Component\n class LogComponent {\n @EventListener // Method annotated with @EventListener must be public\n private fun logCommands(commandName: MyEvent) {}\n\n @EventListener // Method must have maximum one parameter\n fun processCommand(commandName: MyEvent, text: String) {}\n }'",
"markdown": "Reports incorrect\n[@EventListener](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/context/event/EventListener.html) methods.\n\n**Example:**\n\n\n @Configuration @ComponentScan\n open class Config\n\n data class MyEvent(val string: String)\n\n @Component\n class LogComponent {\n @EventListener // Method annotated with @EventListener must be public\n private fun logCommands(commandName: MyEvent) {}\n\n @EventListener // Method must have maximum one parameter\n fun processCommand(commandName: MyEvent, text: String) {}\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringEventListenerInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/Code",
"index": 8,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringInjectionValueConsistencyInspection",
"shortDescription": {
"text": "Inconsistent injection value in XML application context"
},
"fullDescription": {
"text": "Reports inconsistent tags and attributes on injection points in XML application contexts. '<property>' and '<constructor-arg>' must specify a 'ref', 'value', or a sub-element '<property>' and '<constructor-arg>' cannot contain more than one sub-element '<ref>' can contain either a 'bean' attribute, a 'local' attribute, or a 'parent' attribute '<ref>' must specify a bean '<idref>' can contain either a 'bean' attribute or a 'local' attribute '<idref>' must specify a bean '<map>' must specify a key '<idref>' can contain either a 'key' attribute, a 'key-ref' attribute, or a '<key>' sub-element Example: '<beans>\n\n <!-- 1. Property is only allowed to contain either \"ref\" attribute OR \"value\" attribute OR sub-element -->\n <bean class=\"MyClass\">\n <property name=\"bean\" ref=\"myBean\" value=\"foo\"/>\n <!-- Property is only allowed to contain either \"ref\" attribute OR \"value\" attribute OR sub-element -->\n </bean>\n\n <!-- 2. Property must not contain more than one sub-element -->\n <bean class=\"MyFactory\">\n <property name=\"bean\">\n <ref>bean</ref> <!-- Property must not contain more than one sub-element -->\n <value>foo</value> <!-- Property must not contain more than one sub-element -->\n </property>\n </bean>\n\n <!-- 3. Map entry must specify a key -->\n <bean class=\"MyBean\">\n <property name=\"map\">\n <map>\n <entry value=\"foo\"/> <!-- Map entry must specify a key -->\n </map>\n </property>\n </bean>\n </beans>'",
"markdown": "Reports inconsistent tags and attributes on injection points in XML application contexts.\n\n* `<property>` and `<constructor-arg>` must specify a `ref`, `value`, or a sub-element\n* `<property>` and `<constructor-arg>` cannot contain more than one sub-element\n* `<ref>` can contain either a `bean` attribute, a `local` attribute, or a `parent` attribute\n* `<ref>` must specify a bean\n* `<idref>` can contain either a `bean` attribute or a `local` attribute\n* `<idref>` must specify a bean\n* `<map>` must specify a key\n* `<idref>` can contain either a `key` attribute, a `key-ref` attribute, or a `<key>` sub-element\n\n**Example:**\n\n\n <beans>\n\n <!-- 1. Property is only allowed to contain either \"ref\" attribute OR \"value\" attribute OR sub-element -->\n <bean class=\"MyClass\">\n <property name=\"bean\" ref=\"myBean\" value=\"foo\"/>\n <!-- Property is only allowed to contain either \"ref\" attribute OR \"value\" attribute OR sub-element -->\n </bean>\n\n <!-- 2. Property must not contain more than one sub-element -->\n <bean class=\"MyFactory\">\n <property name=\"bean\">\n <ref>bean</ref> <!-- Property must not contain more than one sub-element -->\n <value>foo</value> <!-- Property must not contain more than one sub-element -->\n </property>\n </bean>\n\n <!-- 3. Map entry must specify a key -->\n <bean class=\"MyBean\">\n <property name=\"map\">\n <map>\n <entry value=\"foo\"/> <!-- Map entry must specify a key -->\n </map>\n </property>\n </bean>\n </beans>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringInjectionValueConsistencyInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/XML",
"index": 5,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ContextJavaBeanUnresolvedMethodsInspection",
"shortDescription": {
"text": "Unknown init/destroy method in the @Bean annotation"
},
"fullDescription": {
"text": "Reports unresolved method references on 'initMethod' and 'destroyMethod' parameters of the @Bean annotation. Example: \"Cannot resolve method\" will be reported on 'doInit' expression if MyBean class doesn't contain 'public void 'doInit'(){...}' method 'public class MyBean {...}\n\n @Component\n public class MyComponent {\n @Bean(initMethod=\"doInit\" )\n public MyBean myBean() {...}\n }' In this example, the inspection will report an unresolved method reference if 'MyBean' doesn't define the 'doInit()' method.",
"markdown": "Reports unresolved method references on `initMethod` and `destroyMethod` parameters\nof the [@Bean](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/context/annotation/Bean.html) annotation.\n\n**Example:**\n\"Cannot resolve method\" will be reported on 'doInit' expression if MyBean class doesn't contain 'public void 'doInit'(){...}' method\n\n\n public class MyBean {...}\n\n @Component\n public class MyComponent {\n @Bean(initMethod=\"doInit\" )\n public MyBean myBean() {...}\n }\n\nIn this example, the inspection will report an unresolved method reference if `MyBean` doesn't define the `doInit()` method."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "ContextJavaBeanUnresolvedMethodsInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/Code",
"index": 8,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DuplicatedBeanNamesInspection",
"shortDescription": {
"text": "Duplicated bean names in XML-based application context"
},
"fullDescription": {
"text": "Reports duplicate bean names defined in the application context. Example: '<beans profile=\"PROD\">\n <bean class=\"...\" id=\"duplicatedName\"/> <!-- error -->\n <bean class=\"...\" name=\"foo_name, duplicatedName\"/> <!-- 'duplicatedName' error -->\n <bean class=\"...\" id=\"toBeAliased\"/>\n\n <alias alias=\"duplicatedName\" name=\"toBeAliased\"/> <!-- 'duplicatedName' error -->\n </beans>'",
"markdown": "Reports duplicate bean names defined in the application context.\n\n**Example:**\n\n\n <beans profile=\"PROD\">\n <bean class=\"...\" id=\"duplicatedName\"/> <!-- error -->\n <bean class=\"...\" name=\"foo_name, duplicatedName\"/> <!-- 'duplicatedName' error -->\n <bean class=\"...\" id=\"toBeAliased\"/>\n\n <alias alias=\"duplicatedName\" name=\"toBeAliased\"/> <!-- 'duplicatedName' error -->\n </beans>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "DuplicatedBeanNamesInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/XML",
"index": 5,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringDependsOnUnresolvedBeanInspection",
"shortDescription": {
"text": "Incorrectly referenced bean in @DependsOn annotation"
},
"fullDescription": {
"text": "Reports incorrect bean references in the 'value' parameter of the @DependsOn annotation. Example: '@Component\n @DependsOn(\"unknown\") // reports \"Cannot resolve bean 'unknown'\"\n public class MyComponent {\n }'",
"markdown": "Reports incorrect bean references in the `value` parameter of the\n[@DependsOn](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/context/annotation/DependsOn.html)\nannotation.\n\n**Example:**\n\n\n @Component\n @DependsOn(\"unknown\") // reports \"Cannot resolve bean 'unknown'\"\n public class MyComponent {\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringDependsOnUnresolvedBeanInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/Code",
"index": 8,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringIncorrectResourceTypeInspection",
"shortDescription": {
"text": "Incorrect resource type"
},
"fullDescription": {
"text": "Reports incorrect files referenced in the XML application context. Example: '<beans>\n <import resource=\"imported-app-context.xml\"/>\n <import resource=\"banner.txt\"/> <!-- reports 'Incorrect resource type' as Spring XML application context is expected here -->\n </beans>'",
"markdown": "Reports incorrect files referenced in the XML application context.\n\n**Example:**\n\n\n <beans>\n <import resource=\"imported-app-context.xml\"/>\n <import resource=\"banner.txt\"/> <!-- reports 'Incorrect resource type' as Spring XML application context is expected here -->\n </beans>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringIncorrectResourceTypeInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/XML",
"index": 5,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringRequiredPropertyInspection",
"shortDescription": {
"text": "Missing @Required property injections in the spring xml bean declaration"
},
"fullDescription": {
"text": "Reports '@Required' setter bean properties that are not injected or autowired. Example: '<beans>\n <bean class=\"beans.MyComponent\" id=\"foo\"/>\n <!-- reports \"Required properties missing: 'port'\" -->\n</beans>' 'public class MyComponent {\n @Required\n public void setPort(int port) // reports \"Required property 'port' is not injected\"\n {...}\n}'",
"markdown": "Reports `@Required` setter bean properties that are not injected or autowired.\n\n**Example:**\n\n\n <beans>\n <bean class=\"beans.MyComponent\" id=\"foo\"/>\n <!-- reports \"Required properties missing: 'port'\" -->\n </beans>\n\n\n public class MyComponent {\n @Required\n public void setPort(int port) // reports \"Required property 'port' is not injected\"\n {...}\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringRequiredPropertyInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/XML",
"index": 5,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringCacheableAndCachePutInspection",
"shortDescription": {
"text": "Incorrect usage of @CachePut and @Cacheable on the same method"
},
"fullDescription": {
"text": "Reports @CachePut and @Cacheable annotations declared on the same method. While '@Cacheable' causes the method to skip the execution using the cache, '@CachePut' forces the execution in order to update the cache. This leads to unexpected behavior and should be avoided, except in very specific cases when conditions in annotations exclude them from each other. Note also that such conditions should not rely on the result object (the '#result' variable) as these are validated upfront to confirm the exclusion.",
"markdown": "Reports [@CachePut](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/cache/annotation/CachePut.html)\nand [@Cacheable](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/cache/annotation/Cacheable.html)\nannotations declared on the same method.\nWhile `@Cacheable` causes the method to skip the execution using the cache, `@CachePut` forces the execution in order to update the cache. This leads to unexpected behavior and should be avoided, except in very specific cases when conditions in annotations exclude them from each other. Note also that such conditions should not rely on the result object (the `#result` variable) as these are validated upfront to confirm the exclusion."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringCacheableAndCachePutInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/Code",
"index": 8,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringAopErrorsInspection",
"shortDescription": {
"text": "Incorrect Spring AOP advice or advisor element"
},
"fullDescription": {
"text": "Reports incorrect advices and advisor elements if there are no 'pointcut' or 'pointcut-ref' attributes. Example: '<beans>\n <aop:config>\n <aop:pointcut id=\"zzz\" expression=\"args()\"/>\n <aop:aspect ref=\"xxx\">\n <aop:before method=\"writeArg1\" pointcut=\"execution(* *(String))\"/>\n <aop:after method=\"aaa\" pointcut-ref=\"zzz\"/>\n <aop:after-throwing method=\"aaa\"/> <!--Either 'pointcut' or 'pointcut-ref' attribute must be defined -->\n </aop:aspect>\n </aop:config>\n</beans>'",
"markdown": "Reports incorrect advices and advisor elements if there are no `pointcut` or `pointcut-ref` attributes.\n\n**Example:**\n\n\n <beans>\n <aop:config>\n <aop:pointcut id=\"zzz\" expression=\"args()\"/>\n <aop:aspect ref=\"xxx\">\n <aop:before method=\"writeArg1\" pointcut=\"execution(* *(String))\"/>\n <aop:after method=\"aaa\" pointcut-ref=\"zzz\"/>\n <aop:after-throwing method=\"aaa\"/> <!--Either 'pointcut' or 'pointcut-ref' attribute must be defined -->\n </aop:aspect>\n </aop:config>\n </beans>\n\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringAopErrorsInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring AOP",
"index": 191,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringAopPointcutExpressionInspection",
"shortDescription": {
"text": "Incorrect Spring AOP pointcut expression"
},
"fullDescription": {
"text": "Reports AspectJ pointcut designators which are not supported by Spring. Example: '<beans>\n <aop:config >\n <aop:pointcut expression=\"@this(Anno) <!-- '@this' pointcut designator isn't supported by Spring -->\n and adviceexecution()\"/> <!-- 'adviceexecution' pointcut designator isn't supported by Spring -->\n <aop:pointcut expression=\"!@annotation(Anno)\"/>\n </aop:config>\n</beans>'",
"markdown": "Reports AspectJ pointcut designators which are not supported by Spring.\n\n**Example:**\n\n\n <beans>\n <aop:config >\n <aop:pointcut expression=\"@this(Anno) <!-- '@this' pointcut designator isn't supported by Spring -->\n and adviceexecution()\"/> <!-- 'adviceexecution' pointcut designator isn't supported by Spring -->\n <aop:pointcut expression=\"!@annotation(Anno)\"/>\n </aop:config>\n </beans>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringAopPointcutExpressionInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring AOP",
"index": 191,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringBeanNameConventionInspection",
"shortDescription": {
"text": "Spring bean name violates conventions"
},
"fullDescription": {
"text": "Reports <bean> names that don't follow the bean naming conventions. The convention is to use the standard Java convention for instance field names when naming beans. That is, bean names start with a lowercase letter and are camel-cased from there. Examples of such names include 'accountManager', 'accountService', 'userDao', 'loginController', and so on. Naming beans consistently makes your configuration easier to read and understand. Also, if you are using Spring AOP, it helps a lot when applying an advice to a set of beans related by name.",
"markdown": "Reports **\\<bean\\>** names that don't follow the bean naming conventions.\n\n\nThe convention is to use the standard Java convention for instance field names when naming beans.\nThat is, bean names start with a lowercase letter and are camel-cased from there.\nExamples of such names include `accountManager`, `accountService`, `userDao`, `loginController`, and so on.\nNaming beans consistently makes your configuration easier to read and understand.\nAlso, if you are using Spring AOP, it helps a lot when applying an advice to a set of beans related by name."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringBeanNameConventionInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/XML",
"index": 5,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringHandlersSchemasHighlighting",
"shortDescription": {
"text": "Unresolved file or class reference in a spring.handlers or spring.schemas file"
},
"fullDescription": {
"text": "Reports unresolved class and file references in 'spring.handlers' and 'spring.schemas' files. Example 'spring.handlers' file: 'a=my.company.MyHandler\n b=my.company.UnknownHandler // reports \"Cannot resolve class 'my.company.UnknownHandler'\"'",
"markdown": "Reports unresolved class and file references in `spring.handlers` and `spring.schemas` files.\n\n**Example `spring.handlers` file:**\n\n\n a=my.company.MyHandler\n b=my.company.UnknownHandler // reports \"Cannot resolve class 'my.company.UnknownHandler'\"\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringHandlersSchemasHighlighting",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core",
"index": 4,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringCacheNamesInspection",
"shortDescription": {
"text": "Incorrect required cache names definition"
},
"fullDescription": {
"text": "Reports incorrect '@Cache*' annotation names. At least one cache name should be provided per cache operation: '@Cacheable(\"cache_name\")' or '@Cacheable(cacheNames =\"cache_name\")'. '@CacheConfig#cacheNames()' can be used for sharing common cache-related settings at the class level.",
"markdown": "Reports incorrect `@Cache*` annotation names.\n\nAt least one cache name should be provided per cache operation: `@Cacheable(\"cache_name\")` or `@Cacheable(cacheNames =\"cache_name\")`.\n`@CacheConfig#cacheNames()` can be used for sharing common cache-related settings at the class level."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringCacheNamesInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/Code",
"index": 8,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringJavaStaticMembersAutowiringInspection",
"shortDescription": {
"text": "Incorrect Spring component autowiring or injection on a static class member"
},
"fullDescription": {
"text": "Reports autowired and injected static methods/fields of Spring components. Example: '@Component\npublic class MyComponent {\n\t@Autowired\n\tstatic FooInterface foo; // reports \"Don't autowire static members\"\n}'",
"markdown": "Reports autowired and injected static methods/fields of Spring components.\n\n**Example:**\n\n\n @Component\n public class MyComponent {\n \t@Autowired\n \tstatic FooInterface foo; // reports \"Don't autowire static members\"\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringJavaStaticMembersAutowiringInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/Code",
"index": 8,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringImportResource",
"shortDescription": {
"text": "Unresolved file references in @ImportResource locations"
},
"fullDescription": {
"text": "Reports unresolved files and directories in 'locations' attributes of @ImportResource annotations and the corresponding aliased attributes of the '@ImportResource' meta annotations. Example: '@Configuration\n @ImportResource(locations = \"classpath:META-INF/unknown-context.xml\") // reports \"Cannot resolve file 'unknown-context.xml'\"\n public class MyConfiguration {...}'",
"markdown": "Reports unresolved files and directories in `locations` attributes\nof [@ImportResource](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/context/annotation/ImportResource.html) annotations\nand the corresponding aliased attributes of the `@ImportResource` meta annotations.\n\n**Example:**\n\n\n @Configuration\n @ImportResource(locations = \"classpath:META-INF/unknown-context.xml\") // reports \"Cannot resolve file 'unknown-context.xml'\"\n public class MyConfiguration {...}\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringImportResource",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/Code",
"index": 8,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringTransactionalComponentInspection",
"shortDescription": {
"text": "Invalid 'PlatformTransactionManager' declaration in @Transactional component"
},
"fullDescription": {
"text": "Reports PlatformTransactionManager classes that are not correctly defined in the application context for the current @Transactional component.",
"markdown": "Reports [PlatformTransactionManager](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/transaction/PlatformTransactionManager.html) classes that are not correctly defined in the application context for the current [@Transactional](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/transaction/annotation/Transactional.html) component."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringTransactionalComponentInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/Code",
"index": 8,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringPropertySource",
"shortDescription": {
"text": "Unresolved file references in @PropertySource and @TestPropertySource locations"
},
"fullDescription": {
"text": "Reports unresolved files or directories in @PropertySource and @TestPropertySource annotations. Example: '@Configuration\n @PropertySource(\"classpath:/com/mycompany/unknown.properties\") // reports \"Cannot resolve file unknown.properties\"\n public class AppConfig {...}'",
"markdown": "Reports unresolved files or directories in\n[@PropertySource](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/context/annotation/PropertySource.html)\nand [@TestPropertySource](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/test/context/TestPropertySource.html)\nannotations.\n\n**Example:**\n\n\n @Configuration\n @PropertySource(\"classpath:/com/mycompany/unknown.properties\") // reports \"Cannot resolve file unknown.properties\"\n public class AppConfig {...}\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringPropertySource",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/Code",
"index": 8,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringProfileExpression",
"shortDescription": {
"text": "Incorrectly configured @Profile expression"
},
"fullDescription": {
"text": "Reports incorrect @Profile expressions: Spring profiles must not be empty '&' and '|' operators must not be mixed without parentheses in Spring profile expressions Examples: '// correctly configured\n @Configuration\n @Profile(\"a & (b | c)\")\n public class MyConfiguration {...}\n\n // empty\n @Configuration\n @Profile() // reports \"Profile expression must contain text\"\n public class MyConfiguration {...}\n\n // mixed operators without parentheses\n @Configuration\n @Profile(\"a & b | c\") // reports \"Malformed profile expression\"\n public class MyConfiguration {...}'",
"markdown": "Reports incorrect\n[@Profile](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/context/annotation/Profile.html)\nexpressions:\n\n* Spring profiles must not be empty\n* '\\&' and '\\|' operators must not be mixed without parentheses in Spring profile expressions\n\n**Examples:**\n\n\n // correctly configured\n @Configuration\n @Profile(\"a & (b | c)\")\n public class MyConfiguration {...}\n\n // empty\n @Configuration\n @Profile() // reports \"Profile expression must contain text\"\n public class MyConfiguration {...}\n\n // mixed operators without parentheses\n @Configuration\n @Profile(\"a & b | c\") // reports \"Malformed profile expression\"\n public class MyConfiguration {...}\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringProfileExpression",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Core/Code",
"index": 8,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.java",
"version": "232.8660.185",
"rules": [
{
"id": "KeySetIterationMayUseEntrySet",
"shortDescription": {
"text": "Iteration over 'keySet()' can be optimized"
},
"fullDescription": {
"text": "Reports iterations over the 'keySet()' of a 'java.util.Map' instance, where the iterated keys are used to retrieve the values from the map. Such iteration may be more efficient when replaced with an iteration over the 'entrySet()' or 'values()' (if the key is not actually used). Similarly, 'keySet().forEach(key -> ...)' can be replaced with 'forEach((key, value) -> ...)' if values are retrieved inside a lambda. Example: 'for (Object key : map.keySet()) {\n Object val = map.get(key);\n }' After the quick-fix is applied: 'for (Object val : map.values()) {}'",
"markdown": "Reports iterations over the `keySet()` of a `java.util.Map` instance, where the iterated keys are used to retrieve the values from the map.\n\n\nSuch iteration may be more efficient when replaced with an iteration over the\n`entrySet()` or `values()` (if the key is not actually used).\n\n\nSimilarly, `keySet().forEach(key -> ...)`\ncan be replaced with `forEach((key, value) -> ...)` if values are retrieved\ninside a lambda.\n\n**Example:**\n\n\n for (Object key : map.keySet()) {\n Object val = map.get(key);\n }\n\nAfter the quick-fix is applied:\n\n\n for (Object val : map.values()) {}\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "KeySetIterationMayUseEntrySet",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UncheckedExceptionClass",
"shortDescription": {
"text": "Unchecked 'Exception' class"
},
"fullDescription": {
"text": "Reports subclasses of 'java.lang.RuntimeException'. Some coding standards require that all user-defined exception classes are checked. Example: 'class EnigmaException extends RuntimeException {} // warning: Unchecked exception class 'EnigmaException''",
"markdown": "Reports subclasses of `java.lang.RuntimeException`.\n\nSome coding standards require that all user-defined exception classes are checked.\n\n**Example:**\n\n\n class EnigmaException extends RuntimeException {} // warning: Unchecked exception class 'EnigmaException'\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UncheckedExceptionClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Error handling",
"index": 9,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnusedReturnValue",
"shortDescription": {
"text": "Method can be made 'void'"
},
"fullDescription": {
"text": "Reports methods whose return values are never used when called. The return type of such methods can be made 'void'. Methods annotated with Error Prone's or AssertJ's '@CanIgnoreReturnValue' annotation will not be reported. The quick-fix updates the method signature and removes 'return' statements from inside the method. Example: '// reported if visibility setting is Protected or Public\n protected String myToUpperCase(String s) {\n return s.toUpperCase();\n }\n\n // simple setter, reporting depends on setting\n public String setStr(String str) {\n myStr = str;\n return myStr;\n }\n\n void test() {\n setStr(\"value\"); // return value is unused\n myToUpperCase(\"result\"); // return value is unused\n }' After the quick-fix is applied to both methods: 'protected void myToUpperCase(String s) {\n // 'return' removed completely\n // as 's.toUpperCase()' has no side effect\n }\n\n public void setStr(String str) {\n myStr = str;\n // 'return' removed\n }\n ...' NOTE: Some methods might not be reported during in-editor highlighting due to performance reasons. To see all results, run the inspection using Code | Inspect Code or Code | Analyze Code | Run Inspection by Name> Use the Ignore chainable methods option to ignore unused return values from chainable calls. Use the Maximal reported method visibility option to control the maximum visibility of methods to be reported.",
"markdown": "Reports methods whose return values are never used when called. The return type of such methods can be made `void`.\n\nMethods annotated with Error Prone's or AssertJ's `@CanIgnoreReturnValue` annotation will not be reported.\nThe quick-fix updates the method signature and removes `return` statements from inside the method.\n\n**Example:**\n\n\n // reported if visibility setting is Protected or Public\n protected String myToUpperCase(String s) {\n return s.toUpperCase();\n }\n\n // simple setter, reporting depends on setting\n public String setStr(String str) {\n myStr = str;\n return myStr;\n }\n\n void test() {\n setStr(\"value\"); // return value is unused\n myToUpperCase(\"result\"); // return value is unused\n }\n\nAfter the quick-fix is applied to both methods:\n\n\n protected void myToUpperCase(String s) {\n // 'return' removed completely\n // as 's.toUpperCase()' has no side effect\n }\n\n public void setStr(String str) {\n myStr = str;\n // 'return' removed\n }\n ...\n\n\n**NOTE:** Some methods might not be reported during in-editor highlighting due to performance reasons.\nTo see all results, run the inspection using **Code \\| Inspect Code** or **Code \\| Analyze Code \\| Run Inspection by Name**\\>\n\nUse the **Ignore chainable methods** option to ignore unused return values from chainable calls.\n\nUse the **Maximal reported method visibility** option to control the maximum visibility of methods to be reported."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnusedReturnValue",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Declaration redundancy",
"index": 10,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NumberEquality",
"shortDescription": {
"text": "Number comparison using '==', instead of 'equals()'"
},
"fullDescription": {
"text": "Reports code that uses == or != instead of 'equals()' to test for 'Number' equality. With auto-boxing, it is easy to make the mistake of comparing two instances of a wrapper type instead of two primitives, for example 'Integer' instead of 'int'. Example: 'void foo(Integer a, Integer b) {\n final boolean bool = a == b;\n }' If 'a' is known to be non-null, then it's safe to apply the \"unsafe\" quick-fix and get the result similar to the following: 'void foo(Integer a, Integer b) {\n final boolean bool = a.equals(b);\n }'",
"markdown": "Reports code that uses **==** or **!=** instead of `equals()` to test for `Number` equality.\n\n\nWith auto-boxing, it is easy\nto make the mistake of comparing two instances of a wrapper type instead of two primitives, for example `Integer` instead of\n`int`.\n\n**Example:**\n\n void foo(Integer a, Integer b) {\n final boolean bool = a == b;\n }\n\nIf `a` is known to be non-null, then it's safe to apply the \"unsafe\" quick-fix and get the result similar to the following:\n\n void foo(Integer a, Integer b) {\n final boolean bool = a.equals(b);\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "NumberEquality",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassWithOnlyPrivateConstructors",
"shortDescription": {
"text": "Class with only 'private' constructors should be declared 'final'"
},
"fullDescription": {
"text": "Reports classes with only 'private' constructors. A class that only has 'private' constructors cannot be extended outside a file and should be declared as 'final'.",
"markdown": "Reports classes with only `private` constructors.\n\nA class that only has `private` constructors cannot be extended outside a file and should be declared as `final`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ClassWithOnlyPrivateConstructors",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MathRandomCastToInt",
"shortDescription": {
"text": "'Math.random()' cast to 'int'"
},
"fullDescription": {
"text": "Reports calls to 'Math.random()' which are immediately cast to 'int'. Casting a 'double' between '0.0' (inclusive) and '1.0' (exclusive) to 'int' will always round down to zero. The value should first be multiplied by some factor before casting it to an 'int' to get a value between zero (inclusive) and the multiplication factor (exclusive). Another possible solution is to use the 'nextInt()' method of 'java.util.Random'. Example: 'int r = (int)Math.random() * 10;' After the quick fix is applied: 'int r = (int)(Math.random() * 10);'",
"markdown": "Reports calls to `Math.random()` which are immediately cast to `int`.\n\nCasting a `double` between `0.0` (inclusive) and\n`1.0` (exclusive) to `int` will always round down to zero. The value\nshould first be multiplied by some factor before casting it to an `int` to\nget a value between zero (inclusive) and the multiplication factor (exclusive).\nAnother possible solution is to use the `nextInt()` method of\n`java.util.Random`.\n\n**Example:**\n\n int r = (int)Math.random() * 10;\n\nAfter the quick fix is applied:\n\n int r = (int)(Math.random() * 10);\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "MathRandomCastToInt",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DoubleBraceInitialization",
"shortDescription": {
"text": "Double brace initialization"
},
"fullDescription": {
"text": "Reports Double Brace Initialization. Double brace initialization may cause memory leaks when used in a non-static context because it creates an anonymous class that will reference the surrounding object. Compared to regular initialization, double brace initialization provides worse performance since it requires loading an additional class. It may also cause failure of 'equals()' comparisons if the 'equals()' method doesn't accept subclasses as parameters. In addition, before Java 9, double brace initialization couldn't be combined with the diamond operator since it was incompatible with anonymous classes. Example: 'List<Integer> list = new ArrayList<>() {{\n add(1);\n add(2);\n }};' After the quick-fix is applied: 'List<Integer> list = new ArrayList<>();\n list.add(1);\n list.add(2);'",
"markdown": "Reports [Double Brace Initialization](https://www.c2.com/cgi/wiki?DoubleBraceInitialization).\n\nDouble brace initialization may cause memory leaks when used in a non-static context because it creates an anonymous class\nthat will reference the surrounding object.\n\nCompared to regular initialization, double brace initialization provides worse performance since it requires loading an\nadditional class.\n\nIt may also cause failure of `equals()` comparisons if the `equals()` method doesn't accept subclasses as\nparameters.\n\nIn addition, before Java 9, double brace initialization couldn't be combined with the diamond operator since it was incompatible\nwith anonymous classes.\n\n**Example:**\n\n\n List<Integer> list = new ArrayList<>() {{\n add(1);\n add(2);\n }};\n\nAfter the quick-fix is applied:\n\n\n List<Integer> list = new ArrayList<>();\n list.add(1);\n list.add(2);\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "DoubleBraceInitialization",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Initialization",
"index": 26,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CloneableClassInSecureContext",
"shortDescription": {
"text": "Cloneable class in secure context"
},
"fullDescription": {
"text": "Reports classes which may be cloned. A class may be cloned if it supports the 'Cloneable' interface, and its 'clone()' method is not defined to immediately throw an error. Cloneable classes may be dangerous in code intended for secure use. Example: 'class SecureBean implements Cloneable {}' After the quick-fix is applied: 'class SecureBean {}' When the class extends an existing cloneable class or implements a cloneable interface, then after the quick-fix is applied, the code may look like: 'class SecureBean extends ParentBean {\n @Override\n protected SecureBean clone() throws CloneNotSupportedException {\n throw new CloneNotSupportedException();\n }\n}'",
"markdown": "Reports classes which may be cloned.\n\n\nA class\nmay be cloned if it supports the `Cloneable` interface,\nand its `clone()` method is not defined to immediately\nthrow an error. Cloneable classes may be dangerous in code intended for secure use.\n\n**Example:**\n`class SecureBean implements Cloneable {}`\n\nAfter the quick-fix is applied:\n`class SecureBean {}`\n\n\nWhen the class extends an existing cloneable class or implements a cloneable interface,\nthen after the quick-fix is applied, the code may look like:\n\n class SecureBean extends ParentBean {\n @Override\n protected SecureBean clone() throws CloneNotSupportedException {\n throw new CloneNotSupportedException();\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CloneableClassInSecureContext",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Security",
"index": 32,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AssertionCanBeIf",
"shortDescription": {
"text": "Assertion can be replaced with 'if' statement"
},
"fullDescription": {
"text": "Reports 'assert' statements and suggests replacing them with 'if' statements that throw 'java.lang.AssertionError'. Example: 'assert param != null;' After the quick-fix is applied: 'if (param == null) throw new AssertionError();'",
"markdown": "Reports `assert` statements and suggests replacing them with `if` statements that throw `java.lang.AssertionError`.\n\nExample:\n\n\n assert param != null;\n\nAfter the quick-fix is applied:\n\n\n if (param == null) throw new AssertionError();\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "AssertionCanBeIf",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DoubleNegation",
"shortDescription": {
"text": "Double negation"
},
"fullDescription": {
"text": "Reports double negations that can be simplified. Example: 'if (!!functionCall()) {}' After the quick-fix is applied: 'if (functionCall()) {}' Example: 'if (!(a != b)) {}' After the quick-fix is applied: 'if (a == b) {}'",
"markdown": "Reports double negations that can be simplified.\n\nExample:\n\n\n if (!!functionCall()) {}\n\nAfter the quick-fix is applied:\n\n\n if (functionCall()) {}\n\nExample:\n\n\n if (!(a != b)) {}\n\nAfter the quick-fix is applied:\n\n\n if (a == b) {}\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "DoubleNegation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SingleClassImport",
"shortDescription": {
"text": "Single class import"
},
"fullDescription": {
"text": "Reports 'import' statements that import single classes (as opposed to entire packages). Some coding standards prohibit such 'import' statements. You can configure IntelliJ IDEA to detect and fix such statements with its Optimize Imports command. Go to Settings | Editor | Code Style | Java | Imports and clear the Use single class import checkbox. Thus this inspection is mostly useful for offline reporting on code bases that you don't intend to change.",
"markdown": "Reports `import` statements that import single classes (as opposed to entire packages).\n\nSome coding standards prohibit such `import` statements.\n\n\nYou can configure IntelliJ IDEA to detect and fix such statements with its **Optimize Imports** command. Go to\n[Settings \\| Editor \\| Code Style \\| Java \\| Imports](settings://preferences.sourceCode.Java?Use%20single%20class%20import)\nand clear the **Use single class import** checkbox. Thus this inspection is mostly useful for\noffline reporting on code bases that you don't intend to change."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SingleClassImport",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Imports",
"index": 43,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LoggingConditionDisagreesWithLogLevelStatement",
"shortDescription": {
"text": "Log condition does not match logging call"
},
"fullDescription": {
"text": "Reports is log enabled for conditions of 'if' statements that do not match the log level of the contained logging call. For example: 'if (LOG.isTraceEnabled()) {\n // debug level logged, but checked for trace level\n LOG.debug(\"some log message\");\n }' This inspection understands the java.util.logging, Log4j, Log4j2, Apache Commons Logging and the SLF4J logging frameworks.",
"markdown": "Reports *is log enabled for* conditions of `if` statements that do not match the log level of the contained logging call.\n\n\nFor example:\n\n\n if (LOG.isTraceEnabled()) {\n // debug level logged, but checked for trace level\n LOG.debug(\"some log message\");\n }\n\nThis inspection understands the *java.util.logging* , *Log4j* , *Log4j2* , *Apache Commons Logging*\nand the *SLF4J* logging frameworks."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LoggingConditionDisagreesWithLogLevelStatement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JVM languages/Logging",
"index": 48,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BadOddness",
"shortDescription": {
"text": "Suspicious oddness check"
},
"fullDescription": {
"text": "Reports odd-even checks of the following form: 'x % 2 == 1'. Such checks fail when used with negative odd values. Consider using 'x % 2 != 0' or '(x & 1) == 1' instead.",
"markdown": "Reports odd-even checks of the following form: `x % 2 == 1`. Such checks fail when used with negative odd values. Consider using `x % 2 != 0` or `(x & 1) == 1` instead."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "BadOddness",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues",
"index": 49,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CheckedExceptionClass",
"shortDescription": {
"text": "Checked exception class"
},
"fullDescription": {
"text": "Reports checked exception classes (that is, subclasses of 'java.lang.Exception' that are not subclasses of 'java.lang.RuntimeException'). Some coding standards suppress checked user-defined exception classes. Example: 'class IllegalMoveException extends Exception {}'",
"markdown": "Reports checked exception classes (that is, subclasses of `java.lang.Exception` that are not subclasses of `java.lang.RuntimeException`).\n\nSome coding standards suppress checked user-defined exception classes.\n\n**Example:**\n\n\n class IllegalMoveException extends Exception {}\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CheckedExceptionClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Error handling",
"index": 9,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SerializableStoresNonSerializable",
"shortDescription": {
"text": "'Serializable' object implicitly stores non-'Serializable' object"
},
"fullDescription": {
"text": "Reports any references to local non-'Serializable' variables outside 'Serializable' lambdas, local and anonymous classes. When a local variable is referenced from an anonymous class, its value is stored in an implicit field of that class. The same happens for local classes and lambdas. If the variable is of a non-'Serializable' type, serialization will fail. Example: 'interface A extends Serializable {\n abstract void foo();\n }\n class B {}\n class C {\n void foo() {\n B b = new B();\n A a = new A() {\n @Override\n public void foo() {\n System.out.println(b); // warning\n }\n };\n }\n }'",
"markdown": "Reports any references to local non-`Serializable` variables outside `Serializable` lambdas, local and anonymous classes.\n\n\nWhen a local variable is referenced from an anonymous class, its value\nis stored in an implicit field of that class. The same happens\nfor local classes and lambdas. If the variable is of a\nnon-`Serializable` type, serialization will fail.\n\n**Example:**\n\n\n interface A extends Serializable {\n abstract void foo();\n }\n class B {}\n class C {\n void foo() {\n B b = new B();\n A a = new A() {\n @Override\n public void foo() {\n System.out.println(b); // warning\n }\n };\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SerializableStoresNonSerializable",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Serialization issues",
"index": 54,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InsertLiteralUnderscores",
"shortDescription": {
"text": "Unreadable numeric literal"
},
"fullDescription": {
"text": "Reports long numeric literals without underscores and suggests adding them. Underscores make such literals easier to read. Example: '1000000' After the quick-fix is applied: '1_000_000' This inspection only reports if the language level of the project of module is 7 or higher. New in 2020.2",
"markdown": "Reports long numeric literals without underscores and suggests adding them. Underscores make such literals easier to read.\n\nExample:\n\n\n 1000000\n\nAfter the quick-fix is applied:\n\n\n 1_000_000\n\nThis inspection only reports if the language level of the project of module is 7 or higher.\n\nNew in 2020.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "InsertLiteralUnderscores",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues",
"index": 49,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConstantValueVariableUse",
"shortDescription": {
"text": "Use of variable whose value is known to be constant"
},
"fullDescription": {
"text": "Reports any usages of variables which are known to be constant. This is the case if the (read) use of the variable is surrounded by an 'if', 'while', or 'for' statement with an '==' condition which compares the variable with a constant. In this case, the use of a variable which is known to be constant can be replaced with an actual constant. Example: 'private static void foo(double number) {\n if (number == 1.0) {\n f(number);\n }\n }\n private static void f(double number) {}' After the quick-fix is applied: 'private static void foo(double number) {\n if (number == 1.0) {\n f(1.0);\n }\n }\n private static void f(double number) {}'",
"markdown": "Reports any usages of variables which are known to be constant.\n\nThis is the case if the (read) use of the variable is surrounded by an\n`if`, `while`, or `for`\nstatement with an `==` condition which compares the variable with a constant.\nIn this case, the use of a variable which is known to be constant can be replaced with\nan actual constant.\n\nExample:\n\n\n private static void foo(double number) {\n if (number == 1.0) {\n f(number);\n }\n }\n private static void f(double number) {}\n\nAfter the quick-fix is applied:\n\n\n private static void foo(double number) {\n if (number == 1.0) {\n f(1.0);\n }\n }\n private static void f(double number) {}\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ConstantValueVariableUse",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Data flow",
"index": 61,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ResultOfObjectAllocationIgnored",
"shortDescription": {
"text": "Result of object allocation ignored"
},
"fullDescription": {
"text": "Reports object allocations where the allocated object is ignored and neither assigned to a variable nor used in another way. Such allocation expressions are legal in Java, but are usually either unintended, or evidence of a very odd object initialization strategy. Use the options to list classes whose allocations should be ignored by this inspection.",
"markdown": "Reports object allocations where the allocated object is ignored and neither assigned to a variable nor used in another way.\n\n\nSuch allocation expressions are legal in Java, but are usually either unintended, or\nevidence of a very odd object initialization strategy.\n\n\nUse the options to list classes whose allocations should be ignored by this inspection."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ResultOfObjectAllocationIgnored",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnusedLibrary",
"shortDescription": {
"text": "Unused library"
},
"fullDescription": {
"text": "Reports libraries attached to the specified inspection scope that are not used directly in code.",
"markdown": "Reports libraries attached to the specified inspection scope that are not used directly in code."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnusedLibrary",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Declaration redundancy",
"index": 10,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ObsoleteCollection",
"shortDescription": {
"text": "Use of obsolete collection type"
},
"fullDescription": {
"text": "Reports usages of 'java.util.Vector', 'java.util.Hashtable' and 'java.util.Stack'. Usages of these classes can often be replaced with usages of 'java.util.ArrayList', 'java.util.HashMap' and 'java.util.ArrayDeque' respectively. While still supported, the former classes were made obsolete by the JDK1.2 collection classes, and should probably not be used in new development. Use the Ignore obsolete collection types where they are required option to ignore any cases where the obsolete collections are used as method arguments or assigned to a variable that requires the obsolete type. Enabling this option may consume significant processor resources.",
"markdown": "Reports usages of `java.util.Vector`, `java.util.Hashtable` and `java.util.Stack`.\n\nUsages of these classes can often be replaced with usages of\n`java.util.ArrayList`, `java.util.HashMap` and `java.util.ArrayDeque` respectively.\nWhile still supported,\nthe former classes were made obsolete by the JDK1.2 collection classes, and should probably\nnot be used in new development.\n\n\nUse the **Ignore obsolete collection types where they are required** option to ignore any cases where the obsolete collections are used\nas method arguments or assigned to a variable that requires the obsolete type.\nEnabling this option may consume significant processor resources."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UseOfObsoleteCollectionType",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code maturity",
"index": 67,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ForEachWithRecordPatternCanBeUsed",
"shortDescription": {
"text": "Enhanced 'for' with a record pattern can be used"
},
"fullDescription": {
"text": "Reports local variable declarations and accessors to record components that can be replaced with pattern variables in enhanced `for` statements, which are usually more compact. Example: 'record Record(Integer x, String y) {\n}\n\npublic static void test(List<Record> records) {\n for (Record record : records) {\n System.out.println(record.y());\n Integer x = record.x;\n System.out.println(x);\n }\n}' Can be replaced with: 'record Record(Integer x, String y) {\n}\n\npublic static void test(List<Record> records) {\n for (Record(Integer x, String y) : records) {\n System.out.println(y);\n System.out.println(x);\n }\n}' This inspection only reports if the language level of the project or module is 20 or higher Use the Nesting depth limit option to specify the maximum number of nested deconstruction patterns to report Use the Maximum number of record components to deconstruct option to specify the maximum number of components, which a record can contain to be used in deconstruction patterns Use the Maximum number of not-used record components option to specify the maximum number of components, which are not used in 'for' statement New in 2023.1",
"markdown": "Reports local variable declarations and accessors to record components that can be replaced with pattern variables in enhanced \\`for\\` statements, which are usually more compact.\n\n**Example:**\n\n\n record Record(Integer x, String y) {\n }\n\n public static void test(List<Record> records) {\n for (Record record : records) {\n System.out.println(record.y());\n Integer x = record.x;\n System.out.println(x);\n }\n }\n\nCan be replaced with:\n\n\n record Record(Integer x, String y) {\n }\n\n public static void test(List<Record> records) {\n for (Record(Integer x, String y) : records) {\n System.out.println(y);\n System.out.println(x);\n }\n }\n\nThis inspection only reports if the language level of the project or module is 20 or higher\n\n* Use the **Nesting depth limit** option to specify the maximum number of nested deconstruction patterns to report\n* Use the **Maximum number of record components to deconstruct** option to specify the maximum number of components, which a record can contain to be used in deconstruction patterns\n* Use the **Maximum number of not-used record components** option to specify the maximum number of components, which are not used in `for` statement\n\nNew in 2023.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ForEachWithRecordPatternCanBeUsed",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 20",
"index": 70,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FinalizeNotProtected",
"shortDescription": {
"text": "'finalize()' should be protected, not public"
},
"fullDescription": {
"text": "Reports any implementations of the 'Object.finalize()' method that are declared 'public'. According to the contract of the 'Object.finalize()', only the garbage collector calls this method. Making this method public may be confusing, because it means that the method can be used from other code. A quick-fix is provided to make the method 'protected', to prevent it from being invoked from other classes. Example: 'class X {\n public void finalize() {\n /* ... */\n }\n }' After the quick-fix is applied: 'class X {\n protected void finalize() {\n /* ... */\n }\n }'",
"markdown": "Reports any implementations of the `Object.finalize()` method that are declared `public`.\n\n\nAccording to the contract of the `Object.finalize()`, only the garbage\ncollector calls this method. Making this method public may be confusing, because it\nmeans that the method can be used from other code.\n\n\nA quick-fix is provided to make the method `protected`, to prevent it from being invoked\nfrom other classes.\n\n**Example:**\n\n\n class X {\n public void finalize() {\n /* ... */\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class X {\n protected void finalize() {\n /* ... */\n }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "FinalizeNotProtected",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Finalization",
"index": 77,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LogStatementGuardedByLogCondition",
"shortDescription": {
"text": "Logging call not guarded by log condition"
},
"fullDescription": {
"text": "Reports logging calls with non-constant arguments that are not surrounded by a guard condition. The evaluation of the arguments of a logging call can be expensive. Surrounding a logging call with a guard clause prevents that cost when logging is disabled for the level used by the logging statement. This is especially useful for the least serious level (trace, debug, finest) of logging calls, because those are most often disabled in a production environment. Example: 'public class Principal {\n void bad(Object object) {\n if (true) {\n LOG.debug(\"log log log \" + expensiveCalculation(object));\n }\n LOG.debug(\"some more logging \" + expensiveCalculation(1));\n }\n\n void good(Object) {\n if (LOG.isDebug()) {\n LOG.debug(\"value: \" + expensiveCalculation(object));\n }\n }\n }' Configure the inspection: Use the Logger class name field to specify the logger class name used. Use the table to specify the logging methods this inspection should warn on, with the corresponding log condition text. Use the Flag all unguarded logging calls option to have the inspection flag all unguarded log calls, not only those with non-constant arguments.",
"markdown": "Reports logging calls with non-constant arguments that are not surrounded by a guard condition. The evaluation of the arguments of a logging call can be expensive. Surrounding a logging call with a guard clause prevents that cost when logging is disabled for the level used by the logging statement. This is especially useful for the least serious level (trace, debug, finest) of logging calls, because those are most often disabled in a production environment.\n\n**Example:**\n\n\n public class Principal {\n void bad(Object object) {\n if (true) {\n LOG.debug(\"log log log \" + expensiveCalculation(object));\n }\n LOG.debug(\"some more logging \" + expensiveCalculation(1));\n }\n\n void good(Object) {\n if (LOG.isDebug()) {\n LOG.debug(\"value: \" + expensiveCalculation(object));\n }\n }\n }\n\n\nConfigure the inspection:\n\n* Use the **Logger class name** field to specify the logger class name used.\n*\n Use the table to specify the logging methods this inspection should warn on, with the corresponding log condition text.\n\n* Use the **Flag all unguarded logging calls** option to have the inspection flag all unguarded log calls, not only those with non-constant arguments."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LogStatementGuardedByLogCondition",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Logging",
"index": 79,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ThreadStopSuspendResume",
"shortDescription": {
"text": "Call to 'Thread.stop()', 'suspend()' or 'resume()'"
},
"fullDescription": {
"text": "Reports calls to 'Thread.stop()', 'Thread.suspend()', and 'Thread.resume()'. These calls are inherently prone to data corruption and deadlocks, and their use is strongly discouraged. It is better to use cooperative cancellation instead of 'stop', and interruption instead of direct calls to 'suspend' and 'resume'.",
"markdown": "Reports calls to `Thread.stop()`, `Thread.suspend()`, and `Thread.resume()`.\n\n\nThese calls are inherently prone to data corruption and deadlocks, and their use is strongly discouraged.\nIt is better to use cooperative cancellation instead of `stop`, and\ninterruption instead of direct calls to `suspend` and `resume`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CallToThreadStopSuspendOrResumeManager",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryTemporaryOnConversionFromString",
"shortDescription": {
"text": "Unnecessary temporary object in conversion from 'String'"
},
"fullDescription": {
"text": "Reports unnecessary creation of temporary objects when converting from 'String' to primitive types. Example: 'new Integer(\"3\").intValue()' After the quick-fix is applied: 'Integer.valueOf(\"3\")'",
"markdown": "Reports unnecessary creation of temporary objects when converting from `String` to primitive types.\n\n**Example:**\n\n\n new Integer(\"3\").intValue()\n\nAfter the quick-fix is applied:\n\n\n Integer.valueOf(\"3\")\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryTemporaryOnConversionFromString",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UseOfConcreteClass",
"shortDescription": {
"text": "Use of concrete class"
},
"fullDescription": {
"text": "Reports usages of concrete classes, rather than interfaces. Such declarations may represent a failure of abstraction and may make testing more difficult. Declarations whose classes come from system or third-party libraries will not be reported by this inspection. Casts, instanceofs, and local variables are not reported in 'equals()' method implementations. Also, casts are not reported in 'clone()' method implementations. Example: 'interface Entity {}\n class EntityImpl implements Entity {}\n\n void processObject(Object obj) {\n // warning: instanceof of the concrete class\n if (obj instanceof EntityImpl) {\n // warning: cast to the concrete class,\n // rather than the interface\n processEntity((EntityImpl)obj);\n }\n }\n // warning: parameter of concrete class\n void processEntity(EntityImpl obj) {\n }' Use the Ignore abstract class type option to ignore casts to abstract classes. Use the subsequent options to control contexts where the problem is reported.",
"markdown": "Reports usages of concrete classes, rather than interfaces. Such declarations may represent a failure of abstraction and may make testing more difficult.\n\n\nDeclarations whose classes come from system or third-party libraries will not be reported by this inspection.\nCasts, instanceofs, and local variables are not reported in `equals()` method implementations.\nAlso, casts are not reported in `clone()` method implementations.\n\nExample:\n\n\n interface Entity {}\n class EntityImpl implements Entity {}\n\n void processObject(Object obj) {\n // warning: instanceof of the concrete class\n if (obj instanceof EntityImpl) {\n // warning: cast to the concrete class,\n // rather than the interface\n processEntity((EntityImpl)obj);\n }\n }\n // warning: parameter of concrete class\n void processEntity(EntityImpl obj) {\n }\n\n\nUse the **Ignore abstract class type** option to ignore casts to abstract classes.\n\nUse the subsequent options to control contexts where the problem is reported."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UseOfConcreteClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Abstraction issues",
"index": 83,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryContinue",
"shortDescription": {
"text": "Unnecessary 'continue' statement"
},
"fullDescription": {
"text": "Reports 'continue' statements if they are the last reachable statements in the loop. These 'continue' statements are unnecessary and can be safely removed. Example: 'for (String element: elements) {\n System.out.println();\n continue;\n }' After the quick-fix is applied: 'for (String element: elements) {\n System.out.println();\n }' The inspection doesn't analyze JSP files. Use the Ignore in then branch of 'if' statement with 'else' branch option to ignore 'continue' statements when they are placed in a 'then' branch of a complete 'if'-'else' statement. Example: 'for (String element: elements) {\n if(element.isEmpty()) {\n continue;\n } else {\n //...\n }\n }'",
"markdown": "Reports `continue` statements if they are the last reachable statements in the loop. These `continue` statements are unnecessary and can be safely removed.\n\nExample:\n\n\n for (String element: elements) {\n System.out.println();\n continue;\n }\n\nAfter the quick-fix is applied:\n\n\n for (String element: elements) {\n System.out.println();\n }\n\nThe inspection doesn't analyze JSP files.\n\n\nUse the **Ignore in then branch of 'if' statement with 'else' branch** option to ignore\n`continue` statements when they are placed in a `then` branch of a complete\n`if`-`else` statement.\n\nExample:\n\n\n for (String element: elements) {\n if(element.isEmpty()) {\n continue;\n } else {\n //...\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryContinue",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SuspiciousInvocationHandlerImplementation",
"shortDescription": {
"text": "Suspicious 'InvocationHandler' implementation"
},
"fullDescription": {
"text": "Reports implementations of 'InvocationHandler' that do not proxy standard 'Object' methods like 'hashCode()', 'equals()', and 'toString()'. Failing to handle these methods might cause unexpected problems upon calling them on a proxy instance. Example: 'InvocationHandler myHandler = (proxy, method, params) -> {\n System.out.println(\"Hello World!\");\n return null;\n };\n Runnable myProxy = (Runnable) Proxy.newProxyInstance(\n Thread.currentThread().getContextClassLoader(),\n new Class[] {Runnable.class}, myHandler\n );' This code snippet is designed to only proxy the 'Runnable.run()' method. However, calls to any 'Object' methods, like 'hashCode()', are proxied as well. This can lead to problems like a 'NullPointerException', for example, when adding 'myProxy' to a 'HashSet'. New in 2020.2",
"markdown": "Reports implementations of `InvocationHandler` that do not proxy standard `Object` methods like `hashCode()`, `equals()`, and `toString()`.\n\nFailing to handle these methods might cause unexpected problems upon calling them on a proxy instance.\n\n**Example:**\n\n\n InvocationHandler myHandler = (proxy, method, params) -> {\n System.out.println(\"Hello World!\");\n return null;\n };\n Runnable myProxy = (Runnable) Proxy.newProxyInstance(\n Thread.currentThread().getContextClassLoader(),\n new Class[] {Runnable.class}, myHandler\n );\n\n\nThis code snippet is designed to only proxy the `Runnable.run()` method.\nHowever, calls to any `Object` methods, like `hashCode()`, are proxied as well.\nThis can lead to problems like a `NullPointerException`, for example, when adding `myProxy` to a `HashSet`.\n\nNew in 2020.2"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SuspiciousInvocationHandlerImplementation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HtmlTagCanBeJavadocTag",
"shortDescription": {
"text": "'<code>...</code>' can be replaced with '{@code ...}'"
},
"fullDescription": {
"text": "Reports usages of '<code>' tags in Javadoc comments. Since Java 5, these tags can be replaced with '{@code ...}' constructs. This allows using angle brackets '<' and '>' inside the comment instead of HTML character entities. Example: '/**\n * @return empty <code>ArrayList&lt;Integer&gt;</code>\n */\n List<Integer> getList(){ ... }' After the quick-fix is applied: '/**\n * @return empty {@code ArrayList<Integer>}\n */\n List<Integer> getList(){ ... }'",
"markdown": "Reports usages of `<code>` tags in Javadoc comments. Since Java 5, these tags can be replaced with `{@code ...}` constructs. This allows using angle brackets `<` and `>` inside the comment instead of HTML character entities.\n\n**Example:**\n\n\n /**\n * @return empty <code>ArrayList&lt;Integer&gt;</code>\n */\n List<Integer> getList(){ ... }\n\nAfter the quick-fix is applied:\n\n\n /**\n * @return empty {@code ArrayList<Integer>}\n */\n List<Integer> getList(){ ... }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "HtmlTagCanBeJavadocTag",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Javadoc",
"index": 95,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassEscapesItsScope",
"shortDescription": {
"text": "Class is exposed outside of its visibility scope"
},
"fullDescription": {
"text": "Reports usages of classes in a field or method signature where the class has less visibility than the member that uses it. While legal Java, such members cannot be used outside of the visibility scope of the class type they reference. Example: 'public class Parent {\n public Child getChild() {\n return new Child();\n }\n\n private class Child {}\n }' Additionally, in Java 9 and higher, a module may hide some of its classes from other modules by not exporting their packages. However, if a member that is part of the exported API references a non-exported class in its signature, such a member cannot be used outside of the module. Configure the inspection: Use the Report non-exported classes exposed in module API (Java 9+) option to report module API members that expose non-exported classes. Note that the language level of the project or module needs to be 9 or higher for this option. Use the Report non-accessible classes exposed in public API option to report on public members that expose classes with a smaller visibility scope. Use the Report private classes exposed in package-local API option to report on package-local members that expose 'private' classes.",
"markdown": "Reports usages of classes in a field or method signature where the class has less visibility than the member that uses it. While legal Java, such members cannot be used outside of the visibility scope of the class type they reference.\n\n**Example:**\n\n\n public class Parent {\n public Child getChild() {\n return new Child();\n }\n\n private class Child {}\n }\n\n\nAdditionally, in Java 9 and higher, a module may hide some of its classes from other modules by not exporting their packages.\nHowever, if a member that is part of the exported API references a non-exported class in its signature,\nsuch a member cannot be used outside of the module.\n\nConfigure the inspection:\n\n* Use the **Report non-exported classes exposed in module API (Java 9+)** option to report module API members that expose non-exported classes. \n Note that the language level of the project or module needs to be 9 or higher for this option.\n* Use the **Report non-accessible classes exposed in public API** option to report on public members that expose classes with a smaller visibility scope.\n* Use the **Report private classes exposed in package-local API** option to report on package-local members that expose `private` classes."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ClassEscapesDefinedScope",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Visibility",
"index": 97,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EqualsUsesNonFinalVariable",
"shortDescription": {
"text": "Non-final field referenced in 'equals()'"
},
"fullDescription": {
"text": "Reports implementations of 'equals()' that access non-'final' variables. Such access may result in 'equals()' returning different results at different points in the object's lifecycle, which may in turn cause problems when using the standard collections classes. Example: 'public class Person {\n private String lastName;\n\n @Override\n public boolean equals(Object obj) {\n ...\n Person other = (Person) obj;\n if (lastName == null) {\n if (!lastName.equals(other.lastName)) {\n return false;\n ...\n }\n }\n }'",
"markdown": "Reports implementations of `equals()` that access non-`final` variables. Such access may result in `equals()` returning different results at different points in the object's lifecycle, which may in turn cause problems when using the standard collections classes.\n\n**Example:**\n\n\n public class Person {\n private String lastName;\n\n @Override\n public boolean equals(Object obj) {\n ...\n Person other = (Person) obj;\n if (lastName == null) {\n if (!lastName.equals(other.lastName)) {\n return false;\n ...\n }\n }\n }\n \n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonFinalFieldReferenceInEquals",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NestedAssignment",
"shortDescription": {
"text": "Nested assignment"
},
"fullDescription": {
"text": "Reports assignment expressions that are nested inside other expressions. Such expressions may be confusing and violate the general design principle, which states that any construct should do precisely one thing. Example: 'String userName;\n // Warning: result of assignment to 'userName' is used\n String message = \"Hello \" + (userName = \"Alice\") + \"!\"\n System.out.println(message);\n System.out.println(\"Goodbye \" + userName);'",
"markdown": "Reports assignment expressions that are nested inside other expressions.\n\nSuch expressions may be confusing and violate the general design principle, which states that any construct should do precisely one thing.\n\n**Example:**\n\n\n String userName;\n // Warning: result of assignment to 'userName' is used\n String message = \"Hello \" + (userName = \"Alice\") + \"!\"\n System.out.println(message);\n System.out.println(\"Goodbye \" + userName);\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NestedAssignment",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Assignment issues",
"index": 98,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonFinalFieldInImmutable",
"shortDescription": {
"text": "Non-final field in '@Immutable' class"
},
"fullDescription": {
"text": "Reports any non-final field in a class with the '@Immutable' annotation. This violates the contract of the '@Immutable' annotation. Example: 'import javax.annotation.concurrent.Immutable;\n @Immutable\n class Foo {\n String bar = \"foo\";\n }' Supported '@GuardedBy' annotations are: 'net.jcip.annotations.GuardedBy' 'javax.annotation.concurrent.GuardedBy' 'org.apache.http.annotation.GuardedBy' 'com.android.annotations.concurrency.GuardedBy' 'androidx.annotation.GuardedBy' 'com.google.errorprone.annotations.concurrent.GuardedBy'",
"markdown": "Reports any non-final field in a class with the `@Immutable` annotation. This violates the contract of the `@Immutable` annotation.\n\nExample:\n\n\n import javax.annotation.concurrent.Immutable;\n @Immutable\n class Foo {\n String bar = \"foo\";\n }\n\nSupported `@GuardedBy` annotations are:\n\n* `net.jcip.annotations.GuardedBy`\n* `javax.annotation.concurrent.GuardedBy`\n* `org.apache.http.annotation.GuardedBy`\n* `com.android.annotations.concurrency.GuardedBy`\n* `androidx.annotation.GuardedBy`\n* `com.google.errorprone.annotations.concurrent.GuardedBy`"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonFinalFieldInImmutable",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Concurrency annotation issues",
"index": 99,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StringConcatenationInMessageFormatCall",
"shortDescription": {
"text": "String concatenation as argument to 'MessageFormat.format()' call"
},
"fullDescription": {
"text": "Reports non-constant string concatenations used as an argument to a call to 'MessageFormat.format()'. While occasionally intended, this is usually a misuse of the formatting method and may even cause unexpected exceptions if the variables used in the concatenated string contain special characters like '{'. Also, sometimes this could be the result of mistakenly concatenating a string format argument by typing a '+' when a ',' was meant. Example: 'String formatGreeting(String userName, int balance) {\n return MessageFormat.format(\"Hello, \" + userName + \"! Your balance is {0}.\", balance);\n }' Here, the 'userName' will be interpreted as a part of the format string, which may result in 'IllegalArgumentException' (for example, if 'userName' is '\"{\"'). This call should be probably replaced with 'MessageFormat.format(\"Hello, {0}! Your balance is {1}.\", userName, balance)'.",
"markdown": "Reports non-constant string concatenations used as an argument to a call to `MessageFormat.format()`.\n\n\nWhile occasionally intended, this is usually a misuse of the formatting method\nand may even cause unexpected exceptions if the variables used in the concatenated string contain\nspecial characters like `{`.\n\n\nAlso, sometimes this could be the result\nof mistakenly concatenating a string format argument by typing a `+` when a `,` was meant.\n\n**Example:**\n\n\n String formatGreeting(String userName, int balance) {\n return MessageFormat.format(\"Hello, \" + userName + \"! Your balance is {0}.\", balance);\n }\n\n\nHere, the `userName` will be interpreted as a part of the format string, which may result\nin `IllegalArgumentException` (for example, if `userName` is `\"{\"`).\nThis call should be probably replaced with `MessageFormat.format(\"Hello, {0}! Your balance is {1}.\", userName, balance)`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "StringConcatenationInMessageFormatCall",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ExpectedExceptionNeverThrown",
"shortDescription": {
"text": "Expected exception never thrown in test method body"
},
"fullDescription": {
"text": "Reports checked exceptions expected by a JUnit 4 test-method that are never thrown inside the method body. Such test methods will never succeed. Example: '@Test(expected = CloneNotSupportedException.class)\n public void testIt() {\n }'",
"markdown": "Reports checked exceptions expected by a JUnit 4 test-method that are never thrown inside the method body. Such test methods will never succeed.\n\n**Example:**\n\n\n @Test(expected = CloneNotSupportedException.class)\n public void testIt() {\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ExpectedExceptionNeverThrown",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/JUnit",
"index": 100,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConfusingFloatingPointLiteral",
"shortDescription": {
"text": "Confusing floating-point literal"
},
"fullDescription": {
"text": "Reports any floating point numbers that don't have a decimal point, numbers before the decimal point, or numbers after the decimal point. Such literals may be confusing, and violate several coding standards. Example: 'double d = .03;' After the quick-fix is applied: 'double d = 0.03;' Use the Ignore floating point literals in scientific notation option to ignore floating point numbers in scientific notation.",
"markdown": "Reports any floating point numbers that don't have a decimal point, numbers before the decimal point, or numbers after the decimal point.\n\nSuch literals may be confusing, and violate several coding standards.\n\n**Example:**\n\n double d = .03;\n\nAfter the quick-fix is applied:\n\n double d = 0.03;\n\n\nUse the **Ignore floating point literals in scientific notation** option to ignore floating point numbers in scientific notation."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ConfusingFloatingPointLiteral",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues",
"index": 49,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavadocReference",
"shortDescription": {
"text": "Declaration has problems in Javadoc references"
},
"fullDescription": {
"text": "Reports unresolved references inside Javadoc comments. In the following example, the 'someParam' parameter is missing, so it will be highlighted: 'class A {\n /**\n * @param someParam description\n **/\n void foo() {\n }\n}' Disable the Report inaccessible symbols option to ignore the tags that reference missing method parameters, classes, fields and methods.",
"markdown": "Reports unresolved references inside Javadoc comments.\n\nIn the following example, the `someParam` parameter is missing, so it will be highlighted:\n\n\n class A {\n /**\n * @param someParam description\n **/\n void foo() {\n }\n }\n\n\nDisable the **Report inaccessible symbols** option to ignore the tags that reference missing method parameters,\nclasses, fields and methods."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JavadocReference",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Javadoc",
"index": 95,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ImplicitArrayToString",
"shortDescription": {
"text": "Call to 'toString()' on array"
},
"fullDescription": {
"text": "Reports arrays used in 'String' concatenations or passed as parameters to 'java.io.PrintStream' methods, such as 'System.out.println()'. Usually, the content of the array is meant to be used and not the array object itself. Example: 'void print(Object[] objects) {\n System.out.println(objects);\n }' After the quick-fix is applied: 'void print(Object[] objects) {\n System.out.println(Arrays.toString(objects));\n }'",
"markdown": "Reports arrays used in `String` concatenations or passed as parameters to `java.io.PrintStream` methods, such as `System.out.println()`.\n\n\nUsually, the content of the array is meant to be used and not the array object itself.\n\n**Example:**\n\n\n void print(Object[] objects) {\n System.out.println(objects);\n }\n\nAfter the quick-fix is applied:\n\n\n void print(Object[] objects) {\n System.out.println(Arrays.toString(objects));\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ImplicitArrayToString",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BooleanMethodNameMustStartWithQuestion",
"shortDescription": {
"text": "Boolean method name must start with question word"
},
"fullDescription": {
"text": "Reports boolean methods whose names do not start with a question word. Boolean methods that override library methods are ignored by this inspection. Example: 'boolean empty(List<String> list) {\n return list.isEmpty();\n}' A quick-fix that renames such methods is available only in the editor. Configure the inspection: Use the Boolean method name prefixes list to specify acceptable question words to start boolean method names with. Use the Ignore methods with 'java.lang.Boolean' return type option to ignore methods with the 'java.lang.Boolean' return type. Use the Ignore boolean methods in an @interface option to ignore boolean methods in annotation types ('@interface'). Use the Ignore methods overriding/implementing a super method to ignore methods the have supers.",
"markdown": "Reports boolean methods whose names do not start with a question word.\n\nBoolean methods that override library methods are ignored by this inspection.\n\n**Example:**\n\n boolean empty(List<String> list) {\n return list.isEmpty();\n }\n\nA quick-fix that renames such methods is available only in the editor.\n\nConfigure the inspection:\n\n* Use the **Boolean method name prefixes** list to specify acceptable question words to start boolean method names with.\n* Use the **Ignore methods with 'java.lang.Boolean' return type** option to ignore methods with the `java.lang.Boolean` return type.\n* Use the **Ignore boolean methods in an @interface** option to ignore boolean methods in annotation types (`@interface`).\n* Use the **Ignore methods overriding/implementing a super method** to ignore methods the have supers."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "BooleanMethodNameMustStartWithQuestion",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Naming conventions/Method",
"index": 107,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FinalMethod",
"shortDescription": {
"text": "Method can't be overridden"
},
"fullDescription": {
"text": "Reports methods that are declared 'final'. Such methods can't be overridden and may indicate a lack of object-oriented design. Some coding standards discourage 'final' methods.",
"markdown": "Reports methods that are declared `final`. Such methods can't be overridden and may indicate a lack of object-oriented design. Some coding standards discourage `final` methods."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FinalMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AbsoluteAlignmentInUserInterface",
"shortDescription": {
"text": "Absolute alignment in AWT/Swing code"
},
"fullDescription": {
"text": "Reports usages of absolute alignment constants from AWT and Swing. Internationalized applications use relative alignment because it respects the locale component orientation settings. Example: 'JPanel panel = new JPanel(new BorderLayout(2, 2));\n JLabel label = new JLabel(\"Hello World\");\n panel.add(label, BorderLayout.NORTH);' After the quick-fix is applied: 'JPanel panel = new JPanel(new BorderLayout(2, 2));\n JLabel label = new JLabel(\"Hello World\");\n panel.add(label, BorderLayout.PAGE_START);'",
"markdown": "Reports usages of absolute alignment constants from AWT and Swing. Internationalized applications use relative alignment because it respects the locale component orientation settings.\n\n**Example:**\n\n\n JPanel panel = new JPanel(new BorderLayout(2, 2));\n JLabel label = new JLabel(\"Hello World\");\n panel.add(label, BorderLayout.NORTH);\n\nAfter the quick-fix is applied:\n\n\n JPanel panel = new JPanel(new BorderLayout(2, 2));\n JLabel label = new JLabel(\"Hello World\");\n panel.add(label, BorderLayout.PAGE_START);\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AbsoluteAlignmentInUserInterface",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Internationalization",
"index": 110,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SuspiciousReturnByteInputStream",
"shortDescription": {
"text": "Suspicious byte value returned from 'InputStream.read()'"
},
"fullDescription": {
"text": "Reports expressions of 'byte' type returned from a method implementing the 'InputStream.read()' method. This is suspicious because 'InputStream.read()' should return a value in the range from '0' to '255', while an expression of byte type contains a value from '-128' to '127'. The quick-fix converts the expression into an unsigned 'byte' by applying the bitmask '0xFF'. Example: 'class MyInputStream extends InputStream {\n int pos = 0;\n byte[] data;\n\n MyInputStream(byte[] input) {\n data = input;\n }\n\n @Override\n public int read() {\n if (pos == data.length) {\n return -1;\n }\n return data[pos++]; // problem\n }\n}' After applying the quick-fix: 'class MyInputStream extends InputStream {\n int pos = 0;\n byte[] data;\n\n MyInputStream(byte[] input) {\n data = input;\n }\n\n @Override\n public int read() {\n if (pos == data.length) {\n return -1;\n }\n return data[pos++] & 0xFF;\n }\n}' New in 2023.2",
"markdown": "Reports expressions of `byte` type returned from a method implementing the `InputStream.read()` method.\n\n\nThis is suspicious because `InputStream.read()` should return a value in the range from `0` to `255`,\nwhile an expression of byte type contains a value from `-128` to `127`.\nThe quick-fix converts the expression into an unsigned `byte` by applying the bitmask `0xFF`.\n\n**Example:**\n\n\n class MyInputStream extends InputStream {\n int pos = 0;\n byte[] data;\n\n MyInputStream(byte[] input) {\n data = input;\n }\n\n @Override\n public int read() {\n if (pos == data.length) {\n return -1;\n }\n return data[pos++]; // problem\n }\n }\n\nAfter applying the quick-fix:\n\n\n class MyInputStream extends InputStream {\n int pos = 0;\n byte[] data;\n\n MyInputStream(byte[] input) {\n data = input;\n }\n\n @Override\n public int read() {\n if (pos == data.length) {\n return -1;\n }\n return data[pos++] & 0xFF;\n }\n }\n\nNew in 2023.2"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SuspiciousReturnByteInputStream",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MissingFinalNewline",
"shortDescription": {
"text": "Missing final new line"
},
"fullDescription": {
"text": "Reports if manifest files do not end with a final newline as required by the JAR file specification.",
"markdown": "Reports if manifest files do not end with a final newline as required by the JAR file specification."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "MissingFinalNewline",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Manifest",
"index": 113,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonStaticFinalLogger",
"shortDescription": {
"text": "Non-constant logger"
},
"fullDescription": {
"text": "Reports logger fields that are not declared 'static' and/or 'final'. Ensuring that every class logger is effectively constant and bound to that class simplifies the task of providing a unified logging implementation for an application. A quick-fix is provided to change the logger modifiers to 'static final'. Example: 'public class Significant {\n private Logger LOG = Logger.getLogger(Critical.class);\n }' After the quick-fix is applied: 'public class Significant {\n private static final Logger LOG = Logger.getLogger(Critical.class);\n }' Configure the inspection: Use the Logger class name table to specify logger class names. The inspection will report the fields that are not 'static' and 'final' and are of the type equal to one of the specified class names.",
"markdown": "Reports logger fields that are not declared `static` and/or `final`. Ensuring that every class logger is effectively constant and bound to that class simplifies the task of providing a unified logging implementation for an application.\n\nA quick-fix is provided to change the logger modifiers to `static final`.\n\n**Example:**\n\n\n public class Significant {\n private Logger LOG = Logger.getLogger(Critical.class);\n }\n\nAfter the quick-fix is applied:\n\n\n public class Significant {\n private static final Logger LOG = Logger.getLogger(Critical.class);\n }\n\n\nConfigure the inspection:\n\n* Use the **Logger class name** table to specify logger class names. The inspection will report the fields that are not `static` and `final` and are of the type equal to one of the specified class names."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonConstantLogger",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Logging",
"index": 79,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryBoxing",
"shortDescription": {
"text": "Unnecessary boxing"
},
"fullDescription": {
"text": "Reports explicit boxing, that is wrapping of primitive values in objects. Explicit manual boxing is unnecessary as of Java 5 and later, and can safely be removed. Examples: 'Integer i = new Integer(1);' → 'Integer i = Integer.valueOf(1);' 'int i = Integer.valueOf(1);' → 'int i = 1;' Use the Only report truly superfluously boxed expressions option to report only truly superfluous boxing, where a boxed value is immediately unboxed either implicitly or explicitly. In this case, the entire boxing-unboxing step can be removed. The inspection doesn't report simple explicit boxing. This inspection only reports if the language level of the project or module is 5 or higher.",
"markdown": "Reports explicit boxing, that is wrapping of primitive values in objects.\n\nExplicit manual boxing is unnecessary as of Java 5 and later, and can safely be removed.\n\n**Examples:**\n\n* `Integer i = new Integer(1);` → `Integer i = Integer.valueOf(1);`\n* `int i = Integer.valueOf(1);` → `int i = 1;`\n\n\nUse the **Only report truly superfluously boxed expressions** option to report only truly superfluous boxing,\nwhere a boxed value is immediately unboxed either implicitly or explicitly.\nIn this case, the entire boxing-unboxing step can be removed. The inspection doesn't report simple explicit boxing.\n\nThis inspection only reports if the language level of the project or module is 5 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryBoxing",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 5",
"index": 117,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Anonymous2MethodRef",
"shortDescription": {
"text": "Anonymous type can be replaced with method reference"
},
"fullDescription": {
"text": "Reports anonymous classes which can be replaced with method references. Note that if an anonymous class is converted into an unbound method reference, the same method reference object can be reused by the Java runtime during subsequent invocations. On the other hand, when an anonymous class is used, separate objects are created every time. Thus, applying the quick-fix can cause the semantics change in rare cases, e.g. when anonymous class instances are used as 'HashMap' keys. Example: 'Runnable r = new Runnable() {\n @Override\n public void run() {\n System.out.println();\n }\n };' The quick-fix changes this code to the compact form: 'Runnable r = System.out::println;'. Use the Report when interface is not annotated with @FunctionalInterface option to enable this inspection for interfaces which are not annotated with @FunctionalInterface. This inspection only reports if the language level of the project or module is 8 or higher.",
"markdown": "Reports anonymous classes which can be replaced with method references.\n\n\nNote that if an anonymous class is converted into an unbound method reference, the same method reference object\ncan be reused by the Java runtime during subsequent invocations. On the other hand, when an anonymous class is used,\nseparate objects are created every time. Thus, applying the quick-fix can cause the semantics change in rare cases,\ne.g. when anonymous class instances are used as `HashMap` keys.\n\n**Example:**\n\n\n Runnable r = new Runnable() {\n @Override\n public void run() {\n System.out.println();\n }\n };\n\nThe quick-fix changes this code to the compact form: `Runnable r = System.out::println;`.\n\nUse the **Report when interface is not annotated with @FunctionalInterface** option to enable this inspection for\ninterfaces which are not annotated with @FunctionalInterface.\n\nThis inspection only reports if the language level of the project or module is 8 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "Anonymous2MethodRef",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 8",
"index": 119,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PublicMethodNotExposedInInterface",
"shortDescription": {
"text": "'public' method not exposed in interface"
},
"fullDescription": {
"text": "Reports 'public' methods in classes which are not exposed in an interface. Exposing all 'public' methods via an interface is important for maintaining loose coupling, and may be necessary for certain component-based programming styles. Example: 'interface Person {\n String getName();\n}\n\nclass PersonImpl implements Person {\n private String name;\n\n // ok: method is exposed in interface\n @Override\n public String getName() {\n return name;\n }\n\n // warning: method is public\n // but not exposed in interface\n public void setName() {\n this.name = name;\n }\n}' Use the Ignore if annotated by list to specify special annotations. Methods annotated with one of these annotations will be ignored by this inspection. Use the Ignore if the containing class does not implement a non-library interface option to ignore methods from classes which do not implement any interface from the project.",
"markdown": "Reports `public` methods in classes which are not exposed in an interface.\n\nExposing all `public` methods via an interface is important for\nmaintaining loose coupling, and may be necessary for certain component-based programming styles.\n\nExample:\n\n\n interface Person {\n String getName();\n }\n\n class PersonImpl implements Person {\n private String name;\n\n // ok: method is exposed in interface\n @Override\n public String getName() {\n return name;\n }\n\n // warning: method is public\n // but not exposed in interface\n public void setName() {\n this.name = name;\n }\n }\n\n\nUse the **Ignore if annotated by** list to specify special annotations. Methods annotated with one of\nthese annotations will be ignored by this inspection.\n\n\nUse the **Ignore if the containing class does not implement a non-library interface** option to ignore methods from classes which do not\nimplement any interface from the project."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PublicMethodNotExposedInInterface",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Abstraction issues",
"index": 83,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SerializableHasSerialVersionUIDField",
"shortDescription": {
"text": "Serializable class without 'serialVersionUID'"
},
"fullDescription": {
"text": "Reports classes that implement 'Serializable' and do not declare a 'serialVersionUID' field. Without a 'serialVersionUID' field, any change to the class will make previously serialized versions unreadable. Example: 'class Main implements Serializable {\n }' After the quick-fix is applied: 'class Main implements Serializable {\n private static final long serialVersionUID = -1446398935944895849L;\n }' When using a language level of JDK 14 or higher, the quickfix will also add the 'java.io.Serial' annotation. Use the following options to configure the inspection: List classes whose inheritors should not be reported by this inspection. This is meant for classes that inherit 'Serializable' from a superclass but are not intended for serialization. Whether to ignore 'Serializable' anonymous classes.",
"markdown": "Reports classes that implement `Serializable` and do not declare a `serialVersionUID` field.\n\n\nWithout a `serialVersionUID` field, any change to the class will make previously serialized versions unreadable.\n\n**Example:**\n\n\n class Main implements Serializable {\n }\n\nAfter the quick-fix is applied:\n\n\n class Main implements Serializable {\n private static final long serialVersionUID = -1446398935944895849L;\n }\n\nWhen using a language level of JDK 14 or higher, the quickfix will also add the `java.io.Serial` annotation.\n\nUse the following options to configure the inspection:\n\n* List classes whose inheritors should not be reported by this inspection. This is meant for classes that inherit `Serializable` from a superclass but are not intended for serialization.\n* Whether to ignore `Serializable` anonymous classes."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "serial",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JVM languages",
"index": 47,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MismatchedArrayReadWrite",
"shortDescription": {
"text": "Mismatched read and write of array"
},
"fullDescription": {
"text": "Reports arrays whose contents are read but not updated, or updated but not read. Such inconsistent reads and writes are pointless and probably indicate dead, incomplete or erroneous code. Example: 'final int[] bar = new int[3];\n bar[2] = 3;'",
"markdown": "Reports arrays whose contents are read but not updated, or updated but not read. Such inconsistent reads and writes are pointless and probably indicate dead, incomplete or erroneous code.\n\n**Example:**\n\n\n final int[] bar = new int[3];\n bar[2] = 3;\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "MismatchedReadAndWriteOfArray",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CollectionsMustHaveInitialCapacity",
"shortDescription": {
"text": "Collection without initial capacity"
},
"fullDescription": {
"text": "Reports attempts to instantiate a new 'Collection' object without specifying an initial capacity. If no initial capacity is specified, a default capacity is used, which will rarely be optimal. Failing to specify initial capacities for collections may result in performance issues if space needs to be reallocated and memory copied when the initial capacity is exceeded. This inspection checks allocations of classes listed in the inspection's settings. Example: 'new HashMap<String, String>();' Use the following options to configure the inspection: List collection classes that should be checked. Whether to ignore field initializers.",
"markdown": "Reports attempts to instantiate a new `Collection` object without specifying an initial capacity.\n\n\nIf no initial capacity is specified, a default capacity is used, which will rarely be optimal. Failing\nto specify initial capacities for collections may result in performance issues if space needs to be reallocated and\nmemory copied when the initial capacity is exceeded.\nThis inspection checks allocations of classes listed in the inspection's settings.\n\n**Example:**\n\n\n new HashMap<String, String>();\n\nUse the following options to configure the inspection:\n\n* List collection classes that should be checked.\n* Whether to ignore field initializers."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CollectionWithoutInitialCapacity",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassOnlyUsedInOneModule",
"shortDescription": {
"text": "Class only used from one other module"
},
"fullDescription": {
"text": "Reports classes that: do not depend on any other class in their module depend on classes from a different module are a dependency only for classes from this other module Such classes could be moved into the module on which they depend. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor.",
"markdown": "Reports classes that:\n\n* do not depend on any other class in their module\n* depend on classes from a different module\n* are a dependency only for classes from this other module\n\nSuch classes could be moved into the module on which they depend.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ClassOnlyUsedInOneModule",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Modularization issues",
"index": 121,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConditionSignal",
"shortDescription": {
"text": "Call to 'signal()' instead of 'signalAll()'"
},
"fullDescription": {
"text": "Reports calls to 'java.util.concurrent.locks.Condition.signal()'. While occasionally useful, in almost all cases 'signalAll()' is a better and safer choice.",
"markdown": "Reports calls to `java.util.concurrent.locks.Condition.signal()`. While occasionally useful, in almost all cases `signalAll()` is a better and safer choice."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CallToSignalInsteadOfSignalAll",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PublicMethodWithoutLogging",
"shortDescription": {
"text": "'public' method without logging"
},
"fullDescription": {
"text": "Reports any public methods that do not contain a logging statement. This inspection does not report simple getters and setters. For example: 'public class Crucial {\n private static final Logger LOG = LoggerFactory.getLogger(Crucial.class);\n public void doImportantStuff() {\n // warning on this method\n }\n\n public void doOtherStuff() {\n LOG.info(\"do other stuff\");\n }\n }' Use the table below to specify Logger class names. Public methods that do not use instance methods of the specified classes will be reported by this inspection.",
"markdown": "Reports any public methods that do not contain a logging statement. This inspection does not report simple getters and setters.\n\nFor example:\n\n\n public class Crucial {\n private static finalLogger LOG = LoggerFactory.getLogger(Crucial.class);\n public void doImportantStuff() {\n // warning on this method\n }\n\n public void doOtherStuff() {\n LOG.info(\"do other stuff\");\n }\n }\n\n\nUse the table below to specify Logger class names.\nPublic methods that do not use instance methods of the specified classes will be reported by this inspection."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PublicMethodWithoutLogging",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Logging",
"index": 79,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassNestingDepth",
"shortDescription": {
"text": "Inner class too deeply nested"
},
"fullDescription": {
"text": "Reports classes whose number of nested inner classes exceeds the specified maximum. Nesting inner classes inside other inner classes is confusing and indicates that a refactoring may be necessary. Use the Nesting limit field to specify the maximum allowed nesting depth for a class.",
"markdown": "Reports classes whose number of nested inner classes exceeds the specified maximum.\n\nNesting inner classes inside other inner classes is confusing and indicates that a refactoring may be necessary.\n\nUse the **Nesting limit** field to specify the maximum allowed nesting depth for a class."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "InnerClassTooDeeplyNested",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class metrics",
"index": 125,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryUnaryMinus",
"shortDescription": {
"text": "Unnecessary unary minus"
},
"fullDescription": {
"text": "Reports unnecessary unary minuses. Such expressions might be hard to understand and might contain errors. For example: 'void unaryMinus(int i) {\n int x = - -i;\n }' The following quick fixes are suggested here: Remove '-' operators before the 'i' variable: 'void unaryMinus(int i) {\n int x = i;\n }' Replace '-' operators with the prefix decrement operator: 'void unaryMinus(int i) {\n int x = --i;\n }' Another example: 'void unaryMinus(int i) {\n i += - 8;\n }' After the quick-fix is applied: 'void unaryMinus(int i) {\n i -= 8;\n }'",
"markdown": "Reports unnecessary unary minuses. Such expressions might be hard to understand and might contain errors.\n\n**For example:**\n\n void unaryMinus(int i) {\n int x = - -i;\n }\n\nThe following quick fixes are suggested here:\n\n* Remove `-` operators before the `i` variable:\n\n void unaryMinus(int i) {\n int x = i;\n }\n\n* Replace `-` operators with the prefix decrement operator:\n\n void unaryMinus(int i) {\n int x = --i;\n }\n\n**Another example:**\n\n void unaryMinus(int i) {\n i += - 8;\n }\n\nAfter the quick-fix is applied:\n\n void unaryMinus(int i) {\n i -= 8;\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryUnaryMinus",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues",
"index": 49,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MethodMayBeStatic",
"shortDescription": {
"text": "Method can be made 'static'"
},
"fullDescription": {
"text": "Reports methods that can safely be made 'static'. Making methods static when possible can reduce memory consumption and improve your code quality. A method can be 'static' if: it is not 'synchronized', 'native' or 'abstract', does not reference any of non-static methods and non-static fields from the containing class, is not an override and is not overridden in a subclass. Use the following options to configure the inspection: Whether to report only 'private' and 'final' methods, which increases the performance of this inspection. Whether to ignore empty methods. Whether to ignore default methods in interface when using Java 8 or higher. Whether to let the quick-fix replace instance qualifiers with class references in calls to methods which are made 'static', that is, call 'myClass.m()' would be replaced with 'MyClass.m()'.",
"markdown": "Reports methods that can safely be made `static`. Making methods static when possible can reduce memory consumption and improve your code quality.\n\nA method can be `static` if:\n\n* it is not `synchronized`, `native` or `abstract`,\n* does not reference any of non-static methods and non-static fields from the containing class,\n* is not an override and is not overridden in a subclass.\n\nUse the following options to configure the inspection:\n\n* Whether to report only `private` and `final` methods, which increases the performance of this inspection.\n* Whether to ignore empty methods.\n* Whether to ignore default methods in interface when using Java 8 or higher.\n* Whether to let the quick-fix replace instance qualifiers with class references in calls to methods which are made `static`, that is, call `myClass.m()` would be replaced with `MyClass.m()`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MethodMayBeStatic",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JUnitMixedFramework",
"shortDescription": {
"text": "JUnit API usage from multiple versions in a single TestCase"
},
"fullDescription": {
"text": "Reports JUnit annotated methods when used in a test case from a different JUnit version. To determine the framework version for a test case the inspection checks the framework version of the super class when available. When a super class is not available it will use the most used framework in the test case. Example (JUnit 4 annotation in JUnit 3 test case): 'public class MyTest extends TestCase {\n @Test\n public void foo() { }\n\n @Test\n @Ignore\n public void testBar() { }\n }' After the quick-fix is applied: 'public class MyTest extends TestCase {\n public void testFoo() {}\n\n public void _testBar() {}\n }' Example (JUnit 5 annotation in JUnit 4 test case): 'public class MyTest {\n @BeforeAll // JUnit 5 lifecycle method\n public void initialize() { }\n\n @org.junit.Test // JUnit 4 test annotation\n public void test() {}\n\n @org.junit.Test // JUnit 4 test annotation\n public void testWouldBeExecuted() {}\n }' After the quick-fix is applied: 'public class MyTest {\n @BeforeClass // JUnit 4 lifecycle method\n public void initialize() { }\n\n @org.junit.Test // JUnit 4 test annotation\n public void test() {}\n\n @org.junit.Test // JUnit 4 test annotation\n public void testWouldBeExecuted() {}\n }'",
"markdown": "Reports JUnit annotated methods when used in a test case from a different JUnit version. To determine the framework version for a test case the inspection checks the framework version of the super class when available. When a super class is not available it will use the most used framework in the test case.\n\nExample (JUnit 4 annotation in JUnit 3 test case):\n\n\n public class MyTest extends TestCase {\n @Test\n public void foo() { }\n\n @Test\n @Ignore\n public void testBar() { }\n }\n\nAfter the quick-fix is applied:\n\n\n public class MyTest extends TestCase {\n public void testFoo() {}\n\n public void _testBar() {}\n }\n\nExample (JUnit 5 annotation in JUnit 4 test case):\n\n\n public class MyTest {\n @BeforeAll // JUnit 5 lifecycle method\n public void initialize() { }\n\n @org.junit.Test // JUnit 4 test annotation\n public void test() {}\n\n @org.junit.Test // JUnit 4 test annotation\n public void testWouldBeExecuted() {}\n }\n\nAfter the quick-fix is applied:\n\n\n public class MyTest {\n @BeforeClass // JUnit 4 lifecycle method\n public void initialize() { }\n\n @org.junit.Test // JUnit 4 test annotation\n public void test() {}\n\n @org.junit.Test // JUnit 4 test annotation\n public void testWouldBeExecuted() {}\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "JUnitMixedFramework",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JVM languages/Test frameworks",
"index": 128,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TestMethodWithoutAssertion",
"shortDescription": {
"text": "Test method without assertions"
},
"fullDescription": {
"text": "Reports test methods that do not contain any assertions. Such methods may indicate either incomplete or weak test cases. Example: 'public class ExtensiveTest {\n\n @Test\n public void testAlive() {\n System.out.println(\"nothing\");\n }\n }' Configure the inspection: Use the table to specify the combinations of fully qualified class name and method name regular expression that should qualify as assertions. Class names also match subclasses. Use the 'assert' keyword is considered an assertion option to specify if the Java 'assert' statements using the 'assert' keyword should be considered an assertion. Use the Ignore test methods which declare exceptions option to ignore the test methods that declare exceptions. This can be useful when you have tests that will throw an exception on failure and thus don't need any assertions.",
"markdown": "Reports test methods that do not contain any assertions. Such methods may indicate either incomplete or weak test cases.\n\n**Example:**\n\n\n public class ExtensiveTest {\n\n @Test\n public void testAlive() {\n System.out.println(\"nothing\");\n }\n }\n\n\nConfigure the inspection:\n\n* Use the table to specify the combinations of fully qualified class name and method name regular expression that should qualify as assertions. Class names also match subclasses.\n* Use the **'assert' keyword is considered an assertion** option to specify if the Java `assert` statements using the `assert` keyword should be considered an assertion.\n* Use the **Ignore test methods which declare exceptions** option to ignore the test methods that declare exceptions. This can be useful when you have tests that will throw an exception on failure and thus don't need any assertions."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "TestMethodWithoutAssertion",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JVM languages/Test frameworks",
"index": 128,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ContinueStatement",
"shortDescription": {
"text": "'continue' statement"
},
"fullDescription": {
"text": "Reports 'continue' statements. 'continue' statements complicate refactoring and can be confusing. Example: 'void foo(List<String> strs) {\n for (String str : strs) {\n if (str.contains(\"skip\")) continue;\n handleStr(str);\n }\n }'",
"markdown": "Reports `continue` statements.\n\n`continue` statements complicate refactoring and can be confusing.\n\nExample:\n\n\n void foo(List<String> strs) {\n for (String str : strs) {\n if (str.contains(\"skip\")) continue;\n handleStr(str);\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ContinueStatement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConstantAssertCondition",
"shortDescription": {
"text": "Constant condition in 'assert' statement"
},
"fullDescription": {
"text": "Reports 'assert' statement conditions that are constants. 'assert' statements with constant conditions will either always fail or always succeed. Such statements might be left over after a refactoring and are probably not intended. Example: 'void foo() {\n assert true;\n }'",
"markdown": "Reports `assert` statement conditions that are constants. `assert` statements with constant conditions will either always fail or always succeed. Such statements might be left over after a refactoring and are probably not intended.\n\n**Example:**\n\n\n void foo() {\n assert true;\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ConstantAssertCondition",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaReflectionInvocation",
"shortDescription": {
"text": "Reflective invocation arguments mismatch"
},
"fullDescription": {
"text": "Reports cases in which the arguments provided to 'Method.invoke()' and 'Constructor.newInstance()' do not match the signature specified in 'Class.getMethod()' and 'Class.getConstructor()'. Example: 'Method m = myObj.getClass().getMethod(\"myMethod\", int.class);\n // the argument should be an int value\n m.invoke(myObj, \"abc\");' New in 2017.2",
"markdown": "Reports cases in which the arguments provided to `Method.invoke()` and `Constructor.newInstance()` do not match the signature specified in `Class.getMethod()` and `Class.getConstructor()`.\n\nExample:\n\n\n Method m = myObj.getClass().getMethod(\"myMethod\", int.class);\n // the argument should be an **int** value\n m.invoke(myObj, \"abc\");\n\nNew in 2017.2"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "JavaReflectionInvocation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Reflective access",
"index": 130,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CaughtExceptionImmediatelyRethrown",
"shortDescription": {
"text": "Caught exception is immediately rethrown"
},
"fullDescription": {
"text": "Reports 'catch' blocks that immediately rethrow the caught exception without performing any action on it. Such 'catch' blocks are unnecessary and have no error handling. Example: 'try {\n new FileInputStream(\"\");\n } catch (FileNotFoundException e) {\n throw e;\n }'",
"markdown": "Reports `catch` blocks that immediately rethrow the caught exception without performing any action on it. Such `catch` blocks are unnecessary and have no error handling.\n\n**Example:**\n\n\n try {\n new FileInputStream(\"\");\n } catch (FileNotFoundException e) {\n throw e;\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "CaughtExceptionImmediatelyRethrown",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Error handling",
"index": 9,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "WaitNotInLoop",
"shortDescription": {
"text": "'wait()' not called in loop"
},
"fullDescription": {
"text": "Reports calls to 'wait()' that are not made inside a loop. 'wait()' is normally used to suspend a thread until some condition becomes true. As the thread could have been waken up for a different reason, the condition should be checked after the 'wait()' call returns. A loop is a simple way to achieve this. Example: 'class BoundedCounter {\n private int count;\n synchronized void inc() throws InterruptedException {\n if (count >= 10) wait();\n ++count;\n }\n }' Good code should look like this: 'class BoundedCounter {\n private int count;\n synchronized void inc() throws InterruptedException {\n while (count >= 10) wait();\n ++count;\n }\n }'",
"markdown": "Reports calls to `wait()` that are not made inside a loop.\n\n\n`wait()` is normally used to suspend a thread until some condition becomes true.\nAs the thread could have been waken up for a different reason,\nthe condition should be checked after the `wait()` call returns.\nA loop is a simple way to achieve this.\n\n**Example:**\n\n\n class BoundedCounter {\n private int count;\n synchronized void inc() throws InterruptedException {\n if (count >= 10) wait();\n ++count;\n }\n }\n\nGood code should look like this:\n\n\n class BoundedCounter {\n private int count;\n synchronized void inc() throws InterruptedException {\n while (count >= 10) wait();\n ++count;\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "WaitNotInLoop",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SafeLock",
"shortDescription": {
"text": "Lock acquired but not safely unlocked"
},
"fullDescription": {
"text": "Reports 'java.util.concurrent.locks.Lock' resources that are not acquired in front of a 'try' block or not unlocked in the corresponding 'finally' block. Such resources may be inadvertently leaked if an exception is thrown before the resource is closed. Example: 'lock.lock(); // will be reported since the 'finally' block is missing\n try {\n doSmthWithLock();\n } catch (IOException e) {\n throw new UncheckedIOException(e);\n }\n lock.unlock();'",
"markdown": "Reports `java.util.concurrent.locks.Lock` resources that are not acquired in front of a `try` block or not unlocked in the corresponding `finally` block. Such resources may be inadvertently leaked if an exception is thrown before the resource is closed.\n\n**Example:**\n\n\n lock.lock(); // will be reported since the 'finally' block is missing\n try {\n doSmthWithLock();\n } catch (IOException e) {\n throw new UncheckedIOException(e);\n }\n lock.unlock();\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LockAcquiredButNotSafelyReleased",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReturnThis",
"shortDescription": {
"text": "Return of 'this'"
},
"fullDescription": {
"text": "Reports methods returning 'this'. While such a return is valid, it is rarely necessary, and usually indicates that the method is intended to be used as part of a chain of similar method calls (for example, 'buffer.append(\"foo\").append(\"bar\").append(\"baz\")'). Such chains are frowned upon by many coding standards. Example: 'public Builder append(String str) {\n // [...]\n return this;\n }'",
"markdown": "Reports methods returning `this`.\n\n\nWhile such a return is valid, it is rarely necessary, and usually indicates that the method is intended to be used\nas part of a chain of similar method calls (for example, `buffer.append(\"foo\").append(\"bar\").append(\"baz\")`).\nSuch chains are frowned upon by many coding standards.\n\n**Example:**\n\n\n public Builder append(String str) {\n // [...]\n return this;\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ReturnOfThis",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NakedNotify",
"shortDescription": {
"text": "'notify()' or 'notifyAll()' without corresponding state change"
},
"fullDescription": {
"text": "Reports 'Object.notify()' or 'Object.notifyAll()' being called without any detectable state change occurring. Normally, 'Object.notify()' and 'Object.notifyAll()' are used to inform other threads that a state change has occurred. That state change should occur in a synchronized context that contains the 'Object.notify()' or 'Object.notifyAll()' call, and prior to the call. While not having such a state change isn't necessarily incorrect, it is certainly worth examining. Example: 'synchronized (this) {\n notify();\n }\n // no state change\n synchronized (this) {\n notify(); // this notify might be redundant\n }'",
"markdown": "Reports `Object.notify()` or `Object.notifyAll()` being called without any detectable state change occurring.\n\n\nNormally, `Object.notify()` and `Object.notifyAll()` are used to inform other threads that a state change has\noccurred. That state change should occur in a synchronized context that contains the `Object.notify()` or\n`Object.notifyAll()` call, and prior to the call. While not having such a state change isn't necessarily incorrect, it is\ncertainly worth examining.\n\n**Example:**\n\n\n synchronized (this) {\n notify();\n }\n // no state change\n synchronized (this) {\n notify(); // this notify might be redundant\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NakedNotify",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonFinalClone",
"shortDescription": {
"text": "Non-final 'clone()' in secure context"
},
"fullDescription": {
"text": "Reports 'clone()' methods without the 'final' modifier. Since 'clone()' can be used to instantiate objects without using a constructor, allowing the 'clone()' method to be overridden may result in corrupted objects, and even in security exploits. This may be prevented by making the 'clone()' method or the enclosing class itself 'final'. Example: 'class Main implements Cloneable {\n @Override\n protected Object clone() throws CloneNotSupportedException {\n return super.clone();\n }\n }'",
"markdown": "Reports `clone()` methods without the `final` modifier.\n\n\nSince `clone()` can be used to instantiate objects without using a constructor, allowing the `clone()`\nmethod to be overridden may result in corrupted objects, and even in security exploits. This may be prevented by making the\n`clone()` method or the enclosing class itself `final`.\n\n**Example:**\n\n\n class Main implements Cloneable {\n @Override\n protected Object clone() throws CloneNotSupportedException {\n return super.clone();\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonFinalClone",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Security",
"index": 32,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LossyConversionCompoundAssignment",
"shortDescription": {
"text": "Possibly lossy implicit cast in compound assignment"
},
"fullDescription": {
"text": "Reports compound assignments if the type of the right-hand operand is not assignment compatible with the type of the variable. During such compound assignments, an implicit cast occurs, potentially resulting in lossy conversions. Example: 'long c = 1;\n c += 1.2;' After the quick-fix is applied: 'long c = 1;\n c += (long) 1.2;' New in 2023.2",
"markdown": "Reports compound assignments if the type of the right-hand operand is not assignment compatible with the type of the variable.\n\n\nDuring such compound assignments, an implicit cast occurs, potentially resulting in lossy conversions.\n\nExample:\n\n\n long c = 1;\n c += 1.2;\n\nAfter the quick-fix is applied:\n\n\n long c = 1;\n c += (long) 1.2;\n\nNew in 2023.2"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "lossy-conversions",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues",
"index": 49,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StaticNonFinalField",
"shortDescription": {
"text": "'static', non-'final' field"
},
"fullDescription": {
"text": "Reports non-'final' 'static' fields. A quick-fix is available to add the 'final' modifier to a non-'final' 'static' field. This inspection doesn't check fields' mutability. For example, adding the 'final' modifier to a field that has a value being set somewhere will cause a compilation error. Use the Only report 'public' fields option so that the inspection reported only 'public' fields.",
"markdown": "Reports non-`final` `static` fields.\n\nA quick-fix is available to add the `final` modifier to a non-`final` `static` field.\n\nThis inspection doesn't check fields' mutability. For example, adding the `final` modifier to a field that has a value\nbeing set somewhere will cause a compilation error.\n\n\nUse the **Only report 'public' fields** option so that the inspection reported only `public` fields."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "StaticNonFinalField",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EmptyMethod",
"shortDescription": {
"text": "Empty method"
},
"fullDescription": {
"text": "Reports empty methods that can be removed. Methods are considered empty if they are empty themselves and if they are overridden or implemented by empty methods only. Note that methods containing only comments and the 'super()' call with own parameters are also considered empty. The inspection ignores methods with special annotations, for example, the 'javax.ejb.Init' and 'javax.ejb.Remove' EJB annotations . The quick-fix safely removes unnecessary methods. Configure the inspection: Use the Comments and javadoc count as content option to select whether methods with comments should be treated as non-empty. Use the Additional special annotations option to configure additional annotations that should be ignored by this inspection.",
"markdown": "Reports empty methods that can be removed.\n\nMethods are considered empty if they are empty themselves and if they are overridden or\nimplemented by empty methods only. Note that methods containing only comments and the `super()` call with own parameters are\nalso considered empty.\n\nThe inspection ignores methods with special annotations, for example, the `javax.ejb.Init` and `javax.ejb.Remove` EJB annotations .\n\nThe quick-fix safely removes unnecessary methods.\n\nConfigure the inspection:\n\n* Use the **Comments and javadoc count as content** option to select whether methods with comments should be treated as non-empty.\n* Use the **Additional special annotations** option to configure additional annotations that should be ignored by this inspection."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EmptyMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Declaration redundancy",
"index": 10,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SimplifiableEqualsExpression",
"shortDescription": {
"text": "Unnecessary 'null' check before 'equals()' call"
},
"fullDescription": {
"text": "Reports comparisons to 'null' that are followed by a call to 'equals()' with a constant argument. Example: 'if (s != null && s.equals(\"literal\")) {}' After the quick-fix is applied: 'if (\"literal\".equals(s)) {}' Use the inspection settings to report 'equals()' calls with a non-constant argument when the argument to 'equals()' is proven not to be 'null'.",
"markdown": "Reports comparisons to `null` that are followed by a call to `equals()` with a constant argument.\n\n**Example:**\n\n\n if (s != null && s.equals(\"literal\")) {}\n\nAfter the quick-fix is applied:\n\n\n if (\"literal\".equals(s)) {}\n\n\nUse the inspection settings to report `equals()` calls with a non-constant argument\nwhen the argument to `equals()` is proven not to be `null`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SimplifiableEqualsExpression",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MultipleVariablesInDeclaration",
"shortDescription": {
"text": "Multiple variables in one declaration"
},
"fullDescription": {
"text": "Reports multiple variables that are declared in a single declaration and suggest creating a separate declaration for each variable. Some coding standards prohibit such declarations. Example: 'int x = 1, y = 2;' After the quick-fix is applied: 'int x = 1;\n int y = 2;' Configure the inspection: Use the Ignore 'for' loop declarations option to ignore multiple variables declared in the initialization of a 'for' loop statement, for example: 'for (int i = 0, max = list.size(); i > max; i++) {}' Use the Only warn on different array dimensions in a single declaration option to only warn when variables with different array dimensions are declared in a single declaration, for example: 'String s = \"\", array[];' New in 2019.2",
"markdown": "Reports multiple variables that are declared in a single declaration and suggest creating a separate declaration for each variable.\n\nSome coding standards prohibit such declarations.\n\nExample:\n\n\n int x = 1, y = 2;\n\nAfter the quick-fix is applied:\n\n\n int x = 1;\n int y = 2;\n\nConfigure the inspection:\n\n* Use the **Ignore 'for' loop declarations** option to ignore multiple variables declared in the initialization of a 'for' loop statement, for example:\n\n\n for (int i = 0, max = list.size(); i > max; i++) {}\n\n* Use the **Only warn on different array dimensions in a single declaration** option to only warn when variables with different array dimensions are declared in a single declaration, for example:\n\n\n String s = \"\", array[];\n\nNew in 2019.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "MultipleVariablesInDeclaration",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CallToSimpleGetterInClass",
"shortDescription": {
"text": "Call to simple getter from within class"
},
"fullDescription": {
"text": "Reports calls to a simple property getter from within the property's class. A simple property getter is defined as one which simply returns the value of a field, and does no other calculations. Such simple getter calls can be safely inlined using the quick-fix. Some coding standards also suggest against the use of simple getters for code clarity reasons. Example: 'public class Salient {\n private String name;\n\n public String getName() {\n return name;\n }\n\n @Override\n public String toString() {\n return getName();\n }\n }' After the quick-fix is applied: 'public class Salient {\n private String name;\n\n public String getName() {\n return name;\n }\n\n @Override\n public String toString() {\n return name;\n }\n }' Use the following options to configure the inspection: Whether to only report getter calls on 'this', not on objects of the same type passed in as a parameter. Whether to ignore non-'private' getters.",
"markdown": "Reports calls to a simple property getter from within the property's class.\n\n\nA simple property getter is defined as one which simply returns the value of a field,\nand does no other calculations. Such simple getter calls can be safely inlined using the quick-fix.\nSome coding standards also suggest against the use of simple getters for code clarity reasons.\n\n**Example:**\n\n\n public class Salient {\n private String name;\n\n public String getName() {\n return name;\n }\n\n @Override\n public String toString() {\n return getName();\n }\n }\n\nAfter the quick-fix is applied:\n\n\n public class Salient {\n private String name;\n\n public String getName() {\n return name;\n }\n\n @Override\n public String toString() {\n return name;\n }\n }\n\nUse the following options to configure the inspection:\n\n* Whether to only report getter calls on `this`, not on objects of the same type passed in as a parameter.\n* Whether to ignore non-`private` getters."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CallToSimpleGetterFromWithinClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonSerializableFieldInSerializableClass",
"shortDescription": {
"text": "Non-serializable field in a 'Serializable' class"
},
"fullDescription": {
"text": "Reports non-serializable fields in classes that implement 'java.io.Serializable'. Such fields will result in runtime exceptions if the object is serialized. Fields declared 'transient' or 'static' are not reported, nor are fields of classes that have a 'writeObject' method defined. This inspection assumes fields of the types 'java.util.Collection' and 'java.util.Map' to be 'Serializable', unless the types they are declared in are non-'Serializable'. Example: 'class NonSerializableClass {}\n\n public class SerializableClass implements Serializable {\n NonSerializableClass clazz; // warning: Non-serializable field 'clazz' in a Serializable class\n static NonSerializableClass staticClazz; // no warnings\n }'\n Use the following options to configure the inspection: List classes whose inheritors should not be reported by this inspection. This is meant for classes that inherit 'Serializable' from a superclass but are not intended for serialization. List annotations that will make the inspection ignore the annotated fields. Whether to ignore fields initialized with an anonymous class.",
"markdown": "Reports non-serializable fields in classes that implement `java.io.Serializable`. Such fields will result in runtime exceptions if the object is serialized.\n\n\nFields declared\n`transient` or `static`\nare not reported, nor are fields of classes that have a `writeObject` method defined.\n\n\nThis inspection assumes fields of the types\n`java.util.Collection` and\n`java.util.Map` to be\n`Serializable`, unless the types\nthey are declared in are non-`Serializable`.\n\n**Example:**\n\n\n class NonSerializableClass {}\n\n public class SerializableClass implements Serializable {\n NonSerializableClass clazz; // warning: Non-serializable field 'clazz' in a Serializable class\n static NonSerializableClass staticClazz; // no warnings\n }\n \n\nUse the following options to configure the inspection:\n\n* List classes whose inheritors should not be reported by this inspection. This is meant for classes that inherit `Serializable` from a superclass but are not intended for serialization.\n* List annotations that will make the inspection ignore the annotated fields.\n* Whether to ignore fields initialized with an anonymous class."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonSerializableFieldInSerializableClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Serialization issues",
"index": 54,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DoubleLiteralMayBeFloatLiteral",
"shortDescription": {
"text": "Cast to 'float' can be 'float' literal"
},
"fullDescription": {
"text": "Reports 'double' literal expressions that are immediately cast to 'float'. Such literal expressions can be replaced with equivalent 'float' literals. Example: 'float f = (float)1.1;' After the quick-fix is applied: 'float f = 1.1f;'",
"markdown": "Reports `double` literal expressions that are immediately cast to `float`.\n\nSuch literal expressions can be replaced with equivalent `float` literals.\n\n**Example:**\n\n float f = (float)1.1;\n\nAfter the quick-fix is applied:\n\n float f = 1.1f;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DoubleLiteralMayBeFloatLiteral",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues/Cast",
"index": 138,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OverlyLongLambda",
"shortDescription": {
"text": "Overly long lambda expression"
},
"fullDescription": {
"text": "Reports lambda expressions whose number of statements exceeds the specified maximum. Lambda expressions that are too long may be confusing, and it is often better to extract the statements into a separate method. The following statements are not counted: empty statements (semicolons) block statements 'for' loop initialization statements, that is, 'int i = ...' within a 'for(int i = ...;...)' statement 'for' loop update statements, that is, 'i += 2' within a 'for(int i = ...;...; i += 2)' statement Use the Non-comment source statements limit field to specify the maximum allowed number of statements in a lambda expression.",
"markdown": "Reports lambda expressions whose number of statements exceeds the specified maximum.\n\nLambda expressions that are too long may be confusing, and it is often better to extract the statements into a separate method.\n\n\nThe following statements are not counted:\n\n* empty statements (semicolons)\n* block statements\n* `for` loop initialization statements, that is, `int i = ...` within a `for(int i = ...;...)` statement\n* `for` loop update statements, that is, `i += 2` within a `for(int i = ...;...; i += 2)` statement\n\nUse the **Non-comment source statements limit** field to specify the maximum allowed number of statements in a lambda expression."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OverlyLongLambda",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Method metrics",
"index": 139,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ParametersPerMethod",
"shortDescription": {
"text": "Method with too many parameters"
},
"fullDescription": {
"text": "Reports methods whose number of parameters exceeds the specified maximum. Methods with too many parameters can be a good sign that a refactoring is necessary. Methods that have super methods are not reported. Use the Parameter limit field to specify the maximum allowed number of parameters for a method.",
"markdown": "Reports methods whose number of parameters exceeds the specified maximum. Methods with too many parameters can be a good sign that a refactoring is necessary.\n\nMethods that have super methods are not reported.\n\nUse the **Parameter limit** field to specify the maximum allowed number of parameters for a method."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MethodWithTooManyParameters",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Method metrics",
"index": 139,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CloneDeclaresCloneNotSupported",
"shortDescription": {
"text": "'clone()' does not declare 'CloneNotSupportedException'"
},
"fullDescription": {
"text": "Reports 'clone()' methods that do not declare 'throws CloneNotSupportedException'. If 'throws CloneNotSupportedException' is not declared, the method's subclasses will not be able to prohibit cloning in the standard way. This inspection does not report 'clone()' methods declared 'final' and 'clone()' methods on 'final' classes. Configure the inspection: Use the Only warn on 'protected' clone methods option to indicate that this inspection should only warn on 'protected clone()' methods. The Effective Java book (second and third edition) recommends omitting the 'CloneNotSupportedException' declaration on 'public' methods, because the methods that do not throw checked exceptions are easier to use. Example: 'public class Example implements Cloneable {\n // method doesn't declare 'throws CloneNotSupportedException'\n protected Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n return null;\n }\n }\n }'",
"markdown": "Reports `clone()` methods that do not declare `throws CloneNotSupportedException`.\n\nIf `throws CloneNotSupportedException` is not declared, the method's subclasses will not be able to prohibit cloning\nin the standard way. This inspection does not report `clone()` methods declared `final`\nand `clone()` methods on `final` classes.\n\nConfigure the inspection:\n\nUse the **Only warn on 'protected' clone methods** option to indicate that this inspection should only warn on `protected clone()` methods.\nThe *Effective Java* book (second and third edition) recommends omitting the `CloneNotSupportedException`\ndeclaration on `public` methods, because the methods that do not throw checked exceptions are easier to use.\n\nExample:\n\n\n public class Example implements Cloneable {\n // method doesn't declare 'throws CloneNotSupportedException'\n protected Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n return null;\n }\n }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "CloneDoesntDeclareCloneNotSupportedException",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Cloning issues",
"index": 140,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BooleanExpressionMayBeConditional",
"shortDescription": {
"text": "Boolean expression could be replaced with conditional expression"
},
"fullDescription": {
"text": "Reports any 'boolean' expressions which can be formulated in a more compact and, arguably, clear way than by using a conditional expression. Use the quick-fix to replace the 'boolean' expression by a conditional expression. Example: 'a && b || !a && c;' After the quick-fix is applied: 'a ? b : c;'",
"markdown": "Reports any `boolean` expressions which can be formulated in a more compact and, arguably, clear way than by using a conditional expression.\n\nUse the quick-fix to replace the `boolean` expression by a conditional expression.\n\n**Example:**\n\n\n a && b || !a && c;\n\nAfter the quick-fix is applied:\n\n\n a ? b : c;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "BooleanExpressionMayBeConditional",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryExplicitNumericCast",
"shortDescription": {
"text": "Unnecessary explicit numeric cast"
},
"fullDescription": {
"text": "Reports primitive numeric casts that would be inserted implicitly by the compiler. Also, reports any primitive numeric casts that the compiler will remove. Example: 'int x = (short)5; // The cast will be removed by the javac tool' After the quick-fix is applied: 'int x = 5;'",
"markdown": "Reports primitive numeric casts that would be inserted implicitly by the compiler. Also, reports any primitive numeric casts that the compiler will remove.\n\n**Example:**\n\n int x = (short)5; // The cast will be removed by the javac tool\n\nAfter the quick-fix is applied:\n`int x = 5;`"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryExplicitNumericCast",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues/Cast",
"index": 138,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PropertyValueSetToItself",
"shortDescription": {
"text": "Property value set to itself"
},
"fullDescription": {
"text": "Reports calls of setter methods with the same object getter as a value. Usually, this code does nothing and probably was not intended. For example: 'bean.setPayerId(bean.getPayerId());'",
"markdown": "Reports calls of setter methods with the same object getter as a value. Usually, this code does nothing and probably was not intended.\n\n**For example:**\n\n bean.setPayerId(bean.getPayerId());\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PropertyValueSetToItself",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/JavaBeans issues",
"index": 142,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassInitializer",
"shortDescription": {
"text": "Non-'static' initializer"
},
"fullDescription": {
"text": "Reports non-'static' initializers in classes. Some coding standards prohibit instance initializers and recommend using constructors or field initializers for initialization. Also, deleting the 'static' keyword may accidentally create non-'static' initializers and result in obscure bugs. This inspection doesn't report instance initializers in anonymous classes. Use the Only warn when the class has one or more constructors option to ignore instance initializers in classes that don't have any constructors.",
"markdown": "Reports non-`static` initializers in classes.\n\nSome coding standards prohibit instance initializers and recommend using constructors or field initializers for initialization.\nAlso, deleting the `static` keyword may accidentally create non-`static` initializers and result in obscure bugs.\n\nThis inspection doesn't report instance initializers in anonymous classes.\n\n\nUse the **Only warn when the class has one or more constructors** option to ignore instance initializers in classes that don't have any constructors."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonStaticInitializer",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LoopWithImplicitTerminationCondition",
"shortDescription": {
"text": "Loop with implicit termination condition"
},
"fullDescription": {
"text": "Reports any 'while', 'do-while', and 'for' loops that have the 'true' constant as their only condition. At the same time, such loops can be still terminated by a containing 'if' statement which can break out of the loop. Such an 'if' statement must be the first or the only statement in a 'while' or 'for' loop and the last or the only statement in a 'do-while' loop. Removing the 'if' statement and making its condition an explicit loop condition simplifies the loop.",
"markdown": "Reports any `while`, `do-while`, and `for` loops that have the `true` constant as their only condition. At the same time, such loops can be still terminated by a containing `if` statement which can break out of the loop.\n\nSuch an `if` statement must be the first or the only statement\nin a `while` or `for`\nloop and the last or the only statement in a `do-while` loop.\n\nRemoving the `if` statement and making its condition an explicit\nloop condition simplifies the loop."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LoopWithImplicitTerminationCondition",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceAssignmentWithOperatorAssignment",
"shortDescription": {
"text": "Assignment can be replaced with operator assignment"
},
"fullDescription": {
"text": "Reports assignment operations which can be replaced by operator-assignment. Code using operator assignment is shorter and may be clearer. Example: 'x = x + 3;\n x = x / 3;' After the quick fix is applied: 'x += 3;\n x /= 3;' Use the Ignore conditional operators option to ignore '&&' and '||'. Replacing conditional operators with operator assignment would change the evaluation from lazy to eager, which may change the semantics of the expression. Use the Ignore obscure operators option to ignore '^' and '%', which are less known.",
"markdown": "Reports assignment operations which can be replaced by operator-assignment.\n\nCode using operator assignment is shorter and may be clearer.\n\n**Example:**\n\n x = x + 3;\n x = x / 3;\n\nAfter the quick fix is applied:\n\n x += 3;\n x /= 3;\n\n\nUse the **Ignore conditional operators** option to ignore `&&`\nand `||`. Replacing conditional operators with operator\nassignment would change the evaluation from lazy to eager, which may change the semantics of the expression.\n\n\nUse the **Ignore obscure operators** option to ignore `^` and `%`, which are less known."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "AssignmentReplaceableWithOperatorAssignment",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Assignment issues",
"index": 98,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReturnFromFinallyBlock",
"shortDescription": {
"text": "'return' inside 'finally' block"
},
"fullDescription": {
"text": "Reports 'return' statements inside of 'finally' blocks. While occasionally intended, such 'return' statements may mask thrown exceptions and complicate debugging. Example: 'try {\n foo();\n } finally {\n if (bar()) return;\n }'",
"markdown": "Reports `return` statements inside of `finally` blocks.\n\nWhile occasionally intended, such `return` statements may mask thrown exceptions\nand complicate debugging.\n\n**Example:**\n\n\n try {\n foo();\n } finally {\n if (bar()) return;\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ReturnInsideFinallyBlock",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Error handling",
"index": 9,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantExplicitClose",
"shortDescription": {
"text": "Redundant 'close()'"
},
"fullDescription": {
"text": "Reports unnecessary calls to 'close()' at the end of a try-with-resources block and suggests removing them. Example: 'try(MyAutoCloseable ac = new MyAutoCloseable()) {\n foo();\n ac.close();\n }' After the quick-fix is applied: 'try(MyAutoCloseable ac = new MyAutoCloseable()) {\n foo();\n }' New in 2018.1",
"markdown": "Reports unnecessary calls to `close()` at the end of a try-with-resources block and suggests removing them.\n\n**Example**:\n\n\n try(MyAutoCloseable ac = new MyAutoCloseable()) {\n foo();\n ac.close();\n }\n\nAfter the quick-fix is applied:\n\n\n try(MyAutoCloseable ac = new MyAutoCloseable()) {\n foo();\n }\n\nNew in 2018.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantExplicitClose",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Declaration redundancy",
"index": 10,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessarySemicolon",
"shortDescription": {
"text": "Unnecessary semicolon"
},
"fullDescription": {
"text": "Reports any unnecessary semicolons, including semicolons that are used between class members, inside block statements, or after class definitions. Even though these semicolons are valid in Java, they are redundant and may be removed. Example: 'class C {\n ;\n void m() throws Exception {\n try (AutoCloseable r1 = createAutoCloseable();) {\n ;\n }\n }\n ;\n }' After the quick-fix is applied: 'class C {\n void m() throws Exception {\n try (AutoCloseable r1 = createAutoCloseable()) {\n }\n }\n }'",
"markdown": "Reports any unnecessary semicolons, including semicolons that are used between class members, inside block statements, or after class definitions.\n\nEven though these semicolons are valid in Java, they are redundant and may be removed.\n\nExample:\n\n\n class C {\n ;\n void m() throws Exception {\n try (AutoCloseable r1 = createAutoCloseable();) {\n ;\n }\n }\n ;\n }\n\nAfter the quick-fix is applied:\n\n\n class C {\n void m() throws Exception {\n try (AutoCloseable r1 = createAutoCloseable()) {\n }\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessarySemicolon",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavadocBlankLines",
"shortDescription": {
"text": "Blank line should be replaced with <p> to break lines"
},
"fullDescription": {
"text": "Reports blank lines in Javadoc comments. Blank lines in Javadoc may signal an intention split the text to different paragraphs. However, the Javadoc tool and IntelliJ IDEA will ignore them when rendering documentation comments. The quick-fix suggests to replace the blank line with a paragraph tag (<p>). Example: 'class Main {\n /**\n * Doesn't do anything.\n *\n * Does absolutely nothing\n */\n void foo() {}\n }' After the quick-fix is applied: 'class Main {\n /**\n * Doesn't do anything.\n * <p>\n * Does absolutely nothing\n */\n void foo() {}\n }' New in 2022.1",
"markdown": "Reports blank lines in Javadoc comments.\n\n\nBlank lines in Javadoc may signal an intention split the text to different paragraphs. However, the Javadoc tool and IntelliJ IDEA will\nignore them when rendering documentation comments.\n\n\nThe quick-fix suggests to replace the blank line with a paragraph tag (\\<p\\>).\n\n**Example:**\n\n\n class Main {\n /**\n * Doesn't do anything.\n *\n * Does absolutely nothing\n */\n void foo() {}\n }\n\nAfter the quick-fix is applied:\n\n\n class Main {\n /**\n * Doesn't do anything.\n * <p>\n * Does absolutely nothing\n */\n void foo() {}\n }\n\nNew in 2022.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JavadocBlankLines",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Javadoc",
"index": 95,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TrivialIf",
"shortDescription": {
"text": "Redundant 'if' statement"
},
"fullDescription": {
"text": "Reports 'if' statements that can be simplified to a single assignment, 'return', or 'assert' statement. Example: 'if (foo()) {\n return true;\n } else {\n return false;\n }' After the quick-fix is applied: 'return foo();' Configure the inspection: Use the Ignore chained 'if' statements option if you want to hide a warning for chained 'if' statements. For example, in the following code the warning will be hidden, but the quick-fix will still be available: 'if (condition1) return true;\n if (condition2) return false;\n return true;' Note that replacing 'if (isTrue()) assert false;' with 'assert isTrue();' may change the program semantics when asserts are disabled if condition has side effects. Use the Ignore 'if' statements with trivial 'assert' option if you want to hide a warning for 'if' statements containing only 'assert' statement in their bodies.",
"markdown": "Reports `if` statements that can be simplified to a single assignment, `return`, or `assert` statement.\n\nExample:\n\n\n if (foo()) {\n return true;\n } else {\n return false;\n }\n\nAfter the quick-fix is applied:\n\n\n return foo();\n\nConfigure the inspection:\n\nUse the **Ignore chained 'if' statements** option if you want to hide a warning for chained `if` statements.\n\nFor example, in the following code the warning will be hidden, but the quick-fix will still be available:\n\n\n if (condition1) return true;\n if (condition2) return false;\n return true;\n\nNote that replacing `if (isTrue()) assert false;` with `assert isTrue();` may change the program semantics\nwhen asserts are disabled if condition has side effects.\nUse the **Ignore 'if' statements with trivial 'assert'** option if you want to hide a warning for `if` statements\ncontaining only `assert` statement in their bodies."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantIfStatement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AutoCloseableResource",
"shortDescription": {
"text": "AutoCloseable used without 'try'-with-resources"
},
"fullDescription": {
"text": "Reports 'AutoCloseable' instances which are not used in a try-with-resources statement, also known as Automatic Resource Management. This means that the \"open resource before/in 'try', close in 'finally'\" style that had been used before try-with-resources became available, is also reported. This inspection is meant to replace all opened but not safely closed inspections when developing in Java 7 and higher. Example: 'private static void foo() throws IOException {\n InputStream profile = Thread.currentThread().getContextClassLoader().getResourceAsStream(\"/someFile\");\n System.out.println(profile.read());\n }' Use the following options to configure the inspection: List subclasses of 'AutoCloseable' that do not need to be closed and should be ignored by this inspection. Note: The inspection will still report streams returned from the 'java.nio.file.Files' methods 'lines()', 'walk()', 'list()' and 'find()', even when 'java.util.stream.Stream' is listed to be ignored. These streams contain an associated I/O resource that needs to be closed. List methods returning 'AutoCloseable' that should be ignored when called. Whether to ignore an 'AutoCloseable' if it is the result of a method call. When this option is enabled, the results of factory methods will also be ignored. Whether the inspection should report if an 'AutoCloseable' instance is passed as a method call argument. If this option is enabled, the inspection assumes the resource is closed in the called method. Method calls inside a 'finally' block with 'close' in the name and an 'AutoCloseable' argument will not be ignored. Whether to ignore method references to constructors of resource classes. Whether to ignore methods that return a resource and whose name starts with 'get'. This can reduce false positives because most of the getters do not transfer the ownership of the resource, and their call sites are not responsible for closing the resource.",
"markdown": "Reports `AutoCloseable` instances which are not used in a try-with-resources statement, also known as *Automatic Resource Management* .\n\n\nThis means that the \"open resource before/in `try`, close in `finally`\" style that had been used before\ntry-with-resources became available, is also reported.\nThis inspection is meant to replace all *opened but not safely closed* inspections when developing in Java 7 and higher.\n\n**Example:**\n\n\n private static void foo() throws IOException {\n InputStream profile = Thread.currentThread().getContextClassLoader().getResourceAsStream(\"/someFile\");\n System.out.println(profile.read());\n }\n\n\nUse the following options to configure the inspection:\n\n* List subclasses of `AutoCloseable` that do not need to be closed and should be ignored by this inspection. \n **Note** : The inspection will still report streams returned from the `java.nio.file.Files` methods `lines()`, `walk()`, `list()` and `find()`, even when `java.util.stream.Stream` is listed to be ignored. These streams contain an associated I/O resource that needs to be closed.\n* List methods returning `AutoCloseable` that should be ignored when called.\n* Whether to ignore an `AutoCloseable` if it is the result of a method call. When this option is enabled, the results of factory methods will also be ignored.\n* Whether the inspection should report if an `AutoCloseable` instance is passed as a method call argument. If this option is enabled, the inspection assumes the resource is closed in the called method. Method calls inside a `finally` block with 'close' in the name and an `AutoCloseable` argument will not be ignored.\n* Whether to ignore method references to constructors of resource classes.\n* Whether to ignore methods that return a resource and whose name starts with 'get'. This can reduce false positives because most of the getters do not transfer the ownership of the resource, and their call sites are not responsible for closing the resource."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "resource",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Resource management",
"index": 155,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SingleStatementInBlock",
"shortDescription": {
"text": "Code block contains single statement"
},
"fullDescription": {
"text": "Reports control flow statements with a single statement in their code block and suggests removing the braces from the control flow statement body. Example: 'if (x > 0) {\n System.out.println(\"x is positive\");\n }' After the quick-fix is applied: 'if (x > 0) System.out.println(\"x is positive\");'",
"markdown": "Reports control flow statements with a single statement in their code block and suggests removing the braces from the control flow statement body.\n\nExample:\n\n\n if (x > 0) {\n System.out.println(\"x is positive\");\n }\n\nAfter the quick-fix is applied:\n\n\n if (x > 0) System.out.println(\"x is positive\");\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "SingleStatementInBlock",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RefusedBequest",
"shortDescription": {
"text": "Method does not call super method"
},
"fullDescription": {
"text": "Reports methods that override a super method without calling it. This is also known as a refused bequest. Such methods may represent a failure of abstraction and cause hard-to-trace bugs. The inspection doesn't report methods overridden from 'java.lang.Object', except for 'clone()'. The 'clone()' method should by convention call its super method, which will return an object of the correct type. Example 1: 'class A {\n @Override\n public Object clone() {\n // does not call 'super.clone()'\n return new A();\n }\n }' Example 2: 'interface I {\n default void foo() {}\n }\n\n class A implements I {\n // warning on method when\n // 'Ignore 'default' super methods' is disabled\n @Override\n public void foo(){}\n }' Configure the inspection: Use the Only report when super method is annotated by option to ignore super methods marked with the annotations from the provided list. You can manually add annotations to the list. Use the Ignore empty super methods option to ignore super methods that are either empty or only throw an exception. Use the Ignore 'default' super methods option to ignore 'default' super methods from interfaces.",
"markdown": "Reports methods that override a super method without calling it. This is also known as a *refused bequest* . Such methods may represent a failure of abstraction and cause hard-to-trace bugs.\n\n\nThe inspection doesn't report methods overridden from `java.lang.Object`, except for `clone()`.\nThe `clone()` method should by convention call its super method,\nwhich will return an object of the correct type.\n\n**Example 1:**\n\n\n class A {\n @Override\n public Object clone() {\n // does not call 'super.clone()'\n return new A();\n }\n }\n\n**Example 2:**\n\n\n interface I {\n default void foo() {}\n }\n\n class A implements I {\n // warning on method when\n // 'Ignore 'default' super methods' is disabled\n @Override\n public void foo(){}\n }\n\nConfigure the inspection:\n\n* Use the **Only report when super method is annotated by** option to ignore super methods marked with the annotations from the provided list. You can manually add annotations to the list.\n* Use the **Ignore empty super methods** option to ignore super methods that are either empty or only throw an exception.\n* Use the **Ignore 'default' super methods** option to ignore `default` super methods from interfaces."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "MethodDoesntCallSuperMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Inheritance issues",
"index": 159,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryReturn",
"shortDescription": {
"text": "Unnecessary 'return' statement"
},
"fullDescription": {
"text": "Reports 'return' statements at the end of constructors and methods returning 'void'. These statements are redundant and may be safely removed. This inspection does not report in JSP files. Example: 'void message() {\n System.out.println(\"Hello World\");\n return;\n }' After the quick-fix is applied: 'void message() {\n System.out.println(\"Hello World\");\n }' Use the Ignore in then branch of 'if' statement with 'else' branch option to ignore 'return' statements in the then branch of 'if' statements which also have an 'else' branch.",
"markdown": "Reports `return` statements at the end of constructors and methods returning `void`. These statements are redundant and may be safely removed.\n\nThis inspection does not report in JSP files.\n\nExample:\n\n\n void message() {\n System.out.println(\"Hello World\");\n return;\n }\n\nAfter the quick-fix is applied:\n\n\n void message() {\n System.out.println(\"Hello World\");\n }\n\n\nUse the **Ignore in then branch of 'if' statement with 'else' branch** option to ignore `return` statements in the then branch of `if` statements\nwhich also have an `else` branch."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryReturnStatement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonFinalGuard",
"shortDescription": {
"text": "Non-final '@GuardedBy' field"
},
"fullDescription": {
"text": "Reports '@GuardedBy' annotations in which the guarding field is not 'final'. Guarding on a non-final field may result in unexpected race conditions, as locks will be held on the value of the field (which may change), rather than the field itself. Example: 'private ReadWriteLock lock = new ReentrantReadWriteLock(); //not final guarding field\n private Object state;\n\n @GuardedBy(\"lock\")\n public void bar() {\n state = new Object();\n }' Supported '@GuardedBy' annotations are: 'net.jcip.annotations.GuardedBy' 'javax.annotation.concurrent.GuardedBy' 'org.apache.http.annotation.GuardedBy' 'com.android.annotations.concurrency.GuardedBy' 'androidx.annotation.GuardedBy' 'com.google.errorprone.annotations.concurrent.GuardedBy'",
"markdown": "Reports `@GuardedBy` annotations in which the guarding field is not `final`.\n\nGuarding on a non-final field may result in unexpected race conditions, as locks will\nbe held on the value of the field (which may change), rather than the field itself.\n\nExample:\n\n\n private ReadWriteLock lock = new ReentrantReadWriteLock(); //not final guarding field\n private Object state;\n\n @GuardedBy(\"lock\")\n public void bar() {\n state = new Object();\n }\n\nSupported `@GuardedBy` annotations are:\n\n* `net.jcip.annotations.GuardedBy`\n* `javax.annotation.concurrent.GuardedBy`\n* `org.apache.http.annotation.GuardedBy`\n* `com.android.annotations.concurrency.GuardedBy`\n* `androidx.annotation.GuardedBy`\n* `com.google.errorprone.annotations.concurrent.GuardedBy`"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonFinalGuard",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Concurrency annotation issues",
"index": 99,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessarySuperQualifier",
"shortDescription": {
"text": "Unnecessary 'super' qualifier"
},
"fullDescription": {
"text": "Reports unnecessary 'super' qualifiers in method calls and field references. A 'super' qualifier is unnecessary when the field or method of the superclass is not hidden/overridden in the calling class. Example: 'class Foo {\n void foo() {}\n }\n\n class Bar extends Foo {\n void bar() {\n super.foo();\n }\n }' After the quick-fix is applied: 'class Foo {\n void foo() {}\n }\n\n class Bar extends Foo {\n void bar() {\n foo();\n }\n }' Use the inspection settings to ignore qualifiers that help to distinguish superclass members access from the identically named members of the outer class. See also the following inspections: Java | Visibility | Access to inherited field looks like access to element from surrounding code Java | Visibility | Call to inherited method looks like call to local method",
"markdown": "Reports unnecessary `super` qualifiers in method calls and field references.\n\n\nA `super` qualifier is unnecessary\nwhen the field or method of the superclass is not hidden/overridden in the calling class.\n\n**Example:**\n\n\n class Foo {\n void foo() {}\n }\n\n class Bar extends Foo {\n void bar() {\n super.foo();\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class Foo {\n void foo() {}\n }\n\n class Bar extends Foo {\n void bar() {\n foo();\n }\n }\n\n\nUse the inspection settings to ignore qualifiers that help to distinguish superclass members access\nfrom the identically named members of the outer class.\n\n\nSee also the following inspections:\n\n* *Java \\| Visibility \\| Access to inherited field looks like access to element from surrounding code*\n* *Java \\| Visibility \\| Call to inherited method looks like call to local method*"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessarySuperQualifier",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UseOfPropertiesAsHashtable",
"shortDescription": {
"text": "Use of 'Properties' object as a 'Hashtable'"
},
"fullDescription": {
"text": "Reports calls to the following methods on 'java.util.Properties' objects: 'put()' 'putIfAbsent()' 'putAll()' 'get()' For historical reasons, 'java.util.Properties' inherits from 'java.util.Hashtable', but using these methods is discouraged to prevent pollution of properties with values of types other than 'String'. Calls to 'java.util.Properties.putAll()' won't get reported when both the key and the value parameters in the map are of the 'String' type. Such a call is safe and no better alternative exists. Example: 'Object f(Properties props) {\n props.put(\"hello\", \"world\");\n props.putIfAbsent(\"hello\", \"world\");\n props.putAll(new HashMap<>());\n return props.get(\"Hello\");\n }' After the quick-fix is applied: 'Object f(Properties props) {\n props.setProperty(\"hello\", \"world\");\n props.putIfAbsent(\"hello\", \"world\");\n props.putAll(new HashMap<>());\n return props.getProperty(\"hello\");\n }'",
"markdown": "Reports calls to the following methods on `java.util.Properties` objects:\n\n* `put()`\n* `putIfAbsent()`\n* `putAll()`\n* `get()`\n\n\nFor historical reasons, `java.util.Properties` inherits from `java.util.Hashtable`,\nbut using these methods is discouraged to prevent pollution of properties with values of types other than `String`.\n\n\nCalls to `java.util.Properties.putAll()` won't get reported when\nboth the key and the value parameters in the map are of the `String` type.\nSuch a call is safe and no better alternative exists.\n\n**Example:**\n\n\n Object f(Properties props) {\n props.put(\"hello\", \"world\");\n props.putIfAbsent(\"hello\", \"world\");\n props.putAll(new HashMap<>());\n return props.get(\"Hello\");\n }\n\nAfter the quick-fix is applied:\n\n\n Object f(Properties props) {\n props.setProperty(\"hello\", \"world\");\n props.putIfAbsent(\"hello\", \"world\");\n props.putAll(new HashMap<>());\n return props.getProperty(\"hello\");\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UseOfPropertiesAsHashtable",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "VariableTypeCanBeExplicit",
"shortDescription": {
"text": "Variable type can be explicit"
},
"fullDescription": {
"text": "Reports local variables of the 'var' type that can be replaced with an explicit type. Example: 'var str = \"Hello\";' After the quick-fix is applied: 'String str = \"Hello\";' 'var' keyword appeared in Java 10. This inspection can help to downgrade for backward compatibility with earlier Java versions.",
"markdown": "Reports local variables of the `var` type that can be replaced with an explicit type.\n\n**Example:**\n\n\n var str = \"Hello\";\n\nAfter the quick-fix is applied:\n\n\n String str = \"Hello\";\n\n\n`var` *keyword* appeared in Java 10.\nThis inspection can help to downgrade for backward compatibility with earlier Java versions."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "VariableTypeCanBeExplicit",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 10",
"index": 162,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java8ListSort",
"shortDescription": {
"text": "'Collections.sort()' can be replaced with 'List.sort()'"
},
"fullDescription": {
"text": "Reports calls of 'Collections.sort(list, comparator)' which can be replaced with 'list.sort(comparator)'. 'Collections.sort' is just a wrapper, so it is better to use an instance method directly. This inspection only reports if the language level of the project or module is 8 or higher.",
"markdown": "Reports calls of `Collections.sort(list, comparator)` which can be replaced with `list.sort(comparator)`.\n\n`Collections.sort` is just a wrapper, so it is better to use an instance method directly.\n\nThis inspection only reports if the language level of the project or module is 8 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "Java8ListSort",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 8",
"index": 119,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EqualsReplaceableByObjectsCall",
"shortDescription": {
"text": "'equals()' expression replaceable by 'Objects.equals()' expression"
},
"fullDescription": {
"text": "Reports expressions that can be replaced with a call to 'java.util.Objects#equals'. Example: 'void f(Object a, Object b) {\n boolean result = a != null && a.equals(b);\n }' After the quick-fix is applied: 'void f(Object a, Object b) {\n boolean result = Objects.equals(a, b);\n }' Replacing expressions like 'a != null && a.equals(b)' with 'Objects.equals(a, b)' slightly changes the semantics. Use the Highlight expressions like 'a != null && a.equals(b)' option to enable or disable this behavior. This inspection only reports if the language level of the project or module is 7 or higher.",
"markdown": "Reports expressions that can be replaced with a call to `java.util.Objects#equals`.\n\n**Example:**\n\n\n void f(Object a, Object b) {\n boolean result = a != null && a.equals(b);\n }\n\nAfter the quick-fix is applied:\n\n\n void f(Object a, Object b) {\n boolean result = Objects.equals(a, b);\n }\n\n\nReplacing expressions like `a != null && a.equals(b)` with `Objects.equals(a, b)`\nslightly changes the semantics. Use the **Highlight expressions like 'a != null \\&\\& a.equals(b)'** option to enable or disable this behavior.\n\nThis inspection only reports if the language level of the project or module is 7 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "EqualsReplaceableByObjectsCall",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 7",
"index": 163,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StringEqualsEmptyString",
"shortDescription": {
"text": "'String.equals()' can be replaced with 'String.isEmpty()'"
},
"fullDescription": {
"text": "Reports 'equals()' being called to compare a 'String' with an empty string. In this case, using '.isEmpty()' is better as it shows you exactly what you're checking. Example: 'void checkString(String s){\n if (\"\".equals(s)) throw new IllegalArgumentException();\n }' After the quick-fix is applied: 'void checkString(String s){\n if (s != null && s.isEmpty()) throw new IllegalArgumentException();\n }' '\"\".equals(str)' returns false when 'str' is null. For safety, this inspection's quick-fix inserts an explicit null-check when the 'equals()' argument is nullable. Use the option to make the inspection ignore such cases.",
"markdown": "Reports `equals()` being called to compare a `String` with an empty string. In this case, using `.isEmpty()` is better as it shows you exactly what you're checking.\n\n**Example:**\n\n\n void checkString(String s){\n if (\"\".equals(s)) throw new IllegalArgumentException();\n }\n\nAfter the quick-fix is applied:\n\n\n void checkString(String s){\n if (s != null && s.isEmpty()) throw new IllegalArgumentException();\n }\n\n\n`\"\".equals(str)` returns false when `str` is null. For safety, this inspection's quick-fix inserts an explicit\nnull-check when\nthe `equals()` argument is nullable. Use the option to make the inspection ignore such cases."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "StringEqualsEmptyString",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TooBroadThrows",
"shortDescription": {
"text": "Overly broad 'throws' clause"
},
"fullDescription": {
"text": "Reports 'throws' clauses with exceptions that are more generic than the exceptions that the method actually throws. Example: 'public void createFile() throws Exception { // warning: 'throws Exception' is too broad, masking exception 'IOException'\n File file = new File(\"pathToFile\");\n file.createNewFile();\n }' After the quick-fix is applied: 'public void createFile() throws IOException {\n File file = new File(\"pathToFile\");\n file.createNewFile();\n }' Configure the inspection: Use the Maximum number of hidden exceptions to warn field to ignore exceptions, that hide a larger number of other exceptions than specified. Use the Only warn on RuntimeException, Exception, Error or Throwable option to have this inspection warn only on the most generic exceptions. Use the Ignore exceptions declared on methods overriding a library method option to ignore overly broad 'throws' clauses in methods that override a library method. Use the Ignore exceptions which hide others but are themselves thrown option to ignore any exceptions that hide other exceptions but still may be thrown from the method body and thus are technically not overly broad.",
"markdown": "Reports `throws` clauses with exceptions that are more generic than the exceptions that the method actually throws.\n\n**Example:**\n\n\n public void createFile() throws Exception { // warning: 'throws Exception' is too broad, masking exception 'IOException'\n File file = new File(\"pathToFile\");\n file.createNewFile();\n }\n\nAfter the quick-fix is applied:\n\n\n public void createFile() throws IOException {\n File file = new File(\"pathToFile\");\n file.createNewFile();\n }\n\nConfigure the inspection:\n\n* Use the **Maximum number of hidden exceptions to warn** field to ignore exceptions, that hide a larger number of other exceptions than specified.\n* Use the **Only warn on RuntimeException, Exception, Error or Throwable** option to have this inspection warn only on the most generic exceptions.\n* Use the **Ignore exceptions declared on methods overriding a library method** option to ignore overly broad `throws` clauses in methods that override a library method.\n* Use the **Ignore exceptions which hide others but are themselves thrown** option to ignore any exceptions that hide other exceptions but still may be thrown from the method body and thus are technically not overly broad."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OverlyBroadThrowsClause",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Error handling",
"index": 9,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ImplicitSubclassInspection",
"shortDescription": {
"text": "Final declaration can't be overridden at runtime"
},
"fullDescription": {
"text": "Reports cases when your code prevents a class from being subclassed by some framework (for example, Spring or Hibernate) at runtime. Typical examples of necessary but impossible subclassing: 'final' classes marked with framework-specific annotations (for example, Spring '@Configuration') 'final', 'static' or 'private' methods marked with framework-specific annotations (for example, Spring '@Transactional') methods marked with framework-specific annotations inside 'final' classes The list of reported cases depends on the frameworks used.",
"markdown": "Reports cases when your code prevents a class from being subclassed by some framework (for example, Spring or Hibernate) at runtime.\n\nTypical examples of necessary but impossible subclassing:\n\n* `final` classes marked with framework-specific annotations (for example, Spring `@Configuration`)\n* `final`, `static` or `private` methods marked with framework-specific annotations (for example, Spring `@Transactional`)\n* methods marked with framework-specific annotations inside `final` classes\n\nThe list of reported cases depends on the frameworks used."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "ImplicitSubclassInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Java/Inheritance issues",
"index": 159,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SystemProperties",
"shortDescription": {
"text": "Access of system properties"
},
"fullDescription": {
"text": "Reports code that accesses system properties using one of the following methods: 'System.getProperties()', 'System.setProperty()', 'System.setProperties()', 'System.clearProperties()' 'Integer.getInteger()' 'Boolean.getBoolean()' While accessing the system properties is not a security risk in itself, it is often found in malicious code. Code that accesses system properties should be closely examined in any security audit.",
"markdown": "Reports code that accesses system properties using one of the following methods:\n\n* `System.getProperties()`, `System.setProperty()`, `System.setProperties()`, `System.clearProperties()`\n* `Integer.getInteger()`\n* `Boolean.getBoolean()`\n\n\nWhile accessing the system properties is not a security risk in itself, it is often found in malicious code.\nCode that accesses system properties should be closely examined in any security audit."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AccessOfSystemProperties",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Security",
"index": 32,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ToArrayCallWithZeroLengthArrayArgument",
"shortDescription": {
"text": "'Collection.toArray()' call style"
},
"fullDescription": {
"text": "Reports 'Collection.toArray()' calls that are not in the preferred style, and suggests applying the preferred style. There are two styles to convert a collection to an array: A pre-sized array, for example, 'c.toArray(new String[c.size()])' An empty array, for example, 'c.toArray(new String[0])' In older Java versions, using a pre-sized array was recommended, as the reflection call necessary to create an array of proper size was quite slow. However, since late updates of OpenJDK 6, this call was intrinsified, making the performance of the empty array version the same, and sometimes even better, compared to the pre-sized version. Also, passing a pre-sized array is dangerous for a concurrent or synchronized collection as a data race is possible between the 'size' and 'toArray' calls. This may result in extra 'null's at the end of the array if the collection was concurrently shrunk during the operation. Use the inspection options to select the preferred style.",
"markdown": "Reports `Collection.toArray()` calls that are not in the preferred style, and suggests applying the preferred style.\n\nThere are two styles to convert a collection to an array:\n\n* A pre-sized array, for example, `c.toArray(new String[c.size()])`\n* An empty array, for example, `c.toArray(new String[0])`\n\nIn older Java versions, using a pre-sized array was recommended, as the reflection\ncall necessary to create an array of proper size was quite slow.\n\nHowever, since late updates of OpenJDK 6, this call was intrinsified, making\nthe performance of the empty array version the same, and sometimes even better, compared\nto the pre-sized version. Also, passing a pre-sized array is dangerous for a concurrent or\nsynchronized collection as a data race is possible between the `size` and `toArray`\ncalls. This may result in extra `null`s at the end of the array if the collection was concurrently\nshrunk during the operation.\n\nUse the inspection options to select the preferred style."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ToArrayCallWithZeroLengthArrayArgument",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassWithoutLogger",
"shortDescription": {
"text": "Class without logger"
},
"fullDescription": {
"text": "Reports classes which do not have a declared logger. Ensuring that every class has a dedicated logger is an important step in providing a unified logging implementation for an application. Interfaces, enumerations, annotations, inner classes, and abstract classes are not reported by this inspection. For example: 'public class NoLoggerDeclared {\n\n int calculateNthDigitOfPi(int n) {\n // todo\n return 1;\n }\n }' Use the table in the Options section to specify logger class names. Classes which do not declare a field with the type of one of the specified classes will be reported by this inspection.",
"markdown": "Reports classes which do not have a declared logger.\n\nEnsuring that every class has a dedicated logger is an important step in providing a unified logging\nimplementation for an application. Interfaces, enumerations, annotations, inner classes, and abstract classes are not reported by this inspection.\n\nFor example:\n\n\n public class NoLoggerDeclared {\n\n int calculateNthDigitOfPi(int n) {\n // todo\n return 1;\n }\n }\n\n\nUse the table in the **Options** section to specify logger class names.\nClasses which do not declare a field with the type of one of the specified classes will be reported by this inspection."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ClassWithoutLogger",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Logging",
"index": 79,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReturnOfInnerClass",
"shortDescription": {
"text": "Return of instance of anonymous, local or inner class"
},
"fullDescription": {
"text": "Reports 'return' statements that return an instance of an anonymous, local, or inner class. Such instances keep an implicit reference to the outer instance, which can prevent the outer instance from being garbage-collected. Any caller of a method returning such an instance might cause a memory leak by holding on to the instance returned. Configure the inspection: Use the Ignore returns from non-public methods option to ignore returns from 'protected' or package-private methods. Returns from 'private' methods are always ignored.",
"markdown": "Reports `return` statements that return an instance of an anonymous, local, or inner class. Such instances keep an implicit reference to the outer instance, which can prevent the outer instance from being garbage-collected. Any caller of a method returning such an instance might cause a memory leak by holding on to the instance returned.\n\n\nConfigure the inspection:\n\n* Use the **Ignore returns from non-public methods** option to ignore returns from `protected` or package-private methods. Returns from `private` methods are always ignored."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ReturnOfInnerClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Memory",
"index": 166,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantExplicitVariableType",
"shortDescription": {
"text": "Local variable type can be omitted"
},
"fullDescription": {
"text": "Reports redundant local variable types. These types can be inferred from the context and thus replaced with 'var'. Example: 'void test(InputStream s) {\n try (InputStream in = s) {}\n }' After the fix is applied: 'void test(InputStream s) {\n try (var in = s) {}\n }'",
"markdown": "Reports redundant local variable types.\n\nThese types can be inferred from the context and thus replaced with `var`.\n\n**Example:**\n\n\n void test(InputStream s) {\n try (InputStream in = s) {}\n }\n\nAfter the fix is applied:\n\n\n void test(InputStream s) {\n try (var in = s) {}\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RedundantExplicitVariableType",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 10",
"index": 162,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ExcessiveLambdaUsage",
"shortDescription": {
"text": "Excessive lambda usage"
},
"fullDescription": {
"text": "Reports if a trivial lambda expression is used in cases in which there's an alternative method that behaves in the same way, but accepts a concrete value instead of a lambda. This inspection helps simplify the code. Example: 'Optional.orElseGet(() -> null)' After the quick-fix is applied: 'Optional.orElse(null)' New in 2017.1",
"markdown": "Reports if a trivial lambda expression is used in cases in which there's an alternative method that behaves in the same way, but accepts a concrete value instead of a lambda.\n\nThis inspection helps simplify the code.\n\nExample:\n\n\n Optional.orElseGet(() -> null)\n\nAfter the quick-fix is applied:\n\n\n Optional.orElse(null)\n\nNew in 2017.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ExcessiveLambdaUsage",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ParameterHidingMemberVariable",
"shortDescription": {
"text": "Parameter hides field"
},
"fullDescription": {
"text": "Reports method parameters named identically to a field of a surrounding class. As a result of such naming, you may accidentally use the parameter when using the identically named field is intended. A quick-fix is suggested to rename the parameter. Example: 'class Main {\n private String value;\n\n public Main(String value) {\n value = value.toUpperCase();\n }\n }' You can configure the following options for this inspection: Ignore for property setters - ignore parameters of simple setters. Ignore superclass fields not visible from subclass - ignore 'private' fields in a superclass, which are not visible from the method. Ignore for constructors - ignore parameters of constructors. Ignore for abstract methods - ignore parameters of abstract methods. Ignore for static method parameters hiding instance fields - ignore parameters of 'static' methods hiding an instance field and to ignore parameters of instance methods in static inner classes hiding an instance field of an outer class. While not strictly hiding, such parameters can still be confusing.",
"markdown": "Reports method parameters named identically to a field of a surrounding class. As a result of such naming, you may accidentally use the parameter when using the identically named field is intended.\n\nA quick-fix is suggested to rename the parameter.\n\n**Example:**\n\n\n class Main {\n private String value;\n\n public Main(String value) {\n value = value.toUpperCase();\n }\n }\n \n\nYou can configure the following options for this inspection:\n\n1. **Ignore for property setters** - ignore parameters of simple setters.\n2. **Ignore superclass fields not visible from subclass** - ignore `private` fields in a superclass, which are not visible from the method.\n3. **Ignore for constructors** - ignore parameters of constructors.\n4. **Ignore for abstract methods** - ignore parameters of abstract methods.\n5. **Ignore for static method parameters hiding instance fields** - ignore parameters of `static` methods hiding an instance field and to ignore parameters of instance methods in static inner classes hiding an instance field of an outer class. While not strictly hiding, such parameters can still be confusing."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ParameterHidesMemberVariable",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Visibility",
"index": 97,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ObjectEquality",
"shortDescription": {
"text": "Object comparison using '==', instead of 'equals()'"
},
"fullDescription": {
"text": "Reports code that uses '==' or '!=' rather than 'equals()' to test for object equality. Comparing objects using '==' or '!=' is often a bug, because it compares objects by identity instead of equality. Comparisons to 'null' are not reported. Array, 'String' and 'Number' comparisons are reported by separate inspections. Example: 'if (list1 == list2) {\n return;\n }' After the quick-fix is applied: 'if (Objects.equals(list1, list2)) {\n return;\n }' Use the inspection settings to configure exceptions for this inspection.",
"markdown": "Reports code that uses `==` or `!=` rather than `equals()` to test for object equality.\n\n\nComparing objects using `==` or `!=` is often a bug,\nbecause it compares objects by identity instead of equality.\nComparisons to `null` are not reported.\n\n\nArray, `String` and `Number` comparisons are reported by separate inspections.\n\n**Example:**\n\n if (list1 == list2) {\n return;\n }\n\nAfter the quick-fix is applied:\n\n if (Objects.equals(list1, list2)) {\n return;\n }\n\nUse the inspection settings to configure exceptions for this inspection."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ObjectEquality",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ManualArrayToCollectionCopy",
"shortDescription": {
"text": "Manual array to collection copy"
},
"fullDescription": {
"text": "Reports code that uses a loop to copy the contents of an array into a collection. A shorter and potentially faster (depending on the collection implementation) way to do this is using 'Collection.addAll(Arrays.asList())' or 'Collections.addAll()'. Only loops without additional statements inside are reported. Example: 'void addAll(List<String> list, String[] arr) {\n for (int i = 0; i < arr.length; i++) {\n String s = arr[i];\n list.add(s);\n }\n }' After the quick-fix is applied: 'void addAll(List<String> list, String[] arr) {\n Collections.addAll(list, arr);\n }'",
"markdown": "Reports code that uses a loop to copy the contents of an array into a collection.\n\n\nA shorter and potentially faster (depending on the collection implementation) way to do this is using `Collection.addAll(Arrays.asList())` or `Collections.addAll()`.\n\n\nOnly loops without additional statements inside are reported.\n\n**Example:**\n\n\n void addAll(List<String> list, String[] arr) {\n for (int i = 0; i < arr.length; i++) {\n String s = arr[i];\n list.add(s);\n }\n }\n\nAfter the quick-fix is applied:\n\n\n void addAll(List<String> list, String[] arr) {\n Collections.addAll(list, arr);\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ManualArrayToCollectionCopy",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SwitchLabeledRuleCanBeCodeBlock",
"shortDescription": {
"text": "Labeled switch rule can have code block"
},
"fullDescription": {
"text": "Reports rules of 'switch' expressions or enhanced 'switch' statements with an expression body. These can be converted to code blocks. Example: 'String message = switch (errorCode) {\n case 404 -> \"Not found!\";\n ...\n };' After the quick-fix is applied: 'String message = switch (errorCode) {\n case 404 -> {\n yield \"Not found!\";\n }\n ...\n };' The inspection only reports if the language level of the project or module is 14 or higher. New in 2019.1",
"markdown": "Reports rules of `switch` expressions or enhanced `switch` statements with an expression body. These can be converted to code blocks.\n\nExample:\n\n\n String message = switch (errorCode) {\n case 404 -> \"Not found!\";\n ...\n };\n\nAfter the quick-fix is applied:\n\n\n String message = switch (errorCode) {\n case 404 -> {\n yield \"Not found!\";\n }\n ...\n };\n\nThe inspection only reports if the language level of the project or module is 14 or higher.\n\nNew in 2019.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "SwitchLabeledRuleCanBeCodeBlock",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaReflectionMemberAccess",
"shortDescription": {
"text": "Reflective access to non-existent or not visible class member"
},
"fullDescription": {
"text": "Reports reflective access to fields and methods that don't exist or aren't visible. Example: 'Field stringHashField() throws NoSuchFieldException {\n return String.class.getField(\"hash\");\n }' After the quick-fix is applied: 'Field stringHashField() throws NoSuchFieldException {\n return String.class.getDeclaredField(\"hash\");\n }' With a 'final' class, it's clear if there is a field or method with the specified name in the class. With non-'final' classes, it's possible that a subclass has a field or method with that name, so there could be false positives. Use the inspection's settings to get rid of such false positives everywhere or with specific classes. New in 2017.2",
"markdown": "Reports reflective access to fields and methods that don't exist or aren't visible.\n\nExample:\n\n\n Field stringHashField() throws NoSuchFieldException {\n return String.class.getField(\"hash\");\n }\n\nAfter the quick-fix is applied:\n\n\n Field stringHashField() throws NoSuchFieldException {\n return String.class.getDeclaredField(\"hash\");\n }\n\n\nWith a `final` class, it's clear if there is a field or method with the specified name in the class.\n\n\nWith non-`final` classes, it's possible that a subclass has a field or method with that name, so there could be false positives.\nUse the inspection's settings to get rid of such false positives everywhere or with specific classes.\n\nNew in 2017.2"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "JavaReflectionMemberAccess",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Reflective access",
"index": 130,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ObviousNullCheck",
"shortDescription": {
"text": "Null-check method is called with obviously non-null argument"
},
"fullDescription": {
"text": "Reports if a null-checking method (for example, 'Objects.requireNonNull' or 'Assert.assertNotNull') is called on a value that is obviously non-null (for example, a newly created object). Such a check is redundant and may indicate a programming error. Example: 'final String greeting = Objects.requireNonNull(\"Hi!\");' After the quick-fix is applied: 'final String greeting = \"Hi!\";' New in 2017.2",
"markdown": "Reports if a null-checking method (for example, `Objects.requireNonNull` or `Assert.assertNotNull`) is called on a value that is obviously non-null (for example, a newly created object). Such a check is redundant and may indicate a programming error.\n\n**Example:**\n\n\n final String greeting = Objects.requireNonNull(\"Hi!\");\n\nAfter the quick-fix is applied:\n\n\n final String greeting = \"Hi!\";\n\nNew in 2017.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ObviousNullCheck",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SerialVersionUIDNotStaticFinal",
"shortDescription": {
"text": "'serialVersionUID' field not declared 'private static final long'"
},
"fullDescription": {
"text": "Reports 'Serializable' classes whose 'serialVersionUID' field is not declared 'private static final long'. Example: 'class SampleClass implements Serializable {\n private long serialVersionUID = 1; // field of a Serializable class is not declared 'private static final long'\n\n public SampleClass() {\n System.out.println(serialVersionUID);\n }\n }'",
"markdown": "Reports `Serializable` classes whose `serialVersionUID` field is not declared `private static final long`.\n\n**Example:**\n\n\n class SampleClass implements Serializable {\n private long serialVersionUID = 1; // field of a Serializable class is not declared 'private static final long'\n\n public SampleClass() {\n System.out.println(serialVersionUID);\n }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SerialVersionUIDWithWrongSignature",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Serialization issues",
"index": 54,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnusedLabel",
"shortDescription": {
"text": "Unused label"
},
"fullDescription": {
"text": "Reports labels that are not targets of any 'break' or 'continue' statements. Example: 'label: for (int i = 0; i < 10; i++) {\n if (i == 3) {\n break;\n }\n }' After the quick-fix is applied, the label is removed: 'for (int i = 0; i < 10; i++) {\n if (i == 3) {\n break;\n }\n }'",
"markdown": "Reports labels that are not targets of any `break` or `continue` statements.\n\n**Example:**\n\n\n label: for (int i = 0; i < 10; i++) {\n if (i == 3) {\n break;\n }\n }\n\nAfter the quick-fix is applied, the label is removed:\n\n\n for (int i = 0; i < 10; i++) {\n if (i == 3) {\n break;\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnusedLabel",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Declaration redundancy",
"index": 10,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ForCanBeForeach",
"shortDescription": {
"text": "'for' loop can be replaced with enhanced for loop"
},
"fullDescription": {
"text": "Reports 'for' loops that iterate over collections or arrays, and can be automatically replaced with an enhanced 'for' loop (foreach iteration syntax). Example: 'for (Iterator<String> iterator = list.iterator(); iterator.hasNext(); ) {\n String item = iterator.next();\n System.out.println(item);\n }' After the quick-fix is applied: 'for (String item : list) {\n System.out.println(item);\n }' Use the Report indexed 'java.util.List' loops option to find loops involving 'list.get(index)' calls. Generally, these loops can be replaced with enhanced 'for' loops, unless they modify an underlying list in the process, for example, by calling 'list.remove(index)'. If the latter is the case, the enhanced 'for' loop may throw 'ConcurrentModificationException'. Also, in some cases, 'list.get(index)' loops may work a little bit faster. Use the Do not report iterations over untyped collections option to ignore collections without type parameters. This prevents the creation of enhanced 'for' loop variables of the 'java.lang.Object' type and the insertion of casts where the loop variable is used. This inspection only reports if the language level of the project or module is 5 or higher.",
"markdown": "Reports `for` loops that iterate over collections or arrays, and can be automatically replaced with an enhanced `for` loop (foreach iteration syntax).\n\n**Example:**\n\n\n for (Iterator<String> iterator = list.iterator(); iterator.hasNext(); ) {\n String item = iterator.next();\n System.out.println(item);\n }\n\nAfter the quick-fix is applied:\n\n\n for (String item : list) {\n System.out.println(item);\n }\n\n\nUse the **Report indexed 'java.util.List' loops** option to find loops involving `list.get(index)` calls.\nGenerally, these loops can be replaced with enhanced `for` loops,\nunless they modify an underlying list in the process, for example, by calling `list.remove(index)`.\nIf the latter is the case, the enhanced `for` loop may throw `ConcurrentModificationException`.\nAlso, in some cases, `list.get(index)` loops may work a little bit faster.\n\n\nUse the **Do not report iterations over untyped collections** option to ignore collections without type parameters.\nThis prevents the creation of enhanced `for` loop variables of the `java.lang.Object` type and the insertion of casts\nwhere the loop variable is used.\n\nThis inspection only reports if the language level of the project or module is 5 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ForLoopReplaceableByForEach",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 5",
"index": 117,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InstantiationOfUtilityClass",
"shortDescription": {
"text": "Instantiation of utility class"
},
"fullDescription": {
"text": "Reports instantiation of utility classes using the 'new' keyword. In utility classes, all fields and methods are 'static'. Instantiation of such classes is most likely unnecessary and indicates a mistake. Example: 'class MyUtils {\n public static double cube(double x) {\n return x * x * x;\n }\n }\n class Main {\n public static void main(String[] args) {\n // Instantiation of utility class\n MyUtils utils = new MyUtils();\n }\n }' To prevent utility classes from being instantiated, it's recommended to use a 'private' constructor.",
"markdown": "Reports instantiation of utility classes using the `new` keyword.\n\n\nIn utility classes, all fields and methods are `static`.\nInstantiation of such classes is most likely unnecessary and indicates a mistake.\n\n**Example:**\n\n\n class MyUtils {\n public static double cube(double x) {\n return x * x * x;\n }\n }\n class Main {\n public static void main(String[] args) {\n // Instantiation of utility class\n MyUtils utils = new MyUtils();\n }\n }\n\n\nTo prevent utility classes from being instantiated,\nit's recommended to use a `private` constructor."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "InstantiationOfUtilityClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TrailingWhitespacesInTextBlock",
"shortDescription": {
"text": "Trailing whitespace in text block"
},
"fullDescription": {
"text": "Reports text blocks with trailing whitespace characters. Trailing whitespace is considered incidental and will be stripped away by the Java compiler. This inspection only reports if the language level of the project or module is 15 or higher. New in 2021.1",
"markdown": "Reports text blocks with trailing whitespace characters. Trailing whitespace is considered incidental and will be stripped away by the Java compiler.\n\nThis inspection only reports if the language level of the project or module is 15 or higher.\n\nNew in 2021.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "TrailingWhitespacesInTextBlock",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NewClassNamingConvention",
"shortDescription": {
"text": "Class naming convention"
},
"fullDescription": {
"text": "Reports classes whose names are too short, too long, or do not follow the specified regular expression pattern. Example: if the inspection is enabled for tests, and the specified length for the minimum class name is 8 (the default), the following test class produces a warning because the length of its name is 6, which is less than 8: 'public class MyTest{}'. A quick-fix that renames such classes is available only in the editor. Configure the inspection: Use the list in the Options section to specify which classes should be checked. Deselect the checkboxes for the classes for which you want to skip the check. For each class type, specify the minimum length, maximum length, and the regular expression expected for class names using the provided input fields. Specify 0 in the length fields to skip corresponding checks. Regular expressions should be specified in the standard 'java.util.regex' format.",
"markdown": "Reports classes whose names are too short, too long, or do not follow the specified regular expression pattern.\n\n**Example:** if the inspection is enabled for tests, and the specified length for the minimum class name is 8 (the default), the following test class\nproduces a warning because the length of its name is 6, which is less than 8: `public class MyTest{}`.\n\nA quick-fix that renames such classes is available only in the editor.\n\nConfigure the inspection:\n\n\nUse the list in the **Options** section to specify which classes should be checked. Deselect the checkboxes for the classes for which\nyou want to skip the check.\n\nFor each class type, specify the minimum length, maximum length, and the regular expression expected for class names using the\nprovided input fields. Specify **0** in the length fields to skip corresponding checks.\n\nRegular expressions should be specified in the standard `java.util.regex` format."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NewClassNamingConvention",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Naming conventions/Class",
"index": 172,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UseCompareMethod",
"shortDescription": {
"text": "'compare()' method can be used to compare numbers"
},
"fullDescription": {
"text": "Reports expressions that can be replaced by a call to the 'Integer.compare()' method or a similar method from the 'Long', 'Short', 'Byte', 'Double' or 'Float' classes, instead of more verbose or less efficient constructs. If 'x' and 'y' are boxed integers, then 'x.compareTo(y)' is suggested, if they are primitives 'Integer.compare(x, y)' is suggested. Example: 'public int compare(int x, int y) {\n return x > y ? 1 : x < y ? -1 : 0;\n }' After the quick-fix is applied: 'public int compare(int x, int y) {\n return Integer.compare(x, y);\n }' Note that 'Double.compare' and 'Float.compare' slightly change the code semantics. In particular, they make '-0.0' and '0.0' distinguishable ('Double.compare(-0.0, 0.0)' yields -1). Also, they consistently process 'NaN' value. In most of the cases, this semantics change actually improves the code. Use the checkbox to disable this inspection for floating point numbers if semantics change is unacceptable in your case. New in 2017.2",
"markdown": "Reports expressions that can be replaced by a call to the `Integer.compare()` method or a similar method from the `Long`, `Short`, `Byte`, `Double` or `Float` classes, instead of more verbose or less efficient constructs.\n\nIf `x` and `y` are boxed integers, then `x.compareTo(y)` is suggested,\nif they are primitives `Integer.compare(x, y)` is suggested.\n\n**Example:**\n\n\n public int compare(int x, int y) {\n return x > y ? 1 : x < y ? -1 : 0;\n }\n\nAfter the quick-fix is applied:\n\n\n public int compare(int x, int y) {\n return Integer.compare(x, y);\n }\n\n\nNote that `Double.compare` and `Float.compare` slightly change the code semantics. In particular,\nthey make `-0.0` and `0.0` distinguishable (`Double.compare(-0.0, 0.0)` yields -1).\nAlso, they consistently process `NaN` value. In most of the cases, this semantics change actually improves the\ncode. Use the checkbox to disable this inspection for floating point numbers if semantics change is unacceptable\nin your case.\n\nNew in 2017.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UseCompareMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids",
"index": 69,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StringConcatenationInFormatCall",
"shortDescription": {
"text": "String concatenation as argument to 'format()' call"
},
"fullDescription": {
"text": "Reports non-constant string concatenations used as a format string argument. While occasionally intended, this is usually a misuse of a formatting method and may even cause security issues if the variables used in the concatenated string contain special characters like '%'. Also, sometimes this could be the result of mistakenly concatenating a string format argument by typing a '+' when a ',' was meant. Example: 'static String formatGreeting(String userName) {\n return String.format(\"Hello, \" + userName);\n }' Here, the 'userName' will be interpreted as a part of format string, which may result in 'IllegalFormatException' (for example, if 'userName' is '\"%\"') or in using an enormous amount of memory (for example, if 'userName' is '\"%2000000000%\"'). The call should be probably replaced with 'String.format(\"Hello, %s\", userName);'. This inspection checks calls to formatting methods on 'java.util.Formatter', 'java.lang.String', 'java.io.PrintWriter', or 'java.io.PrintStream'.",
"markdown": "Reports non-constant string concatenations used as a format string argument.\n\n\nWhile occasionally intended, this is usually a misuse of a formatting method\nand may even cause security issues if the variables used in the concatenated string\ncontain special characters like `%`.\n\n\nAlso, sometimes this could be the result\nof mistakenly concatenating a string format argument by typing a `+` when a `,` was meant.\n\n**Example:**\n\n\n static String formatGreeting(String userName) {\n return String.format(\"Hello, \" + userName);\n }\n\n\nHere, the `userName` will be interpreted as a part of format string, which may result\nin `IllegalFormatException` (for example, if `userName` is `\"%\"`) or\nin using an enormous amount of memory (for example, if `userName` is `\"%2000000000%\"`).\nThe call should be probably replaced with `String.format(\"Hello, %s\", userName);`.\n\n\nThis inspection checks calls to formatting methods on\n`java.util.Formatter`,\n`java.lang.String`,\n`java.io.PrintWriter`,\nor `java.io.PrintStream`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "StringConcatenationInFormatCall",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "WaitWhileHoldingTwoLocks",
"shortDescription": {
"text": "'wait()' while holding two locks"
},
"fullDescription": {
"text": "Reports calls to 'wait()' methods that may occur while the current thread is holding two locks. Since calling 'wait()' only releases one lock on its target, waiting with two locks held can easily lead to a deadlock. Example: 'synchronized (lockA) {\n synchronized (lockB) {\n lockB.wait(); //warning\n //thread A is stuck here holding lockA\n }\n }\n\n synchronized (lockA) { //thread B can't enter the block and release thread A\n lockB.notify();\n }'",
"markdown": "Reports calls to `wait()` methods that may occur while the current thread is holding two locks.\n\n\nSince calling `wait()` only releases one lock on its target,\nwaiting with two locks held can easily lead to a deadlock.\n\n**Example:**\n\n\n synchronized (lockA) {\n synchronized (lockB) {\n lockB.wait(); //warning\n //thread A is stuck here holding lockA\n }\n }\n\n synchronized (lockA) { //thread B can't enter the block and release thread A\n lockB.notify();\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "WaitWhileHoldingTwoLocks",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SerializableInnerClassWithNonSerializableOuterClass",
"shortDescription": {
"text": "Serializable non-'static' inner class with non-Serializable outer class"
},
"fullDescription": {
"text": "Reports non-static inner classes that implement 'Serializable' and are declared inside a class that doesn't implement 'Serializable'. Such classes are unlikely to serialize correctly due to implicit references to the outer class. Example: 'class A {\n class Main implements Serializable {\n }\n }' Use the following options to configure the inspection: List classes whose inheritors should not be reported by this inspection. This is meant for classes that inherit 'Serializable' from a superclass but are not intended for serialization. Whether to ignore 'Serializable' anonymous classes.",
"markdown": "Reports non-static inner classes that implement `Serializable` and are declared inside a class that doesn't implement `Serializable`.\n\n\nSuch classes are unlikely to serialize correctly due to implicit references to the outer class.\n\n**Example:**\n\n\n class A {\n class Main implements Serializable {\n }\n }\n\nUse the following options to configure the inspection:\n\n* List classes whose inheritors should not be reported by this inspection. This is meant for classes that inherit `Serializable` from a superclass but are not intended for serialization.\n* Whether to ignore `Serializable` anonymous classes."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SerializableInnerClassWithNonSerializableOuterClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Serialization issues",
"index": 54,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NegativeIntConstantInLongContext",
"shortDescription": {
"text": "Negative int hexadecimal constant in long context"
},
"fullDescription": {
"text": "Reports negative int hexadecimal constants in long context. Such constants are implicitly widened to long, which means their higher bits will become 1 rather than 0 (e.g., 0xFFFF_FFFF will become 0xFFFF_FFFF_FFFF_FFFFL). Unlikely this is intended, and even if it is, using an explicit long constant would be less confusing. Example: '// Warning: this is int constant -1 which is widened to long\n // becoming 0xFFFF_FFFF_FFFF_FFFFL.\n long mask = 0xFFFF_FFFF;' New in 2022.3",
"markdown": "Reports negative int hexadecimal constants in long context. Such constants are implicitly widened to long, which means their higher bits will become 1 rather than 0 (e.g., 0xFFFF_FFFF will become 0xFFFF_FFFF_FFFF_FFFFL). Unlikely this is intended, and even if it is, using an explicit long constant would be less confusing.\n\n**Example:**\n\n\n // Warning: this is int constant -1 which is widened to long\n // becoming 0xFFFF_FFFF_FFFF_FFFFL.\n long mask = 0xFFFF_FFFF;\n\nNew in 2022.3"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "NegativeIntConstantInLongContext",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues",
"index": 49,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SynchronizeOnLock",
"shortDescription": {
"text": "Synchronization on a 'Lock' object"
},
"fullDescription": {
"text": "Reports 'synchronized' blocks that lock on an instance of 'java.util.concurrent.locks.Lock'. Such synchronization is almost certainly unintended, and appropriate versions of '.lock()' and '.unlock()' should be used instead. Example: 'final ReentrantLock lock = new ReentrantLock();\n\n public void foo() {\n synchronized (lock) {}\n }'",
"markdown": "Reports `synchronized` blocks that lock on an instance of `java.util.concurrent.locks.Lock`. Such synchronization is almost certainly unintended, and appropriate versions of `.lock()` and `.unlock()` should be used instead.\n\n**Example:**\n\n\n final ReentrantLock lock = new ReentrantLock();\n\n public void foo() {\n synchronized (lock) {}\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SynchroniziationOnLockObject",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BadExceptionCaught",
"shortDescription": {
"text": "Prohibited 'Exception' caught"
},
"fullDescription": {
"text": "Reports 'catch' clauses that catch an inappropriate exception. Some exceptions, for example 'java.lang.NullPointerException' or 'java.lang.IllegalMonitorStateException', represent programming errors and therefore almost certainly should not be caught in production code. Example: 'try {\n return component.getMousePosition(true) != null;\n } catch (NullPointerException e) { // warning: Prohibited exception 'NullPointerException' caught\n return false;\n }' Use the Prohibited exceptions list to specify which exceptions should be reported.",
"markdown": "Reports `catch` clauses that catch an inappropriate exception.\n\nSome exceptions, for example\n`java.lang.NullPointerException` or\n`java.lang.IllegalMonitorStateException`, represent programming errors\nand therefore almost certainly should not be caught in production code.\n\n**Example:**\n\n\n try {\n return component.getMousePosition(true) != null;\n } catch (NullPointerException e) { // warning: Prohibited exception 'NullPointerException' caught\n return false;\n }\n\nUse the **Prohibited exceptions** list to specify which exceptions should be reported."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ProhibitedExceptionCaught",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Error handling",
"index": 9,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InstanceofCatchParameter",
"shortDescription": {
"text": "'instanceof' on 'catch' parameter"
},
"fullDescription": {
"text": "Reports cases in which an 'instanceof' expression is used for testing the type of a parameter in a 'catch' block. Testing the type of 'catch' parameters is usually better done by having separate 'catch' blocks instead of using 'instanceof'. Example: 'void foo(Runnable runnable) {\n try {\n runnable.run();\n } catch (Throwable throwable) {\n if (throwable instanceof NoClassDefFoundError) { // warning: 'instanceof' on 'catch' parameter 'throwable'\n System.out.println(\"Class not found!\");\n }\n }\n }'",
"markdown": "Reports cases in which an `instanceof` expression is used for testing the type of a parameter in a `catch` block.\n\nTesting the type of `catch` parameters is usually better done by having separate\n`catch` blocks instead of using `instanceof`.\n\n**Example:**\n\n\n void foo(Runnable runnable) {\n try {\n runnable.run();\n } catch (Throwable throwable) {\n if (throwable instanceof NoClassDefFoundError) { // warning: 'instanceof' on 'catch' parameter 'throwable'\n System.out.println(\"Class not found!\");\n }\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "InstanceofCatchParameter",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Error handling",
"index": 9,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OptionalGetWithoutIsPresent",
"shortDescription": {
"text": "Optional.get() is called without isPresent() check"
},
"fullDescription": {
"text": "Reports calls to 'get()' on an 'Optional' without checking that it has a value. Calling 'Optional.get()' on an empty 'Optional' instance will throw an exception. Example: 'void x(List<Integer> list) {\n final Optional<Integer> optional =\n list.stream().filter(x -> x > 10).findFirst();\n final Integer result = optional.get(); // problem here\n }'",
"markdown": "Reports calls to `get()` on an `Optional` without checking that it has a value.\n\nCalling `Optional.get()` on an empty `Optional` instance will throw an exception.\n\n**Example:**\n\n\n void x(List<Integer> list) {\n final Optional<Integer> optional =\n list.stream().filter(x -> x > 10).findFirst();\n final Integer result = optional.get(); // problem here\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "OptionalGetWithoutIsPresent",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OnDemandImport",
"shortDescription": {
"text": "'*' import"
},
"fullDescription": {
"text": "Reports any 'import' statements that cover entire packages ('* imports'). Some coding standards prohibit such 'import' statements. You can configure IntelliJ IDEA to detect and fix such statements with its Optimize Imports command. Go to Settings | Editor | Code Style | Java | Imports, make sure that the Use single class import option is enabled, and specify values in the Class count to use import with '*' and Names count to use static import with '*' fields. Thus this inspection is mostly useful for offline reporting on code bases that you don't intend to change.",
"markdown": "Reports any `import` statements that cover entire packages ('\\* imports').\n\nSome coding standards prohibit such `import` statements.\n\n\nYou can configure IntelliJ IDEA to detect and fix such statements with its **Optimize Imports**\ncommand. Go to [Settings \\| Editor \\| Code Style \\| Java \\| Imports](settings://preferences.sourceCode.Java?Use%20single%20class%20import),\nmake sure that the **Use single class import** option is enabled, and specify values in the\n**Class count to use import with '\\*'** and **Names count to use static import with '\\*'** fields.\nThus this inspection is mostly useful for offline reporting on code bases that you don't\nintend to change."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OnDemandImport",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Imports",
"index": 43,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FallthruInSwitchStatement",
"shortDescription": {
"text": "Fallthrough in 'switch' statement"
},
"fullDescription": {
"text": "Reports 'fall-through' in a 'switch' statement. Fall-through occurs when a series of executable statements after a 'case' label is not guaranteed to transfer control before the next 'case' label. For example, this can happen if the branch is missing a 'break' statement. In that case, control falls through to the statements after that 'switch' label, even though the 'switch' expression is not equal to the value of the fallen-through label. While occasionally intended, this construction is confusing and is often the result of a typo. This inspection ignores any fall-through commented with a text matching the regex pattern '(?i)falls?\\s*thro?u'. There is a fix that adds a 'break' to the branch that can fall through to the next branch. Example: 'switch(x) {\n case (4):\n if (condition) {\n System.out.println(\"3\");\n // no break here\n } else {\n break;\n }\n case (6):\n System.out.println(\"4\");\n }' After the quick-fix is applied: 'switch(x) {\n case (4):\n if (condition) {\n System.out.println(\"3\");\n } else {\n break;\n }\n break;\n case (6):\n System.out.println(\"4\");\n }'",
"markdown": "Reports 'fall-through' in a `switch` statement.\n\nFall-through occurs when a series of executable statements after a `case` label is not guaranteed\nto transfer control before the next `case` label. For example, this can happen if the branch is missing a `break` statement.\nIn that case, control falls through to the statements after\nthat `switch` label, even though the `switch` expression is not equal to\nthe value of the fallen-through label. While occasionally intended, this construction is confusing and is often the result of a typo.\n\n\nThis inspection ignores any fall-through commented with a text matching the regex pattern `(?i)falls?\\s*thro?u`.\n\nThere is a fix that adds a `break` to the branch that can fall through to the next branch.\n\nExample:\n\n\n switch(x) {\n case (4):\n if (condition) {\n System.out.println(\"3\");\n // no break here\n } else {\n break;\n }\n case (6):\n System.out.println(\"4\");\n }\n\nAfter the quick-fix is applied:\n\n\n switch(x) {\n case (4):\n if (condition) {\n System.out.println(\"3\");\n } else {\n break;\n }\n break;\n case (6):\n System.out.println(\"4\");\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "fallthrough",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantOperationOnEmptyContainer",
"shortDescription": {
"text": "Redundant operation on empty container"
},
"fullDescription": {
"text": "Reports redundant operations on empty collections, maps or arrays. Iterating, removing elements, sorting, and some other operations on empty collections have no effect and can be removed. Also, they may be a signal of a bug. Example: 'if (numbers.isEmpty()){\n //error due to the missed negation\n int max = numbers.stream().max(Comparator.naturalOrder()).get();\n ...\n }' New in 2019.1",
"markdown": "Reports redundant operations on empty collections, maps or arrays.\n\n\nIterating, removing elements, sorting,\nand some other operations on empty collections have no effect and can be removed. Also, they may be a signal of a bug.\n\n**Example:**\n\n\n if (numbers.isEmpty()){\n //error due to the missed negation\n int max = numbers.stream().max(Comparator.naturalOrder()).get();\n ...\n }\n\nNew in 2019.1"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantOperationOnEmptyContainer",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OptionalIsPresent",
"shortDescription": {
"text": "Non functional style 'Optional.isPresent()' usage"
},
"fullDescription": {
"text": "Reports 'Optional' expressions used as 'if' or conditional expression conditions, that can be rewritten in a functional style. The result is often shorter and easier to read. Example: 'if (str.isPresent()) str.get().trim();' After the quick-fix is applied: 'str.ifPresent(String::trim);' This inspection only reports if the language level of the project or module is 8 or higher.",
"markdown": "Reports `Optional` expressions used as `if` or conditional expression conditions, that can be rewritten in a functional style. The result is often shorter and easier to read.\n\nExample:\n\n\n if (str.isPresent()) str.get().trim();\n\nAfter the quick-fix is applied:\n\n\n str.ifPresent(String::trim);\n\nThis inspection only reports if the language level of the project or module is 8 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OptionalIsPresent",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AtomicFieldUpdaterNotStaticFinal",
"shortDescription": {
"text": "'AtomicFieldUpdater' field not declared 'static final'"
},
"fullDescription": {
"text": "Reports fields of types: 'java.util.concurrent.atomic.AtomicLongFieldUpdater' 'java.util.concurrent.atomic.AtomicIntegerFieldUpdater' 'java.util.concurrent.atomic.AtomicReferenceFieldUpdater' that are not 'static final'. Because only one atomic field updater is needed for updating a 'volatile' field in all instances of a class, it can almost always be 'static'. Making the updater 'final' allows the JVM to optimize access for improved performance. Example: 'class Main {\n private volatile int id;\n private AtomicIntegerFieldUpdater<Main> idFieldUpdater = AtomicIntegerFieldUpdater.newUpdater(Main.class, \"id\");\n }' After the quick-fix is applied: 'class Main {\n private volatile int id;\n private static final AtomicIntegerFieldUpdater<Main> idFieldUpdater = AtomicIntegerFieldUpdater.newUpdater(Main.class, \"id\");\n }'",
"markdown": "Reports fields of types:\n\n* `java.util.concurrent.atomic.AtomicLongFieldUpdater`\n* `java.util.concurrent.atomic.AtomicIntegerFieldUpdater`\n* `java.util.concurrent.atomic.AtomicReferenceFieldUpdater`\n\nthat are not `static final`. Because only one atomic field updater is needed for updating a `volatile` field in all instances of a class, it can almost always be `static`.\n\nMaking the updater `final` allows the JVM to optimize access for improved performance.\n\n**Example:**\n\n\n class Main {\n private volatile int id;\n private AtomicIntegerFieldUpdater<Main> idFieldUpdater = AtomicIntegerFieldUpdater.newUpdater(Main.class, \"id\");\n }\n\nAfter the quick-fix is applied:\n\n\n class Main {\n private volatile int id;\n private static final AtomicIntegerFieldUpdater<Main> idFieldUpdater = AtomicIntegerFieldUpdater.newUpdater(Main.class, \"id\");\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "AtomicFieldUpdaterNotStaticFinal",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RecordStoreResource",
"shortDescription": {
"text": "'RecordStore' opened but not safely closed"
},
"fullDescription": {
"text": "Reports Java ME 'javax.microedition.rms.RecordStore' resources that are not opened in front of a 'try' block and closed in the corresponding 'finally' block. Such resources may be inadvertently leaked if an exception is thrown before the resource is closed. This inspection is intended for Java ME and other highly resource constrained environments. Applying the results of this inspection without consideration might have negative effects on code clarity and design. Example: 'void foo1() throws RecordStoreException {\n RecordStore rs = RecordStore.openRecordStore(\"bar\", true); // warning\n }\n void foo2() throws RecordStoreException {\n RecordStore rs = RecordStore.openRecordStore(\"bar\", true); // no warning\n try {\n /* ... */\n } finally {\n rs.closeRecordStore();\n }\n }'",
"markdown": "Reports Java ME `javax.microedition.rms.RecordStore` resources that are not opened in front of a `try` block and closed in the corresponding `finally` block.\n\nSuch resources may be inadvertently leaked if an exception is thrown before the resource is closed.\n\n\nThis inspection is intended for Java ME and other highly resource constrained environments.\nApplying the results of this inspection without consideration might have negative effects on code clarity and design.\n\n**Example:**\n\n\n void foo1() throws RecordStoreException {\n RecordStore rs = RecordStore.openRecordStore(\"bar\", true); // warning\n }\n void foo2() throws RecordStoreException {\n RecordStore rs = RecordStore.openRecordStore(\"bar\", true); // no warning\n try {\n /* ... */\n } finally {\n rs.closeRecordStore();\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RecordStoreOpenedButNotSafelyClosed",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance/Embedded",
"index": 178,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ObjectsEqualsCanBeSimplified",
"shortDescription": {
"text": "'Objects.equals()' can be replaced with 'equals()'"
},
"fullDescription": {
"text": "Reports calls to 'Objects.equals(a, b)' in which the first argument is statically known to be non-null. Such a call can be safely replaced with 'a.equals(b)' or 'a == b' if both arguments are primitives. Example: 'String defaultName = \"default\";\n boolean isDefault = Objects.equals(defaultName, name);' After the quick-fix is applied: 'String defaultName = \"default\";\n boolean isDefault = defaultName.equals(name);' New in 2018.3",
"markdown": "Reports calls to `Objects.equals(a, b)` in which the first argument is statically known to be non-null.\n\nSuch a call can be safely replaced with `a.equals(b)` or `a == b` if both arguments are primitives.\n\nExample:\n\n\n String defaultName = \"default\";\n boolean isDefault = Objects.equals(defaultName, name);\n\nAfter the quick-fix is applied:\n\n\n String defaultName = \"default\";\n boolean isDefault = defaultName.equals(name);\n\nNew in 2018.3"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ObjectsEqualsCanBeSimplified",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnresolvedClassReferenceRepair",
"shortDescription": {
"text": "Unresolved class reference"
},
"fullDescription": {
"text": "Reports an unresolved class reference. The quick-fix suggests trying to resolve reference.",
"markdown": "Reports an unresolved class reference.\n\nThe quick-fix suggests trying to resolve reference."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "UnresolvedClassReferenceRepair",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Abstraction issues",
"index": 83,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NativeMethods",
"shortDescription": {
"text": "Native method"
},
"fullDescription": {
"text": "Reports methods declared 'native'. Native methods are inherently unportable.",
"markdown": "Reports methods declared `native`. Native methods are inherently unportable."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NativeMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Portability",
"index": 179,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EqualsWithItself",
"shortDescription": {
"text": "'equals()' called on itself"
},
"fullDescription": {
"text": "Reports calls to 'equals()', 'compareTo()' or similar, that compare an object for equality with itself. The method contracts of these methods specify that such calls will always return 'true' for 'equals()' or '0' for 'compareTo()'. The inspection also checks calls to 'Objects.equals()', 'Objects.deepEquals()', 'Arrays.equals()', 'Comparator.compare()', 'assertEquals()' methods of test frameworks (JUnit, TestNG, AssertJ), 'Integer.compare()', 'Integer.compareUnsigned()' and similar methods. Example: 'class Foo {\n boolean foo(Object o) {\n return o.equals(o); // warning\n }\n\n boolean bar(String[] ss) {\n return Arrays.equals(ss, ss); // warning\n }\n}' Use the option to report test assertions report only on non-extendable library classes (like 'String') and primitive types. This option can be useful, when testing 'equals()' methods.",
"markdown": "Reports calls to `equals()`, `compareTo()` or similar, that compare an object for equality with itself. The method contracts of these methods specify that such calls will always return `true` for `equals()` or `0` for `compareTo()`. The inspection also checks calls to `Objects.equals()`, `Objects.deepEquals()`, `Arrays.equals()`, `Comparator.compare()`, `assertEquals()` methods of test frameworks (JUnit, TestNG, AssertJ), `Integer.compare()`, `Integer.compareUnsigned()` and similar methods.\n\n**Example:**\n\n\n class Foo {\n boolean foo(Object o) {\n return o.equals(o); // warning\n }\n\n boolean bar(String[] ss) {\n return Arrays.equals(ss, ss); // warning\n }\n }\n\n\nUse the option to report test assertions report only on non-extendable library classes (like `String`) and primitive types.\nThis option can be useful, when testing `equals()` methods."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "EqualsWithItself",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BulkFileAttributesRead",
"shortDescription": {
"text": "Bulk 'Files.readAttributes()' call can be used"
},
"fullDescription": {
"text": "Reports multiple sequential 'java.io.File' attribute checks, such as: 'isDirectory()' 'isFile()' 'lastModified()' 'length()' Such calls can be replaced with a bulk 'Files.readAttributes()' call. This is usually more performant then multiple separate attribute checks. Example: 'boolean isNewFile(File file, long lastModified) throws IOException {\n return file.isFile() && file.lastModified() > lastModified;\n }' After the quick-fix is applied: 'boolean isNewFile(File file, long lastModified) throws IOException {\n BasicFileAttributes fileAttributes = Files.readAttributes(file.toPath(), BasicFileAttributes.class);\n return fileAttributes.isRegularFile() && fileAttributes.lastModifiedTime().toMillis() > lastModified;\n }' This inspection does not show a warning if 'IOException' is not handled in the current context, but the quick-fix is still available. Note that the replacements are usually not completely equivalent and should be applied with care. In particular, the behavior could differ if the file does not exist at all. This inspection only reports if the language level of the project or module is 7 or higher. New in 2022.1",
"markdown": "Reports multiple sequential `java.io.File` attribute checks, such as:\n\n* `isDirectory()`\n* `isFile()`\n* `lastModified()`\n* `length()`\n\nSuch calls can be replaced with a bulk `Files.readAttributes()` call. This is usually more performant then multiple separate attribute checks.\n\nExample:\n\n\n boolean isNewFile(File file, long lastModified) throws IOException {\n return file.isFile() && file.lastModified() > lastModified;\n }\n\nAfter the quick-fix is applied:\n\n\n boolean isNewFile(File file, long lastModified) throws IOException {\n BasicFileAttributes fileAttributes = Files.readAttributes(file.toPath(), BasicFileAttributes.class);\n return fileAttributes.isRegularFile() && fileAttributes.lastModifiedTime().toMillis() > lastModified;\n }\n\nThis inspection does not show a warning if `IOException` is not handled in the current context, but the quick-fix is still available.\n\nNote that the replacements are usually not completely equivalent and should be applied with care. In particular, the behavior could differ if\nthe file does not exist at all.\n\nThis inspection only reports if the language level of the project or module is 7 or higher.\n\nNew in 2022.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "BulkFileAttributesRead",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ImplicitNumericConversion",
"shortDescription": {
"text": "Implicit numeric conversion"
},
"fullDescription": {
"text": "Reports implicit conversion between numeric types. Implicit numeric conversion is not a problem in itself but, if unexpected, may cause difficulties when tracing bugs. Example: 'double m(int i) {\n return i * 10;\n }' After the quick-fix is applied: 'double m(int i) {\n return (double) (i * 10);\n }' Configure the inspection: Use the Ignore widening conversions option to ignore implicit conversion that cannot result in data loss (for example, 'int'->'long'). Use the Ignore conversions from and to 'char' option to ignore conversion from and to 'char'. The inspection will still report conversion from and to floating-point numbers. Use the Ignore conversion from constants and literals to make the inspection ignore conversion from literals and compile-time constants.",
"markdown": "Reports implicit conversion between numeric types.\n\nImplicit numeric conversion is not a problem in itself but, if unexpected, may cause difficulties when tracing bugs.\n\n**Example:**\n\n\n double m(int i) {\n return i * 10;\n }\n\nAfter the quick-fix is applied:\n\n\n double m(int i) {\n return (double) (i * 10);\n }\n\nConfigure the inspection:\n\n* Use the **Ignore widening conversions** option to ignore implicit conversion that cannot result in data loss (for example, `int`-\\>`long`).\n* Use the **Ignore conversions from and to 'char'** option to ignore conversion from and to `char`. The inspection will still report conversion from and to floating-point numbers.\n* Use the **Ignore conversion from constants and literals** to make the inspection ignore conversion from literals and compile-time constants."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ImplicitNumericConversion",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues",
"index": 49,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OverlyComplexBooleanExpression",
"shortDescription": {
"text": "Overly complex boolean expression"
},
"fullDescription": {
"text": "Reports boolean expressions with too many terms. Such expressions may be confusing and bug-prone. Example: 'cond(x1) && cond(x2) ^ cond(x3) && cond(x4);' Configure the inspection: Use the Maximum number of terms field to specify the maximum number of terms allowed in a boolean expression. Use the Ignore pure conjunctions and disjunctions option to ignore boolean expressions which use only a single boolean operator repeatedly.",
"markdown": "Reports boolean expressions with too many terms. Such expressions may be confusing and bug-prone.\n\nExample:\n\n\n cond(x1) && cond(x2) ^ cond(x3) && cond(x4);\n\nConfigure the inspection:\n\n* Use the **Maximum number of terms** field to specify the maximum number of terms allowed in a boolean expression.\n* Use the **Ignore pure conjunctions and disjunctions** option to ignore boolean expressions which use only a single boolean operator repeatedly."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OverlyComplexBooleanExpression",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OverlyStrongTypeCast",
"shortDescription": {
"text": "Overly strong type cast"
},
"fullDescription": {
"text": "Reports type casts that are overly strong. For instance, casting an object to 'ArrayList' when casting it to 'List' would do just as well. Note: much like the Redundant type cast inspection, applying the fix for this inspection may change the semantics of your program if you are intentionally using an overly strong cast to cause a 'ClassCastException' to be generated. Example: 'interface Super {\n void doSmth();\n }\n interface Sub extends Super { }\n\n void use(Object obj) {\n // Warning: ((Super)obj).doSmth() could be used\n ((Sub)obj).doSmth();\n }' Use the checkbox below to ignore casts when there's a matching 'instanceof' check in the code.",
"markdown": "Reports type casts that are overly strong. For instance, casting an object to `ArrayList` when casting it to `List` would do just as well.\n\n\n**Note:** much like the *Redundant type cast*\ninspection, applying the fix for this inspection may change the semantics of your program if you are\nintentionally using an overly strong cast to cause a `ClassCastException` to be generated.\n\nExample:\n\n\n interface Super {\n void doSmth();\n }\n interface Sub extends Super { }\n\n void use(Object obj) {\n // Warning: ((Super)obj).doSmth() could be used\n ((Sub)obj).doSmth();\n }\n\n\nUse the checkbox below to ignore casts when there's a matching `instanceof` check in the code."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OverlyStrongTypeCast",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Abstraction issues",
"index": 83,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StringConcatenationArgumentToLogCall",
"shortDescription": {
"text": "Non-constant string concatenation as argument to logging call"
},
"fullDescription": {
"text": "Reports non-constant string concatenations that are used as arguments to SLF4J and Log4j 2 logging methods. Non-constant concatenations are evaluated at runtime even when the logging message is not logged; this can negatively impact performance. It is recommended to use a parameterized log message instead, which will not be evaluated when logging is disabled. Example: 'public class Vital {\n private static final Logger LOG = LoggerFactory.getLogger(Vital.class);\n\n public void saveTheWorld(int i, String s, boolean b) {\n LOG.info(\"saveTheWorld(\" + i + \", \" + s + \", \" + b + \")\");\n // todo\n }\n }' After the quick-fix is applied: 'public class Vital {\n private static final Logger LOG = LoggerFactory.getLogger(Vital.class);\n\n public void saveTheWorld(int i, String s, boolean b) {\n LOG.info(\"saveTheWorld({}, {}, {})\", i, s, b);\n // todo\n }\n }' Configure the inspection: Use the Warn on list to ignore certain higher logging levels. Higher logging levels may be enabled even in production, and the arguments will always be evaluated.",
"markdown": "Reports non-constant string concatenations that are used as arguments to **SLF4J** and **Log4j 2** logging methods. Non-constant concatenations are evaluated at runtime even when the logging message is not logged; this can negatively impact performance. It is recommended to use a parameterized log message instead, which will not be evaluated when logging is disabled.\n\n**Example:**\n\n\n public class Vital {\n private static final Logger LOG = LoggerFactory.getLogger(Vital.class);\n\n public void saveTheWorld(int i, String s, boolean b) {\n LOG.info(\"saveTheWorld(\" + i + \", \" + s + \", \" + b + \")\");\n // todo\n }\n }\n\nAfter the quick-fix is applied:\n\n\n public class Vital {\n private static final Logger LOG = LoggerFactory.getLogger(Vital.class);\n\n public void saveTheWorld(int i, String s, boolean b) {\n LOG.info(\"saveTheWorld({}, {}, {})\", i, s, b);\n // todo\n }\n }\n\n\nConfigure the inspection:\n\n* Use the **Warn on** list to ignore certain higher logging levels. Higher logging levels may be enabled even in production, and the arguments will always be evaluated."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "StringConcatenationArgumentToLogCall",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Logging",
"index": 79,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LoadLibraryWithNonConstantString",
"shortDescription": {
"text": "Call to 'System.loadLibrary()' with non-constant string"
},
"fullDescription": {
"text": "Reports calls to 'java.lang.System.loadLibrary()', 'java.lang.System.load()', 'java.lang.Runtime.loadLibrary()' and 'java.lang.Runtime.load()' which take a dynamically-constructed string as the name of the library. Constructed library name strings are a common source of security breaches. By default, this inspection ignores compile-time constants. Example: 'void test(int i) {\n System.loadLibrary(\"foo\" + i);\n }' Use the inspection settings to consider any 'static final' fields as constant. Be careful, because strings like the following will be ignored when the option is enabled: 'private static final String LIBRARY = getUserInput();'",
"markdown": "Reports calls to `java.lang.System.loadLibrary()`, `java.lang.System.load()`, `java.lang.Runtime.loadLibrary()` and `java.lang.Runtime.load()` which take a dynamically-constructed string as the name of the library.\n\n\nConstructed library name strings are a common source of security breaches.\nBy default, this inspection ignores compile-time constants.\n\n**Example:**\n\n\n void test(int i) {\n System.loadLibrary(\"foo\" + i);\n }\n\n\nUse the inspection settings to consider any `static final` fields as constant.\nBe careful, because strings like the following will be ignored when the option is enabled:\n\n\n private static final String LIBRARY = getUserInput();\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LoadLibraryWithNonConstantString",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Security",
"index": 32,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SimplifiableAssertion",
"shortDescription": {
"text": "Simplifiable assertion"
},
"fullDescription": {
"text": "Reports any 'assert' calls that can be replaced with simpler and equivalent calls. Example → Replacement 'assertEquals(true, x());' 'assertTrue(x());' 'assertTrue(y() != null);' 'assertNotNull(y());' 'assertTrue(z == z());' 'assertSame(z, z());' 'assertTrue(a.equals(a()));' 'assertEquals(a, a());' 'assertTrue(false);' 'fail();'",
"markdown": "Reports any `assert` calls that can be replaced with simpler and equivalent calls.\n\n| Example | → | Replacement |\n|----------------------------------|---|-------------------------|\n| `assertEquals(`**true**`, x());` | | `assertTrue(x());` |\n| `assertTrue(y() != null);` | | `assertNotNull(y());` |\n| `assertTrue(z == z());` | | `assertSame(z, z());` |\n| `assertTrue(a.equals(a()));` | | `assertEquals(a, a());` |\n| `assertTrue(`**false**`);` | | `fail();` |"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SimplifiableAssertion",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Test frameworks",
"index": 182,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InterfaceMethodClashesWithObject",
"shortDescription": {
"text": "Interface method clashes with method in 'Object'"
},
"fullDescription": {
"text": "Reports interface methods that clash with the protected methods 'clone()' and 'finalize()' from the 'java.lang.Object' class. In an interface, it is possible to declare these methods with a return type that is incompatible with the 'java.lang.Object' methods. A class that implements such an interface will not be compilable. When the interface is functional, it remains possible to create a lambda from it, but this is not recommended. Example: '// Warning: this interface cannot be implemented\n // by any class, only by a lambda or method reference\n interface MyInterface {\n double clone();\n }'",
"markdown": "Reports interface methods that clash with the **protected** methods `clone()` and `finalize()` from the `java.lang.Object` class.\n\nIn an interface, it is possible to declare these methods with a return type that is incompatible with the `java.lang.Object` methods.\nA class that implements such an interface will not be compilable.\nWhen the interface is functional, it remains possible to create a lambda from it, but this is not recommended.\n\nExample:\n\n\n // Warning: this interface cannot be implemented\n // by any class, only by a lambda or method reference\n interface MyInterface {\n double clone();\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "InterfaceMethodClashesWithObject",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Abstraction issues",
"index": 83,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StaticMethodOnlyUsedInOneClass",
"shortDescription": {
"text": "Static member only used from one other class"
},
"fullDescription": {
"text": "Reports 'static' methods and fields that are only used from a class other than the containing class. Such members could be moved into the using class. Factory methods and members accessed from an anonymous class inside the member's class are ignored by this inspection. Convenience overloads, which call a method with the same name in the same class but have fewer parameters, are also ignored. Use the first checkbox to suppress this inspection when the static member is only used from a test class. Use the second checkbox below to ignore member usages from inside anonymous, local, or non-static inner classes. Use the third checkbox below to not warn on members that cannot be moved without problems, for example, because a method with an identical signature is already present in the target class, or because a field or a method used inside the method will not be accessible when this method is moved. Use the fourth checkbox to ignore members located in utility classes.",
"markdown": "Reports `static` methods and fields that are only used from a class other than the containing class. Such members could be moved into the using class. Factory methods and members accessed from an anonymous class inside the member's class are ignored by this inspection. Convenience overloads, which call a method with the same name in the same class but have fewer parameters, are also ignored.\n\n\nUse the first checkbox to suppress this inspection when the static member is only used from a test class.\n\n\nUse the second checkbox below to ignore member usages from inside anonymous, local, or non-static inner classes.\n\n\nUse the third checkbox below to not warn on members that cannot be moved without problems,\nfor example, because a method with an identical signature is already present in the target class,\nor because a field or a method used inside the method will not be accessible when this method is moved.\n\n\nUse the fourth checkbox to ignore members located in utility classes."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "StaticMethodOnlyUsedInOneClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Abstraction issues",
"index": 83,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantEscapeInRegexReplacement",
"shortDescription": {
"text": "Redundant escape in regex replacement string"
},
"fullDescription": {
"text": "Reports redundant escapes in the replacement string of regex methods. It is allowed to escape any character in a regex replacement string, but only for the '$' and '\\' characters is escaping necessary. Example: 'string.replaceAll(\"a\", \"\\\\b\");' After the quick-fix is applied: 'string.replaceAll(\"a\", \"b\");' New in 2022.3",
"markdown": "Reports redundant escapes in the replacement string of regex methods. It is allowed to escape any character in a regex replacement string, but only for the `$` and `\\` characters is escaping necessary.\n\n**Example:**\n\n\n string.replaceAll(\"a\", \"\\\\b\");\n\nAfter the quick-fix is applied:\n\n\n string.replaceAll(\"a\", \"b\");\n\nNew in 2022.3"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantEscapeInRegexReplacement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UseOfSunClasses",
"shortDescription": {
"text": "Use of 'sun.*' classes"
},
"fullDescription": {
"text": "Reports uses of classes from the 'sun.*' hierarchy. Such classes are non-portable between different JVMs.",
"markdown": "Reports uses of classes from the `sun.*` hierarchy. Such classes are non-portable between different JVMs."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UseOfSunClasses",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Portability",
"index": 179,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantCast",
"shortDescription": {
"text": "Redundant type cast"
},
"fullDescription": {
"text": "Reports unnecessary cast expressions. Example: 'static Object toObject(String s) {\n return (Object) s;\n }' Use the checkbox below to ignore clarifying casts e.g., casts in collection calls where 'Object' is expected: 'static void removeFromList(List<String> l, Object o) {\n l.remove((String)o);\n }'",
"markdown": "Reports unnecessary cast expressions.\n\nExample:\n\n\n static Object toObject(String s) {\n return (Object) s;\n }\n\n\nUse the checkbox below to ignore clarifying casts e.g., casts in collection calls where `Object` is expected:\n\n\n static void removeFromList(List<String> l, Object o) {\n l.remove((String)o);\n } \n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantCast",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SimplifyCollector",
"shortDescription": {
"text": "Simplifiable collector"
},
"fullDescription": {
"text": "Reports collectors that can be simplified. In particular, some cascaded 'groupingBy()' collectors can be expressed by using a simpler 'toMap()' collector, which is also likely to be more performant. Example: 'Collectors.groupingByConcurrent(String::length, Collectors.collectingAndThen(Collectors.maxBy(String::compareTo), Optional::get));' After the quick-fix is applied: 'Collectors.toConcurrentMap(String::length, Function.identity(), BinaryOperator.maxBy(String::compareTo));' This inspection only reports if the language level of the project or module is 8 or higher. New in 2017.1",
"markdown": "Reports collectors that can be simplified.\n\nIn particular, some cascaded `groupingBy()` collectors can be expressed by using a\nsimpler `toMap()` collector, which is also likely to be more performant.\n\nExample:\n\n\n Collectors.groupingByConcurrent(String::length, Collectors.collectingAndThen(Collectors.maxBy(String::compareTo), Optional::get));\n\nAfter the quick-fix is applied:\n\n\n Collectors.toConcurrentMap(String::length, Function.identity(), BinaryOperator.maxBy(String::compareTo));\n\nThis inspection only reports if the language level of the project or module is 8 or higher.\n\nNew in 2017.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SimplifyCollector",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IteratorNextDoesNotThrowNoSuchElementException",
"shortDescription": {
"text": "'Iterator.next()' which can't throw 'NoSuchElementException'"
},
"fullDescription": {
"text": "Reports implementations of 'Iterator.next()' that cannot throw 'java.util.NoSuchElementException'. Such implementations violate the contract of 'java.util.Iterator', and may result in subtle bugs if the iterator is used in a non-standard way. Example: 'class Numbers implements Iterator<Integer> {\n @Override\n public Integer next() { //warning\n if (hasNext()) {\n return generateNext();\n } else {\n return null; //throw NoSuchElementException instead\n }\n }\n\n ...\n }'",
"markdown": "Reports implementations of `Iterator.next()` that cannot throw `java.util.NoSuchElementException`.\n\n\nSuch implementations violate the contract of `java.util.Iterator`,\nand may result in subtle bugs if the iterator is used in a non-standard way.\n\n**Example:**\n\n\n class Numbers implements Iterator<Integer> {\n @Override\n public Integer next() { //warning\n if (hasNext()) {\n return generateNext();\n } else {\n return null; //throw NoSuchElementException instead\n }\n }\n\n ...\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "IteratorNextCanNotThrowNoSuchElementException",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SerializableInnerClassHasSerialVersionUIDField",
"shortDescription": {
"text": "Serializable non-static inner class without 'serialVersionUID'"
},
"fullDescription": {
"text": "Reports non-static inner classes that implement 'java.io.Serializable', but do not define a 'serialVersionUID' field. Without a 'serialVersionUID' field, any change to the class will make previously serialized versions unreadable. It is strongly recommended that 'Serializable' non-static inner classes have a 'serialVersionUID' field, otherwise the default serialization algorithm may result in serialized versions being incompatible between compilers due to differences in synthetic accessor methods. A quick-fix is suggested to add the missing 'serialVersionUID' field. Example: 'class Outer {\n class Inner implements Serializable {}\n }' After the quick-fix is applied: 'class Outer {\n class Inner implements Serializable {\n private static final long serialVersionUID = -7004458730436243902L;\n }\n }' Use the following options to configure the inspection: List classes whose inheritors should not be reported by this inspection. This is meant for classes that inherit 'Serializable' from a superclass but are not intended for serialization. Whether to ignore 'Serializable' anonymous classes.",
"markdown": "Reports non-static inner classes that implement `java.io.Serializable`, but do not define a `serialVersionUID` field.\n\n\nWithout a `serialVersionUID` field, any change to the class will make previously\nserialized versions unreadable. It is strongly recommended that `Serializable`\nnon-static inner classes have a `serialVersionUID` field, otherwise the default\nserialization algorithm may result in serialized versions being incompatible between\ncompilers due to differences in synthetic accessor methods.\n\n\nA quick-fix is suggested to add the missing `serialVersionUID` field.\n\n**Example:**\n\n\n class Outer {\n class Inner implements Serializable {}\n }\n\nAfter the quick-fix is applied:\n\n\n class Outer {\n class Inner implements Serializable {\n private static final long serialVersionUID = -7004458730436243902L;\n }\n }\n\nUse the following options to configure the inspection:\n\n* List classes whose inheritors should not be reported by this inspection. This is meant for classes that inherit `Serializable` from a superclass but are not intended for serialization.\n* Whether to ignore `Serializable` anonymous classes."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SerializableNonStaticInnerClassWithoutSerialVersionUID",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Serialization issues",
"index": 54,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ParameterNameDiffersFromOverriddenParameter",
"shortDescription": {
"text": "Parameter name differs from parameter in overridden or overloaded method"
},
"fullDescription": {
"text": "Reports parameters whose names differ from the corresponding parameters of the methods they override or overload. While legal in Java, such inconsistent names may be confusing and decrease the documentation benefits of good naming practices. Example: 'class Person {\n Person(String fullName) {}\n }\n class Child extends Person {\n Child(String name) { super(name); }\n }' After the quick-fix is applied: 'class Person {\n Person(String fullName) {}\n }\n class Child extends Person {\n Child(String fullName) { super(fullName); }\n }' Use the options to indicate whether to ignore overridden parameter names that are only a single character long or come from a library method. Both can be useful if you do not wish to be bound by dubious naming conventions used in libraries.",
"markdown": "Reports parameters whose names differ from the corresponding parameters of the methods they override or overload. While legal in Java, such inconsistent names may be confusing and decrease the documentation benefits of good naming practices.\n\n**Example:**\n\n\n class Person {\n Person(String fullName) {}\n }\n class Child extends Person {\n Child(String name) { super(name); }\n }\n\nAfter the quick-fix is applied:\n\n\n class Person {\n Person(String fullName) {}\n }\n class Child extends Person {\n Child(String fullName) { super(fullName); }\n }\n\n\nUse the options to indicate whether to ignore overridden parameter names that are only\na single character long or come from a library method. Both can be useful if\nyou do not wish to be bound by dubious naming conventions used in libraries."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ParameterNameDiffersFromOverriddenParameter",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Naming conventions",
"index": 106,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReadWriteStringCanBeUsed",
"shortDescription": {
"text": "'Files.readString()' or 'Files.writeString()' can be used"
},
"fullDescription": {
"text": "Reports method calls that read or write a 'String' as bytes using 'java.nio.file.Files'. Such calls can be replaced with a call to a 'Files.readString()' or 'Files.writeString()' method introduced in Java 11. Example: 'String s = \"example\";\n Files.write(Paths.get(\"out.txt\"), s.getBytes(StandardCharsets.UTF_8), StandardOpenOption.WRITE);\n s = new String(Files.readAllBytes(Paths.get(\"in.txt\")), StandardCharsets.ISO_8859_1);' After the quick fix is applied: 'String s = \"example\";\n Files.writeString(Paths.get(\"out.txt\"), s, StandardOpenOption.WRITE);\n s = Files.readString(Paths.get(\"in.txt\"), StandardCharsets.ISO_8859_1);' New in 2018.3",
"markdown": "Reports method calls that read or write a `String` as bytes using `java.nio.file.Files`. Such calls can be replaced with a call to a `Files.readString()` or `Files.writeString()` method introduced in Java 11.\n\n**Example:**\n\n\n String s = \"example\";\n Files.write(Paths.get(\"out.txt\"), s.getBytes(StandardCharsets.UTF_8), StandardOpenOption.WRITE);\n s = new String(Files.readAllBytes(Paths.get(\"in.txt\")), StandardCharsets.ISO_8859_1);\n\nAfter the quick fix is applied:\n\n\n String s = \"example\";\n Files.writeString(Paths.get(\"out.txt\"), s, StandardOpenOption.WRITE);\n s = Files.readString(Paths.get(\"in.txt\"), StandardCharsets.ISO_8859_1);\n\nNew in 2018.3"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ReadWriteStringCanBeUsed",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 11",
"index": 185,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StringBufferReplaceableByStringBuilder",
"shortDescription": {
"text": "'StringBuffer' may be 'StringBuilder'"
},
"fullDescription": {
"text": "Reports variables declared as 'StringBuffer' and suggests replacing them with 'StringBuilder'. 'StringBuilder' is a non-thread-safe replacement for 'StringBuffer'. This inspection only reports if the language level of the project or module is 5 or higher.",
"markdown": "Reports variables declared as `StringBuffer` and suggests replacing them with `StringBuilder`. `StringBuilder` is a non-thread-safe replacement for `StringBuffer`.\n\nThis inspection only reports if the language level of the project or module is 5 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "StringBufferMayBeStringBuilder",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 5",
"index": 117,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SynchronizedMethod",
"shortDescription": {
"text": "'synchronized' method"
},
"fullDescription": {
"text": "Reports the 'synchronized' modifier on methods. There are several reasons a 'synchronized' modifier on a method may be a bad idea: As little work as possible should be performed under a lock. Therefore it is often better to use a 'synchronized' block and keep there only the code that works with shared state. Synchronization becomes a part of a method's interface. This makes a transition to a different locking mechanism difficult. Keeping track of what is locking a particular object gets harder. The DoS (denial-of-service) attack becomes feasible either on purpose or unknowingly when inheriting the method's class. As an alternative, consider synchronizing on a 'private final' lock object, access to which can be completely controlled. A quick-fix is provided to wrap the method body with 'synchronized(this)'. Example: 'class Main {\n public synchronized void fooBar() {\n }\n }' After the quick-fix is applied: 'class Main {\n public void fooBar() {\n synchronized (this) {\n }\n }\n }' You can configure the following options for this inspection: Include native methods - include native methods into the inspection's scope. Ignore methods overriding a synchronized method - do not report methods that override a 'synchronized' method.",
"markdown": "Reports the `synchronized` modifier on methods.\n\n\nThere are several reasons a `synchronized` modifier on a method may be a bad idea:\n\n1. As little work as possible should be performed under a lock. Therefore it is often better to use a `synchronized` block and keep there only the code that works with shared state.\n2. Synchronization becomes a part of a method's interface. This makes a transition to a different locking mechanism difficult.\n3. Keeping track of what is locking a particular object gets harder.\n4. The DoS (denial-of-service) attack becomes feasible either on purpose or unknowingly when inheriting the method's class.\n\n\nAs an alternative, consider synchronizing on a `private final` lock object, access to which can be completely controlled.\n\nA quick-fix is provided to wrap the method body with `synchronized(this)`.\n\n**Example:**\n\n\n class Main {\n public synchronized void fooBar() {\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class Main {\n public void fooBar() {\n synchronized (this) {\n }\n }\n }\n\nYou can configure the following options for this inspection:\n\n1. **Include native methods** - include native methods into the inspection's scope.\n2. **Ignore methods overriding a synchronized method** - do not report methods that override a `synchronized` method."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SynchronizedMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AbstractMethodWithMissingImplementations",
"shortDescription": {
"text": "Abstract method with missing implementations"
},
"fullDescription": {
"text": "Reports 'abstract' methods that are not implemented in every concrete subclass. This results in a compile-time error on the subclasses; the inspection reports the problem at the point of the abstract method, allowing faster detection of the problem.",
"markdown": "Reports `abstract` methods that are not implemented in every concrete subclass.\n\n\nThis results in a compile-time error on the subclasses;\nthe inspection reports the problem at the point of the abstract method, allowing faster detection of the problem."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AbstractMethodWithMissingImplementations",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Inheritance issues",
"index": 159,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryToStringCall",
"shortDescription": {
"text": "Unnecessary call to 'toString()'"
},
"fullDescription": {
"text": "Reports calls to 'toString()' that are used in the following cases: In string concatenations In the 'java.lang.StringBuilder#append()' or 'java.lang.StringBuffer#append()' methods In the methods of 'java.io.PrintWriter' or 'java.io.PrintStream' in the methods 'org.slf4j.Logger' In these cases, conversion to string will be handled by the underlying library methods, and the explicit call to 'toString()' is not needed. Example: 'System.out.println(this.toString())' After the quick-fix is applied: 'System.out.println(this)' Note that without the 'toString()' call, the code semantics might be different: if the expression is null, then the 'null' string will be used instead of throwing a 'NullPointerException'. Use the Report only when qualifier is known to be not-null option to avoid warnings for the values that could potentially be null.",
"markdown": "Reports calls to `toString()` that are used in the following cases:\n\n* In string concatenations\n* In the `java.lang.StringBuilder#append()` or `java.lang.StringBuffer#append()` methods\n* In the methods of `java.io.PrintWriter` or `java.io.PrintStream`\n* in the methods `org.slf4j.Logger`\n\nIn these cases, conversion to string will be handled by the underlying library methods, and the explicit call to `toString()` is not needed.\n\nExample:\n\n\n System.out.println(this.toString())\n\nAfter the quick-fix is applied:\n\n\n System.out.println(this)\n\n\nNote that without the `toString()` call, the code semantics might be different: if the expression is null,\nthen the `null` string will be used instead of throwing a `NullPointerException`.\n\nUse the **Report only when qualifier is known to be not-null** option to avoid warnings for the values that could potentially be null."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryToStringCall",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SuppressionAnnotation",
"shortDescription": {
"text": "Inspection suppression annotation"
},
"fullDescription": {
"text": "Reports comments or annotations suppressing inspections. This inspection can be useful when leaving suppressions intentionally for further review. Example: '@SuppressWarnings(\"unused\")\n static Stream<String> stringProvider() {\n return Stream.of(\"foo\", \"bar\");\n }'",
"markdown": "Reports comments or annotations suppressing inspections.\n\nThis inspection can be useful when leaving suppressions intentionally for further review.\n\n**Example:**\n\n\n @SuppressWarnings(\"unused\")\n static Stream<String> stringProvider() {\n return Stream.of(\"foo\", \"bar\");\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SuppressionAnnotation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code maturity",
"index": 67,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassOnlyUsedInOnePackage",
"shortDescription": {
"text": "Class only used from one other package"
},
"fullDescription": {
"text": "Reports classes that don't depend on any other class in their package, depend on classes from another package, and are themselves a dependency only for classes from this other package. Consider moving such classes to the package on which they depend. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor.",
"markdown": "Reports classes that don't depend on any other class in their package, depend on classes from another package, and are themselves a dependency only for classes from this other package. Consider moving such classes to the package on which they depend.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ClassOnlyUsedInOnePackage",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Packaging issues",
"index": 190,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReturnSeparatedFromComputation",
"shortDescription": {
"text": "'return' separated from the result computation"
},
"fullDescription": {
"text": "Reports 'return' statements that return a local variable where the value of the variable is computed somewhere else within the same method. The quick-fix inlines the returned variable by moving the return statement to the location in which the value of the variable is computed. When the returned value can't be inlined into the 'return' statement, the quick-fix attempts to move the return statement as close to the computation of the returned value as possible. Example: 'int n = -1;\n for (int i = 0; i < a.length; i++) {\n if (a[i] == b) {\n n = i;\n break;\n }\n }\n return n;' After the quick-fix is applied: 'int n = -1;\n for (int i = 0; i < a.length; i++) {\n if (a[i] == b) {\n return i;\n }\n }\n return n;'",
"markdown": "Reports `return` statements that return a local variable where the value of the variable is computed somewhere else within the same method.\n\nThe quick-fix inlines the returned variable by moving the return statement to the location in which the value\nof the variable is computed.\nWhen the returned value can't be inlined into the `return` statement,\nthe quick-fix attempts to move the return statement as close to the computation of the returned value as possible.\n\nExample:\n\n\n int n = -1;\n for (int i = 0; i < a.length; i++) {\n if (a[i] == b) {\n n = i;\n break;\n }\n }\n return n;\n\nAfter the quick-fix is applied:\n\n\n int n = -1;\n for (int i = 0; i < a.length; i++) {\n if (a[i] == b) {\n return i;\n }\n }\n return n;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReturnSeparatedFromComputation",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SynchronizeOnNonFinalField",
"shortDescription": {
"text": "Synchronization on a non-final field"
},
"fullDescription": {
"text": "Reports 'synchronized' statement lock expressions that consist of a non-'final' field reference. Such statements are unlikely to have useful semantics, as different threads may acquire different locks even when operating on the same object. Example: 'private Object o;\n public void foo() {\n synchronized (o) // synchronization on a non-final field\n { }\n }'",
"markdown": "Reports `synchronized` statement lock expressions that consist of a non-`final` field reference. Such statements are unlikely to have useful semantics, as different threads may acquire different locks even when operating on the same object.\n\n**Example:**\n\n\n private Object o;\n public void foo() {\n synchronized (o) // synchronization on a non-final field\n { }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SynchronizeOnNonFinalField",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EqualsWhichDoesntCheckParameterClass",
"shortDescription": {
"text": "'equals()' method which does not check class of parameter"
},
"fullDescription": {
"text": "Reports 'equals()' methods that do not check the type of their parameter. Failure to check the type of the parameter in the 'equals()' method may result in latent errors if the object is used in an untyped collection. Example: 'class MyClass {\n int x;\n\n @Override\n public boolean equals(Object obj) {\n // equals method should return false if obj is not MyClass\n return ((MyClass)obj).x == x;\n }\n }'",
"markdown": "Reports `equals()` methods that do not check the type of their parameter.\n\nFailure to check the type of the parameter\nin the `equals()` method may result in latent errors if the object is used in an untyped collection.\n\n**Example:**\n\n\n class MyClass {\n int x;\n\n @Override\n public boolean equals(Object obj) {\n // equals method should return false if obj is not MyClass\n return ((MyClass)obj).x == x;\n }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "EqualsWhichDoesntCheckParameterClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NumericOverflow",
"shortDescription": {
"text": "Numeric overflow"
},
"fullDescription": {
"text": "Reports expressions that overflow during computation. Usually, this happens by accident and indicates a bug. For example, a wrong type is used or a shift should be done in an opposite direction . Examples: 'float a = 1.0f/0.0f;\n long b = 30 * 24 * 60 * 60 * 1000;\n long c = 1000L << 62;'",
"markdown": "Reports expressions that overflow during computation. Usually, this happens by accident and indicates a bug. For example, a wrong type is used or a shift should be done in an opposite direction .\n\n**Examples:**\n\n\n float a = 1.0f/0.0f;\n long b = 30 * 24 * 60 * 60 * 1000;\n long c = 1000L << 62;\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "NumericOverflow",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues",
"index": 49,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AssignmentToSuperclassField",
"shortDescription": {
"text": "Constructor assigns value to field defined in superclass"
},
"fullDescription": {
"text": "Reports assignment to, or modification of fields that are declared in a superclass from within a subclass constructor. It is considered preferable to initialize the fields of a superclass in its own constructor and delegate to that constructor in a subclass. This will also allow declaring a field 'final' if it isn't changed after the construction. Example: 'class Super {\n int x;\n }\n class Sub extends Super {\n Sub(int _x) {\n // Warning: x is declared in a superclass\n x = _x;\n }\n }' To avoid the problem, declare a superclass constructor: 'class Super {\n final int x;\n\n Super(int _x) {\n x = _x;\n }\n }\n class Sub extends Super {\n Sub(int _x) {\n super(_x);\n }\n }'",
"markdown": "Reports assignment to, or modification of fields that are declared in a superclass from within a subclass constructor.\n\nIt is considered preferable to initialize the fields of a superclass in its own constructor and\ndelegate to that constructor in a subclass. This will also allow declaring a field `final`\nif it isn't changed after the construction.\n\n**Example:**\n\n\n class Super {\n int x;\n }\n class Sub extends Super {\n Sub(int _x) {\n // Warning: x is declared in a superclass\n x = _x;\n }\n }\n\nTo avoid the problem, declare a superclass constructor:\n\n\n class Super {\n final int x;\n\n Super(int _x) {\n x = _x;\n }\n }\n class Sub extends Super {\n Sub(int _x) {\n super(_x);\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AssignmentToSuperclassField",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Assignment issues",
"index": 98,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SuspiciousIndentAfterControlStatement",
"shortDescription": {
"text": "Suspicious indentation after control statement without braces"
},
"fullDescription": {
"text": "Reports suspicious indentation of statements after a control statement without braces. Such indentation can make it look like the statement is inside the control statement, when in fact it will be executed unconditionally after the control statement. Example: 'class Bar {\n void foo(int i) {\n if (i == 0)\n System.out.println(\"foo\");\n System.out.println(\"bar\"); // warning\n if (i == 1);\n System.out.println(\"great\"); // warning\n if (i == 42)\n System.out.println(\"answer\");\n System.out.println(\"question\"); // warning\n }\n }'",
"markdown": "Reports suspicious indentation of statements after a control statement without braces.\n\n\nSuch indentation can make it look like the statement is inside the control statement,\nwhen in fact it will be executed unconditionally after the control statement.\n\n**Example:**\n\n\n class Bar {\n void foo(int i) {\n if (i == 0)\n System.out.println(\"foo\");\n System.out.println(\"bar\"); // warning\n if (i == 1);\n System.out.println(\"great\"); // warning\n if (i == 42)\n System.out.println(\"answer\");\n System.out.println(\"question\"); // warning\n }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SuspiciousIndentAfterControlStatement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassNewInstance",
"shortDescription": {
"text": "Unsafe call to 'Class.newInstance()'"
},
"fullDescription": {
"text": "Reports calls to 'java.lang.Class.newInstance()'. This method propagates exceptions thrown by the no-arguments constructor, including checked exceptions. Usages of this method effectively bypass the compile-time exception checking that would otherwise be performed by the compiler. A quick-fix is suggested to replace the call with a call to the 'java.lang.reflect.Constructor.newInstance()' method, which avoids this problem by wrapping any exception thrown by the constructor in a (checked) 'java.lang.reflect.InvocationTargetException'. Example: 'clazz.newInstance()' After the quick-fix is applied: 'clazz.getConstructor().newInstance();'",
"markdown": "Reports calls to `java.lang.Class.newInstance()`.\n\n\nThis method propagates exceptions thrown by\nthe no-arguments constructor, including checked exceptions. Usages of this method\neffectively bypass the compile-time exception checking that would\notherwise be performed by the compiler.\n\n\nA quick-fix is suggested to replace the call with a call to the\n`java.lang.reflect.Constructor.newInstance()` method, which\navoids this problem by wrapping any exception thrown by the constructor in a\n(checked) `java.lang.reflect.InvocationTargetException`.\n\n**Example:**\n\n\n clazz.newInstance()\n\nAfter the quick-fix is applied:\n\n\n clazz.getConstructor().newInstance();\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ClassNewInstance",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LimitedScopeInnerClass",
"shortDescription": {
"text": "Local class"
},
"fullDescription": {
"text": "Reports local classes. A local class is a named nested class declared inside a code block. Local classes are uncommon and may therefore be confusing. In addition, some code standards discourage the use of local classes. Example: 'void test() {\n class Local { // local class\n }\n new Local();\n }'",
"markdown": "Reports local classes.\n\nA local class is a named nested class declared inside a code block.\nLocal classes are uncommon and may therefore be confusing.\nIn addition, some code standards discourage the use of local classes.\n\n**Example:**\n\n\n void test() {\n class Local { // local class\n }\n new Local();\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LimitedScopeInnerClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StaticFieldReferenceOnSubclass",
"shortDescription": {
"text": "Static field referenced via subclass"
},
"fullDescription": {
"text": "Reports accesses to static fields where the call is qualified by a subclass of the declaring class, rather than by the declaring class itself. Java allows such qualification, but such accesses may indicate a subtle confusion of inheritance and overriding. Example: 'class Parent {\n static int foo = 0;\n }\n\n class Child extends Parent { }\n\n void bar() {\n System.out.println(Child.foo);\n }' After the quick-fix is applied, the result looks like this: 'class Parent {\n static int foo = 0;\n }\n\n class Child extends Parent { }\n\n void bar() {\n System.out.println(Parent.foo);\n }'",
"markdown": "Reports accesses to static fields where the call is qualified by a subclass of the declaring class, rather than by the declaring class itself.\n\n\nJava allows such qualification, but such accesses may indicate a subtle confusion of inheritance and overriding.\n\n**Example:**\n\n\n class Parent {\n static int foo = 0;\n }\n\n class Child extends Parent { }\n\n void bar() {\n System.out.println(Child.foo);\n }\n\nAfter the quick-fix is applied, the result looks like this:\n\n\n class Parent {\n static int foo = 0;\n }\n\n class Child extends Parent { }\n\n void bar() {\n System.out.println(Parent.foo);\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "StaticFieldReferencedViaSubclass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IgnoredJUnitTest",
"shortDescription": {
"text": "JUnit test annotated with '@Ignore'/'@Disabled'"
},
"fullDescription": {
"text": "Reports usages of JUnit 4's '@Ignore' or JUnit 5's '@Disabled' annotations. It is considered a code smell to have tests annotated with these annotations for a long time, especially when no reason is specified. Example: '@Ignore\n public class UrgentTest {\n\n @Test\n public void testIt() {\n Assert.assertEquals(\"expected\", \"actual\");\n }\n }' Configure the inspection: Use the Only report annotations without reason option to only report the cases when no reason is specified as the annotation's 'value' attribute.",
"markdown": "Reports usages of JUnit 4's `@Ignore` or JUnit 5's `@Disabled` annotations. It is considered a code smell to have tests annotated with these annotations for a long time, especially when no reason is specified.\n\n**Example:**\n\n\n @Ignore\n public class UrgentTest {\n\n @Test\n public void testIt() {\n Assert.assertEquals(\"expected\", \"actual\");\n }\n }\n\n\nConfigure the inspection:\n\n* Use the **Only report annotations without reason** option to only report the cases when no reason is specified as the annotation's `value` attribute."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "IgnoredJUnitTest",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JVM languages/Test frameworks",
"index": 128,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IgnoreResultOfCall",
"shortDescription": {
"text": "Result of method call ignored"
},
"fullDescription": {
"text": "Reports method calls whose result is ignored. For many methods, ignoring the result is perfectly legitimate, but for some it is almost certainly an error. Examples of methods where ignoring the result is likely an error include 'java.io.inputStream.read()', which returns the number of bytes actually read, and any method on 'java.lang.String' or 'java.math.BigInteger'. These methods do not produce side-effects and thus pointless if their result is ignored. The calls to the following methods are inspected: Simple getters (which do nothing except return a field) Methods specified in the settings of this inspection Methods annotated with 'org.jetbrains.annotations.Contract(pure=true)' Methods annotated with .*.'CheckReturnValue' Methods in a class or package annotated with 'javax.annotation.CheckReturnValue' Optionally, all non-library methods Calls to methods annotated with Error Prone's or AssertJ's '@CanIgnoreReturnValue' annotation are not reported. Use the inspection settings to specify the classes to check. Methods are matched by name or name pattern using Java regular expression syntax. For classes, use fully-qualified names. Each entry applies to both the class and all its inheritors.",
"markdown": "Reports method calls whose result is ignored.\n\nFor many methods, ignoring the result is perfectly\nlegitimate, but for some it is almost certainly an error. Examples of methods where ignoring\nthe result is likely an error include `java.io.inputStream.read()`,\nwhich returns the number of bytes actually read, and any method on\n`java.lang.String` or `java.math.BigInteger`. These methods do not produce side-effects and thus pointless\nif their result is ignored.\n\nThe calls to the following methods are inspected:\n\n* Simple getters (which do nothing except return a field)\n* Methods specified in the settings of this inspection\n* Methods annotated with `org.jetbrains.annotations.Contract(pure=true)`\n* Methods annotated with .\\*.`CheckReturnValue`\n* Methods in a class or package annotated with `javax.annotation.CheckReturnValue`\n* Optionally, all non-library methods\n\nCalls to methods annotated with Error Prone's or AssertJ's `@CanIgnoreReturnValue` annotation are not reported.\n\n\nUse the inspection settings to specify the classes to check.\nMethods are matched by name or name pattern using Java regular expression syntax.\nFor classes, use fully-qualified names. Each entry applies to both the class and all its inheritors."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ResultOfMethodCallIgnored",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SwitchExpressionCanBePushedDown",
"shortDescription": {
"text": "Common subexpression can be extracted from 'switch'"
},
"fullDescription": {
"text": "Reports switch expressions and statements where every branch has a common subexpression, and the 'switch' can be moved inside. This action shortens the code. In many cases, it's reasonable to extract the resulting switch expression to a separate variable or method. Example: 'switch (value) {\n case 0 -> System.out.println(\"zero\");\n case 1 -> System.out.println(\"one\");\n case 2, 3, 4 -> System.out.println(\"few\");\n default -> System.out.println(\"many\");\n }' After the quick-fix is applied: 'System.out.println(switch (value) {\n case 0 -> \"zero\";\n case 1 -> \"one\";\n case 2, 3, 4 -> \"few\";\n default -> \"many\";\n });' This inspection is applicable only for enhanced switches with arrow syntax. New in 2022.3",
"markdown": "Reports switch expressions and statements where every branch has a common subexpression, and the `switch` can be moved inside. This action shortens the code. In many cases, it's reasonable to extract the resulting switch expression to a separate variable or method.\n\nExample:\n\n\n switch (value) {\n case 0 -> System.out.println(\"zero\");\n case 1 -> System.out.println(\"one\");\n case 2, 3, 4 -> System.out.println(\"few\");\n default -> System.out.println(\"many\");\n }\n\nAfter the quick-fix is applied:\n\n\n System.out.println(switch (value) {\n case 0 -> \"zero\";\n case 1 -> \"one\";\n case 2, 3, 4 -> \"few\";\n default -> \"many\";\n });\n\n\nThis inspection is applicable only for enhanced switches with arrow syntax.\n\nNew in 2022.3"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "SwitchExpressionCanBePushedDown",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InnerClassReferencedViaSubclass",
"shortDescription": {
"text": "Inner class referenced via subclass"
},
"fullDescription": {
"text": "Reports accesses of inner and nested classes where the call is qualified by a subclass of the declaring class, rather than the declaring class itself. Java allows such qualification, but such accesses may indicate a subtle confusion of inheritance and overriding. Example: 'class Super {\n static class Inner {}\n }\n\n class Sub extends Super {\n void test() {\n Sub.Inner s = new Sub.Inner(); // 'Inner' class is declared in 'Super' class, but referenced via 'Sub' class\n }\n }' After the quick-fix is applied: 'class Super {\n static class Inner {}\n }\n\n class Sub extends Super {\n void test() {\n Super.Inner s = new Super.Inner();\n }\n }'",
"markdown": "Reports accesses of inner and nested classes where the call is qualified by a subclass of the declaring class, rather than the declaring class itself.\n\n\nJava allows such qualification, but such accesses may indicate a subtle confusion of inheritance and overriding.\n\n**Example:**\n\n\n class Super {\n static class Inner {}\n }\n\n class Sub extends Super {\n void test() {\n Sub.Inner s = new Sub.Inner(); // 'Inner' class is declared in 'Super' class, but referenced via 'Sub' class\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class Super {\n static class Inner {}\n }\n\n class Sub extends Super {\n void test() {\n Super.Inner s = new Super.Inner();\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "InnerClassReferencedViaSubclass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ScheduledThreadPoolExecutorWithZeroCoreThreads",
"shortDescription": {
"text": "'ScheduledThreadPoolExecutor' with zero core threads"
},
"fullDescription": {
"text": "Reports any 'java.util.concurrent.ScheduledThreadPoolExecutor' instances in which 'corePoolSize' is set to zero via the 'setCorePoolSize' method or the object constructor. A 'ScheduledThreadPoolExecutor' with zero core threads will run nothing. Example: 'void foo(int corePoolSize) {\n if (corePoolSize != 0) return;\n ThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(corePoolSize); // warning\n executor.setCorePoolSize(corePoolSize); // warning\n }'",
"markdown": "Reports any `java.util.concurrent.ScheduledThreadPoolExecutor` instances in which `corePoolSize` is set to zero via the `setCorePoolSize` method or the object constructor.\n\n\nA `ScheduledThreadPoolExecutor` with zero core threads will run nothing.\n\n**Example:**\n\n\n void foo(int corePoolSize) {\n if (corePoolSize != 0) return;\n ThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(corePoolSize); // warning\n executor.setCorePoolSize(corePoolSize); // warning\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ScheduledThreadPoolExecutorWithZeroCoreThreads",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ChannelResource",
"shortDescription": {
"text": "'Channel' opened but not safely closed"
},
"fullDescription": {
"text": "Reports 'Channel' resources that are not safely closed, including any instances created by calling 'getChannel()' on a file or socket resource. By default, the inspection assumes that the resources can be closed by any method with 'close' or 'cleanup' in its name. Example: 'void send(Socket socket) throws IOException {\n SocketChannel channel = socket.getChannel(); //warning\n channel.write(ByteBuffer.wrap(\"message\".getBytes()));\n }' Use the following options to configure the inspection: Whether a 'Channel' resource is allowed to be opened inside a 'try' block. This style is less desirable because it is more verbose than opening a 'Channel' in front of a 'try' block. Whether the resource can be closed by any method call with the resource passed as argument.",
"markdown": "Reports `Channel` resources that are not safely closed, including any instances created by calling `getChannel()` on a file or socket resource.\n\n\nBy default, the inspection assumes that the resources can be closed by any method with\n'close' or 'cleanup' in its name.\n\n**Example:**\n\n\n void send(Socket socket) throws IOException {\n SocketChannel channel = socket.getChannel(); //warning\n channel.write(ByteBuffer.wrap(\"message\".getBytes()));\n }\n\n\nUse the following options to configure the inspection:\n\n* Whether a `Channel` resource is allowed to be opened inside a `try` block. This style is less desirable because it is more verbose than opening a `Channel` in front of a `try` block.\n* Whether the resource can be closed by any method call with the resource passed as argument."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ChannelOpenedButNotSafelyClosed",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Resource management",
"index": 155,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassMayBeInterface",
"shortDescription": {
"text": "Abstract 'class' may be 'interface'"
},
"fullDescription": {
"text": "Reports 'abstract' classes that can be converted to interfaces. Using interfaces instead of classes is preferable as Java doesn't support multiple class inheritance, while a class can implement multiple interfaces. A class may be converted to an interface if it has no superclasses (other than Object), has only 'public static final' fields, 'public abstract' methods, and 'public' inner classes. Example: 'abstract class Example {\n public static final int MY_CONST = 42;\n public abstract void foo();\n}\n\nclass Inheritor extends Example {\n @Override\n public void foo() {\n System.out.println(MY_CONST);\n }\n}' After the quick-fix is applied: 'interface Example {\n int MY_CONST = 42;\n void foo();\n}\n\nclass Inheritor implements Example {\n @Override\n public void foo() {\n System.out.println(MY_CONST);\n }\n}' Configure the inspection: Use the Report classes containing non-abstract methods when using Java 8 option to report only the classes with 'static' methods and non-abstract methods that can be converted to 'default' methods (only applicable to language level of 8 or higher).",
"markdown": "Reports `abstract` classes that can be converted to interfaces.\n\nUsing interfaces instead of classes is preferable as Java doesn't support multiple class inheritance,\nwhile a class can implement multiple interfaces.\n\nA class may be converted to an interface if it has no superclasses (other\nthan Object), has only `public static final` fields,\n`public abstract` methods, and `public` inner classes.\n\n\nExample:\n\n\n abstract class Example {\n public static final int MY_CONST = 42;\n public abstract void foo();\n }\n\n class Inheritor extends Example {\n @Override\n public void foo() {\n System.out.println(MY_CONST);\n }\n }\n\nAfter the quick-fix is applied:\n\n\n interface Example {\n int MY_CONST = 42;\n void foo();\n }\n\n class Inheritor implements Example {\n @Override\n public void foo() {\n System.out.println(MY_CONST);\n }\n }\n\nConfigure the inspection:\n\n\nUse the **Report classes containing non-abstract methods when using Java 8** option to report only the classes with `static` methods and non-abstract methods that can be converted to\n`default` methods (only applicable to language level of 8 or higher)."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ClassMayBeInterface",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryCallToStringValueOf",
"shortDescription": {
"text": "Unnecessary conversion to 'String'"
},
"fullDescription": {
"text": "Reports calls to static methods like 'String.valueOf()' or 'Integer.toString()' when they are used in a string concatenation or as an argument of a library method in which the explicit string conversion is not needed. Example: 'System.out.println(\"Number: \" + Integer.toString(count));' After the quick-fix is applied: 'System.out.println(\"Number: \" + count);' Library methods in which explicit string conversion is considered redundant: Classes 'java.io.PrintWriter', 'java.io.PrintStream' 'print()', 'println()' Classes 'java.lang.StringBuilder', 'java.lang.StringBuffer' 'append()' Class 'org.slf4j.Logger' 'trace()', 'debug()', 'info()', 'warn()', 'error()' Use the Report calls, which can be replaced with concatenations with empty string option to additionally report cases when concatenations with empty string can be used instead of 'String.valueOf()'.",
"markdown": "Reports calls to static methods like `String.valueOf()` or `Integer.toString()` when they are used in a string concatenation or as an argument of a library method in which the explicit string conversion is not needed.\n\nExample:\n\n\n System.out.println(\"Number: \" + Integer.toString(count));\n\nAfter the quick-fix is applied:\n\n\n System.out.println(\"Number: \" + count);\n\nLibrary methods in which explicit string conversion is considered redundant:\n\n* Classes `java.io.PrintWriter`, `java.io.PrintStream`\n * `print()`, `println()`\n* Classes `java.lang.StringBuilder`, `java.lang.StringBuffer`\n * `append()`\n* Class `org.slf4j.Logger`\n * `trace()`, `debug()`, `info()`, `warn()`, `error()`\n\n\nUse the **Report calls, which can be replaced with concatenations with empty string**\noption to additionally report cases when concatenations with empty string can be used instead of `String.valueOf()`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryCallToStringValueOf",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConstantOnWrongSideOfComparison",
"shortDescription": {
"text": "Constant on wrong side of comparison"
},
"fullDescription": {
"text": "Reports comparison operations where the constant value is on the wrong side. Some coding conventions specify that constants should be on a specific side of a comparison, either left or right. Example: 'boolean compare(int x) {\n return 1 > x; // Constant '1' on the left side of the comparison\n }' After the quick-fix is applied: 'boolean compare(int x) {\n return x < 1;\n }' Use the inspection settings to choose the side of constants in comparisons and whether to warn if 'null' literals are on the wrong side. New in 2019.2",
"markdown": "Reports comparison operations where the constant value is on the wrong side.\n\nSome coding conventions specify that constants should be on a specific side of a comparison, either left or right.\n\n**Example:**\n\n\n boolean compare(int x) {\n return 1 > x; // Constant '1' on the left side of the comparison\n }\n\nAfter the quick-fix is applied:\n\n\n boolean compare(int x) {\n return x < 1;\n }\n\n\nUse the inspection settings to choose the side of constants in comparisons\nand whether to warn if `null` literals are on the wrong side.\n\nNew in 2019.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ConstantOnWrongSideOfComparison",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessarilyQualifiedStaticallyImportedElement",
"shortDescription": {
"text": "Unnecessarily qualified statically imported element"
},
"fullDescription": {
"text": "Reports usage of statically imported members qualified with their containing class name. Such qualification is unnecessary and can be removed because statically imported members can be accessed directly by member name. Example: 'import static foo.Test.WIDTH;\n\n class Bar {\n void bar() {\n System.out.println(Test.WIDTH);\n }\n }' After the quick-fix is applied: 'import static foo.Test.WIDTH;\n\n class Bar {\n void bar() {\n System.out.println(WIDTH);\n }\n }'",
"markdown": "Reports usage of statically imported members qualified with their containing class name.\n\nSuch qualification is unnecessary and can be removed\nbecause statically imported members can be accessed directly by member name.\n\n**Example:**\n\n\n import static foo.Test.WIDTH;\n\n class Bar {\n void bar() {\n System.out.println(Test.WIDTH);\n }\n }\n\nAfter the quick-fix is applied:\n\n\n import static foo.Test.WIDTH;\n\n class Bar {\n void bar() {\n System.out.println(WIDTH);\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessarilyQualifiedStaticallyImportedElement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ObjectToString",
"shortDescription": {
"text": "Call to default 'toString()'"
},
"fullDescription": {
"text": "Reports calls to 'toString()' that use the default implementation from 'java.lang.Object'. The default implementation is rarely intended but may be used by accident. Calls to 'toString()' on objects with 'java.lang.Object', interface or abstract class type are ignored by this inspection. Example: 'class Bar {\n void foo1(Bar bar) {\n String s = bar.toString(); // warning\n /* ... */\n }\n\n void foo2(Object obj) {\n String s = obj.toString(); // no warning here\n /* ... */\n }\n }'",
"markdown": "Reports calls to `toString()` that use the default implementation from `java.lang.Object`.\n\nThe default implementation is rarely intended but may be used by accident.\n\n\nCalls to `toString()` on objects with `java.lang.Object`,\ninterface or abstract class type are ignored by this inspection.\n\n**Example:**\n\n\n class Bar {\n void foo1(Bar bar) {\n String s = bar.toString(); // warning\n /* ... */\n }\n\n void foo2(Object obj) {\n String s = obj.toString(); // no warning here\n /* ... */\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ObjectToString",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IfCanBeAssertion",
"shortDescription": {
"text": "Statement can be replaced with 'assert' or 'Objects.requireNonNull'"
},
"fullDescription": {
"text": "Reports 'if' statements that throw only 'java.lang.Throwable' from a 'then' branch and do not have an 'else' branch. Such statements can be converted to more compact 'assert' statements. The inspection also reports Guava's 'Preconditions.checkNotNull()'. They can be replaced with a 'Objects.requireNonNull()' call for which a library may not be needed. Example: 'if (x == 2) throw new RuntimeException(\"fail\");\n if (y == null) throw new AssertionError();\n Preconditions.checkNotNull(z, \"z\");' After the quick-fix is applied: 'assert x != 2 : \"fail\";\n Objects.requireNonNull(y);\n Objects.requireNonNull(z, \"z\");' By default, this inspection provides a quick-fix in the editor without code highlighting.",
"markdown": "Reports `if` statements that throw only `java.lang.Throwable` from a `then` branch and do not have an `else` branch. Such statements can be converted to more compact `assert` statements.\n\n\nThe inspection also reports Guava's `Preconditions.checkNotNull()`.\nThey can be replaced with a `Objects.requireNonNull()` call for which a library may not be needed.\n\nExample:\n\n\n if (x == 2) throw new RuntimeException(\"fail\");\n if (y == null) throw new AssertionError();\n Preconditions.checkNotNull(z, \"z\");\n\nAfter the quick-fix is applied:\n\n\n assert x != 2 : \"fail\";\n Objects.requireNonNull(y);\n Objects.requireNonNull(z, \"z\");\n\nBy default, this inspection provides a quick-fix in the editor without code highlighting."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "IfCanBeAssertion",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryTemporaryOnConversionToString",
"shortDescription": {
"text": "Unnecessary temporary object in conversion to 'String'"
},
"fullDescription": {
"text": "Reports unnecessary creation of temporary objects when converting from a primitive type to 'String'. Example: 'String foo = new Integer(3).toString();' After the quick-fix is applied: 'String foo = Integer.toString(3);'",
"markdown": "Reports unnecessary creation of temporary objects when converting from a primitive type to `String`.\n\n**Example:**\n\n\n String foo = new Integer(3).toString();\n\nAfter the quick-fix is applied:\n\n\n String foo = Integer.toString(3);\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryTemporaryOnConversionToString",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InterfaceMayBeAnnotatedFunctional",
"shortDescription": {
"text": "Interface may be annotated as '@FunctionalInterface'"
},
"fullDescription": {
"text": "Reports interfaces that can be annotated with '@FunctionalInterface' (available since JDK 1.8). Annotating an interface with '@FunctionalInterface' indicates that the interface is functional and no more 'abstract' methods can be added to it. Example: 'interface FileProcessor {\n void execute(File file);\n }' After the quick-fix is applied: '@FunctionalInterface\n interface FileProcessor {\n void execute(File file);\n }' This inspection only reports if the language level of the project or module is 8 or higher.",
"markdown": "Reports interfaces that can be annotated with `@FunctionalInterface` (available since JDK 1.8).\n\nAnnotating an interface with `@FunctionalInterface` indicates that the interface\nis functional and no more `abstract` methods can be added to it.\n\n**Example:**\n\n\n interface FileProcessor {\n void execute(File file);\n }\n\nAfter the quick-fix is applied:\n\n\n @FunctionalInterface\n interface FileProcessor {\n void execute(File file);\n }\n\nThis inspection only reports if the language level of the project or module is 8 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "InterfaceMayBeAnnotatedFunctional",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BreakStatementWithLabel",
"shortDescription": {
"text": "'break' statement with label"
},
"fullDescription": {
"text": "Reports 'break' statements with labels. Labeled 'break' statements complicate refactoring and can be confusing. Example: 'void handle(List<String> strs) {\n outer:\n for (String s: strs) {\n for (char ch : s.toCharArray()) {\n if ('s' == ch) break outer;\n handleChar(ch);\n }\n }\n }'",
"markdown": "Reports `break` statements with labels.\n\nLabeled `break` statements complicate refactoring and can be confusing.\n\nExample:\n\n\n void handle(List<String> strs) {\n outer:\n for (String s: strs) {\n for (char ch : s.toCharArray()) {\n if ('s' == ch) break outer;\n handleChar(ch);\n }\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "BreakStatementWithLabel",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StaticCallOnSubclass",
"shortDescription": {
"text": "Static method referenced via subclass"
},
"fullDescription": {
"text": "Reports static method calls where the call is qualified by a subclass of the declaring class, rather than by the declaring class itself. Java allows such qualification for classes, but such calls may indicate a subtle confusion of inheritance and overriding. Example: 'class Parent {\n public static void print(String str) {}\n }\n class Child extends Parent {}\n\n Child.print(\"Hello, world!\");' After the quick-fix is applied: 'Parent.print(\"Hello, world!\");'",
"markdown": "Reports static method calls where the call is qualified by a subclass of the declaring class, rather than by the declaring class itself.\n\n\nJava allows such qualification for classes, but such calls\nmay indicate a subtle confusion of inheritance and overriding.\n\n**Example:**\n\n\n class Parent {\n public static void print(String str) {}\n }\n class Child extends Parent {}\n\n Child.print(\"Hello, world!\");\n\nAfter the quick-fix is applied:\n\n\n Parent.print(\"Hello, world!\");\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "StaticMethodReferencedViaSubclass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NotifyWithoutCorrespondingWait",
"shortDescription": {
"text": "'notify()' without corresponding 'wait()'"
},
"fullDescription": {
"text": "Reports calls to 'Object.notify()' or 'Object.notifyAll()' for which no call to a corresponding 'Object.wait()' can be found. Only calls that target fields of the current class are reported by this inspection. Example: 'synchronized (synList) {\n synList.notify(); //synList.wait() is never called\n }'",
"markdown": "Reports calls to `Object.notify()` or `Object.notifyAll()` for which no call to a corresponding `Object.wait()` can be found.\n\nOnly calls that target fields of the current class are reported by this inspection.\n\n**Example:**\n\n\n synchronized (synList) {\n synList.notify(); //synList.wait() is never called\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NotifyWithoutCorrespondingWait",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SlowAbstractSetRemoveAll",
"shortDescription": {
"text": "Call to 'set.removeAll(list)' may work slowly"
},
"fullDescription": {
"text": "Reports calls to 'java.util.Set.removeAll()' with a 'java.util.List' argument. Such a call can be slow when the size of the argument is greater than or equal to the size of the set, and the set is a subclass of 'java.util.AbstractSet'. In this case, 'List.contains()' is called for each element in the set, which will perform a linear search. Example: 'public void check(String... ss) {\n // possible O(n^2) complexity\n mySet.removeAll(List.of(ss));\n }' After the quick fix is applied: 'public void check(String... ss) {\n // O(n) complexity\n List.of(ss).forEach(mySet::remove);\n }' New in 2020.3",
"markdown": "Reports calls to `java.util.Set.removeAll()` with a `java.util.List` argument.\n\n\nSuch a call can be slow when the size of the argument is greater than or equal to the size of the set,\nand the set is a subclass of `java.util.AbstractSet`.\nIn this case, `List.contains()` is called for each element in the set, which will perform a linear search.\n\n**Example:**\n\n\n public void check(String... ss) {\n // possible O(n^2) complexity\n mySet.removeAll(List.of(ss));\n }\n\nAfter the quick fix is applied:\n\n\n public void check(String... ss) {\n // O(n) complexity\n List.of(ss).forEach(mySet::remove);\n }\n\nNew in 2020.3"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SlowAbstractSetRemoveAll",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ArrayEquality",
"shortDescription": {
"text": "Array comparison using '==', instead of 'Arrays.equals()'"
},
"fullDescription": {
"text": "Reports operators '==' and '!=' used to test for array equality. In most cases, testing for the equality of array contents is intended, which can be done with the 'java.util.Arrays.equals()' method. A quick-fix is suggested to replace '==' with 'java.util.Arrays.equals()'. Example: 'void foo(Object[] x, Object[] y) {\n boolean comparison = x == y;\n }' After the quick-fix is applied: 'void foo(Object[] x, Object[] y) {\n boolean comparison = Arrays.equals(x, y);\n }'",
"markdown": "Reports operators `==` and `!=` used to test for array equality. In most cases, testing for the equality of array contents is intended, which can be done with the `java.util.Arrays.equals()` method.\n\n\nA quick-fix is suggested to replace `==` with `java.util.Arrays.equals()`.\n\n**Example:**\n\n\n void foo(Object[] x, Object[] y) {\n boolean comparison = x == y;\n }\n\nAfter the quick-fix is applied:\n\n\n void foo(Object[] x, Object[] y) {\n boolean comparison = Arrays.equals(x, y);\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ArrayEquality",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StaticCollection",
"shortDescription": {
"text": "Static collection"
},
"fullDescription": {
"text": "Reports static fields of a 'Collection' type. While it's not necessarily a problem, static collections often cause memory leaks and are therefore prohibited by some coding standards. Example: 'public class Example {\n static List<String> list = new ArrayList<>();\n\n }' Configure the inspection: Use the Ignore weak static collections or maps option to ignore the fields of the 'java.util.WeakHashMap' type.",
"markdown": "Reports static fields of a `Collection` type. While it's not necessarily a problem, static collections often cause memory leaks and are therefore prohibited by some coding standards.\n\n**Example:**\n\n\n public class Example {\n static List<String> list = new ArrayList<>();\n\n }\n\n\nConfigure the inspection:\n\n* Use the **Ignore weak static collections or maps** option to ignore the fields of the `java.util.WeakHashMap` type."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "StaticCollection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Memory",
"index": 166,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonExceptionNameEndsWithException",
"shortDescription": {
"text": "Non-exception class name ends with 'Exception'"
},
"fullDescription": {
"text": "Reports non-'exception' classes whose names end with 'Exception'. Such classes may cause confusion by breaking a common naming convention and often indicate that the 'extends Exception' clause is missing. Example: 'public class NotStartedException {}' A quick-fix that renames such classes is available only in the editor.",
"markdown": "Reports non-`exception` classes whose names end with `Exception`.\n\nSuch classes may cause confusion by breaking a common naming convention and\noften indicate that the `extends Exception` clause is missing.\n\n**Example:**\n\n public class NotStartedException {}\n\nA quick-fix that renames such classes is available only in the editor."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonExceptionNameEndsWithException",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Naming conventions/Class",
"index": 172,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassComplexity",
"shortDescription": {
"text": "Overly complex class"
},
"fullDescription": {
"text": "Reports classes whose total complexity exceeds the specified maximum. The total complexity of a class is the sum of cyclomatic complexities of all the methods and initializers the class declares. Inherited methods and initializers are not counted toward the total complexity. Too high complexity indicates that the class should be refactored into several smaller classes. Use the Cyclomatic complexity limit field below to specify the maximum allowed complexity for a class.",
"markdown": "Reports classes whose total complexity exceeds the specified maximum.\n\nThe total complexity of a class is the sum of cyclomatic complexities of all the methods\nand initializers the class declares. Inherited methods and initializers are not counted\ntoward the total complexity.\n\nToo high complexity indicates that the class should be refactored into several smaller classes.\n\nUse the **Cyclomatic complexity limit** field below to specify the maximum allowed complexity for a class."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OverlyComplexClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class metrics",
"index": 125,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java9UndeclaredServiceUsage",
"shortDescription": {
"text": "Usage of service not declared in 'module-info'"
},
"fullDescription": {
"text": "Reports situations in which a service is loaded with 'java.util.ServiceLoader' but it isn't declared with the 'uses' clause in the 'module-info.java' file and suggests inserting it. New in 2018.1",
"markdown": "Reports situations in which a service is loaded with `java.util.ServiceLoader` but it isn't declared with the `uses` clause in the `module-info.java` file and suggests inserting it.\n\nNew in 2018.1"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "Java9UndeclaredServiceUsage",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Visibility",
"index": 97,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CallToSimpleSetterInClass",
"shortDescription": {
"text": "Call to simple setter from within class"
},
"fullDescription": {
"text": "Reports calls to a simple property setter from within the property's class. A simple property setter is defined as one which simply assigns the value of its parameter to a field, and does no other calculations. Such simple setter calls can be safely inlined. Some coding standards also suggest against the use of simple setters for code clarity reasons. Example: 'class Foo {\n private int index;\n public Foo(int idx) {\n setIndex(idx);\n }\n public void setIndex(int idx) {\n index = idx;\n }\n }' After the quick-fix is applied: 'class Foo {\n private int index;\n public Foo(int idx) {\n index = idx;\n }\n public void setIndex(int idx) {\n index = idx;\n }\n }' Use the following options to configure the inspection: Whether to only report setter calls on 'this', not on objects of the same type passed in as a parameter. Whether to ignore non-'private' setters.",
"markdown": "Reports calls to a simple property setter from within the property's class.\n\n\nA simple property setter is defined as one which simply assigns the value of its parameter to a field,\nand does no other calculations. Such simple setter calls can be safely inlined.\nSome coding standards also suggest against the use of simple setters for code clarity reasons.\n\n**Example:**\n\n\n class Foo {\n private int index;\n public Foo(int idx) {\n setIndex(idx);\n }\n public void setIndex(int idx) {\n index = idx;\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class Foo {\n private int index;\n public Foo(int idx) {\n index = idx;\n }\n public void setIndex(int idx) {\n index = idx;\n }\n }\n\nUse the following options to configure the inspection:\n\n* Whether to only report setter calls on `this`, not on objects of the same type passed in as a parameter.\n* Whether to ignore non-`private` setters."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CallToSimpleSetterFromWithinClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceWithJavadoc",
"shortDescription": {
"text": "Comment replaceable with Javadoc"
},
"fullDescription": {
"text": "Reports a regular comment that belongs to a field, method, or class that can be replaced with a Javadoc comment. Example: 'public class Main {\n /*\n * Hello,\n */\n // World!\n void f() {\n }\n }' After the quick-fix is applied: 'public class Main {\n /**\n * Hello,\n * World!\n */\n void f() {\n }\n }'",
"markdown": "Reports a regular comment that belongs to a field, method, or class that can be replaced with a Javadoc comment.\n\n**Example:**\n\n\n public class Main {\n /*\n * Hello,\n */\n // World!\n void f() {\n }\n }\n\nAfter the quick-fix is applied:\n\n\n public class Main {\n /**\n * Hello,\n * World!\n */\n void f() {\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceWithJavadoc",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Javadoc",
"index": 95,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EmptyFinallyBlock",
"shortDescription": {
"text": "Empty 'finally' block"
},
"fullDescription": {
"text": "Reports empty 'finally' blocks. Empty 'finally' blocks usually indicate coding errors. They may also remain after code refactoring and can safely be removed. This inspection doesn't report empty 'finally' blocks found in JSP files. Example: 'try {\n Files.readString(Paths.get(\"in.txt\"));\n } catch (IOException e) {\n throw new RuntimeException(e);\n } finally {\n\n }' After the quick-fix is applied: 'try {\n Files.readString(Paths.get(\"in.txt\"));\n } catch (IOException e) {\n throw new RuntimeException(e);\n }'",
"markdown": "Reports empty `finally` blocks.\n\nEmpty `finally` blocks usually indicate coding errors. They may also remain after code refactoring and can safely be removed.\n\nThis inspection doesn't report empty `finally` blocks found in JSP files.\n\n**Example:**\n\n\n try {\n Files.readString(Paths.get(\"in.txt\"));\n } catch (IOException e) {\n throw new RuntimeException(e);\n } finally {\n\n }\n\nAfter the quick-fix is applied:\n\n\n try {\n Files.readString(Paths.get(\"in.txt\"));\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "EmptyFinallyBlock",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Error handling",
"index": 9,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FinalStaticMethod",
"shortDescription": {
"text": "'static' method declared 'final'"
},
"fullDescription": {
"text": "Reports static methods that are marked as 'final'. Such code might indicate an error or an incorrect assumption about the effect of the 'final' keyword. Static methods are not subject to runtime polymorphism, so the only purpose of the 'final' keyword used with static methods is to ensure the method will not be hidden in a subclass.",
"markdown": "Reports static methods that are marked as `final`.\n\nSuch code might indicate an error or an incorrect assumption about the effect of the `final` keyword.\nStatic methods are not subject to runtime polymorphism, so the only purpose of the `final` keyword used with static methods\nis to ensure the method will not be hidden in a subclass."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FinalStaticMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantTypeArguments",
"shortDescription": {
"text": "Redundant type arguments"
},
"fullDescription": {
"text": "Reports calls to parametrized methods with explicit argument types that can be omitted since they will be unambiguously inferred by the compiler. Using redundant type arguments is unnecessary and makes the code less readable. Example: 'List<String> list = Arrays.<String>asList(\"Hello\", \"World\");' A quick-fix is provided to remove redundant type arguments: 'List<String> list = Arrays.asList(\"Hello\", \"World\");'",
"markdown": "Reports calls to parametrized methods with explicit argument types that can be omitted since they will be unambiguously inferred by the compiler.\n\n\nUsing redundant type arguments is unnecessary and makes the code less readable.\n\nExample:\n\n\n List<String> list = Arrays.<String>asList(\"Hello\", \"World\");\n\nA quick-fix is provided to remove redundant type arguments:\n\n\n List<String> list = Arrays.asList(\"Hello\", \"World\");\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantTypeArguments",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RuntimeExecWithNonConstantString",
"shortDescription": {
"text": "Call to 'Runtime.exec()' with non-constant string"
},
"fullDescription": {
"text": "Reports calls to 'java.lang.Runtime.exec()' which take a dynamically-constructed string as the command to execute. Constructed execution strings are a common source of security breaches. By default, this inspection ignores compile-time constants. Example: 'String i = getUserInput();\n Runtime runtime = Runtime.getRuntime();\n runtime.exec(\"foo\" + i); // reports warning' Use the inspection settings to consider any 'static' 'final' fields as constant. Be careful, because strings like the following will be ignored when the option is enabled: 'static final String COMMAND = \"ping \" + getDomainFromUserInput() + \"'\";'",
"markdown": "Reports calls to `java.lang.Runtime.exec()` which take a dynamically-constructed string as the command to execute.\n\n\nConstructed execution strings are a common source of security breaches.\nBy default, this inspection ignores compile-time constants.\n\n**Example:**\n\n\n String i = getUserInput();\n Runtime runtime = Runtime.getRuntime();\n runtime.exec(\"foo\" + i); // reports warning\n\n\nUse the inspection settings to consider any `static` `final` fields as constant.\nBe careful, because strings like the following will be ignored when the option is enabled:\n\n\n static final String COMMAND = \"ping \" + getDomainFromUserInput() + \"'\";\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CallToRuntimeExecWithNonConstantString",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Security",
"index": 32,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SystemSetSecurityManager",
"shortDescription": {
"text": "Call to 'System.setSecurityManager()'"
},
"fullDescription": {
"text": "Reports calls to 'System.setSecurityManager()'. While often benign, any call to 'System.setSecurityManager()' should be closely examined in any security audit.",
"markdown": "Reports calls to `System.setSecurityManager()`.\n\nWhile often benign, any call to `System.setSecurityManager()` should be closely examined in any security audit."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CallToSystemSetSecurityManager",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Security",
"index": 32,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassWithoutNoArgConstructor",
"shortDescription": {
"text": "Class without no-arg constructor"
},
"fullDescription": {
"text": "Reports classes without a constructor that takes no arguments (i.e. has no parameters). No-arg constructors are necessary in some contexts. For example, if a class needs to be created using reflection. Example: 'public class Bean {\n private String name;\n\n public Bean(String name) {\n this.name = name;\n }\n }' Use the checkbox below to ignore classes without explicit constructors. The compiler provides a default no-arg constructor to such classes.",
"markdown": "Reports classes without a constructor that takes no arguments (i.e. has no parameters). No-arg constructors are necessary in some contexts. For example, if a class needs to be created using reflection.\n\n**Example:**\n\n\n public class Bean {\n private String name;\n\n public Bean(String name) {\n this.name = name;\n }\n }\n\n\nUse the checkbox below to ignore classes without explicit constructors.\nThe compiler provides a default no-arg constructor to such classes."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ClassWithoutNoArgConstructor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/JavaBeans issues",
"index": 142,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassWithTooManyDependencies",
"shortDescription": {
"text": "Class with too many dependencies"
},
"fullDescription": {
"text": "Reports classes that are directly dependent on too many other classes in the project. Modifications to any dependency of such classes may require changing the class, thus making it prone to instability. Only top-level classes are reported. Use the Maximum number of dependencies field to specify the maximum allowed number of dependencies for a class. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor.",
"markdown": "Reports classes that are directly dependent on too many other classes in the project.\n\nModifications to any dependency of such classes may require changing the class, thus making it prone to instability.\n\nOnly top-level classes are reported.\n\nUse the **Maximum number of dependencies** field to specify the maximum allowed number of dependencies for a class.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ClassWithTooManyDependencies",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Dependency issues",
"index": 200,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NewExceptionWithoutArguments",
"shortDescription": {
"text": "Exception constructor called without arguments"
},
"fullDescription": {
"text": "Reports creation of a exception instance without any arguments specified. When an exception is constructed without any arguments, it contains no information about the problem that occurred, which makes debugging needlessly hard. Example: 'throw new IOException(); // warning: exception without arguments'",
"markdown": "Reports creation of a exception instance without any arguments specified.\n\nWhen an exception is constructed without any arguments, it contains no information about the problem that occurred, which makes\ndebugging needlessly hard.\n\n**Example:**\n\n\n throw new IOException(); // warning: exception without arguments\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NewExceptionWithoutArguments",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Error handling",
"index": 9,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PackageWithTooManyClasses",
"shortDescription": {
"text": "Package with too many classes"
},
"fullDescription": {
"text": "Reports packages that contain too many classes. Overly large packages may indicate a lack of design clarity. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor. Use the Maximum number of classes field to specify the maximum allowed number of classes in a package.",
"markdown": "Reports packages that contain too many classes.\n\nOverly large packages may indicate a lack of design clarity.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor.\n\nUse the **Maximum number of classes** field to specify the maximum allowed number of classes in a package."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PackageWithTooManyClasses",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Packaging issues",
"index": 190,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AwaitWithoutCorrespondingSignal",
"shortDescription": {
"text": "'await()' without corresponding 'signal()'"
},
"fullDescription": {
"text": "Reports calls to 'Condition.await()', for which no call to a corresponding 'Condition.signal()' or 'Condition.signalAll()' can be found. Calling 'Condition.await()' in a thread without corresponding 'Condition.signal()' may cause the thread to become disabled until it is interrupted or \"spurious wakeup\" occurs. Only calls that target fields of the current class are reported by this inspection. Example: 'class Queue {\n private final Condition isEmpty = ...;\n\n void add(Object elem) {\n // ...\n // isEmpty.signal();\n // ...\n }\n\n void remove(Object elem) throws InterruptedException {\n // ...\n isEmpty.await(); // 'await()' doesn't contain corresponding 'signal()'/'signalAll()' call\n // ...\n }\n }'",
"markdown": "Reports calls to `Condition.await()`, for which no call to a corresponding `Condition.signal()` or `Condition.signalAll()` can be found.\n\n\nCalling `Condition.await()` in a thread without corresponding `Condition.signal()` may cause the thread\nto become disabled until it is interrupted or \"spurious wakeup\" occurs.\n\nOnly calls that target fields of the current class are reported by this inspection.\n\n**Example:**\n\n\n class Queue {\n private final Condition isEmpty = ...;\n\n void add(Object elem) {\n // ...\n // isEmpty.signal();\n // ...\n }\n\n void remove(Object elem) throws InterruptedException {\n // ...\n isEmpty.await(); // 'await()' doesn't contain corresponding 'signal()'/'signalAll()' call\n // ...\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AwaitWithoutCorrespondingSignal",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OverwrittenKey",
"shortDescription": {
"text": "Overwritten Map, Set, or array element"
},
"fullDescription": {
"text": "Reports code that overwrites a 'Map' key, a 'Set' element, or an array element in a sequence of 'add'/'put' calls or using a Java 9 factory method like 'Set.of' (which will result in runtime exception). This usually occurs due to a copy-paste error. Example: 'map.put(\"A\", 1);\n map.put(\"B\", 2);\n map.put(\"C\", 3);\n map.put(\"D\", 4);\n map.put(\"A\", 5); // duplicating key \"A\", overwrites the previously written entry' New in 2017.3",
"markdown": "Reports code that overwrites a `Map` key, a `Set` element, or an array element in a sequence of `add`/`put` calls or using a Java 9 factory method like `Set.of` (which will result in runtime exception).\n\nThis usually occurs due to a copy-paste error.\n\n**Example:**\n\n\n map.put(\"A\", 1);\n map.put(\"B\", 2);\n map.put(\"C\", 3);\n map.put(\"D\", 4);\n map.put(\"A\", 5); // duplicating key \"A\", overwrites the previously written entry\n\nNew in 2017.3"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "OverwrittenKey",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AnonymousClassMethodCount",
"shortDescription": {
"text": "Anonymous inner class with too many methods"
},
"fullDescription": {
"text": "Reports anonymous inner classes whose method count exceeds the specified maximum. Anonymous classes with numerous methods may be difficult to understand and should be promoted to become named inner classes. Use the Method count limit field to specify the maximum allowed number of methods in an anonymous inner class.",
"markdown": "Reports anonymous inner classes whose method count exceeds the specified maximum.\n\nAnonymous classes with numerous methods may be\ndifficult to understand and should be promoted to become named inner classes.\n\nUse the **Method count limit** field to specify the maximum allowed number of methods in an anonymous inner class."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AnonymousInnerClassWithTooManyMethods",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class metrics",
"index": 125,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CastToIncompatibleInterface",
"shortDescription": {
"text": "Casting to incompatible interface"
},
"fullDescription": {
"text": "Reports type cast expressions where the cast type is an interface and the cast expression has a class type that neither implements the cast interface, nor has any visible subclasses that implement the cast interface. Although this might be intended, such a construct is most likely an error, and will result in a 'java.lang.ClassCastException' at runtime. Example: 'interface A {}\n interface Z {}\n static class C {}\n\n void x(C c) {\n if (c instanceof Z) {\n A a = ((A)c); // cast to incompatible interface 'A'\n }\n }'",
"markdown": "Reports type cast expressions where the cast type is an interface and the cast expression has a class type that neither implements the cast interface, nor has any visible subclasses that implement the cast interface.\n\n\nAlthough this might be intended, such a construct is most likely an error, and will\nresult in a `java.lang.ClassCastException` at runtime.\n\n**Example:**\n\n\n interface A {}\n interface Z {}\n static class C {}\n\n void x(C c) {\n if (c instanceof Z) {\n A a = ((A)c); // cast to incompatible interface 'A'\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CastToIncompatibleInterface",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnqualifiedMethodAccess",
"shortDescription": {
"text": "Instance method call not qualified with 'this'"
},
"fullDescription": {
"text": "Reports calls to non-'static' methods on the same instance that are not qualified with 'this'. Example: 'class Foo {\n void bar() {}\n\n void foo() {\n bar();\n }\n }' After the quick-fix is applied: 'class Foo {\n void bar() {}\n\n void foo() {\n this.bar();\n }\n }'",
"markdown": "Reports calls to non-`static` methods on the same instance that are not qualified with `this`.\n\n**Example:**\n\n\n class Foo {\n void bar() {}\n\n void foo() {\n bar();\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class Foo {\n void bar() {}\n\n void foo() {\n this.bar();\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnqualifiedMethodAccess",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InstanceofIncompatibleInterface",
"shortDescription": {
"text": "'instanceof' with incompatible interface"
},
"fullDescription": {
"text": "Reports 'instanceof' expressions where the compared type is an interface, and the compared expression has a class type that neither implements the compared interface, nor has any visible subclasses which implement the compared interface. Although that might be intended, normally such a construct is most likely an error, where the resulting 'instanceof' expression always evaluates to 'false'. Example: 'interface I1 {}\n\n interface I2 {}\n\n interface I3 extends I1 {}\n\n static class Sub1 implements I1 {}\n\n static class Sub2 extends Sub1 implements I2 {\n void test(Sub1 sub1) {\n if (sub1 instanceof I3) { // here 'I3' is incompatible interface\n }\n }\n }'",
"markdown": "Reports `instanceof` expressions where the compared type is an interface, and the compared expression has a class type that neither implements the compared interface, nor has any visible subclasses which implement the compared interface.\n\n\nAlthough that might be intended, normally such a construct is most likely an error, where\nthe resulting `instanceof` expression always evaluates to `false`.\n\n**Example:**\n\n\n interface I1 {}\n\n interface I2 {}\n\n interface I3 extends I1 {}\n\n static class Sub1 implements I1 {}\n\n static class Sub2 extends Sub1 implements I2 {\n void test(Sub1 sub1) {\n if (sub1 instanceof I3) { // here 'I3' is incompatible interface\n }\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "InstanceofIncompatibleInterface",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FunctionalExpressionCanBeFolded",
"shortDescription": {
"text": "Functional expression can be folded"
},
"fullDescription": {
"text": "Reports method references or lambda expressions that point to a method of their own functional interface type and hence can be replaced with their qualifiers removing unnecessary object allocation. Example: 'SwingUtilities.invokeLater(r::run);\n SwingUtilities.invokeAndWait(() -> r.run());' After the quick-fix is applied: 'SwingUtilities.invokeLater(r);\n SwingUtilities.invokeAndWait(r);' This inspection reports only if the language level of the project or module is 8 or higher.",
"markdown": "Reports method references or lambda expressions that point to a method of their own functional interface type and hence can be replaced with their qualifiers removing unnecessary object allocation.\n\nExample:\n\n\n SwingUtilities.invokeLater(r::run);\n SwingUtilities.invokeAndWait(() -> r.run());\n\nAfter the quick-fix is applied:\n\n\n SwingUtilities.invokeLater(r);\n SwingUtilities.invokeAndWait(r);\n\nThis inspection reports only if the language level of the project or module is 8 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FunctionalExpressionCanBeFolded",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Declaration redundancy",
"index": 10,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CustomClassloader",
"shortDescription": {
"text": "Custom 'ClassLoader' is declared"
},
"fullDescription": {
"text": "Reports user-defined subclasses of 'java.lang.ClassLoader'. While not necessarily representing a security hole, such classes should be thoroughly inspected for possible security issues.",
"markdown": "Reports user-defined subclasses of `java.lang.ClassLoader`.\n\n\nWhile not necessarily representing a security hole, such classes should be thoroughly\ninspected for possible security issues."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CustomClassloader",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Security",
"index": 32,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ThisEscapedInConstructor",
"shortDescription": {
"text": "'this' reference escaped in object construction"
},
"fullDescription": {
"text": "Reports possible escapes of 'this' during the object initialization. The escapes occur when 'this' is used as a method argument or an object of assignment in a constructor or initializer. Such escapes may result in subtle bugs, as the object is now available in the context where it is not guaranteed to be initialized. Example: 'class Foo {\n {\n System.out.println(this);\n }\n }'",
"markdown": "Reports possible escapes of `this` during the object initialization. The escapes occur when `this` is used as a method argument or an object of assignment in a constructor or initializer. Such escapes may result in subtle bugs, as the object is now available in the context where it is not guaranteed to be initialized.\n\n**Example:**\n\n\n class Foo {\n {\n System.out.println(this);\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ThisEscapedInObjectConstruction",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Initialization",
"index": 26,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessarySuperConstructor",
"shortDescription": {
"text": "Unnecessary call to 'super()'"
},
"fullDescription": {
"text": "Reports calls to no-arg superclass constructors during object construction. Such calls are unnecessary and may be removed. Example: 'class Foo {\n Foo() {\n super();\n }\n }' After the quick-fix is applied: 'class Foo {\n Foo() {\n }\n }'",
"markdown": "Reports calls to no-arg superclass constructors during object construction.\n\nSuch calls are unnecessary and may be removed.\n\n**Example:**\n\n\n class Foo {\n Foo() {\n super();\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class Foo {\n Foo() {\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryCallToSuper",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IfCanBeSwitch",
"shortDescription": {
"text": "'if' can be replaced with 'switch'"
},
"fullDescription": {
"text": "Reports 'if' statements that can be replaced with 'switch' statements. The replacement result is usually shorter and clearer. Example: 'void test(String str) {\n if (str.equals(\"1\")) {\n System.out.println(1);\n } else if (str.equals(\"2\")) {\n System.out.println(2);\n } else if (str.equals(\"3\")) {\n System.out.println(3);\n } else {\n System.out.println(4);\n }\n }' After the quick-fix is applied: 'void test(String str) {\n switch (str) {\n case \"1\" -> System.out.println(1);\n case \"2\" -> System.out.println(2);\n case \"3\" -> System.out.println(3);\n default -> System.out.println(4);\n }\n }' This inspection only reports if the language level of the project or module is 7 or higher. Use the Minimum number of 'if' condition branches field to specify the minimum number of 'if' condition branches for an 'if' statement to have to be reported. Note that the terminal 'else' branch (without 'if') is not counted. Use the Suggest switch on numbers option to enable the suggestion of 'switch' statements on primitive and boxed numbers and characters. Use the Suggest switch on enums option to enable the suggestion of 'switch' statements on 'enum' constants. Use the Only suggest on null-safe expressions option to suggest 'switch' statements that can't introduce a 'NullPointerException' only.",
"markdown": "Reports `if` statements that can be replaced with `switch` statements.\n\nThe replacement result is usually shorter and clearer.\n\n**Example:**\n\n\n void test(String str) {\n if (str.equals(\"1\")) {\n System.out.println(1);\n } else if (str.equals(\"2\")) {\n System.out.println(2);\n } else if (str.equals(\"3\")) {\n System.out.println(3);\n } else {\n System.out.println(4);\n }\n }\n\nAfter the quick-fix is applied:\n\n\n void test(String str) {\n switch (str) {\n case \"1\" -> System.out.println(1);\n case \"2\" -> System.out.println(2);\n case \"3\" -> System.out.println(3);\n default -> System.out.println(4);\n }\n }\n \nThis inspection only reports if the language level of the project or module is 7 or higher.\n\nUse the **Minimum number of 'if' condition branches** field to specify the minimum number of `if` condition branches\nfor an `if` statement to have to be reported. Note that the terminal `else` branch (without `if`) is not counted.\n\n\nUse the **Suggest switch on numbers** option to enable the suggestion of `switch` statements on\nprimitive and boxed numbers and characters.\n\n\nUse the **Suggest switch on enums** option to enable the suggestion of `switch` statements on\n`enum` constants.\n\n\nUse the **Only suggest on null-safe expressions** option to suggest `switch` statements that can't introduce a `NullPointerException` only."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "IfCanBeSwitch",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids",
"index": 69,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonPublicClone",
"shortDescription": {
"text": "'clone()' method not 'public'"
},
"fullDescription": {
"text": "Reports 'clone()' methods that are 'protected' and not 'public'. When overriding the 'clone()' method from 'java.lang.Object', it is expected to make the method 'public', so that it is accessible from non-subclasses outside the package.",
"markdown": "Reports `clone()` methods that are `protected` and not `public`.\n\nWhen overriding the `clone()` method from `java.lang.Object`, it is expected to make the method `public`,\nso that it is accessible from non-subclasses outside the package."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonPublicClone",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Cloning issues",
"index": 140,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "VariableNotUsedInsideIf",
"shortDescription": {
"text": "Reference checked for 'null' is not used inside 'if'"
},
"fullDescription": {
"text": "Reports references to variables that are checked for nullability in the condition of an 'if' statement or conditional expression but not used inside that 'if' statement. Usually this either means that the check is unnecessary or that the variable is not referenced inside the 'if' statement by mistake. Example: 'void test(Integer i) {\n if (i != null) { // here 'i' is not used inside 'if' statement\n System.out.println();\n }\n }'",
"markdown": "Reports references to variables that are checked for nullability in the condition of an `if` statement or conditional expression but not used inside that `if` statement.\n\n\nUsually this either means that\nthe check is unnecessary or that the variable is not referenced inside the\n`if` statement by mistake.\n\n**Example:**\n\n\n void test(Integer i) {\n if (i != null) { // here 'i' is not used inside 'if' statement\n System.out.println();\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "VariableNotUsedInsideIf",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CollectionAddAllCanBeReplacedWithConstructor",
"shortDescription": {
"text": "Redundant 'Collection.addAll()' call"
},
"fullDescription": {
"text": "Reports 'Collection.addAll()' and 'Map.putAll()' calls immediately after an instantiation of a collection using a no-arg constructor. Such constructs can be replaced with a single call to a parametrized constructor, which simplifies the code. Also, for some collections the replacement might be more performant. Example: 'Set<String> set = new HashSet<>();\n set.addAll(Arrays.asList(\"alpha\", \"beta\", \"gamma\"));' After the quick-fix is applied: 'Set<String> set = new HashSet<>(Arrays.asList(\"alpha\", \"beta\", \"gamma\"));' The JDK collection classes are supported by default. Additionally, you can specify other classes using the Classes to check panel.",
"markdown": "Reports `Collection.addAll()` and `Map.putAll()` calls immediately after an instantiation of a collection using a no-arg constructor.\n\nSuch constructs can be replaced with a single call to a parametrized constructor, which simplifies the code. Also, for some collections the replacement\nmight be more performant.\n\n**Example:**\n\n\n Set<String> set = new HashSet<>();\n set.addAll(Arrays.asList(\"alpha\", \"beta\", \"gamma\"));\n\nAfter the quick-fix is applied:\n\n\n Set<String> set = new HashSet<>(Arrays.asList(\"alpha\", \"beta\", \"gamma\"));\n\n\nThe JDK collection classes are supported by default.\nAdditionally, you can specify other classes using the **Classes to check** panel."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "CollectionAddAllCanBeReplacedWithConstructor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MultipleReturnPointsPerMethod",
"shortDescription": {
"text": "Method with multiple return points"
},
"fullDescription": {
"text": "Reports methods whose number of 'return' points exceeds the specified maximum. Methods with too many 'return' points may be confusing and hard to refactor. A 'return' point is either a 'return' statement or a falling through the bottom of a 'void' method or constructor. Example: The method below is reported if only two 'return' statements are allowed: 'void doSmth(User[] users) {\n for (User user : users) {\n if (cond1(user)) {\n user.setId(getId());\n return;\n } else if (cond2(user)) {\n if (cond3(user)) {\n user.setId(getId());\n return;\n }\n }\n }\n }' Consider rewriting the method so it becomes easier to understand: 'void doSmth(User[] users) {\n for (User user : users) {\n if (cond1(user) || cond2(user) && cond3(user)) {\n user.setId(getId());\n return;\n }\n }\n }' Configure the inspection: Use the Return point limit field to specify the maximum allowed number of 'return' points for a method. Use the Ignore guard clauses option to ignore guard clauses. A guard clause is an 'if' statement that contains only a 'return' statement Use the Ignore for 'equals()' methods option to ignore 'return' points inside 'equals()' methods.",
"markdown": "Reports methods whose number of `return` points exceeds the specified maximum. Methods with too many `return` points may be confusing and hard to refactor.\n\nA `return` point is either a `return` statement or a falling through the bottom of a\n`void` method or constructor.\n\n**Example:**\n\nThe method below is reported if only two `return` statements are allowed:\n\n\n void doSmth(User[] users) {\n for (User user : users) {\n if (cond1(user)) {\n user.setId(getId());\n return;\n } else if (cond2(user)) {\n if (cond3(user)) {\n user.setId(getId());\n return;\n }\n }\n }\n }\n\nConsider rewriting the method so it becomes easier to understand:\n\n\n void doSmth(User[] users) {\n for (User user : users) {\n if (cond1(user) || cond2(user) && cond3(user)) {\n user.setId(getId());\n return;\n }\n }\n }\n\nConfigure the inspection:\n\n* Use the **Return point limit** field to specify the maximum allowed number of `return` points for a method.\n* Use the **Ignore guard clauses** option to ignore guard clauses. A guard clause is an `if` statement that contains only a `return` statement\n* Use the **Ignore for 'equals()' methods** option to ignore `return` points inside `equals()` methods."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MethodWithMultipleReturnPoints",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Method metrics",
"index": 139,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DiamondCanBeReplacedWithExplicitTypeArguments",
"shortDescription": {
"text": "Diamond can be replaced with explicit type arguments"
},
"fullDescription": {
"text": "Reports instantiation of generic classes in which the <> symbol (diamond) is used instead of type parameters. The quick-fix replaces <> (diamond) with explicit type parameters. Example: 'List <String> list = new ArrayList<>()' After the quick-fix is applied: 'List <String> list = new ArrayList<String>()' Diamond operation appeared in Java 7. This inspection can help to downgrade for backward compatibility with earlier Java versions.",
"markdown": "Reports instantiation of generic classes in which the **\\<\\>** symbol (diamond) is used instead of type parameters.\n\nThe quick-fix replaces **\\<\\>** (diamond) with explicit type parameters.\n\nExample:\n\n List <String> list = new ArrayList<>()\n\nAfter the quick-fix is applied:\n\n List <String> list = new ArrayList<String>()\n\n\n*Diamond operation* appeared in Java 7.\nThis inspection can help to downgrade for backward compatibility with earlier Java versions."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "DiamondCanBeReplacedWithExplicitTypeArguments",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaRequiresAutoModule",
"shortDescription": {
"text": "Dependencies on automatic modules"
},
"fullDescription": {
"text": "Reports usages of automatic modules in a 'requires' directive. An automatic module is unreliable since it can depend on the types on the class path, and its name and exported packages can change if it's converted into an explicit module. Corresponds to '-Xlint:requires-automatic' and '-Xlint:requires-transitive-automatic' Javac options. The first option increases awareness of when automatic modules are used. The second warns the authors of a module that they're putting the users of that module at risk by establishing implied readability to an automatic module. Example: '//module-info.java\n module org.printer {\n requires transitive drivers.corp.org; // reported in case 'drivers.corp.org' is an automatic module\n }' Use the Highlight only transitive dependencies option to warn only about transitive dependencies.",
"markdown": "Reports usages of automatic modules in a `requires` directive.\n\nAn automatic\nmodule is unreliable since it can depend on the types on the class path,\nand its name and exported packages can change if it's\nconverted into an explicit module.\n\nCorresponds to `-Xlint:requires-automatic` and `-Xlint:requires-transitive-automatic` Javac options.\nThe first option increases awareness of when automatic modules are used.\nThe second warns the authors of a module that they're putting the users of that module at risk by establishing implied readability to an automatic module.\n\n**Example:**\n\n\n //module-info.java\n module org.printer {\n requires transitive drivers.corp.org; // reported in case 'drivers.corp.org' is an automatic module\n }\n\n\nUse the **Highlight only transitive dependencies** option to warn only about transitive dependencies."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "requires-transitive-automatic",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 9",
"index": 205,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RuntimeExec",
"shortDescription": {
"text": "Call to 'Runtime.exec()'"
},
"fullDescription": {
"text": "Reports calls to 'Runtime.exec()' or any of its variants. Calls to 'Runtime.exec()' are inherently unportable.",
"markdown": "Reports calls to `Runtime.exec()` or any of its variants. Calls to `Runtime.exec()` are inherently unportable."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CallToRuntimeExec",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Portability",
"index": 179,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SubtractionInCompareTo",
"shortDescription": {
"text": "Subtraction in 'compareTo()'"
},
"fullDescription": {
"text": "Reports subtraction in 'compareTo()' methods and methods implementing 'java.util.Comparator.compare()'. While it is a common idiom to use the results of integer subtraction as the result of a 'compareTo()' method, this construct may cause subtle and difficult bugs in cases of integer overflow. Comparing the integer values directly and returning '-1', '0', or '1' is a better practice in most cases. Subtraction on floating point values that is immediately cast to integral type is also reported because precision loss is possible due to rounding. The inspection doesn't report when it's statically determined that value ranges are limited, and overflow never occurs. Additionally, subtraction on 'int' numbers greater than or equal to '0' will never overflow. Therefore, this inspection tries not to warn in those cases. Methods that always return zero or greater can be marked with the 'javax.annotation.Nonnegative' annotation or specified in this inspection's options. Example: 'class DoubleHolder implements Comparable<DoubleHolder> {\n double d;\n public int compareTo(DoubleHolder that) {\n return (int)(this.d - that.d);\n }\n }' A no-warning example because 'String.length()' is known to be non-negative: 'class A implements Comparable<A> {\n final String s = \"\";\n public int compareTo(A a) {\n return s.length() - a.s.length();\n }\n }' Use the options to list methods that are safe to use inside a subtraction. Methods are safe when they return an 'int' value that is always greater than or equal to '0'.",
"markdown": "Reports subtraction in `compareTo()` methods and methods implementing `java.util.Comparator.compare()`.\n\n\nWhile it is a common idiom to\nuse the results of integer subtraction as the result of a `compareTo()`\nmethod, this construct may cause subtle and difficult bugs in cases of integer overflow.\nComparing the integer values directly and returning `-1`, `0`, or `1` is a better practice in most cases.\n\n\nSubtraction on floating point values that is immediately cast to integral type is also reported because precision loss is possible due to\nrounding.\n\n\nThe inspection doesn't report when it's statically determined that value ranges are limited, and overflow never occurs.\nAdditionally, subtraction on `int` numbers greater than or equal to `0` will never overflow.\nTherefore, this inspection tries not to warn in those cases.\n\n\nMethods that always return zero or greater can be marked with the\n`javax.annotation.Nonnegative` annotation or specified in this inspection's options.\n\n**Example:**\n\n\n class DoubleHolder implements Comparable<DoubleHolder> {\n double d;\n public int compareTo(DoubleHolder that) {\n return (int)(this.d - that.d);\n }\n }\n\nA no-warning example because `String.length()` is known to be non-negative:\n\n\n class A implements Comparable<A> {\n final String s = \"\";\n public int compareTo(A a) {\n return s.length() - a.s.length();\n }\n }\n\n\nUse the options to list methods that are safe to use inside a subtraction.\nMethods are safe when they return an `int` value that is always greater than or equal to `0`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SubtractionInCompareTo",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConnectionResource",
"shortDescription": {
"text": "Connection opened but not safely closed"
},
"fullDescription": {
"text": "Reports Java ME 'javax.microedition.io.Connection' resources that are not opened in front of a 'try' block and closed in the corresponding 'finally' block. Such resources may be inadvertently leaked if an exception is thrown before the resource is closed. Example: 'void example() throws IOException {\n Connection c = Connector.open(\"foo\");\n }'",
"markdown": "Reports Java ME `javax.microedition.io.Connection` resources that are not opened in front of a `try` block and closed in the corresponding `finally` block. Such resources may be inadvertently leaked if an exception is thrown before the resource is closed.\n\n**Example:**\n\n\n void example() throws IOException {\n Connection c = Connector.open(\"foo\");\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ConnectionOpenedButNotSafelyClosed",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance/Embedded",
"index": 178,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BooleanVariableAlwaysNegated",
"shortDescription": {
"text": "Boolean variable is always inverted"
},
"fullDescription": {
"text": "Reports boolean variables or fields which are always negated when their value is used. Example: 'void m() {\n boolean b = true; //boolean variable 'b' is always inverted\n System.out.println(!b);\n }'",
"markdown": "Reports boolean variables or fields which are always negated when their value is used.\n\nExample:\n\n\n void m() {\n boolean b = true; //boolean variable 'b' is always inverted\n System.out.println(!b);\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "BooleanVariableAlwaysNegated",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Data flow",
"index": 61,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ExtendsAnnotation",
"shortDescription": {
"text": "Class extends annotation interface"
},
"fullDescription": {
"text": "Reports classes declared as an implementation or extension of an annotation interface. While it is legal to extend an annotation interface, it is often done by accident, and the result can't be used as an annotation.",
"markdown": "Reports classes declared as an implementation or extension of an annotation interface.\n\nWhile it is legal to extend an annotation interface, it is often done by accident,\nand the result can't be used as an annotation."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ClassExplicitlyAnnotation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Inheritance issues",
"index": 159,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "unused",
"shortDescription": {
"text": "Unused declaration"
},
"fullDescription": {
"text": "Reports classes, methods, or fields that are not used or unreachable from the entry points. An entry point can be a main method, tests, classes from outside the specified scope, classes accessible from 'module-info.java', and so on. It is possible to configure custom entry points by using name patterns or annotations. Example: 'public class Department {\n private Organization myOrganization;\n }' In this example, 'Department' explicitly references 'Organization' but if 'Department' class itself is unused, then inspection will report both classes. The inspection also reports parameters that are not used by their methods and all method implementations and overriders, as well as local variables that are declared but not used. Note: Some unused members may not be reported during in-editor code highlighting. For performance reasons, a non-private member is checked only when its name rarely occurs in the project. To see all results, run the inspection by selecting Code | Inspect Code or Code | Analyze Code | Run Inspection by Name from the main menu. Use the visibility settings below to configure members to be reported. For example, configuring report 'private' methods only means that 'public' methods of 'private' inner class will be reported but 'protected' methods of top level class will be ignored. Use the entry points tab to configure entry points to be considered during the inspection run. You can add entry points manually when inspection results are ready. If your code uses unsupported frameworks, there are several options: If the framework relies on annotations, use the Annotations... button to configure the framework's annotations. If the framework doesn't rely on annotations, try to configure class name patterns that are expected by the framework. This way the annotated code accessible by the framework internals will be treated as used.",
"markdown": "Reports classes, methods, or fields that are not used or unreachable from the entry points.\n\nAn entry point can be a main method, tests, classes from outside the specified scope, classes accessible from\n`module-info.java`, and so on. It is possible to configure custom entry points by using name patterns or annotations.\n\n**Example:**\n\n\n public class Department {\n private Organization myOrganization;\n }\n\nIn this example, `Department` explicitly references `Organization` but if `Department` class itself is unused, then inspection will report both classes.\n\n\nThe inspection also reports parameters that are not used by their methods and all method implementations and overriders, as well as local\nvariables that are declared but not used.\n\n\n**Note:** Some unused members may not be reported during in-editor code highlighting. For performance reasons, a non-private member is\nchecked only when its name rarely occurs in the project.\nTo see all results, run the inspection by selecting **Code \\| Inspect Code** or **Code \\| Analyze Code \\| Run Inspection by Name** from the main menu.\n\nUse the visibility settings below to configure members to be reported. For example, configuring report `private` methods only means\nthat `public` methods of `private` inner class will be reported but `protected` methods of top level class\nwill be ignored.\n\n\nUse the **entry points** tab to configure entry points to be considered during the inspection run.\n\nYou can add entry points manually when inspection results are ready.\n\nIf your code uses unsupported frameworks, there are several options:\n\n* If the framework relies on annotations, use the **Annotations...** button to configure the framework's annotations.\n* If the framework doesn't rely on annotations, try to configure class name patterns that are expected by the framework.\n\nThis way the annotated code accessible by the framework internals will be treated as used."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "unused",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Declaration redundancy",
"index": 10,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MismatchedStringCase",
"shortDescription": {
"text": "Mismatched case in 'String' operation"
},
"fullDescription": {
"text": "Reports 'String' method calls that always return the same value ('-1' or 'false') because a lowercase character is searched in an uppercase-only string or vice versa. Reported methods include 'equals', 'startsWith', 'endsWith', 'contains', 'indexOf', and 'lastIndexOf'. Example: if (columnName.toLowerCase().equals(\"ID\")) {...}\n New in 2019.3",
"markdown": "Reports `String` method calls that always return the same value (`-1` or `false`) because a lowercase character is searched in an uppercase-only string or vice versa.\n\nReported methods include `equals`, `startsWith`, `endsWith`, `contains`,\n`indexOf`, and `lastIndexOf`.\n\n**Example:**\n\n```\n if (columnName.toLowerCase().equals(\"ID\")) {...}\n```\n\nNew in 2019.3"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "MismatchedStringCase",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AssignmentToNull",
"shortDescription": {
"text": "'null' assignment"
},
"fullDescription": {
"text": "Reports variables that are assigned to 'null' outside a declaration. The main purpose of 'null' in Java is to denote uninitialized reference variables. In rare cases, assigning a variable explicitly to 'null' is useful to aid garbage collection. However, using 'null' to denote a missing, not specified, or invalid value or a not found element is considered bad practice and may make your code more prone to 'NullPointerExceptions'. Instead, consider defining a sentinel object with the intended semantics or use library types like 'Optional' to denote the absence of a value. Example: 'Integer convert(String s) {\n Integer value;\n try {\n value = Integer.parseInt(s);\n } catch (NumberFormatException e) {\n // Warning: null is used to denote an 'invalid value'\n value = null;\n }\n return value;\n }' Use the Ignore assignments to fields option to ignore assignments to fields.",
"markdown": "Reports variables that are assigned to `null` outside a declaration.\n\nThe main purpose of `null` in Java is to denote uninitialized\nreference variables. In rare cases, assigning a variable explicitly to `null`\nis useful to aid garbage collection. However, using `null` to denote a missing, not specified, or invalid value or a not\nfound element is considered bad practice and may make your code more prone to `NullPointerExceptions`.\nInstead, consider defining a sentinel object with the intended semantics\nor use library types like `Optional` to denote the absence of a value.\n\n**Example:**\n\n\n Integer convert(String s) {\n Integer value;\n try {\n value = Integer.parseInt(s);\n } catch (NumberFormatException e) {\n // Warning: null is used to denote an 'invalid value'\n value = null;\n }\n return value;\n }\n\n\nUse the **Ignore assignments to fields** option to ignore assignments to fields."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AssignmentToNull",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Assignment issues",
"index": 98,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "WaitCalledOnCondition",
"shortDescription": {
"text": "'wait()' called on 'java.util.concurrent.locks.Condition' object"
},
"fullDescription": {
"text": "Reports calls to 'wait()' made on a 'java.util.concurrent.locks.Condition' object. This is probably a programming error, and some variant of the 'await()' method was intended instead. Example: 'void acquire(Condition released) throws InterruptedException {\n while (acquired) {\n released.wait();\n }\n }' Good code would look like this: 'void acquire(Condition released) throws InterruptedException {\n while (acquired) {\n released.await();\n }\n }'",
"markdown": "Reports calls to `wait()` made on a `java.util.concurrent.locks.Condition` object. This is probably a programming error, and some variant of the `await()` method was intended instead.\n\n**Example:**\n\n\n void acquire(Condition released) throws InterruptedException {\n while (acquired) {\n released.wait();\n }\n }\n\nGood code would look like this:\n\n\n void acquire(Condition released) throws InterruptedException {\n while (acquired) {\n released.await();\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "WaitCalledOnCondition",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DanglingJavadoc",
"shortDescription": {
"text": "Dangling Javadoc comment"
},
"fullDescription": {
"text": "Reports Javadoc comments that don't belong to any class, method or field. The Javadoc tool ignores dangling Javadoc comments and doesn't include them in the HTML documentation it generates. Example: 'class A {\n /**\n * Dangling comment\n */\n /**\n * Method javadoc\n */\n public void m(){}\n }' A quick-fix is available to delete such comments completely or convert them into a block comment. After the quick-fix is applied: 'class A {\n /*\n Dangling comment\n */\n /**\n * Method javadoc\n */\n public void m(){}\n }' Use the Ignore file header comment in JavaDoc format option to ignore comments at the beginning of Java files. These are usually copyright messages.",
"markdown": "Reports Javadoc comments that don't belong to any class, method or field. The Javadoc tool ignores dangling Javadoc comments and doesn't include them in the HTML documentation it generates.\n\n**Example:**\n\n\n class A {\n /**\n * Dangling comment\n */\n /**\n * Method javadoc\n */\n public void m(){}\n }\n\nA quick-fix is available to delete such comments completely or convert them into a block comment. After the quick-fix is applied:\n\n\n class A {\n /*\n Dangling comment\n */\n /**\n * Method javadoc\n */\n public void m(){}\n }\n\nUse the **Ignore file header comment in JavaDoc format** option to ignore comments at the beginning of Java files.\nThese are usually copyright messages."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DanglingJavadoc",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Javadoc",
"index": 95,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HibernateResource",
"shortDescription": {
"text": "Hibernate resource opened but not safely closed"
},
"fullDescription": {
"text": "Reports calls to the 'openSession()' method if the returned 'org.hibernate.Session' resource is not safely closed. By default, the inspection assumes that the resources can be closed by any method with 'close' or 'cleanup' in its name. Example: 'void doHibernateQuery(SessionFactory factory) {\n Session session = factory.openSession(); //warning\n session.createQuery(\"...\");\n }' Use the following options to configure the inspection: Whether a 'org.hibernate.Session' resource is allowed to be opened inside a 'try' block. This style is less desirable because it is more verbose than opening a resource in front of a 'try' block. Whether the resource can be closed by any method call with the resource passed as argument.",
"markdown": "Reports calls to the `openSession()` method if the returned `org.hibernate.Session` resource is not safely closed.\n\n\nBy default, the inspection assumes that the resources can be closed by any method with\n'close' or 'cleanup' in its name.\n\n**Example:**\n\n\n void doHibernateQuery(SessionFactory factory) {\n Session session = factory.openSession(); //warning\n session.createQuery(\"...\");\n }\n\n\nUse the following options to configure the inspection:\n\n* Whether a `org.hibernate.Session` resource is allowed to be opened inside a `try` block. This style is less desirable because it is more verbose than opening a resource in front of a `try` block.\n* Whether the resource can be closed by any method call with the resource passed as argument."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "HibernateResourceOpenedButNotSafelyClosed",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Resource management",
"index": 155,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ComparisonOfShortAndChar",
"shortDescription": {
"text": "Comparison of 'short' and 'char' values"
},
"fullDescription": {
"text": "Reports equality comparisons between 'short' and 'char' values. Such comparisons may cause subtle bugs because while both values are 2-byte long, 'short' values are signed, and 'char' values are unsigned. Example: 'if (Character.MAX_VALUE == shortValue()) {} //never can be true'",
"markdown": "Reports equality comparisons between `short` and `char` values.\n\nSuch comparisons may cause subtle bugs because while both values are 2-byte long, `short` values are\nsigned, and `char` values are unsigned.\n\n**Example:**\n\n\n if (Character.MAX_VALUE == shortValue()) {} //never can be true\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ComparisonOfShortAndChar",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues",
"index": 49,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EmptyInitializer",
"shortDescription": {
"text": "Empty class initializer"
},
"fullDescription": {
"text": "Reports empty class initializer blocks.",
"markdown": "Reports empty class initializer blocks."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EmptyClassInitializer",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Declaration redundancy",
"index": 10,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryBreak",
"shortDescription": {
"text": "Unnecessary 'break' statement"
},
"fullDescription": {
"text": "Reports any unnecessary 'break' statements. An 'break' statement is unnecessary if no other statements are executed after it has been removed. Example: 'switch (e) {\n case A -> {\n System.out.println(\"A\");\n break; // reports 'break' statement is unnecessary\n }\n default -> {\n System.out.println(\"Default\");\n break; // reports 'break' statement is unnecessary\n }\n }'",
"markdown": "Reports any unnecessary `break` statements.\n\nAn `break` statement is unnecessary if no other statements are executed after it has been removed.\n\n**Example:**\n\n\n switch (e) {\n case A -> {\n System.out.println(\"A\");\n break; // reports 'break' statement is unnecessary\n }\n default -> {\n System.out.println(\"Default\");\n break; // reports 'break' statement is unnecessary\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryBreak",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RawUseOfParameterizedType",
"shortDescription": {
"text": "Raw use of parameterized class"
},
"fullDescription": {
"text": "Reports generic classes with omitted type parameters. Such raw use of generic types is valid in Java, but it defeats the purpose of type parameters and may mask bugs. This inspection mirrors the 'rawtypes' warning of 'javac'. Examples: '//warning: Raw use of parameterized class 'List'\nList list = new ArrayList<String>();\n//list of strings was created but integer is accepted as well\nlist.add(1);' '//no warning as it's impossible to provide type arguments during array creation\nIntFunction<List<?>[]> fun = List[]::new;' Configure the inspection: Use the Ignore construction of new objects option to ignore raw types used in object construction. Use the Ignore type casts option to ignore raw types used in type casts. Use the Ignore where a type parameter would not compile option to ignore the cases when a type parameter fails to compile (for example, when creating an array or overriding a library method). Use the Ignore parameter types of overriding methods option to ignore type parameters used in parameters of overridden methods. Use the Ignore when automatic quick-fix is not available option to ignore the cases when a quick-fix is not available. This inspection only reports if the language level of the project or module is 5 or higher.",
"markdown": "Reports generic classes with omitted type parameters. Such *raw* use of generic types is valid in Java, but it defeats the purpose of type parameters and may mask bugs. This inspection mirrors the `rawtypes` warning of `javac`.\n\n**Examples:**\n\n\n //warning: Raw use of parameterized class 'List'\n List list = new ArrayList<String>();\n //list of strings was created but integer is accepted as well\n list.add(1);\n\n\n //no warning as it's impossible to provide type arguments during array creation\n IntFunction<List<?>[]> fun = List[]::new;\n\nConfigure the inspection:\n\n* Use the **Ignore construction of new objects** option to ignore raw types used in object construction.\n* Use the **Ignore type casts** option to ignore raw types used in type casts.\n* Use the **Ignore where a type parameter would not compile** option to ignore the cases when a type parameter fails to compile (for example, when creating an array or overriding a library method).\n* Use the **Ignore parameter types of overriding methods** option to ignore type parameters used in parameters of overridden methods.\n* Use the **Ignore when automatic quick-fix is not available** option to ignore the cases when a quick-fix is not available.\nThis inspection only reports if the language level of the project or module is 5 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "rawtypes",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 5",
"index": 117,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PublicConstructorInNonPublicClass",
"shortDescription": {
"text": "'public' constructor in non-public class"
},
"fullDescription": {
"text": "Reports 'public' constructors in non-'public' classes. Usually, there is no reason for creating a 'public' constructor in a class with a lower access level. Please note, however, that this inspection changes the behavior of some reflection calls. In particular, 'Class.getConstructor()' won't be able to find the updated constructor ('Class.getDeclaredConstructor()' should be used instead). Do not use the inspection if your code or code of some used frameworks relies on constructor accessibility via 'getConstructor()'. Example: 'class House {\n public House() {}\n }' After the quick-fix is applied: 'class House {\n House() {}\n }'",
"markdown": "Reports `public` constructors in non-`public` classes.\n\nUsually, there is no reason for creating a `public` constructor in a class with a lower access level.\nPlease note, however, that this inspection changes the behavior of some reflection calls. In particular,\n`Class.getConstructor()` won't be able to find the updated constructor\n(`Class.getDeclaredConstructor()` should be used instead). Do not use the inspection if your code\nor code of some used frameworks relies on constructor accessibility via `getConstructor()`.\n\n**Example:**\n\n\n class House {\n public House() {}\n }\n\nAfter the quick-fix is applied:\n\n\n class House {\n House() {}\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PublicConstructorInNonPublicClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Visibility",
"index": 97,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ProtectedInnerClass",
"shortDescription": {
"text": "Protected nested class"
},
"fullDescription": {
"text": "Reports 'protected' nested classes. Example: 'public class Outer {\n protected static class Nested {} // warning\n protected class Inner {} // warning\n protected enum Mode {} // warning depends on the setting\n protected interface I {} // warning depends on the setting\n }' Configure the inspection: Use the Ignore 'protected' inner enums option to ignore 'protected' inner enums. Use the Ignore 'protected' inner interfaces option to ignore 'protected' inner interfaces.",
"markdown": "Reports `protected` nested classes.\n\n**Example:**\n\n\n public class Outer {\n protected static class Nested {} // warning\n protected class Inner {} // warning\n protected enum Mode {} // warning depends on the setting\n protected interface I {} // warning depends on the setting\n }\n\nConfigure the inspection:\n\n* Use the **Ignore 'protected' inner enums** option to ignore `protected` inner enums.\n* Use the **Ignore 'protected' inner interfaces** option to ignore `protected` inner interfaces."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ProtectedInnerClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Encapsulation",
"index": 211,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ExternalizableWithoutPublicNoArgConstructor",
"shortDescription": {
"text": "'Externalizable' class without 'public' no-arg constructor"
},
"fullDescription": {
"text": "Reports 'Externalizable' classes without a public no-argument constructor. When an 'Externalizable' object is reconstructed, an instance is created using the public no-arg constructor before the 'readExternal' method called. If a public no-arg constructor is not available, a 'java.io.InvalidClassException' will be thrown at runtime.",
"markdown": "Reports `Externalizable` classes without a public no-argument constructor.\n\nWhen an `Externalizable` object is reconstructed, an instance is created using the public\nno-arg constructor before the `readExternal` method called. If a public\nno-arg constructor is not available, a `java.io.InvalidClassException` will be\nthrown at runtime."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ExternalizableWithoutPublicNoArgConstructor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Serialization issues",
"index": 54,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StaticGuardedByInstance",
"shortDescription": {
"text": "Static member guarded by instance field or this"
},
"fullDescription": {
"text": "Reports '@GuardedBy' annotations on 'static' fields or methods in which the guard is either a non-static field or 'this'. Guarding a static element with a non-static element may result in excessive concurrency, multiple threads may be able to access the guarded field simultaneously by locking in different object contexts. Example: 'private ReadWriteLock lock = new ReentrantReadWriteLock();\n\n @GuardedBy(\"lock\")\n public static void bar() {\n // ...\n }' Supported '@GuardedBy' annotations are: 'net.jcip.annotations.GuardedBy' 'javax.annotation.concurrent.GuardedBy' 'org.apache.http.annotation.GuardedBy' 'com.android.annotations.concurrency.GuardedBy' 'androidx.annotation.GuardedBy' 'com.google.errorprone.annotations.concurrent.GuardedBy'",
"markdown": "Reports `@GuardedBy` annotations on `static` fields or methods in which the guard is either a non-static field or `this`.\n\nGuarding a static element with a non-static element may result in\nexcessive concurrency, multiple threads may be able to access the guarded field simultaneously by locking in different object contexts.\n\nExample:\n\n\n private ReadWriteLock lock = new ReentrantReadWriteLock();\n\n @GuardedBy(\"lock\")\n public static void bar() {\n // ...\n }\n\nSupported `@GuardedBy` annotations are:\n\n* `net.jcip.annotations.GuardedBy`\n* `javax.annotation.concurrent.GuardedBy`\n* `org.apache.http.annotation.GuardedBy`\n* `com.android.annotations.concurrency.GuardedBy`\n* `androidx.annotation.GuardedBy`\n* `com.google.errorprone.annotations.concurrent.GuardedBy`"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "StaticGuardedByInstance",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Concurrency annotation issues",
"index": 99,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ManualArrayCopy",
"shortDescription": {
"text": "Manual array copy"
},
"fullDescription": {
"text": "Reports manual copying of array contents that can be replaced with a call to 'System.arraycopy()'. Example: 'for (int i = 0; i < array.length; i++) {\n newArray[i] = array[i];\n }' After the quick-fix is applied: 'System.arraycopy(array, 0, newArray, 0, array.length);'",
"markdown": "Reports manual copying of array contents that can be replaced with a call to `System.arraycopy()`.\n\n**Example:**\n\n\n for (int i = 0; i < array.length; i++) {\n newArray[i] = array[i];\n }\n\nAfter the quick-fix is applied:\n\n\n System.arraycopy(array, 0, newArray, 0, array.length);\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ManualArrayCopy",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StaticPseudoFunctionalStyleMethod",
"shortDescription": {
"text": "Guava pseudo-functional call can be converted to Stream API call"
},
"fullDescription": {
"text": "Reports usages of Guava pseudo-functional code when 'Java Stream API' is available. Though 'Guava Iterable API' provides functionality similar to 'Java Streams API', it's slightly different and may miss some features. Especially, primitive-specialized stream variants like 'IntStream' are more performant than generic variants. Example: 'List<String> transformedIterable = Iterables.transform(someList, someTransformFunction);//warning: Pseudo functional style code' After the quick-fix is applied: 'List<String> transformedIterable = someList.stream().map(someTransformFunction).collect(Collectors.toList());' Note: Code semantics can be changed; for example, Guava's 'Iterable.transform' produces a lazy-evaluated iterable, but the replacement is eager-evaluated. This inspection only reports if the language level of the project or module is 8 or higher.",
"markdown": "Reports usages of Guava pseudo-functional code when `Java Stream API` is available.\n\nThough `Guava Iterable API` provides functionality similar to `Java Streams API`, it's slightly different and\nmay miss some features.\nEspecially, primitive-specialized stream variants like `IntStream` are more performant than generic variants.\n\n**Example:**\n\n\n List<String> transformedIterable = Iterables.transform(someList, someTransformFunction);//warning: Pseudo functional style code\n\nAfter the quick-fix is applied:\n\n List<String> transformedIterable = someList.stream().map(someTransformFunction).collect(Collectors.toList());\n\n\n**Note:** Code semantics can be changed; for example, Guava's `Iterable.transform` produces a lazy-evaluated iterable,\nbut the replacement is eager-evaluated.\n\nThis inspection only reports if the language level of the project or module is 8 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "StaticPseudoFunctionalStyleMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 8",
"index": 119,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MisspelledEquals",
"shortDescription": {
"text": "'equal()' instead of 'equals()'"
},
"fullDescription": {
"text": "Reports declarations of 'equal()' with a single parameter. Normally, this is a typo and 'equals()' is actually intended. A quick-fix is suggested to rename the method to 'equals'. Example: 'class Main {\n public boolean equal(Object obj) {\n return true;\n }\n }' After the quick-fix is applied: 'class Main {\n public boolean equals(Object obj) {\n return true;\n }\n }'",
"markdown": "Reports declarations of `equal()` with a single parameter. Normally, this is a typo and `equals()` is actually intended.\n\nA quick-fix is suggested to rename the method to `equals`.\n\n**Example:**\n\n\n class Main {\n public boolean equal(Object obj) {\n return true;\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class Main {\n public boolean equals(Object obj) {\n return true;\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MisspelledEquals",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LengthOneStringInIndexOf",
"shortDescription": {
"text": "Single character string argument in 'String.indexOf()' call"
},
"fullDescription": {
"text": "Reports single character strings being used as an argument in 'String.indexOf()' and 'String.lastIndexOf()' calls. A quick-fix is suggested to replace such string literals with equivalent character literals, gaining some performance enhancement. Example: 'return s.indexOf(\"x\");' After the quick-fix is applied: 'return s.indexOf('x');'",
"markdown": "Reports single character strings being used as an argument in `String.indexOf()` and `String.lastIndexOf()` calls.\n\nA quick-fix is suggested to replace such string literals with equivalent character literals, gaining some performance enhancement.\n\n**Example:**\n\n\n return s.indexOf(\"x\");\n\nAfter the quick-fix is applied:\n\n\n return s.indexOf('x');\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SingleCharacterStringConcatenation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonFinalFieldInEnum",
"shortDescription": {
"text": "Non-final field in 'enum'"
},
"fullDescription": {
"text": "Reports non-final fields in enumeration types. Non-final fields introduce global mutable state, which is generally considered undesirable. Example: 'enum Enum {\n FIRST(\"first\"),\n SECOND(\"second\");\n\n public String str;\n\n Enum(String str) {\n this.str = str;\n }\n }' After the quick-fix is applied: 'enum Enum {\n FIRST(\"first\"),\n SECOND(\"second\");\n\n public final String str;\n\n Enum(String str) {\n this.str = str;\n }\n }' Use the `Ignore fields that cannot be made 'final'` option to only warn on fields that can be made final using the quick-fix.",
"markdown": "Reports non-final fields in enumeration types. Non-final fields introduce global mutable state, which is generally considered undesirable.\n\n**Example:**\n\n\n enum Enum {\n FIRST(\"first\"),\n SECOND(\"second\");\n\n public String str;\n\n Enum(String str) {\n this.str = str;\n }\n }\n\nAfter the quick-fix is applied:\n\n\n enum Enum {\n FIRST(\"first\"),\n SECOND(\"second\");\n\n public final String str;\n\n Enum(String str) {\n this.str = str;\n }\n }\n\nUse the \\`Ignore fields that cannot be made 'final'\\` option to only warn on fields that can be made final using the quick-fix."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonFinalFieldInEnum",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TrivialFunctionalExpressionUsage",
"shortDescription": {
"text": "Trivial usage of functional expression"
},
"fullDescription": {
"text": "Reports functional interface methods calls that are directly invoked on the definition of the lambda, method reference, or anonymous class. Such method calls can be replaced with the body of the functional interface implementation. Example: 'boolean contains(List<String> names, String name) {\n return ((Predicate<String>)x -> {\n return names.contains(x);\n }).test(name);\n }' When the quick-fix is applied, the method call changes to: 'boolean contains(List<String> names, String name) {\n return names.contains(name);\n }'",
"markdown": "Reports functional interface methods calls that are directly invoked on the definition of the lambda, method reference, or anonymous class. Such method calls can be replaced with the body of the functional interface implementation.\n\n**Example:**\n\n\n boolean contains(List<String> names, String name) {\n return ((Predicate<String>)x -> {\n return names.contains(x);\n }).test(name);\n }\n\nWhen the quick-fix is applied, the method call changes to:\n\n\n boolean contains(List<String> names, String name) {\n return names.contains(name);\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "TrivialFunctionalExpressionUsage",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Declaration redundancy",
"index": 10,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ExtendsThread",
"shortDescription": {
"text": "Class directly extends 'Thread'"
},
"fullDescription": {
"text": "Reports classes that directly extend 'java.lang.Thread'. It is usually recommended to prefer composition over inheritance to create more reusable code that is easier to modify later. Example: 'class MainThread extends Thread {\n }'",
"markdown": "Reports classes that directly extend `java.lang.Thread`. It is usually recommended to prefer composition over inheritance to create more reusable code that is easier to modify later.\n\n**Example:**\n\n\n class MainThread extends Thread {\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ClassExplicitlyExtendsThread",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SimplifyOptionalCallChains",
"shortDescription": {
"text": "Optional call chain can be simplified"
},
"fullDescription": {
"text": "Reports Optional call chains that can be simplified. Here are several examples of possible simplifications: 'optional.map(x -> true).orElse(false)' → 'optional.isPresent()' 'optional.map(x -> Optional.of(x.trim())).orElseGet(Optional::empty)' → 'optional.map(String::trim)' 'optional.map(x -> (String)x).orElse(null)' → '(String) optional.orElse(null)' 'Optional.ofNullable(optional.orElse(null))' → 'optional' 'val = optional.orElse(null); val != null ? val : defaultExpr' → 'optional.orElse(defaultExpr)' 'val = optional.orElse(null); if(val != null) expr(val)' → 'optional.ifPresent(val -> expr(val))' New in 2017.2",
"markdown": "Reports **Optional** call chains that can be simplified. Here are several examples of possible simplifications:\n\n* `optional.map(x -> true).orElse(false)` → `optional.isPresent()`\n* `optional.map(x -> Optional.of(x.trim())).orElseGet(Optional::empty)` → `optional.map(String::trim)`\n* `optional.map(x -> (String)x).orElse(null)` → `(String) optional.orElse(null)`\n* `Optional.ofNullable(optional.orElse(null))` → `optional`\n* `val = optional.orElse(null); val != null ? val : defaultExpr ` → `optional.orElse(defaultExpr)`\n* `val = optional.orElse(null); if(val != null) expr(val) ` → `optional.ifPresent(val -> expr(val))`\n\nNew in 2017.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SimplifyOptionalCallChains",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RandomDoubleForRandomInteger",
"shortDescription": {
"text": "Using 'Random.nextDouble()' to get random integer"
},
"fullDescription": {
"text": "Reports calls to 'java.util.Random.nextDouble()' that are used to create a positive integer number by multiplying the call by a factor and casting to an integer. For generating a random positive integer in a range, 'java.util.Random.nextInt(int)' is simpler and more efficient. Example: 'int getRandomInt() {\n return (int) ((new Random()).nextDouble() * SIZE);\n }'\n After the quick-fix is applied: 'int getRandomInt() {\n return (new Random()).nextInt(SIZE);\n }'",
"markdown": "Reports calls to `java.util.Random.nextDouble()` that are used to create a positive integer number by multiplying the call by a factor and casting to an integer.\n\n\nFor generating a random positive integer in a range,\n`java.util.Random.nextInt(int)` is simpler and more efficient.\n\n**Example:**\n\n\n int getRandomInt() {\n return (int) ((new Random()).nextDouble() * SIZE);\n }\n \nAfter the quick-fix is applied:\n\n\n int getRandomInt() {\n return (new Random()).nextInt(SIZE);\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UsingRandomNextDoubleForRandomInteger",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SuspiciousArrayCast",
"shortDescription": {
"text": "Suspicious array cast"
},
"fullDescription": {
"text": "Reports suspicious array casts. An array cast is considered suspicious when it casts to a more specific array type. Such a cast is legal at compile time but may fail with a 'ClassCastException' at runtime. Example: 'Number[] numbers = new Number[]{1L, 2L, 4L};\n Long[] longs = (Long[])numbers;'",
"markdown": "Reports suspicious array casts. An array cast is considered suspicious when it casts to a more specific array type. Such a cast is legal at compile time but may fail with a `ClassCastException` at runtime.\n\n**Example:**\n\n\n Number[] numbers = new Number[]{1L, 2L, 4L};\n Long[] longs = (Long[])numbers;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SuspiciousArrayCast",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DivideByZero",
"shortDescription": {
"text": "Division by zero"
},
"fullDescription": {
"text": "Reports division by zero or remainder by zero. Such expressions will produce an 'Infinity', '-Infinity' or 'NaN' result for doubles or floats, and will throw an 'ArithmeticException' for integers. When the expression has a 'NaN' result, the fix suggests replacing the division expression with the 'NaN' constant.",
"markdown": "Reports division by zero or remainder by zero. Such expressions will produce an `Infinity`, `-Infinity` or `NaN` result for doubles or floats, and will throw an `ArithmeticException` for integers.\n\nWhen the expression has a `NaN` result, the fix suggests replacing the division expression with the `NaN` constant."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "divzero",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues",
"index": 49,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StringConcatenationMissingWhitespace",
"shortDescription": {
"text": "Whitespace may be missing in string concatenation"
},
"fullDescription": {
"text": "Reports string concatenations with missing whitespaces, that is where the left-hand side ends with a Unicode letter or digit and the right-hand side starts with a Unicode letter or digit. Example: 'String sql = \"SELECT column\" +\n \"FROM table\";' Use the Ignore concatenations with variable strings option to only report when both the left and right side of the concatenation are literals.",
"markdown": "Reports string concatenations with missing whitespaces, that is where the left-hand side ends with a Unicode letter or digit and the right-hand side starts with a Unicode letter or digit.\n\n**Example:**\n\n\n String sql = \"SELECT column\" +\n \"FROM table\";\n\n\nUse the **Ignore concatenations with variable strings** option to only report\nwhen both the left and right side of the concatenation are literals."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "StringConcatenationMissingWhitespace",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DeconstructionCanBeUsed",
"shortDescription": {
"text": "Record pattern can be used"
},
"fullDescription": {
"text": "Reports patterns that can be replaced with record patterns. Example: 'record Point(int x, int y) {}\n\n static void printSum(Object obj) {\n if (obj instanceof Point p) {\n int x = p.x();\n int y = p.y();\n System.out.println(x + y);\n }\n }' After the quick-fix is applied: 'record Point(int x, int y) {}\n\n static void printSum(Object obj) {\n if (obj instanceof Point(int x, int y)) {\n System.out.println(x + y);\n }\n }' This inspection only reports if the language level of the project or module is 19 or higher New in 2023.1",
"markdown": "Reports patterns that can be replaced with record patterns.\n\nExample:\n\n\n record Point(int x, int y) {}\n\n static void printSum(Object obj) {\n if (obj instanceof Point p) {\n int x = p.x();\n int y = p.y();\n System.out.println(x + y);\n }\n }\n\nAfter the quick-fix is applied:\n\n\n record Point(int x, int y) {}\n\n static void printSum(Object obj) {\n if (obj instanceof Point(int x, int y)) {\n System.out.println(x + y);\n }\n }\n\nThis inspection only reports if the language level of the project or module is 19 or higher\n\nNew in 2023.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "DeconstructionCanBeUsed",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 19",
"index": 215,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ExceptionFromCatchWhichDoesntWrap",
"shortDescription": {
"text": "'throw' inside 'catch' block which ignores the caught exception"
},
"fullDescription": {
"text": "Reports exceptions that are thrown from inside 'catch' blocks but do not \"wrap\" the caught exception. When an exception is thrown in response to an exception, wrapping the initial exception prevents losing valuable context information, such as stack frames and line numbers. Example: '...\n catch (IOException e) {\n closeAllConnections();\n throw new ConnectException(\"Connection problem.\"); // warning: 'throw' inside 'catch' block ignores the caught exception 'e'\n }' Configure the inspection: Use the Ignore if result of exception method call is used option to indicate whether the inspection should ignore exceptions whose argument is the result of a method call on the original exception, such as 'getMessage()'. Use the Ignore if thrown exception cannot wrap an exception option to ignore 'throw' statements that throw exceptions without a constructor that accepts a 'Throwable' cause.",
"markdown": "Reports exceptions that are thrown from inside `catch` blocks but do not \"wrap\" the caught exception.\n\nWhen an exception is thrown in response to an exception, wrapping the initial exception prevents losing valuable context information,\nsuch as stack frames and line numbers.\n\n**Example:**\n\n\n ...\n catch (IOException e) {\n closeAllConnections();\n throw new ConnectException(\"Connection problem.\"); // warning: 'throw' inside 'catch' block ignores the caught exception 'e'\n }\n\nConfigure the inspection:\n\n* Use the **Ignore if result of exception method call is used** option to indicate whether the inspection should ignore exceptions whose argument is the result of a method call on the original exception, such as `getMessage()`.\n* Use the **Ignore if thrown exception cannot wrap an exception** option to ignore `throw` statements that throw exceptions without a constructor that accepts a `Throwable` cause."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ThrowInsideCatchBlockWhichIgnoresCaughtException",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Error handling",
"index": 9,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MethodOnlyUsedFromInnerClass",
"shortDescription": {
"text": "Private method only used from inner class"
},
"fullDescription": {
"text": "Reports 'private' methods which are only called from an inner class of the class containing the method. Such methods can be safely moved into that inner class. Example: 'public class Outer {\n public static void main(String[] args) {\n new Inner().run(args[0]);\n }\n\n static class Inner {\n void run(String arg) {\n // Method isEmpty() is used from Inner class only\n // consider moving it to the Inner class\n if (!isEmpty(arg)) {\n System.out.println(\"Argument is supplied\");\n }\n }\n }\n\n private static boolean isEmpty(String s) {\n return s != null && s.trim().isEmpty();\n }\n}' Use the first checkbox below to ignore 'private' methods which are called from an anonymous or local class. Use the third checkbox to only report 'static' methods.",
"markdown": "Reports `private` methods which are only called from an inner class of the class containing the method. Such methods can be safely moved into that inner class.\n\nExample:\n\n\n public class Outer {\n public static void main(String[] args) {\n new Inner().run(args[0]);\n }\n\n static class Inner {\n void run(String arg) {\n // Method isEmpty() is used from Inner class only\n // consider moving it to the Inner class\n if (!isEmpty(arg)) {\n System.out.println(\"Argument is supplied\");\n }\n }\n }\n\n private static boolean isEmpty(String s) {\n return s != null && s.trim().isEmpty();\n }\n }\n\n\nUse the first checkbox below to ignore `private`\nmethods which are called from an anonymous or local class.\n\n\nUse the third checkbox to only report `static` methods."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MethodOnlyUsedFromInnerClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Abstraction issues",
"index": 83,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ResultSetIndexZero",
"shortDescription": {
"text": "Use of index 0 in JDBC ResultSet"
},
"fullDescription": {
"text": "Reports attempts to access column 0 of 'java.sql.ResultSet' or 'java.sql.PreparedStatement'. For historical reasons, columns of 'java.sql.ResultSet' and 'java.sql.PreparedStatement' are numbered starting with 1, rather than with 0, and accessing column 0 is a common error in JDBC programming. Example: 'String getName(ResultSet rs) {\n return rs.getString(0);\n }'",
"markdown": "Reports attempts to access column 0 of `java.sql.ResultSet` or `java.sql.PreparedStatement`. For historical reasons, columns of `java.sql.ResultSet` and `java.sql.PreparedStatement` are numbered starting with **1** , rather than with **0** , and accessing column 0 is a common error in JDBC programming.\n\n**Example:**\n\n\n String getName(ResultSet rs) {\n return rs.getString(0);\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UseOfIndexZeroInJDBCResultSet",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PatternVariableHidesField",
"shortDescription": {
"text": "Pattern variable hides field"
},
"fullDescription": {
"text": "Reports pattern variables named identically to a field of a surrounding class. As a result of such naming, you may accidentally use the pattern variable when using the identically named field is intended. A quick-fix is suggested to rename the variable. Example: 'class Pointless {\n Point p = new Point();\n\n public void test(Object a) {\n if (a instanceof Point p) {\n System.out.print(\"a is a point (\" + p.x + \", \" + p.y + ')');\n } else {\n System.out.print(\"p is a point (\" + p.x + \", \" + p.y + ')');\n }\n }\n }' New in 2022.2",
"markdown": "Reports pattern variables named identically to a field of a surrounding class. As a result of such naming, you may accidentally use the pattern variable when using the identically named field is intended.\n\n\nA quick-fix is suggested to rename the variable.\n\n**Example:**\n\n\n class Pointless {\n Point p = new Point();\n\n public void test(Object a) {\n if (a instanceof Point p) {\n System.out.print(\"a is a point (\" + p.x + \", \" + p.y + ')');\n } else {\n System.out.print(\"p is a point (\" + p.x + \", \" + p.y + ')');\n }\n }\n }\n\nNew in 2022.2"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PatternVariableHidesField",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Visibility",
"index": 97,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonThreadSafeLazyInitialization",
"shortDescription": {
"text": "Unsafe lazy initialization of 'static' field"
},
"fullDescription": {
"text": "Reports 'static' variables that are lazily initialized in a non-thread-safe manner. Lazy initialization of 'static' variables should be done with an appropriate synchronization construct to prevent different threads from performing conflicting initialization. When applicable, a quick-fix, which introduces the lazy initialization holder class idiom, is suggested. This idiom makes use of the fact that the JVM guarantees that a class will not be initialized until it is used. Example: 'class X {\n private static List<String> list;\n\n public List<String> getList() {\n if (list == null) {\n list = List.of(\"one\", \"two\", \"tree\");\n }\n return list;\n }\n }' After the quick-fix is applied: 'class X {\n private static final class ListHolder {\n static final List<String> list = List.of(\"one\", \"two\", \"tree\");\n }\n\n public List<String> getList() {\n return ListHolder.list;\n }\n }'",
"markdown": "Reports `static` variables that are lazily initialized in a non-thread-safe manner.\n\nLazy initialization of `static` variables should be done with an appropriate synchronization construct\nto prevent different threads from performing conflicting initialization.\n\nWhen applicable, a quick-fix, which introduces the\n[lazy initialization holder class idiom](https://en.wikipedia.org/wiki/Initialization_on_demand_holder_idiom), is suggested.\nThis idiom makes use of the fact that the JVM guarantees that a class will not be initialized until it is used.\n\n**Example:**\n\n\n class X {\n private static List<String> list;\n\n public List<String> getList() {\n if (list == null) {\n list = List.of(\"one\", \"two\", \"tree\");\n }\n return list;\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class X {\n private static final class ListHolder {\n static final List<String> list = List.of(\"one\", \"two\", \"tree\");\n }\n\n public List<String> getList() {\n return ListHolder.list;\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonThreadSafeLazyInitialization",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Initialization",
"index": 26,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantMethodOverride",
"shortDescription": {
"text": "Method is identical to its super method"
},
"fullDescription": {
"text": "Reports methods that are identical to their super methods. Such methods have the same signature as their super method and either have an identical body or only their body consists only of a call to the super method. These methods are redundant and can be removed. Use the first checkbox below to run the inspection for the methods that override library methods. Checking library methods may slow down the inspection. Use the second checkbox below to ignore methods that only delegate calls to their super methods.",
"markdown": "Reports methods that are identical to their super methods. Such methods have the same signature as their super method and either have an identical body or only their body consists only of a call to the super method. These methods are redundant and can be removed.\n\n\nUse the first checkbox below to run the inspection for the methods that override library methods.\nChecking library methods may slow down the inspection.\n\n\nUse the second checkbox below to ignore methods that only delegate calls to their super methods."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantMethodOverride",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Inheritance issues",
"index": 159,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SignalWithoutCorrespondingAwait",
"shortDescription": {
"text": "'signal()' without corresponding 'await()'"
},
"fullDescription": {
"text": "Reports calls to 'Condition.signal()' or 'Condition.signalAll()' for which no call to a corresponding 'Condition.await()' can be found. Only calls that target fields of the current class are reported by this inspection. Example: 'class Queue {\n private final Condition isEmpty = ...;\n\n void add(Object elem) {\n // ...\n isEmpty.signal(); // warning: Call to 'signal()' without corresponding 'await()'\n // ...\n }\n\n void remove(Object elem) throws InterruptedException {\n // ...\n // isEmpty.await();\n // ...\n }\n }'",
"markdown": "Reports calls to `Condition.signal()` or `Condition.signalAll()` for which no call to a corresponding `Condition.await()` can be found.\n\nOnly calls that target fields of the current class are reported by this inspection.\n\n**Example:**\n\n\n class Queue {\n private final Condition isEmpty = ...;\n\n void add(Object elem) {\n // ...\n isEmpty.signal(); // warning: Call to 'signal()' without corresponding 'await()'\n // ...\n }\n\n void remove(Object elem) throws InterruptedException {\n // ...\n // isEmpty.await();\n // ...\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SignalWithoutCorrespondingAwait",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FoldExpressionIntoStream",
"shortDescription": {
"text": "Expression can be folded into Stream chain"
},
"fullDescription": {
"text": "Reports expressions with a repeating pattern which could be replaced with Stream API or 'String.join()'. Example: 'boolean allStartWith(String a, String b, String c, String d, String prefix) {\n return a.startsWith(prefix) && b.startsWith(prefix) && c.startsWith(prefix) && d.startsWith(prefix);\n }' After the quick-fix is applied: 'boolean foo(String a, String b, String c, String d, String prefix) {\n return Stream.of(a, b, c, d).allMatch(s -> s.startsWith(prefix));\n }' Example: 'String joinAll(String a, String b, String c, String d) {\n return a + \",\" + b + \",\" + c + \",\" + d;\n }' After the quick-fix is applied: 'String joinAll(String a, String b, String c, String d) {\n return String.join(\",\", a, b, c, d);\n }' This inspection only reports if the language level of the project or module is 8 or higher. New in 2018.2",
"markdown": "Reports expressions with a repeating pattern which could be replaced with *Stream API* or `String.join()`.\n\nExample:\n\n\n boolean allStartWith(String a, String b, String c, String d, String prefix) {\n return a.startsWith(prefix) && b.startsWith(prefix) && c.startsWith(prefix) && d.startsWith(prefix);\n }\n\nAfter the quick-fix is applied:\n\n\n boolean foo(String a, String b, String c, String d, String prefix) {\n return Stream.of(a, b, c, d).allMatch(s -> s.startsWith(prefix));\n }\n\nExample:\n\n\n String joinAll(String a, String b, String c, String d) {\n return a + \",\" + b + \",\" + c + \",\" + d;\n }\n\nAfter the quick-fix is applied:\n\n\n String joinAll(String a, String b, String c, String d) {\n return String.join(\",\", a, b, c, d);\n }\n\nThis inspection only reports if the language level of the project or module is 8 or higher.\n\nNew in 2018.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "FoldExpressionIntoStream",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 8",
"index": 119,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SerializableDeserializableClassInSecureContext",
"shortDescription": {
"text": "Serializable class in secure context"
},
"fullDescription": {
"text": "Reports classes that may be serialized or deserialized. A class may be serialized if it supports the 'Serializable' interface, and its 'readObject()' and 'writeObject()' methods are not defined to always throw an exception. Serializable classes may be dangerous in code intended for secure use. Example: 'class DeserializableClass implements Serializable { // the class doesn't contain 'writeObject()' method throwing an exception\n private int sensitive = 736326;\n\n private void readObject(ObjectInputStream in) {\n throw new Error();\n }\n}' After the quick-fix is applied: 'class DeserializableClass implements Serializable {\n private int sensitive = 736326;\n\n private void readObject(ObjectInputStream in) {\n throw new Error();\n }\n\n private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n throw new java.io.NotSerializableException(\"DeserializableClass\");\n }\n }' Use the following options to configure the inspection: List classes whose inheritors should not be reported by this inspection. This is meant for classes that inherit 'Serializable' from a superclass but are not intended for serialization. Note that it still may be more secure to add 'readObject()' and 'writeObject()' methods which always throw an exception, instead of ignoring those classes. Whether to ignore serializable anonymous classes.",
"markdown": "Reports classes that may be serialized or deserialized.\n\n\nA class may be serialized if it supports the `Serializable` interface,\nand its `readObject()` and `writeObject()` methods are not defined to always\nthrow an exception. Serializable classes may be dangerous in code intended for secure use.\n\n**Example:**\n\n\n class DeserializableClass implements Serializable { // the class doesn't contain 'writeObject()' method throwing an exception\n private int sensitive = 736326;\n\n private void readObject(ObjectInputStream in) {\n throw new Error();\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class DeserializableClass implements Serializable {\n private int sensitive = 736326;\n\n private void readObject(ObjectInputStream in) {\n throw new Error();\n }\n\n private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {\n throw new java.io.NotSerializableException(\"DeserializableClass\");\n }\n }\n\n\nUse the following options to configure the inspection:\n\n* List classes whose inheritors should not be reported by this inspection. This is meant for classes that inherit `Serializable` from a superclass but are not intended for serialization. Note that it still may be more secure to add `readObject()` and `writeObject()` methods which always throw an exception, instead of ignoring those classes.\n* Whether to ignore serializable anonymous classes."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SerializableDeserializableClassInSecureContext",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Security",
"index": 32,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IncrementDecrementUsedAsExpression",
"shortDescription": {
"text": "Result of '++' or '--' used"
},
"fullDescription": {
"text": "Reports increment or decrement expressions that are nested inside other expressions. Such expressions may be confusing and violate the general design principle, which states that any construct should do precisely one thing. The quick-fix extracts the increment or decrement operation to a separate expression statement. Example: 'int i = 10;\n while (i-- > 0) {\n System.out.println(i);\n }' After the quick-fix is applied: 'int i = 10;\n while (i > 0) {\n i--;\n System.out.println(i);\n }\n i--;'",
"markdown": "Reports increment or decrement expressions that are nested inside other expressions. Such expressions may be confusing and violate the general design principle, which states that any construct should do precisely one thing.\n\nThe quick-fix extracts the increment or decrement operation to a separate expression statement.\n\n**Example:**\n\n\n int i = 10;\n while (i-- > 0) {\n System.out.println(i);\n }\n\nAfter the quick-fix is applied:\n\n\n int i = 10;\n while (i > 0) {\n i--;\n System.out.println(i);\n }\n i--;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ValueOfIncrementOrDecrementUsed",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Assignment issues",
"index": 98,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UpperCaseFieldNameNotConstant",
"shortDescription": {
"text": "Non-constant field with upper-case name"
},
"fullDescription": {
"text": "Reports non-'static' non-'final' fields whose names are all in upper case. Such fields may cause confusion by breaking a common naming convention and are often used by mistake. Example: 'public static int THE_ANSWER = 42; //a warning here: final modifier is missing' A quick-fix that renames such fields is available only in the editor.",
"markdown": "Reports non-`static` non-`final` fields whose names are all in upper case.\n\nSuch fields may cause confusion by breaking a common naming convention and\nare often used by mistake.\n\n**Example:**\n\n\n public static int THE_ANSWER = 42; //a warning here: final modifier is missing\n\nA quick-fix that renames such fields is available only in the editor."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonConstantFieldWithUpperCaseName",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Naming conventions",
"index": 106,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Convert2streamapi",
"shortDescription": {
"text": "Loop can be collapsed with Stream API"
},
"fullDescription": {
"text": "Reports loops which can be replaced with stream API calls using lambda expressions. Such a replacement changes the style from imperative to more functional and makes the code more compact. Example: 'boolean check(List<String> data) {\n for (String e : data) {\n String trimmed = e.trim();\n if (!trimmed.startsWith(\"xyz\")) {\n return false;\n }\n }\n return true;\n }' After the quick-fix is applied: 'boolean check(List<String> data) {\n return data.stream().map(String::trim).allMatch(trimmed -> trimmed.startsWith(\"xyz\"));\n }' This inspection only reports if the language level of the project or module is 8 or higher.",
"markdown": "Reports loops which can be replaced with stream API calls using lambda expressions.\n\nSuch a replacement changes the style from imperative to more functional and makes the code more compact.\n\nExample:\n\n\n boolean check(List<String> data) {\n for (String e : data) {\n String trimmed = e.trim();\n if (!trimmed.startsWith(\"xyz\")) {\n return false;\n }\n }\n return true;\n }\n\nAfter the quick-fix is applied:\n\n\n boolean check(List<String> data) {\n return data.stream().map(String::trim).allMatch(trimmed -> trimmed.startsWith(\"xyz\"));\n }\n\nThis inspection only reports if the language level of the project or module is 8 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "Convert2streamapi",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 8",
"index": 119,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SerialPersistentFieldsWithWrongSignature",
"shortDescription": {
"text": "'serialPersistentFields' field not declared 'private static final ObjectStreamField[]'"
},
"fullDescription": {
"text": "Reports 'Serializable' classes whose 'serialPersistentFields' field is not declared as 'private static final ObjectStreamField[]'. If a 'serialPersistentFields' field is not declared with those modifiers, the serialization behavior will be as if the field was not declared at all. Example: 'class List implements Serializable {\n private List next;\n\n ObjectStreamField[] serialPersistentFields = {new ObjectStreamField(\"next\", List.class)};\n\n }'",
"markdown": "Reports `Serializable` classes whose `serialPersistentFields` field is not declared as `private static final ObjectStreamField[]`.\n\n\nIf a `serialPersistentFields` field is not declared with those modifiers,\nthe serialization behavior will be as if the field was not declared at all.\n\n**Example:**\n\n\n class List implements Serializable {\n private List next;\n\n ObjectStreamField[] serialPersistentFields = {new ObjectStreamField(\"next\", List.class)};\n\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SerialPersistentFieldsWithWrongSignature",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Serialization issues",
"index": 54,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryParentheses",
"shortDescription": {
"text": "Unnecessary parentheses"
},
"fullDescription": {
"text": "Reports any instance of unnecessary parentheses. Parentheses are considered unnecessary if the evaluation order of an expression remains unchanged after you remove the parentheses. Example: 'int n = 3 + (9 * 8);' After quick-fix is applied: 'int n = 3 + 9 * 8;' Configure the inspection: Use the Ignore clarifying parentheses option to ignore parentheses that help clarify a binary expression. Parentheses are clarifying if the parenthesized expression is an 'instanceof' expression that is a part of a larger expression or has a different operator than the parent expression. Use the Ignore parentheses around the condition of conditional expressions option to ignore any parentheses around the condition of conditional expressions. Some coding standards specify that all such conditions must be surrounded by parentheses. Use the Ignore parentheses around single no formal type lambda parameter option to ignore parentheses around a single lambda parameter within a lambda expression.",
"markdown": "Reports any instance of unnecessary parentheses.\n\nParentheses are considered unnecessary if the evaluation order of an expression remains\nunchanged after you remove the parentheses.\n\nExample:\n\n\n int n = 3 + (9 * 8);\n\nAfter quick-fix is applied:\n\n\n int n = 3 + 9 * 8;\n\nConfigure the inspection:\n\n* Use the **Ignore clarifying parentheses** option to ignore parentheses that help clarify a binary expression. Parentheses are clarifying if the parenthesized expression is an `instanceof` expression that is a part of a larger expression or has a different operator than the parent expression.\n* Use the **Ignore parentheses around the condition of conditional expressions** option to ignore any parentheses around the condition of conditional expressions. Some coding standards specify that all such conditions must be surrounded by parentheses.\n* Use the **Ignore parentheses around single no formal type lambda parameter** option to ignore parentheses around a single lambda parameter within a lambda expression."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "UnnecessaryParentheses",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NestedMethodCall",
"shortDescription": {
"text": "Nested method call"
},
"fullDescription": {
"text": "Reports method calls used as parameters to another method call. The quick-fix introduces a variable to make the code simpler and easier to debug. Example: 'public int y() { return 1; }\n public int f(int x) { return 2 * x; }\n\n public void foo() {\n int x = f(y());\n }' After the quick-fix is applied: 'public int y() { return 1; }\n public int f(int x) { return 2 * x; }\n\n public void foo() {\n int y = y();\n int x = f(y);\n }' Use the inspection options to toggle the reporting of: method calls in field initializers calls to static methods calls to simple getters",
"markdown": "Reports method calls used as parameters to another method call.\n\nThe quick-fix introduces a variable to make the code simpler and easier to debug.\n\n**Example:**\n\n\n public int y() { return 1; }\n public int f(int x) { return 2 * x; }\n\n public void foo() {\n int x = f(y());\n }\n\nAfter the quick-fix is applied:\n\n\n public int y() { return 1; }\n public int f(int x) { return 2 * x; }\n\n public void foo() {\n int y = y();\n int x = f(y);\n }\n\n\nUse the inspection options to toggle the reporting of:\n\n* method calls in field initializers\n* calls to static methods\n* calls to simple getters"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NestedMethodCall",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavacQuirks",
"shortDescription": {
"text": "Javac quirks"
},
"fullDescription": {
"text": "Reports known Javac issues, performance problems, and incompatibilities. For example, type inference may be slow when it has to process many nested calls. The following code triggers a warning, as the vararg method call has 50+ poly arguments: 'Arrays.asList(\n Arrays.asList(\"a1\", \"b1\"),\n Arrays.asList(\"a2\", \"b2\"),\n ...\n Arrays.asList(\"a100\", \"b100\"));' The quick-fix adds explicit type arguments, which makes compilation and IDE processing much faster: '//noinspection RedundantTypeArguments\n Arrays.<List<String>>asList(\n Arrays.asList(\"a1\", \"b1\"),\n Arrays.asList(\"a2\", \"b2\"),\n ...\n Arrays.asList(\"a100\", \"b100\"));'",
"markdown": "Reports known Javac issues, performance problems, and incompatibilities. For example, type inference may be slow when it has to process many nested calls.\n\nThe following code triggers a warning, as the vararg method call has 50+ poly arguments:\n\n\n Arrays.asList(\n Arrays.asList(\"a1\", \"b1\"),\n Arrays.asList(\"a2\", \"b2\"),\n ...\n Arrays.asList(\"a100\", \"b100\"));\n\nThe quick-fix adds explicit type arguments, which makes compilation and IDE processing much faster:\n\n\n //noinspection RedundantTypeArguments\n Arrays.<List<String>>asList(\n Arrays.asList(\"a1\", \"b1\"),\n Arrays.asList(\"a2\", \"b2\"),\n ...\n Arrays.asList(\"a100\", \"b100\"));\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "JavacQuirks",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Compiler issues",
"index": 217,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SourceToSinkFlow",
"shortDescription": {
"text": "Non-safe string is passed to safe method"
},
"fullDescription": {
"text": "Reports cases when a non-safe string is passed to a method with a parameter marked with '@Untainted' annotations, returned from annotated methods or assigned to annotated fields, parameters, or local variables. Kotlin 'set' and 'get' methods for fields are not supported as entry points. A safe object (in the same class) is: a string literal, interface instance, or enum object a result of a call of a method that is marked as '@Untainted' a private field, which is assigned only with a string literal and has a safe initializer a final field, which has a safe initializer local variable or parameter that are marked as '@Untainted' and are not assigned from non-safe objects This field, local variable, or parameter must not be passed as arguments to methods or used as a qualifier or must be a primitive, its wrapper or immutable. Also static final fields are considered as safe. The analysis is performed only inside one file. To process dependencies from other classes, use options. The analysis extends to private or static methods and has a limit of depth propagation. Example: 'void doSmth(boolean b) {\n String s = safe();\n String s1 = \"other\";\n if (b) s1 = s;\n sink(s);\n }\n\n String sink(@Untainted String s) {}'\n Here we do not have non-safe string assignments to 's' so a warning is not produced. On the other hand: 'void doSmth(boolean b) {\n String s = safe();\n String s1 = \"other\";\n s1 = foo();\n if (b) s = s1;\n sink(s); // warning here\n }\n\n String foo();\n\n String sink(@Untainted String s) {}'\n Here we have a warning since 's1' has an unknown state after 'foo' call result assignment. New in 2021.2",
"markdown": "Reports cases when a non-safe string is passed to a method with a parameter marked with `@Untainted` annotations, returned from annotated methods or assigned to annotated fields, parameters, or local variables. Kotlin `set` and `get` methods for fields are not supported as entry points.\n\n\nA safe object (in the same class) is:\n\n* a string literal, interface instance, or enum object\n* a result of a call of a method that is marked as `@Untainted`\n* a private field, which is assigned only with a string literal and has a safe initializer\n* a final field, which has a safe initializer\n* local variable or parameter that are marked as `@Untainted` and are not assigned from non-safe objects\nThis field, local variable, or parameter must not be passed as arguments to methods or used as a qualifier or must be a primitive, its wrapper or immutable.\n\nAlso static final fields are considered as safe.\n\n\nThe analysis is performed only inside one file. To process dependencies from other classes, use options.\nThe analysis extends to private or static methods and has a limit of depth propagation.\n\n\nExample:\n\n\n void doSmth(boolean b) {\n String s = safe();\n String s1 = \"other\";\n if (b) s1 = s;\n sink(s);\n }\n\n String sink(@Untainted String s) {}\n\n\nHere we do not have non-safe string assignments to `s` so a warning is not produced. On the other hand:\n\n\n void doSmth(boolean b) {\n String s = safe();\n String s1 = \"other\";\n s1 = foo();\n if (b) s = s1;\n sink(s); // warning here\n }\n\n String foo();\n\n String sink(@Untainted String s) {}\n\n\nHere we have a warning since `s1` has an unknown state after `foo` call result assignment.\n\nNew in 2021.2"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "tainting",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JVM languages",
"index": 47,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RecordCanBeClass",
"shortDescription": {
"text": "Record can be converted to class"
},
"fullDescription": {
"text": "Reports record classes and suggests converting them to ordinary classes. This inspection makes it possible to move a Java record to a codebase using an earlier Java version by applying the quick-fix to this record. Note that the resulting class is not completely equivalent to the original record: The resulting class no longer extends 'java.lang.Record', so 'instanceof Record' returns 'false'. Reflection methods like 'Class.isRecord()' and 'Class.getRecordComponents()' produce different results. The generated 'hashCode()' implementation may produce a different result because the formula to calculate record 'hashCode' is deliberately not specified. Record serialization mechanism differs from that of an ordinary class. Refer to Java Object Serialization Specification for details. Example: 'record Point(int x, int y) {}' After the quick-fix is applied: 'final class Point {\n private final int x;\n private final int y;\n\n Point(int x, int y) {\n this.x = x;\n this.y = y;\n }\n\n public int x() { return x; }\n\n public int y() { return y; }\n\n @Override\n public boolean equals(Object obj) {\n if (obj == this) return true;\n if (obj == null || obj.getClass() != this.getClass()) return false;\n var that = (Point)obj;\n return this.x == that.x &&\n this.y == that.y;\n }\n\n @Override\n public int hashCode() {\n return Objects.hash(x, y);\n }\n\n @Override\n public String toString() {\n return \"Point[\" +\n \"x=\" + x + \", \" +\n \"y=\" + y + ']';\n }\n }' This inspection only reports if the language level of the project or module is 16 or higher. New in 2020.3",
"markdown": "Reports record classes and suggests converting them to ordinary classes.\n\nThis inspection makes it possible to move a Java record to a codebase using an earlier Java version\nby applying the quick-fix to this record.\n\n\nNote that the resulting class is not completely equivalent to the original record:\n\n* The resulting class no longer extends `java.lang.Record`, so `instanceof Record` returns `false`.\n* Reflection methods like `Class.isRecord()` and `Class.getRecordComponents()` produce different results.\n* The generated `hashCode()` implementation may produce a different result because the formula to calculate record `hashCode` is deliberately not specified.\n* Record serialization mechanism differs from that of an ordinary class. Refer to *Java Object Serialization Specification* for details.\n\nExample:\n\n\n record Point(int x, int y) {}\n\nAfter the quick-fix is applied:\n\n\n final class Point {\n private final int x;\n private final int y;\n\n Point(int x, int y) {\n this.x = x;\n this.y = y;\n }\n\n public int x() { return x; }\n\n public int y() { return y; }\n\n @Override\n public boolean equals(Object obj) {\n if (obj == this) return true;\n if (obj == null || obj.getClass() != this.getClass()) return false;\n var that = (Point)obj;\n return this.x == that.x &&\n this.y == that.y;\n }\n\n @Override\n public int hashCode() {\n return Objects.hash(x, y);\n }\n\n @Override\n public String toString() {\n return \"Point[\" +\n \"x=\" + x + \", \" +\n \"y=\" + y + ']';\n }\n }\n\nThis inspection only reports if the language level of the project or module is 16 or higher.\n\nNew in 2020.3"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RecordCanBeClass",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ThreadYield",
"shortDescription": {
"text": "Call to 'Thread.yield()'"
},
"fullDescription": {
"text": "Reports calls to 'Thread.yield()'. The behavior of 'yield()' is non-deterministic and platform-dependent, and it is rarely appropriate to use this method. Its use should be combined with detailed profiling and benchmarking to ensure that it actually has the desired effect. Example: 'public static void main(String[] args) {\n Runnable r = () -> {\n for (int i = 0; i < 10; i++) {\n System.out.println(i);\n Thread.yield();\n }\n };\n new Thread(r).start();\n new Thread(r).start();\n }'",
"markdown": "Reports calls to `Thread.yield()`.\n\n\nThe behavior of `yield()` is non-deterministic and platform-dependent, and it is rarely appropriate to use this method.\nIts use should be combined with detailed profiling and benchmarking to ensure that it actually has the desired effect.\n\n**Example:**\n\n\n public static void main(String[] args) {\n Runnable r = () -> {\n for (int i = 0; i < 10; i++) {\n System.out.println(i);\n Thread.yield();\n }\n };\n new Thread(r).start();\n new Thread(r).start();\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CallToThreadYield",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LambdaCanBeMethodCall",
"shortDescription": {
"text": "Lambda can be replaced with method call"
},
"fullDescription": {
"text": "Reports lambda expressions which can be replaced with a call to a JDK method. For example, an expression 'x -> x' of type 'Function<T, T>' can be replaced with a 'Function.identity()' call. New in 2017.1",
"markdown": "Reports lambda expressions which can be replaced with a call to a JDK method.\n\nFor example, an expression `x -> x` of type `Function<T, T>`\ncan be replaced with a `Function.identity()` call.\n\nNew in 2017.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "LambdaCanBeMethodCall",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 8",
"index": 119,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Singleton",
"shortDescription": {
"text": "Singleton"
},
"fullDescription": {
"text": "Reports singleton classes. Singleton classes are declared in a way that only one instance of the class can ever be instantiated. Singleton classes complicate testing, and their presence may indicate a lack of object-oriented design. Example: 'class Singleton {\n private static final Singleton ourInstance = new Singleton();\n\n private Singleton() {\n }\n\n public Singleton getInstance() {\n return ourInstance;\n }\n }'",
"markdown": "Reports singleton classes.\n\nSingleton classes are declared in a way that only one instance of the class can ever be instantiated. Singleton classes complicate testing,\nand their presence may indicate a lack of object-oriented design.\n\n**Example:**\n\n\n class Singleton {\n private static final Singleton ourInstance = new Singleton();\n\n private Singleton() {\n }\n\n public Singleton getInstance() {\n return ourInstance;\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "Singleton",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DefaultNotLastCaseInSwitch",
"shortDescription": {
"text": "'default' not last case in 'switch'"
},
"fullDescription": {
"text": "Reports 'switch' statements or expressions in which the 'default' branch is positioned before another case. Such a construct is unnecessarily confusing. A quick-fix is provided to move the 'default' branch to the last position, if possible. Example: 'switch (n) {\n default:\n System.out.println();\n break;\n case 1:\n break;\n }' After the quick-fix is applied: 'switch (n) {\n case 1:\n break;\n default:\n System.out.println();\n break;\n }'",
"markdown": "Reports `switch` statements or expressions in which the `default` branch is positioned before another case. Such a construct is unnecessarily confusing. A quick-fix is provided to move the `default` branch to the last position, if possible.\n\n**Example:**\n\n\n switch (n) {\n default:\n System.out.println();\n break;\n case 1:\n break;\n }\n\nAfter the quick-fix is applied:\n\n\n switch (n) {\n case 1:\n break;\n default:\n System.out.println();\n break;\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DefaultNotLastCaseInSwitch",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NullThrown",
"shortDescription": {
"text": "'null' thrown"
},
"fullDescription": {
"text": "Reports 'null' literals that are used as the argument of a 'throw' statement. Such constructs produce a 'java.lang.NullPointerException' that usually should not be thrown programmatically.",
"markdown": "Reports `null` literals that are used as the argument of a `throw` statement.\n\nSuch constructs produce a `java.lang.NullPointerException` that usually should not be thrown programmatically."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NullThrown",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Error handling",
"index": 9,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LocalCanBeFinal",
"shortDescription": {
"text": "Local variable or parameter can be 'final'"
},
"fullDescription": {
"text": "Reports parameters or local variables that may have the 'final' modifier added to their declaration. Example: 'ArrayList<Integer> list = new ArrayList();\n fill(list);\n return list;' After the quick-fix is applied: 'final ArrayList<Integer> list = new ArrayList();\n fill(list);\n return list;' Use the inspection's options to define whether parameters or local variables should be reported.",
"markdown": "Reports parameters or local variables that may have the `final` modifier added to their declaration.\n\nExample:\n\n\n ArrayList<Integer> list = new ArrayList();\n fill(list);\n return list;\n\nAfter the quick-fix is applied:\n\n\n final ArrayList<Integer> list = new ArrayList();\n fill(list);\n return list;\n\n\nUse the inspection's options to define whether parameters or local variables should be reported."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LocalCanBeFinal",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FieldMayBeStatic",
"shortDescription": {
"text": "Field can be made 'static'"
},
"fullDescription": {
"text": "Reports instance variables that can safely be made 'static'. A field can be static if it is declared 'final' and initialized with a constant. Example: 'public final String str = \"sample\";' The inspection does not report final fields that can be implicitly written. Use the \"Annotations\" button to modify the list of annotations that assume implicit field write.",
"markdown": "Reports instance variables that can safely be made `static`. A field can be static if it is declared `final` and initialized with a constant.\n\n**Example:**\n\n\n public final String str = \"sample\";\n\n\nThe inspection does not report final fields that can be implicitly written. Use the \"Annotations\" button to modify\nthe list of annotations that assume implicit field write."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FieldMayBeStatic",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ArrayEquals",
"shortDescription": {
"text": "'equals()' called on array"
},
"fullDescription": {
"text": "Reports 'equals()' calls that compare two arrays. Calling 'equals()' on an array compares identity and is equivalent to using '=='. Use 'Arrays.equals()' to compare the contents of two arrays, or 'Arrays.deepEquals()' for multi-dimensional arrays. Example: 'void sample(int[] first, int[] second){\n if (first.equals(second)) return;\n }' After the quick-fix is applied: 'void sample(int[] first, int[] second){\n if (Arrays.equals(first, second)) return;\n }'",
"markdown": "Reports `equals()` calls that compare two arrays.\n\nCalling `equals()` on an array compares identity and is equivalent to using `==`.\nUse `Arrays.equals()` to compare the contents of two arrays, or `Arrays.deepEquals()` for\nmulti-dimensional arrays.\n\n**Example:**\n\n\n void sample(int[] first, int[] second){\n if (first.equals(second)) return;\n }\n\nAfter the quick-fix is applied:\n\n\n void sample(int[] first, int[] second){\n if (Arrays.equals(first, second)) return;\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ArrayEquals",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ProblematicVarargsMethodOverride",
"shortDescription": {
"text": "Non-varargs method overrides varargs method"
},
"fullDescription": {
"text": "Reports methods that override a variable arity (a.k.a. varargs) method but replace the variable arity parameter with an array parameter. Though this code is valid, it may be confusing and should be avoided.",
"markdown": "Reports methods that override a variable arity (a.k.a. varargs) method but replace the variable arity parameter with an array parameter. Though this code is valid, it may be confusing and should be avoided."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ProblematicVarargsMethodOverride",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Inheritance issues",
"index": 159,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MisspelledHeader",
"shortDescription": {
"text": "Unknown or misspelled header name"
},
"fullDescription": {
"text": "Reports any unknown and probably misspelled header names and provides possible variants.",
"markdown": "Reports any unknown and probably misspelled header names and provides possible variants."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "MisspelledHeader",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Manifest",
"index": 113,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AtomicFieldUpdaterIssues",
"shortDescription": {
"text": "Inconsistent 'AtomicFieldUpdater' declaration"
},
"fullDescription": {
"text": "Reports issues with 'AtomicLongFieldUpdater', 'AtomicIntegerFieldUpdater', or 'AtomicReferenceFieldUpdater' fields (the 'java.util.concurrent.atomic' package). The reported issues are identical to the runtime problems that can happen with atomic field updaters: specified field not found, specified field not accessible, specified field has a wrong type, and so on. Examples: 'class A {\n private static volatile int value = 0;\n private static final AtomicIntegerFieldUpdater updater =\n AtomicIntegerFieldUpdater.newUpdater((A.class), \"value\"); // warning: Field 'value' has 'static' modifier\n }' 'class B {\n private static final AtomicIntegerFieldUpdater updater =\n AtomicIntegerFieldUpdater.newUpdater(B.class, \"value\"); // warning: No field named 'value' found in class 'B'\n }'",
"markdown": "Reports issues with `AtomicLongFieldUpdater`, `AtomicIntegerFieldUpdater`, or `AtomicReferenceFieldUpdater` fields (the `java.util.concurrent.atomic` package).\n\nThe reported issues are identical to the runtime problems that can happen with atomic field updaters:\nspecified field not found, specified field not accessible, specified field has a wrong type, and so on.\n\n**Examples:**\n\n*\n\n\n class A {\n private static volatile int value = 0;\n private static final AtomicIntegerFieldUpdater updater =\n AtomicIntegerFieldUpdater.newUpdater((A.class), \"value\"); // warning: Field 'value' has 'static' modifier\n }\n \n*\n\n\n class B {\n private static final AtomicIntegerFieldUpdater updater =\n AtomicIntegerFieldUpdater.newUpdater(B.class, \"value\"); // warning: No field named 'value' found in class 'B'\n }\n \n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "AtomicFieldUpdaterIssues",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PackageNamingConvention",
"shortDescription": {
"text": "Package naming convention"
},
"fullDescription": {
"text": "Reports packages whose names are either too short, too long, or do not follow the specified regular expression pattern. Example: 'package io;' Use the options to specify the minimum and maximum length of the package name as well as a regular expression that matches valid package names (regular expressions are in standard 'java.util.regex' format).",
"markdown": "Reports packages whose names are either too short, too long, or do not follow the specified regular expression pattern.\n\n**Example:**\n\n\n package io;\n\n\nUse the options to specify the minimum and maximum length of the package name\nas well as a regular expression that matches valid package names\n(regular expressions are in standard `java.util.regex` format)."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PackageNamingConvention",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Naming conventions",
"index": 106,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CapturingCleaner",
"shortDescription": {
"text": "Cleaner captures object reference"
},
"fullDescription": {
"text": "Reports 'Runnable' passed to a 'Cleaner.register()' capturing reference being registered. If the reference is captured, it will never be phantom reachable and the cleaning action will never be invoked. Possible sources of this problem: Lambda using non-static methods, fields, or 'this' itself Non-static inner class (anonymous or not) always captures this reference in java up to 18 version Instance method reference Access to outer class non-static members from non-static inner class Sample of code that will be reported: 'int fileDescriptor;\n Cleaner.Cleanable cleanable = Cleaner.create().register(this, () -> {\n System.out.println(\"adsad\");\n //this is captured via fileDescriptor\n fileDescriptor = 0;\n });' This inspection only reports if the language level of the project or module is 9 or higher. New in 2018.1",
"markdown": "Reports `Runnable` passed to a `Cleaner.register()` capturing reference being registered. If the reference is captured, it will never be phantom reachable and the cleaning action will never be invoked.\n\nPossible sources of this problem:\n\n* Lambda using non-static methods, fields, or `this` itself\n* Non-static inner class (anonymous or not) always captures this reference in java up to 18 version\n* Instance method reference\n* Access to outer class non-static members from non-static inner class\n\nSample of code that will be reported:\n\n\n int fileDescriptor;\n Cleaner.Cleanable cleanable = Cleaner.create().register(this, () -> {\n System.out.println(\"adsad\");\n //this is captured via fileDescriptor\n fileDescriptor = 0;\n });\n\nThis inspection only reports if the language level of the project or module is 9 or higher.\n\nNew in 2018.1"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "CapturingCleaner",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ThreadStartInConstruction",
"shortDescription": {
"text": "Call to 'Thread.start()' during object construction"
},
"fullDescription": {
"text": "Reports calls to 'start()' on 'java.lang.Thread' or any of its subclasses during object construction. While occasionally useful, such constructs should be avoided due to inheritance issues. Subclasses of a class that launches a thread during the object construction will not have finished any initialization logic of their own before the thread has launched. This inspection does not report if the class that starts a thread is declared 'final'. Example: 'class MyThread extends Thread {\n MyThread() {\n start();\n }\n }'",
"markdown": "Reports calls to `start()` on `java.lang.Thread` or any of its subclasses during object construction.\n\n\nWhile occasionally useful, such constructs should be avoided due to inheritance issues.\nSubclasses of a class that launches a thread during the object construction will not have finished\nany initialization logic of their own before the thread has launched.\n\nThis inspection does not report if the class that starts a thread is declared `final`.\n\n**Example:**\n\n\n class MyThread extends Thread {\n MyThread() {\n start();\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CallToThreadStartDuringObjectConstruction",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SwitchStatementWithTooManyBranches",
"shortDescription": {
"text": "Maximum 'switch' branches"
},
"fullDescription": {
"text": "Reports 'switch' statements or expressions with too many 'case' labels. Such a long switch statement may be confusing and should probably be refactored. Sometimes, it is not a problem (for example, a domain is very complicated and has enums with a lot of constants). Example: 'switch (x) {\n case 1 -> {}\n case 2 -> {}\n case 3 -> {}\n case 4 -> {}\n case 5 -> {}\n case 6 -> {}\n case 7 -> {}\n case 8 -> {}\n case 9 -> {}\n case 10 -> {}\n case 11,12,13 -> {}\n default -> {}\n }' Use the Maximum number of branches field to specify the maximum number of 'case' labels expected.",
"markdown": "Reports `switch` statements or expressions with too many `case` labels.\n\nSuch a long switch statement may be confusing and should probably be refactored.\nSometimes, it is not a problem (for example, a domain is very complicated and has enums with a lot of constants).\n\nExample:\n\n\n switch (x) {\n case 1 -> {}\n case 2 -> {}\n case 3 -> {}\n case 4 -> {}\n case 5 -> {}\n case 6 -> {}\n case 7 -> {}\n case 8 -> {}\n case 9 -> {}\n case 10 -> {}\n case 11,12,13 -> {}\n default -> {}\n }\n\nUse the **Maximum number of branches** field to specify the maximum number of `case` labels expected."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SwitchStatementWithTooManyBranches",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LoopConditionNotUpdatedInsideLoop",
"shortDescription": {
"text": "Loop variable not updated inside loop"
},
"fullDescription": {
"text": "Reports any variables and parameters that are used in a loop condition and are not updated inside the loop. Such variables and parameters are usually used by mistake as they may cause an infinite loop if they are executed. Example: 'void loopDoesNotLoop(boolean b) {\n while (b) {\n System.out.println();\n break;\n }\n }' Configure the inspection: Use the Ignore possible non-local changes option to disable this inspection if the condition can be updated indirectly (e.g. via the called method or concurrently from another thread).",
"markdown": "Reports any variables and parameters that are used in a loop condition and are not updated inside the loop.\n\nSuch variables and parameters are usually used by mistake as they\nmay cause an infinite loop if they are executed.\n\nExample:\n\n\n void loopDoesNotLoop(boolean b) {\n while (b) {\n System.out.println();\n break;\n }\n }\n\nConfigure the inspection:\n\n\nUse the **Ignore possible non-local changes** option to disable this inspection\nif the condition can be updated indirectly (e.g. via the called method or concurrently from another thread)."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "LoopConditionNotUpdatedInsideLoop",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DoubleCheckedLocking",
"shortDescription": {
"text": "Double-checked locking"
},
"fullDescription": {
"text": "Reports double-checked locking. Double-checked locking tries to initialize a field on demand and in a thread-safe manner, while avoiding the cost of synchronization. Unfortunately it is not thread-safe when used on a field that is not declared 'volatile'. When using Java 1.4 or earlier, double-checked locking doesn't work even with a 'volatile' field. Read the article linked above for a detailed explanation of the problem. Example of incorrect double-checked locking: 'class Foo {\n private Helper helper = null;\n public Helper getHelper() {\n if (helper == null)\n synchronized(this) {\n if (helper == null) helper = new Helper();\n }\n return helper;\n }\n }\n // other functions and members...\n }'",
"markdown": "Reports [double-checked locking](https://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html).\n\n\nDouble-checked locking tries to initialize a field on demand and in a thread-safe manner, while avoiding the cost of synchronization.\nUnfortunately it is not thread-safe when used on a field that is not declared `volatile`.\nWhen using Java 1.4 or earlier, double-checked locking doesn't work even with a `volatile` field.\nRead the article linked above for a detailed explanation of the problem.\n\nExample of incorrect double-checked locking:\n\n\n class Foo {\n private Helper helper = null;\n public Helper getHelper() {\n if (helper == null)\n synchronized(this) {\n if (helper == null) helper = new Helper();\n }\n return helper;\n }\n }\n // other functions and members...\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "DoubleCheckedLocking",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UseOfObsoleteAssert",
"shortDescription": {
"text": "Usage of obsolete 'junit.framework.Assert' method"
},
"fullDescription": {
"text": "Reports any calls to methods from the 'junit.framework.Assert' class. This class is obsolete and the calls can be replaced by calls to methods from the 'org.junit.Assert' class. For example: 'import org.junit.*;\n public class NecessaryTest {\n @Test\n public void testIt() {\n junit.framework.Assert.assertEquals(\"expected\", \"actual\");\n }\n }' After the quick fix is applied, the result looks like the following: 'import org.junit;\n public class NecessaryTest {\n\n public void testIt() {\n Assert.assertEquals(\"expected\", \"actual\");\n }\n }'",
"markdown": "Reports any calls to methods from the `junit.framework.Assert` class. This class is obsolete and the calls can be replaced by calls to methods from the `org.junit.Assert` class.\n\nFor example:\n\n\n import org.junit.*;\n public class NecessaryTest {\n @Test\n public void testIt() {\n junit.framework.Assert.assertEquals(\"expected\", \"actual\");\n }\n }\n\nAfter the quick fix is applied, the result looks like the following:\n\n\n import org.junit;\n public class NecessaryTest {\n\n public void testIt() {\n Assert.assertEquals(\"expected\", \"actual\");\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UseOfObsoleteAssert",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/JUnit",
"index": 100,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonSerializableObjectBoundToHttpSession",
"shortDescription": {
"text": "Non-serializable object bound to 'HttpSession'"
},
"fullDescription": {
"text": "Reports objects of classes not implementing 'java.io.Serializable' used as arguments to 'javax.servlet.http.HttpSession.setAttribute()' or 'javax.servlet.http.HttpSession.putValue()'. Such objects will not be serialized if the 'HttpSession' is passivated or migrated, and may result in difficult-to-diagnose bugs. This inspection assumes objects of the types 'java.util.Collection' and 'java.util.Map' to be 'Serializable', unless type parameters are non-'Serializable'. Example: 'void foo(HttpSession session) {\n session.setAttribute(\"foo\", new NonSerializable());\n }\n static class NonSerializable {}'",
"markdown": "Reports objects of classes not implementing `java.io.Serializable` used as arguments to `javax.servlet.http.HttpSession.setAttribute()` or `javax.servlet.http.HttpSession.putValue()`.\n\n\nSuch objects will not be serialized if the `HttpSession` is passivated or migrated,\nand may result in difficult-to-diagnose bugs.\n\n\nThis inspection assumes objects of the types `java.util.Collection` and\n`java.util.Map` to be `Serializable`,\nunless type parameters are non-`Serializable`.\n\n**Example:**\n\n\n void foo(HttpSession session) {\n session.setAttribute(\"foo\", new NonSerializable());\n }\n static class NonSerializable {}\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonSerializableObjectBoundToHttpSession",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Serialization issues",
"index": 54,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CallToNativeMethodWhileLocked",
"shortDescription": {
"text": "Call to a 'native' method while locked"
},
"fullDescription": {
"text": "Reports calls 'native' methods within a 'synchronized' block or method. When possible, it's better to keep calls to 'native' methods out of the synchronized context because such calls cause an expensive context switch and may lead to performance issues. Example: 'native void nativeMethod();\n\n void example(){\n synchronized (lock){\n nativeMethod();//warning\n }\n }'",
"markdown": "Reports calls `native` methods within a `synchronized` block or method.\n\n\nWhen possible, it's better to keep calls to `native` methods out of the synchronized context\nbecause such calls cause an expensive context switch and may lead to performance issues.\n\n**Example:**\n\n\n native void nativeMethod();\n\n void example(){\n synchronized (lock){\n nativeMethod();//warning\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CallToNativeMethodWhileLocked",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NestingDepth",
"shortDescription": {
"text": "Overly nested method"
},
"fullDescription": {
"text": "Reports methods whose body contain too deeply nested statements. Methods with too deep statement nesting may be confusing and are a good sign that refactoring may be necessary. Use the Nesting depth limit field to specify the maximum allowed nesting depth for a method.",
"markdown": "Reports methods whose body contain too deeply nested statements.\n\nMethods with too deep statement\nnesting may be confusing and are a good sign that refactoring may be necessary.\n\nUse the **Nesting depth limit** field to specify the maximum allowed nesting depth for a method."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OverlyNestedMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Method metrics",
"index": 139,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantExplicitChronoField",
"shortDescription": {
"text": "Calls of 'java.time' methods with explicit 'ChronoField' or 'ChronoUnit' arguments can be simplified"
},
"fullDescription": {
"text": "Reports 'java.time' method calls with 'java.time.temporal.ChronoField' and 'java.time.temporal.ChronoUnit' as arguments when these calls can be replaced with calls of more specific methods. Example: 'LocalTime localTime = LocalTime.now();\nint minute = localTime.get(ChronoField.MINUTE_OF_HOUR);' After the quick-fix is applied: 'LocalTime localTime = LocalTime.now();\nint minute = localTime.getMinute();' New in 2023.2",
"markdown": "Reports `java.time` method calls with `java.time.temporal.ChronoField` and `java.time.temporal.ChronoUnit` as arguments when these calls can be replaced with calls of more specific methods.\n\nExample:\n\n\n LocalTime localTime = LocalTime.now();\n int minute = localTime.get(ChronoField.MINUTE_OF_HOUR);\n\nAfter the quick-fix is applied:\n\n\n LocalTime localTime = LocalTime.now();\n int minute = localTime.getMinute();\n\nNew in 2023.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantExplicitChronoField",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SocketResource",
"shortDescription": {
"text": "Socket opened but not safely closed"
},
"fullDescription": {
"text": "Reports socket resources that are not safely closed. Socket resources reported by this inspection include 'java.net.Socket', 'java.net.DatagramSocket', and 'java.net.ServerSocket'. By default, the inspection assumes that the resources can be closed by any method with 'close' or 'cleanup' in its name. Example: 'byte[] getMessage(ServerSocket socket) throws IOException {\n Socket client = socket.accept(); //socket is not closed\n return client.getInputStream().readAllBytes();\n }' Use the following options to configure the inspection: Whether a socket is allowed to be opened inside a 'try' block. This style is less desirable because it is more verbose than opening a resource in front of a 'try' block. Whether the resource can be closed by any method call with the resource passed as argument.",
"markdown": "Reports socket resources that are not safely closed. Socket resources reported by this inspection include `java.net.Socket`, `java.net.DatagramSocket`, and `java.net.ServerSocket`.\n\n\nBy default, the inspection assumes that the resources can be closed by any method with\n'close' or 'cleanup' in its name.\n\n**Example:**\n\n\n byte[] getMessage(ServerSocket socket) throws IOException {\n Socket client = socket.accept(); //socket is not closed\n return client.getInputStream().readAllBytes();\n }\n\n\nUse the following options to configure the inspection:\n\n* Whether a socket is allowed to be opened inside a `try` block. This style is less desirable because it is more verbose than opening a resource in front of a `try` block.\n* Whether the resource can be closed by any method call with the resource passed as argument."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SocketOpenedButNotSafelyClosed",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Resource management",
"index": 155,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TypeParameterHidesVisibleType",
"shortDescription": {
"text": "Type parameter hides visible type"
},
"fullDescription": {
"text": "Reports type parameters that have the same names as the visible types in the current scope. Such parameter names may be confusing. Example: 'abstract class MyList<T> extends AbstractList<T> {\n private List<T> elements;\n // type parameter 'T' hides type parameter 'T'\n public <T> T[] toArray(T[] array) {\n return elements.toArray(array);\n }\n}'",
"markdown": "Reports type parameters that have the same names as the visible types in the current scope. Such parameter names may be confusing.\n\nExample:\n\n\n abstract class MyList<T> extends AbstractList<T> {\n private List<T> elements;\n // type parameter 'T' hides type parameter 'T'\n public <T> T[] toArray(T[] array) {\n return elements.toArray(array);\n }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "TypeParameterHidesVisibleType",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Visibility",
"index": 97,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassWithMultipleLoggers",
"shortDescription": {
"text": "Class with multiple loggers"
},
"fullDescription": {
"text": "Reports classes that have multiple loggers declared. Ensuring that every class has a single dedicated logger is an important step in providing a unified logging implementation for an application. For example: 'public class Critical {\n protected static final Logger LOG = Logger.getLogger(Critical.class);\n\n protected static final Logger myLogger = Logger.getLogger(getClass());\n }' Use the table below to specify Logger class names. Classes which declare multiple fields that have the type of one of the specified classes will be reported by this inspection.",
"markdown": "Reports classes that have multiple loggers declared. Ensuring that every class has a single dedicated logger is an important step in providing a unified logging implementation for an application.\n\nFor example:\n\n\n public class Critical {\n protected static final Logger LOG = Logger.getLogger(Critical.class);\n\n protected static final Logger myLogger = Logger.getLogger(getClass());\n }\n\n\nUse the table below to specify Logger class names.\nClasses which declare multiple fields that have the type of one of the specified classes will be reported by this inspection."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ClassWithMultipleLoggers",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Logging",
"index": 79,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ExtendsThrowable",
"shortDescription": {
"text": "Class directly extends 'Throwable'"
},
"fullDescription": {
"text": "Reports classes that directly extend 'java.lang.Throwable'. Extending 'java.lang.Throwable' directly is generally considered bad practice. It is usually enough to extend 'java.lang.RuntimeException', 'java.lang.Exception', or - in special cases - 'java.lang.Error'. Example: 'class EnigmaThrowable extends Throwable {} // warning: Class 'EnigmaThrowable' directly extends 'java.lang.Throwable''",
"markdown": "Reports classes that directly extend `java.lang.Throwable`.\n\nExtending `java.lang.Throwable` directly is generally considered bad practice.\nIt is usually enough to extend `java.lang.RuntimeException`, `java.lang.Exception`, or - in special\ncases - `java.lang.Error`.\n\n**Example:**\n\n\n class EnigmaThrowable extends Throwable {} // warning: Class 'EnigmaThrowable' directly extends 'java.lang.Throwable'\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ExtendsThrowable",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Error handling",
"index": 9,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AutoBoxing",
"shortDescription": {
"text": "Auto-boxing"
},
"fullDescription": {
"text": "Reports expressions that are affected by autoboxing conversion (automatic wrapping of primitive values as objects). Try not to use objects instead of primitives. It might significantly affect performance. Example: 'Integer x = 42;' The quick-fix makes the conversion explicit: 'Integer x = Integer.valueOf(42);' AutoBoxing appeared in Java 5. This inspection can help to downgrade for backward compatibility with earlier Java versions.",
"markdown": "Reports expressions that are affected by autoboxing conversion (automatic wrapping of primitive values as objects). Try not to use objects instead of primitives. It might significantly affect performance.\n\n**Example:**\n\n Integer x = 42;\n\nThe quick-fix makes the conversion explicit:\n\n Integer x = Integer.valueOf(42);\n\n\n*AutoBoxing* appeared in Java 5.\nThis inspection can help to downgrade for backward compatibility with earlier Java versions."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AutoBoxing",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ThreadDeathRethrown",
"shortDescription": {
"text": "'ThreadDeath' not rethrown"
},
"fullDescription": {
"text": "Reports 'try' statements that catch 'java.lang.ThreadDeath' and do not rethrow the exception. Example: 'try {\n executeInParallel(request);\n } catch (ThreadDeath ex) { // warning: ThreadDeath 'ex' not rethrown\n return false;\n }'",
"markdown": "Reports `try` statements that catch `java.lang.ThreadDeath` and do not rethrow the exception.\n\n**Example:**\n\n\n try {\n executeInParallel(request);\n } catch (ThreadDeath ex) { // warning: ThreadDeath 'ex' not rethrown\n return false;\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ThreadDeathNotRethrown",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Error handling",
"index": 9,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CloneCallsConstructors",
"shortDescription": {
"text": "'clone()' instantiates objects with constructor"
},
"fullDescription": {
"text": "Reports calls to object constructors inside 'clone()' methods. It is considered good practice to call 'clone()' to instantiate objects inside of a 'clone()' method instead of creating them directly to support later subclassing. This inspection will not report 'clone()' methods declared as 'final' or 'clone()' methods on 'final' classes.",
"markdown": "Reports calls to object constructors inside `clone()` methods.\n\nIt is considered good practice to call `clone()` to instantiate objects inside of a `clone()` method\ninstead of creating them directly to support later subclassing.\nThis inspection will not report\n`clone()` methods declared as `final`\nor `clone()` methods on `final` classes."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CloneCallsConstructors",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Cloning issues",
"index": 140,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ArraysAsListWithZeroOrOneArgument",
"shortDescription": {
"text": "Call to 'Arrays.asList()' with too few arguments"
},
"fullDescription": {
"text": "Reports calls to 'Arrays.asList()' with at most one argument. Such calls could be replaced with 'Collections.singletonList()', 'Collections.emptyList()', or 'List.of()' on JDK 9 and later, which will save some memory. In particular, 'Collections.emptyList()' and 'List.of()' with no arguments always return a shared instance, while 'Arrays.asList()' with no arguments creates a new object every time it's called. Note: the lists returned by 'Collections.singletonList()' and 'List.of()' are immutable, while the list returned 'Arrays.asList()' allows calling the 'set()' method. This may break the code in rare cases. Example: 'List<String> empty = Arrays.asList();\n List<String> one = Arrays.asList(\"one\");' After the quick-fix is applied: 'List<String> empty = Collections.emptyList();\n List<String> one = Collections.singletonList(\"one\");'",
"markdown": "Reports calls to `Arrays.asList()` with at most one argument.\n\n\nSuch calls could be replaced\nwith `Collections.singletonList()`, `Collections.emptyList()`,\nor `List.of()` on JDK 9 and later, which will save some memory.\n\nIn particular, `Collections.emptyList()` and `List.of()` with no arguments\nalways return a shared instance,\nwhile `Arrays.asList()` with no arguments creates a new object every time it's called.\n\nNote: the lists returned by `Collections.singletonList()` and `List.of()` are immutable,\nwhile the list returned `Arrays.asList()` allows calling the `set()` method.\nThis may break the code in rare cases.\n\n**Example:**\n\n\n List<String> empty = Arrays.asList();\n List<String> one = Arrays.asList(\"one\");\n\nAfter the quick-fix is applied:\n\n\n List<String> empty = Collections.emptyList();\n List<String> one = Collections.singletonList(\"one\");\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ArraysAsListWithZeroOrOneArgument",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnstableApiUsage",
"shortDescription": {
"text": "Unstable API Usage"
},
"fullDescription": {
"text": "Reports usages of an API marked with one of the annotations as unstable. Such an API may be changed or removed in future versions, breaking the code that uses it. The annotations which are used to mark unstable APIs are shown in the list below. By default, the inspection ignores usages of unstable APIs if their declarations are located in sources of the same project. In such cases it'll be possible to update the usages when you change APIs. However, it may be inconvenient if the project is big, so one can switch off the Ignore API declared in this project option to report the usages of unstable APIs declared in both the project sources and libraries.",
"markdown": "Reports usages of an API marked with one of the annotations as unstable. Such an API may be changed or removed in future versions, breaking the code that uses it.\n\nThe annotations which are used to mark unstable APIs are shown in the list below.\n\nBy default, the inspection ignores usages of unstable APIs\nif their declarations are located in sources of the same project. In such cases it'll be possible to update the usages when you change APIs.\nHowever, it may be inconvenient if the project is big, so one can switch off the **Ignore API declared in this project** option to report\nthe usages of unstable APIs declared in both the project sources and libraries."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "UnstableApiUsage",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JVM languages",
"index": 47,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LambdaUnfriendlyMethodOverload",
"shortDescription": {
"text": "Lambda-unfriendly method overload"
},
"fullDescription": {
"text": "Reports overloaded methods that take functional interfaces with conflicting abstract method signatures. Such overloads introduce ambiguity and require callers to cast lambdas to a specific type or specify lambda parameter types explicitly. It is preferable to give the overloaded methods different names to eliminate ambiguity. Example: 'interface MyExecutor {\n void execute(Supplier<?> supplier);\n void execute(Callable<?> callable);\n }' Here, 'Supplier' and 'Callable' are functional interfaces whose single abstract methods do not take any parameters and return a non-void value. As a result, the type of the lambda cannot be inferred at the call site unless an explicit cast is used.",
"markdown": "Reports overloaded methods that take functional interfaces with conflicting abstract method signatures.\n\nSuch overloads introduce ambiguity and require callers to cast lambdas to a specific type or specify lambda parameter types explicitly.\nIt is preferable to give the overloaded methods different names to eliminate ambiguity.\n\nExample:\n\n\n interface MyExecutor {\n void execute(Supplier<?> supplier);\n void execute(Callable<?> callable);\n }\n\n\nHere, `Supplier` and `Callable` are functional interfaces\nwhose single abstract methods do not take any parameters and return a non-void value.\nAs a result, the type of the lambda cannot be inferred at the call site unless an explicit cast is used."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LambdaUnfriendlyMethodOverload",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Naming conventions/Method",
"index": 107,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CodeBlock2Expr",
"shortDescription": {
"text": "Statement lambda can be replaced with expression lambda"
},
"fullDescription": {
"text": "Reports lambda expressions with code block bodies when expression-style bodies can be used instead. The result of the conversion is shorter and more clear. Example: 'Comparable<String> c = o -> {return 0;};' After the quick-fix is applied: 'Comparable<String> c = o -> 0;'",
"markdown": "Reports lambda expressions with code block bodies when expression-style bodies can be used instead. The result of the conversion is shorter and more clear.\n\nExample:\n\n\n Comparable<String> c = o -> {return 0;};\n\nAfter the quick-fix is applied:\n\n\n Comparable<String> c = o -> 0;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CodeBlock2Expr",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 8",
"index": 119,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SimplifyForEach",
"shortDescription": {
"text": "Simplifiable forEach() call"
},
"fullDescription": {
"text": "Reports 'forEach()' calls that can be replaced with a more concise method or from which intermediate steps can be extracted. Example: 'List<String> findNStrings(List<String> list, int n) {\n List<String> other = new ArrayList<>();\n list.forEach(s -> {\n if(s.length() > n) other.add(s);\n });\n return other;\n }' After the quick-fix is applied: 'List<String> findNStrings(List<String> list, int n) {\n List<String> other = list.stream()\n .filter(s -> s.length() > n)\n .collect(Collectors.toList());\n return other;\n }' This inspection only reports if the language level of the project or module is 8 or higher. New in 2017.3",
"markdown": "Reports `forEach()` calls that can be replaced with a more concise method or from which intermediate steps can be extracted.\n\n**Example:**\n\n\n List<String> findNStrings(List<String> list, int n) {\n List<String> other = new ArrayList<>();\n list.forEach(s -> {\n if(s.length() > n) other.add(s);\n });\n return other;\n }\n\nAfter the quick-fix is applied:\n\n\n List<String> findNStrings(List<String> list, int n) {\n List<String> other = list.stream()\n .filter(s -> s.length() > n)\n .collect(Collectors.toList());\n return other;\n }\n\nThis inspection only reports if the language level of the project or module is 8 or higher.\n\nNew in 2017.3"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "SimplifyForEach",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 8",
"index": 119,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Since15",
"shortDescription": {
"text": "Usages of API which isn't available at the configured language level"
},
"fullDescription": {
"text": "Reports usages of the API that is unavailable at the configured language level. This inspection does 3 things: Highlight usage of generified classes when the language level is below Java 7. Highlight when default methods are not overridden and the language level is below Java 8. Highlight usage of API when the language level is lower than marked using the '@since' tag in the documentation. Use the Forbid API usages option to forbid usages of the API in respect to the project or custom language level.",
"markdown": "Reports usages of the API that is unavailable at the configured language level. This inspection does 3 things:\n\n* Highlight usage of generified classes when the language level is below Java 7.\n* Highlight when default methods are not overridden and the language level is below Java 8.\n* Highlight usage of API when the language level is lower than marked using the `@since` tag in the documentation.\n\n\nUse the **Forbid API usages** option to forbid usages of the API in respect to the project or custom language level."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "Since15",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JVM languages",
"index": 47,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantLengthCheck",
"shortDescription": {
"text": "Redundant array length check"
},
"fullDescription": {
"text": "Reports unnecessary array length checks followed by array iteration. When array length is zero, the iteration will be skipped anyway, so there's no need to check length explicitly. Example: 'void f(String[] array) {\n if (array.length != 0) { // unnecessary check\n for (String str : array) {\n System.out.println(str);\n }\n }\n }' A quick-fix is suggested to unwrap or remove the length check: 'void f(String[] array) {\n for (String str : array) {\n System.out.println(str);\n }\n }' New in 2022.3",
"markdown": "Reports unnecessary array length checks followed by array iteration. When array length is zero, the iteration will be skipped anyway, so there's no need to check length explicitly.\n\nExample:\n\n\n void f(String[] array) {\n if (array.length != 0) { // unnecessary check\n for (String str : array) {\n System.out.println(str);\n }\n }\n }\n\nA quick-fix is suggested to unwrap or remove the length check:\n\n\n void f(String[] array) {\n for (String str : array) {\n System.out.println(str);\n }\n }\n\nNew in 2022.3"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantLengthCheck",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DataFlowIssue",
"shortDescription": {
"text": "Nullability and data flow problems"
},
"fullDescription": {
"text": "Reports code constructs that always violate nullability contracts, may throw exceptions, or are just redundant, based on data flow analysis. Examples: 'if (array.length < index) {\n System.out.println(array[index]);\n} // Array index is always out of bounds\n\nif (str == null) System.out.println(\"str is null\");\nSystem.out.println(str.trim());\n// the last statement may throw an NPE\n\n@NotNull\nInteger square(@Nullable Integer input) {\n // the method contract is violated\n return input == null ? null : input * input;\n}' The inspection behavior may be controlled by a number of annotations, such as nullability annotations, '@Contract' annotation, '@Range' annotation and so on. Configure the inspection: Use the Suggest @Nullable annotation for methods/fields/parameters where nullable values are used option to warn when a nullable value is passed as an argument to a method with a non-annotated parameter, stored into non-annotated field, or returned from a non-annotated method. In this case, the inspection will suggest propagating the '@Nullable' annotation. You can also configure nullability annotations using the Configure Annotations button. Use the Treat non-annotated members and parameters as @Nullable option to assume that non-annotated members can be null, so they must not be used in non-null context. Use the Report not-null required parameter with null-literal argument usages option to report method parameters that cannot be null (e.g. immediately dereferenced in the method body), but there are call sites where a 'null' literal is passed. Use the Report nullable methods that always return a non-null value option to report methods that are annotated as '@Nullable', but always return non-null value. In this case, it's suggested that you change the annotation to '@NotNull'. Use the Ignore assert statements option to control how the inspection treats 'assert' statements. By default, the option is disabled, which means that the assertions are assumed to be executed (-ea mode). If the option is enabled, the assertions will be completely ignored (-da mode). Use the Report problems that happen only on some code paths option to control whether to report problems that may happen only on some code path. If this option is disabled, warnings like exception is possible will not be reported. The inspection will report only warnings like exception will definitely occur. This mode may greatly reduce the number of false-positives, especially if the code is not consistently annotated with nullability and contract annotations. That is why it can be useful for finding the most important problems in legacy code bases. Before IntelliJ IDEA 2022.3, this inspection was part of the \"Constant Conditions & Exceptions\" inspection. Now, it is split into two inspections: \"Constant Values\" and \"Nullability and data flow problems\".",
"markdown": "Reports code constructs that always violate nullability contracts, may throw exceptions, or are just redundant, based on data flow analysis.\n\nExamples:\n\n if (array.length < index) {\n System.out.println(array[index]);\n } // Array index is always out of bounds\n\n if (str == null) System.out.println(\"str is null\");\n System.out.println(str.trim());\n // the last statement may throw an NPE\n\n @NotNull\n Integer square(@Nullable Integer input) {\n // the method contract is violated\n return input == null ? null : input * input;\n }\n\n\nThe inspection behavior may be controlled by a number of annotations, such as\n[nullability](https://www.jetbrains.com/help/idea/nullable-and-notnull-annotations.html) annotations,\n[@Contract](https://www.jetbrains.com/help/idea/contract-annotations.html) annotation,\n`@Range` annotation and so on.\n\nConfigure the inspection:\n\n* Use the **Suggest @Nullable annotation for methods/fields/parameters where nullable values are used** option to warn when a nullable value is passed as an argument to a method with a non-annotated parameter, stored into non-annotated field, or returned from a non-annotated method. In this case, the inspection will suggest propagating the `@Nullable` annotation. You can also configure nullability annotations using the **Configure Annotations** button.\n* Use the **Treat non-annotated members and parameters as @Nullable** option to assume that non-annotated members can be null, so they must not be used in non-null context.\n* Use the **Report not-null required parameter with null-literal argument usages** option to report method parameters that cannot be null (e.g. immediately dereferenced in the method body), but there are call sites where a `null` literal is passed.\n* Use the **Report nullable methods that always return a non-null value** option to report methods that are annotated as `@Nullable`, but always return non-null value. In this case, it's suggested that you change the annotation to `@NotNull`.\n* Use the **Ignore assert statements** option to control how the inspection treats `assert` statements. By default, the option is disabled, which means that the assertions are assumed to be executed (-ea mode). If the option is enabled, the assertions will be completely ignored (-da mode).\n* Use the **Report problems that happen only on some code paths** option to control whether to report problems that may happen only on some code path. If this option is disabled, warnings like *exception is possible* will not be reported. The inspection will report only warnings like *exception will definitely occur*. This mode may greatly reduce the number of false-positives, especially if the code is not consistently annotated with nullability and contract annotations. That is why it can be useful for finding the most important problems in legacy code bases.\n\n\nBefore IntelliJ IDEA 2022.3, this inspection was part of the \"Constant Conditions \\& Exceptions\" inspection.\nNow, it is split into two inspections:\n\"Constant Values\" and \"Nullability and data flow problems\"."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "DataFlowIssue",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Guava",
"shortDescription": {
"text": "Guava's functional primitives can be replaced with Java"
},
"fullDescription": {
"text": "Reports usages of Guava's functional primitives that can be migrated to standard Java API calls. For example, the inspection reports usages of classes and interfaces like 'FluentIterable', 'Optional', 'Function', 'Predicate', or 'Supplier'. Example: 'ImmutableList<String> results = FluentIterable.from(List.of(1, 2, 3)).transform(Object::toString).toList();' After the quick-fix is applied: 'List<String> results = List.of(1, 2, 3).stream().map(Object::toString).collect(Collectors.toList());' The quick-fix may change the semantics. Some lazy-evaluated Guava's iterables can be transformed to eager-evaluated. This inspection only reports if the language level of the project or module is 8 or higher.",
"markdown": "Reports usages of Guava's functional primitives that can be migrated to standard Java API calls.\n\nFor example, the inspection reports usages of classes and interfaces like `FluentIterable`, `Optional`, `Function`,\n`Predicate`, or `Supplier`.\n\nExample:\n\n\n ImmutableList<String> results = FluentIterable.from(List.of(1, 2, 3)).transform(Object::toString).toList();\n\nAfter the quick-fix is applied:\n\n\n List<String> results = List.of(1, 2, 3).stream().map(Object::toString).collect(Collectors.toList());\n\n\nThe quick-fix may change the semantics. Some lazy-evaluated Guava's iterables can be transformed to eager-evaluated.\n\nThis inspection only reports if the language level of the project or module is 8 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "Guava",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 8",
"index": 119,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NoopMethodInAbstractClass",
"shortDescription": {
"text": "No-op method in 'abstract' class"
},
"fullDescription": {
"text": "Reports no-op (for \"no operation\") methods in 'abstract' classes. It is usually a better design to make such methods 'abstract' themselves so that classes inheriting these methods provide their implementations. Example: 'abstract class Test {\n protected void doTest() {\n }\n }'",
"markdown": "Reports no-op (for \"no operation\") methods in `abstract` classes.\n\nIt is usually a better\ndesign to make such methods `abstract` themselves so that classes inheriting these\nmethods provide their implementations.\n\n**Example:**\n\n\n abstract class Test {\n protected void doTest() {\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NoopMethodInAbstractClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FieldHidesSuperclassField",
"shortDescription": {
"text": "Subclass field hides superclass field"
},
"fullDescription": {
"text": "Reports fields in a derived class that are named identically a field of a superclass. Java fields cannot be overridden in derived classes, so the field in the derived class will hide the field from the superclass. As a result of such naming, you may accidentally use the field of the derived class where the identically named field of a base class is intended. A quick-fix is suggested to rename the field in the derived class. Example: 'class Parent {\n Parent parent;\n}\nclass Child extends Parent {\n Child parent;\n}' You can configure the following options for this inspection: Ignore non-accessible fields - indicates whether this inspection should report all name clashes, or only clashes with fields which are visible from the subclass. Ignore static fields hiding static fields - ignore 'static' fields which hide 'static' fields in base classes.",
"markdown": "Reports fields in a derived class that are named identically a field of a superclass. Java fields cannot be overridden in derived classes, so the field in the derived class will hide the field from the superclass.\n\n\nAs a result of such naming, you may accidentally use the field of the derived class\nwhere the identically named field of a base class is intended.\n\nA quick-fix is suggested to rename the field in the derived class.\n\n**Example:**\n\n class Parent {\n Parent parent;\n }\n class Child extends Parent {\n Child parent;\n }\n\n\nYou can configure the following options for this inspection:\n\n1. **Ignore non-accessible fields** - indicates whether this inspection should report all name clashes, or only clashes with fields which are visible from the subclass.\n2. **Ignore static fields hiding static fields** - ignore `static` fields which hide `static` fields in base classes."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FieldNameHidesFieldInSuperclass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Visibility",
"index": 97,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JUnit3StyleTestMethodInJUnit4Class",
"shortDescription": {
"text": "Old style JUnit test method in JUnit 4 class"
},
"fullDescription": {
"text": "Reports JUnit 3 style test methods that are located inside a class that does not extend the JUnit 3 'TestCase' class and contains JUnit 4 or JUnit 5 '@Test' annotated methods. Such test methods cannot be run.",
"markdown": "Reports JUnit 3 style test methods that are located inside a class that does not extend the JUnit 3 `TestCase` class and contains JUnit 4 or JUnit 5 `@Test` annotated methods. Such test methods cannot be run."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "JUnit3StyleTestMethodInJUnit4Class",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/JUnit",
"index": 100,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OverlyLargePrimitiveArrayInitializer",
"shortDescription": {
"text": "Overly large initializer for array of primitive type"
},
"fullDescription": {
"text": "Reports array initializer expressions for primitive arrays that contain too many elements. Such initializers may result in overly large class files because code must be generated to initialize each array element. In memory or bandwidth constrained environments, it may be more efficient to load large arrays of primitives from resource files. This inspection is intended for Java ME and other highly resource constrained environments. Applying the results of this inspection without consideration might have negative effects on code clarity and design. Use the option to specify the maximum number of elements to allow in primitive array initializers.",
"markdown": "Reports array initializer expressions for primitive arrays that contain too many elements. Such initializers may result in overly large class files because code must be generated to initialize each array element. In memory or bandwidth constrained environments, it may be more efficient to load large arrays of primitives from resource files.\n\n\nThis inspection is intended for Java ME and other highly resource constrained environments.\nApplying the results of this inspection without consideration might have negative effects on code clarity and design.\n\n\nUse the option to specify the maximum number of elements to allow in primitive array initializers."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OverlyLargePrimitiveArrayInitializer",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance/Embedded",
"index": 178,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InstanceVariableUninitializedUse",
"shortDescription": {
"text": "Instance field used before initialization"
},
"fullDescription": {
"text": "Reports instance variables that are read before initialization. The inspection ignores equality checks with 'null'. Example: 'class Foo {\n int bar;\n\n Foo() {\n System.out.println(bar);\n }\n }' Note that this inspection uses a very conservative dataflow algorithm and may incorrectly report instance variables as uninitialized. Variables reported as initialized will always be initialized. Use the Ignore if annotated by option to specify special annotations. The inspection will ignore fields annotated with one of these annotations. Use the Ignore primitive fields option to ignore uninitialized primitive fields.",
"markdown": "Reports instance variables that are read before initialization.\n\nThe inspection ignores equality checks with `null`.\n\n**Example:**\n\n\n class Foo {\n int bar;\n\n Foo() {\n System.out.println(bar);\n }\n }\n\nNote that this inspection uses a very conservative dataflow algorithm and may incorrectly report instance variables as uninitialized. Variables\nreported as initialized will always be initialized.\n\nUse the **Ignore if annotated by** option to specify special annotations. The inspection will ignore fields\nannotated with one of these annotations.\n\nUse the **Ignore primitive fields** option to ignore uninitialized primitive fields."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "InstanceVariableUsedBeforeInitialized",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Initialization",
"index": 26,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ExpressionMayBeFactorized",
"shortDescription": {
"text": "Expression can be factorized"
},
"fullDescription": {
"text": "Reports expressions that can be factorized, i.e. reorganized to pull out a common factor. This reduces redundancy and could improve the readability of your code. Example: 'a && b || a && c' After the quick-fix is applied: 'a && (b || c)' New in 2021.3",
"markdown": "Reports expressions that can be factorized, i.e. reorganized to pull out a common factor. This reduces redundancy and could improve the readability of your code.\n\n**Example:**\n\n\n a && b || a && c\n\nAfter the quick-fix is applied:\n\n\n a && (b || c)\n\nNew in 2021.3"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ExpressionMayBeFactorized",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ListRemoveInLoop",
"shortDescription": {
"text": "'List.remove()' called in loop"
},
"fullDescription": {
"text": "Reports 'List.remove(index)' called in a loop that can be replaced with 'List.subList().clear()'. The replacement is more efficient for most 'List' implementations when many elements are deleted. Example: 'void removeRange(List<String> list, int from, int to) {\n for (int i = from; i < to; i++) {\n list.remove(from);\n }\n }' After the quick-fix is applied: 'void removeRange(List<String> list, int from, int to) {\n if (to > from) {\n list.subList(from, to).clear();\n }\n }' The quick-fix adds a range check automatically to prevent a possible 'IndexOutOfBoundsException' when the minimal value is bigger than the maximal value. It can be removed if such a situation is impossible in your code. New in 2018.2",
"markdown": "Reports `List.remove(index)` called in a loop that can be replaced with `List.subList().clear()`.\n\nThe replacement\nis more efficient for most `List` implementations when many elements are deleted.\n\nExample:\n\n\n void removeRange(List<String> list, int from, int to) {\n for (int i = from; i < to; i++) {\n list.remove(from);\n }\n }\n\nAfter the quick-fix is applied:\n\n\n void removeRange(List<String> list, int from, int to) {\n if (to > from) {\n list.subList(from, to).clear();\n }\n }\n\n\nThe quick-fix adds a range check automatically to prevent a possible `IndexOutOfBoundsException` when the minimal value is bigger\nthan the maximal value. It can be removed if such a situation is impossible in your code.\n\nNew in 2018.2"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ListRemoveInLoop",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MissingOverrideAnnotation",
"shortDescription": {
"text": "Missing '@Override' annotation"
},
"fullDescription": {
"text": "Reports methods overriding superclass methods but are not annotated with '@java.lang.Override'. Annotating methods with '@java.lang.Override' improves code readability since it shows the intent. In addition, the compiler emits an error when a signature of the overridden method doesn't match the superclass method. Example: 'class X {\n public String toString() {\n return \"hello world\";\n }\n }' After the quick-fix is applied: 'class X {\n @Override\n public String toString() {\n return \"hello world\";\n }\n }' Configure the inspection: Use the Ignore 'equals()', 'hashCode()' and 'toString()' option to ignore these 'java.lang.Object' methods: 'equals()', 'hashCode()', and 'toString()'. The risk that these methods will disappear and your code won't be compiling anymore due to the '@Override' annotation is relatively small. Use the Ignore methods in anonymous classes option to ignore methods in anonymous classes. Disable the Highlight method when its overriding methods do not all have the '@Override' annotation option to only warn on the methods missing an '@Override' annotation, and not on overridden methods where one or more descendants are missing an '@Override' annotation. This inspection only reports if the language level of the project or module is 5 or higher.",
"markdown": "Reports methods overriding superclass methods but are not annotated with `@java.lang.Override`.\n\n\nAnnotating methods with `@java.lang.Override` improves code readability since it shows the intent.\nIn addition, the compiler emits an error when a signature of the overridden method doesn't match the superclass method.\n\n**Example:**\n\n\n class X {\n public String toString() {\n return \"hello world\";\n }\n }\n \nAfter the quick-fix is applied:\n\n\n class X {\n @Override\n public String toString() {\n return \"hello world\";\n }\n }\n \nConfigure the inspection:\n\n* Use the **Ignore 'equals()', 'hashCode()' and 'toString()'** option to ignore these `java.lang.Object` methods: `equals()`, `hashCode()`, and `toString()`. The risk that these methods will disappear and your code won't be compiling anymore due to the `@Override` annotation is relatively small.\n* Use the **Ignore methods in anonymous classes** option to ignore methods in anonymous classes.\n* Disable the **Highlight method when its overriding methods do not all have the '@Override' annotation** option to only warn on the methods missing an `@Override` annotation, and not on overridden methods where one or more descendants are missing an `@Override` annotation.\n\nThis inspection only reports if the language level of the project or module is 5 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "override",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Inheritance issues",
"index": 159,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CharUsedInArithmeticContext",
"shortDescription": {
"text": "'char' expression used in arithmetic context"
},
"fullDescription": {
"text": "Reports expressions of the 'char' type used in addition or subtraction expressions. Such code is not necessarily an issue but may result in bugs (for example, if a string is expected). Example: 'int a = 'a' + 42;' After the quick-fix is applied: 'int a = (int) 'a' + 42;' For the 'String' context: 'int i1 = 1;\nint i2 = 2;\nSystem.out.println(i2 + '-' + i1 + \" = \" + (i2 - i1));' After the quick-fix is applied: 'System.out.println(i2 + \"-\" + i1 + \" = \" + (i2 - i1));'",
"markdown": "Reports expressions of the `char` type used in addition or subtraction expressions.\n\nSuch code is not necessarily an issue but may result in bugs (for example,\nif a string is expected).\n\n**Example:** `int a = 'a' + 42;`\n\nAfter the quick-fix is applied: `int a = (int) 'a' + 42;`\n\nFor the `String` context:\n\n int i1 = 1;\n int i2 = 2;\n System.out.println(i2 + '-' + i1 + \" = \" + (i2 - i1));\n\nAfter the quick-fix is applied:\n`System.out.println(i2 + \"-\" + i1 + \" = \" + (i2 - i1));`"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CharUsedInArithmeticContext",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues",
"index": 49,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TestFailedLine",
"shortDescription": {
"text": "Failed line in test"
},
"fullDescription": {
"text": "Reports failed method calls or assertions in tests. It helps detect the failed line in code faster and start debugging it immediately. Example: '@Test\n fun foo() {\n assertEquals(1, 0) // highlighted\n }'",
"markdown": "Reports failed method calls or assertions in tests. It helps detect the failed line in code faster and start debugging it immediately.\n\n**Example:**\n\n\n @Test\n fun foo() {\n assertEquals(1, 0) // highlighted\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "TestFailedLine",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JVM languages/Test frameworks",
"index": 128,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ExtendsConcreteCollection",
"shortDescription": {
"text": "Class explicitly extends a 'Collection' class"
},
"fullDescription": {
"text": "Reports classes that extend concrete subclasses of the 'java.util.Collection' or 'java.util.Map' classes. Subclassing concrete collection types is a common yet poor practice. It is considerably more brittle than delegating collection calls.",
"markdown": "Reports classes that extend concrete subclasses of the `java.util.Collection` or `java.util.Map` classes.\n\n\nSubclassing concrete collection types is a common yet poor practice. It is considerably more brittle than delegating collection calls."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ClassExtendsConcreteCollection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Inheritance issues",
"index": 159,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ObjectInstantiationInEqualsHashCode",
"shortDescription": {
"text": "Object instantiation inside 'equals()' or 'hashCode()'"
},
"fullDescription": {
"text": "Reports construction of (temporary) new objects inside 'equals()', 'hashCode()', 'compareTo()', and 'Comparator.compare()' methods. Besides constructor invocations, new objects can also be created by autoboxing or iterator creation inside a 'foreach' statement. This can cause performance problems, for example, when objects are added to a 'Set' or 'Map', where these methods will be called often. The inspection will not report when the objects are created in a 'throw' or 'assert' statement. Example: 'class Person {\n private String name;\n private int age;\n\n public boolean equals(Object o) {\n return Arrays.equals(new Object[] {name, age}, new Object[] {((Foo)o).name, ((Foo)o).age});\n }\n\n public int hashCode() {\n return (name + age).hashCode();\n }\n }' In this example, two additional arrays are created inside 'equals()', usages of 'age' field require boxing, and 'name + age' implicitly creates a new string.",
"markdown": "Reports construction of (temporary) new objects inside `equals()`, `hashCode()`, `compareTo()`, and `Comparator.compare()` methods.\n\n\nBesides constructor invocations, new objects can also be created by autoboxing or iterator creation inside a\n`foreach` statement.\nThis can cause performance problems, for example, when objects are added to a `Set` or `Map`,\nwhere these methods will be called often.\n\n\nThe inspection will not report when the objects are created in a `throw` or `assert` statement.\n\n**Example:**\n\n\n class Person {\n private String name;\n private int age;\n\n public boolean equals(Object o) {\n return Arrays.equals(new Object[] {name, age}, new Object[] {((Foo)o).name, ((Foo)o).age});\n }\n\n public int hashCode() {\n return (name + age).hashCode();\n }\n }\n\n\nIn this example, two additional arrays are created inside `equals()`, usages of `age` field require boxing,\nand `name + age` implicitly creates a new string."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ObjectInstantiationInEqualsHashCode",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IntLiteralMayBeLongLiteral",
"shortDescription": {
"text": "Cast to 'long' can be 'long' literal"
},
"fullDescription": {
"text": "Reports 'int' literal expressions that are immediately cast to 'long'. Such literal expressions can be replaced with equivalent 'long' literals. Example: 'Long l = (long)42;' After the quick-fix is applied: 'Long l = 42L;'",
"markdown": "Reports `int` literal expressions that are immediately cast to `long`.\n\nSuch literal expressions can be replaced with equivalent `long` literals.\n\n**Example:**\n\n Long l = (long)42;\n\nAfter the quick-fix is applied:\n\n Long l = 42L;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "IntLiteralMayBeLongLiteral",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues/Cast",
"index": 138,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SingleCharacterStartsWith",
"shortDescription": {
"text": "Single character 'startsWith()' or 'endsWith()'"
},
"fullDescription": {
"text": "Reports calls to 'String.startsWith()' and 'String.endsWith()' where single character string literals are passed as an argument. A quick-fix is suggested to replace such calls with more efficiently implemented 'String.charAt()'. However, the performance gain of such change is minimal and the code becomes less readable because of the extra non-zero length check, so it is recommended to apply the quick-fix only inside tight loops. This inspection is intended for Java ME and other highly resource constrained environments. Applying the results of this inspection without consideration might have negative effects on code clarity and design. Example: 'boolean startsWithX(String s) {\n return s.startsWith(\"x\");\n }' After the quick-fix is applied: 'boolean startsWithX(String s) {\n return !s.isEmpty() && s.charAt(0) == 'x';\n }'",
"markdown": "Reports calls to `String.startsWith()` and `String.endsWith()` where single character string literals are passed as an argument.\n\n\nA quick-fix is suggested to replace such calls with more efficiently implemented `String.charAt()`.\n\n\nHowever, the performance gain of such change is minimal and the code becomes less readable because of the extra non-zero length check,\nso it is recommended to apply the quick-fix only inside tight loops.\n\n\nThis inspection is intended for Java ME and other highly resource constrained environments.\nApplying the results of this inspection without consideration might have negative effects on code clarity and design.\n\n**Example:**\n\n\n boolean startsWithX(String s) {\n return s.startsWith(\"x\");\n }\n\nAfter the quick-fix is applied:\n\n\n boolean startsWithX(String s) {\n return !s.isEmpty() && s.charAt(0) == 'x';\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SingleCharacterStartsWith",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance/Embedded",
"index": 178,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryJavaDocLink",
"shortDescription": {
"text": "Unnecessary Javadoc link"
},
"fullDescription": {
"text": "Reports Javadoc '@see', '{@link}', and '{@linkplain}' tags that refer to the method owning the comment, the super method of the method owning the comment, or the class containing the comment. Such links are unnecessary and can be safely removed with this inspection's quick-fix. The quick-fix will remove the entire Javadoc comment if the tag is its only content. Example: 'class Example {\n /**\n * @see Example#method\n */\n public void method() { }\n }' After the quick-fix is applied: 'class Example {\n public void method() { }\n}' Use the checkbox below to ignore inline links ('{@link}' and '{@linkplain}') to super methods. Although a link to all super methods is automatically added by the Javadoc tool, an inline link to the super method may sometimes be needed in texts of the Javadoc comments.",
"markdown": "Reports Javadoc `@see`, `{@link}`, and `{@linkplain}` tags that refer to the method owning the comment, the super method of the method owning the comment, or the class containing the comment.\n\nSuch links are unnecessary and can be safely removed with this inspection's quick-fix. The\nquick-fix will remove the entire Javadoc comment if the tag is its only content.\n\n**Example:**\n\n\n class Example {\n /**\n * @see Example#method\n */\n public void method() { }\n }\n\nAfter the quick-fix is applied:\n\n\n class Example {\n public void method() { }\n }\n\n\nUse the checkbox below to ignore inline links (`{@link}` and `{@linkplain}`)\nto super methods. Although a link to all super methods is automatically added by the\nJavadoc tool, an inline link to the super method may sometimes be needed in texts of the Javadoc comments."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryJavaDocLink",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Javadoc",
"index": 95,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FinalClass",
"shortDescription": {
"text": "Class is closed to inheritance"
},
"fullDescription": {
"text": "Reports classes that are declared 'final'. Final classes that extend a 'sealed' class or interface are not reported. Such classes can't be inherited and may indicate a lack of object-oriented design. Some coding standards discourage 'final' classes. Example: 'public final class Main {\n }' After the quick-fix is applied: 'public class Main {\n }'",
"markdown": "Reports classes that are declared `final`. Final classes that extend a `sealed` class or interface are not reported. Such classes can't be inherited and may indicate a lack of object-oriented design. Some coding standards discourage `final` classes.\n\n**Example:**\n\n\n public final class Main {\n }\n\nAfter the quick-fix is applied:\n\n\n public class Main {\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FinalClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryEmptyArrayUsage",
"shortDescription": {
"text": "Unnecessary zero length array usage"
},
"fullDescription": {
"text": "Reports allocations of arrays with known lengths of zero when there is a constant for that in the class of the array's element type. As zero-length arrays are immutable, you can save memory reusing the same array instance. Example: 'class Item {\n // Public zero-length array constant that can be reused \n public static final Item[] EMPTY_ARRAY = new Item[0];\n }\n class EmptyNode {\n Item[] getChildren() {\n // Unnecessary zero-length array creation\n return new Item[0];\n }\n }' After the quick-fix is applied: 'class EmptyNode {\n Item[] getChildren() {\n return Item.EMPTY_ARRAY;\n }\n }'",
"markdown": "Reports allocations of arrays with known lengths of zero when there is a constant for that in the class of the array's element type. As zero-length arrays are immutable, you can save memory reusing the same array instance.\n\n**Example:**\n\n\n class Item {\n // Public zero-length array constant that can be reused \n public static final Item[] EMPTY_ARRAY = new Item[0];\n }\n class EmptyNode {\n Item[] getChildren() {\n // Unnecessary zero-length array creation\n return new Item[0];\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class EmptyNode {\n Item[] getChildren() {\n return Item.EMPTY_ARRAY;\n }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ConstantForZeroLengthArrayAllocation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Memory",
"index": 166,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BooleanConstructor",
"shortDescription": {
"text": "Boolean constructor call"
},
"fullDescription": {
"text": "Reports creation of 'Boolean' objects. Constructing new 'Boolean' objects is rarely necessary, and may cause performance problems if done often enough. Also, 'Boolean' constructors are deprecated since Java 9 and could be removed or made inaccessible in future Java versions. Example: 'Boolean b1 = new Boolean(true);\n Boolean b2 = new Boolean(str);' After the quick-fix is applied: 'Boolean b1 = Boolean.TRUE;\n Boolean b2 = Boolean.valueOf(str);'",
"markdown": "Reports creation of `Boolean` objects.\n\n\nConstructing new `Boolean` objects is rarely necessary,\nand may cause performance problems if done often enough. Also, `Boolean`\nconstructors are deprecated since Java 9 and could be removed or made\ninaccessible in future Java versions.\n\n**Example:**\n\n\n Boolean b1 = new Boolean(true);\n Boolean b2 = new Boolean(str);\n\nAfter the quick-fix is applied:\n\n\n Boolean b1 = Boolean.TRUE;\n Boolean b2 = Boolean.valueOf(str);\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "BooleanConstructorCall",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TooBroadScope",
"shortDescription": {
"text": "Scope of variable is too broad"
},
"fullDescription": {
"text": "Reports any variable declarations that can be moved to a smaller scope. This inspection is especially useful for Pascal style declarations at the beginning of a method. Additionally variables with too broad a scope are also often left behind after refactorings. Example: 'StringBuilder sb = new StringBuilder();\n System.out.println();\n sb.append(1);' After the quick-fix is applied: 'System.out.println();\n StringBuilder sb = new StringBuilder();\n sb.append(1);' Configure the inspection: Use the Only report variables that can be moved into inner blocks option to report only those variables that can be moved inside deeper code blocks. For example, when the option is enabled, the movement will not be suggested for the 'sb' variable above. However, it will be suggested for the following code: 'StringBuilder sb = new StringBuilder(a);\n if (flag) {\n sb.append(1);\n }' Use the Report variables with a new expression as initializer (potentially unsafe) option to report variables that are initialized with a new expression. This makes the inspection potentially unsafe when the constructor has non-local side effects. For example, when the option is enabled, the movement will be suggested for the 'foo' variable: 'class Foo {\n static List<Foo> fooList = new ArrayList<>();\n String bar;\n\n Foo(String bar) {\n this.bar = bar;\n fooList.add(this);\n }\n\n public static void main(String[] args) {\n // movement is possible even though is unsafe\n Foo foo = new Foo(\"bar\");\n System.out.println(fooList.size());\n System.out.println(foo.bar);\n }\n }'",
"markdown": "Reports any variable declarations that can be moved to a smaller scope.\n\nThis inspection is especially\nuseful for *Pascal style* declarations at the beginning of a method. Additionally variables with too broad a\nscope are also often left behind after refactorings.\n\n**Example:**\n\n\n StringBuilder sb = new StringBuilder();\n System.out.println();\n sb.append(1);\n\nAfter the quick-fix is applied:\n\n\n System.out.println();\n StringBuilder sb = new StringBuilder();\n sb.append(1);\n\nConfigure the inspection:\n\n* Use the **Only report variables that can be moved into inner blocks** option to report only those variables that can be moved inside deeper code blocks. For example, when the option is enabled, the movement will not be suggested for the `sb` variable above. However, it will be suggested for the following code:\n\n\n StringBuilder sb = new StringBuilder(a);\n if (flag) {\n sb.append(1);\n }\n\n* Use the **Report variables with a new expression as initializer\n (potentially unsafe)** option to report variables that are initialized with a new expression. This makes the inspection potentially unsafe when the constructor has non-local side effects. For example, when the option is enabled, the movement will be suggested for the `foo` variable:\n\n\n class Foo {\n static List<Foo> fooList = new ArrayList<>();\n String bar;\n\n Foo(String bar) {\n this.bar = bar;\n fooList.add(this);\n }\n\n public static void main(String[] args) {\n // movement is possible even though is unsafe\n Foo foo = new Foo(\"bar\");\n System.out.println(fooList.size());\n System.out.println(foo.bar);\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "TooBroadScope",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Data flow",
"index": 61,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ThreadPriority",
"shortDescription": {
"text": "Call to 'Thread.setPriority()'"
},
"fullDescription": {
"text": "Reports calls to 'Thread.setPriority()'. Modifying priorities of threads is an inherently non-portable operation, as no guarantees are given in the Java specification of how priorities are used in scheduling threads, or even whether they are used at all.",
"markdown": "Reports calls to `Thread.setPriority()`. Modifying priorities of threads is an inherently non-portable operation, as no guarantees are given in the Java specification of how priorities are used in scheduling threads, or even whether they are used at all."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CallToThreadSetPriority",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JUnitMalformedDeclaration",
"shortDescription": {
"text": "JUnit malformed declaration"
},
"fullDescription": {
"text": "Reports JUnit test member declarations that are malformed and are likely not recognized by the JUnit test framework. The following problems are reported by this inspection: Test classes that can't be constructed Fields annotated by '@RegisterExtension' that have the wrong type or are not declared as static when it is required Static or private inner classes annotated with '@Nested' Parameterized tests that are defined without a source Parameterized tests with a '@MethodSource' that has an unknown, non-static or no-arg target Mismatched types between parameterized test method parameter and the specified '@ValueSource' or '@EnumSource' values Tests that are annotated by more than one of '@Test', '@ParameterizedTest' or '@RepeatedTest' 'setup()' or 'tearDown()' methods that are not public, whose return type is not void or take arguments 'suite()' methods that are private, take arguments or are not static Methods annotated by '@BeforeClass', '@AfterClass', '@BeforeAll' or '@AfterAll' that are not public, not static, whose return type is not void or do not have a valid parameter list Methods annotated by '@Before', '@After', '@BeforeEach' or '@AfterEach' that are not public, whose return type is not void or take arguments Injected 'RepetitionInfo' in '@BeforeAll' or '@AfterAll' methods Injected 'RepetitionInfo' in '@BeforeEach' or '@AfterEach' methods that are used by '@Test' annotated tests Fields and methods annotated by '@DataPoint' or '@DataPoints' that are not public or not static Fields and methods annotated by '@Rule' that are not public or not a subtype of 'TestRule' or 'MethodRule' Fields and methods annotated by '@ClassRule' that are not public, not static or not a subtype of 'TestRule' Methods inside a subclass of 'TestCase' with a 'test' prefix that are not public, whose return type is not void, take arguments or are static Methods annotated by '@Test' that are not public, whose return type is not void, take arguments or are static Note that in Kotlin, suspending functions do have arguments and a non-void return type. Therefore, they also will not be executed by the JUnit test runner. This inspection will also report about this problem. Malformed '@Before' method example (Java): '@Before private int foo(int arg) { ... }' After the quick-fix is applied: '@Before public void foo() { ... }' Missing method source example (Kotlin): 'class Example {\n @MethodSource(\"parameters\")\n @ParameterizedTest\n fun foo(param: String) { ... }\n }' After the quick-fix is applied: 'class Example {\n @MethodSource(\"parameters\")\n @ParameterizedTest\n fun foo(param: String) { ... }\n\n companion object {\n @JvmStatic\n fun parameters(): Stream<Arguments> {\n TODO(\"Not yet implemented\")\n }\n }\n }' Use the inspection options to specify annotations. Any parameter annotated with one of these annotations will not be reported.",
"markdown": "Reports JUnit test member declarations that are malformed and are likely not recognized by the JUnit test framework. The following problems are reported by this inspection:\n\n* Test classes that can't be constructed\n* Fields annotated by `@RegisterExtension` that have the wrong type or are not declared as static when it is required\n* Static or private inner classes annotated with `@Nested`\n* Parameterized tests that are defined without a source\n* Parameterized tests with a `@MethodSource` that has an unknown, non-static or no-arg target\n* Mismatched types between parameterized test method parameter and the specified `@ValueSource` or `@EnumSource` values\n* Tests that are annotated by more than one of `@Test`, `@ParameterizedTest` or `@RepeatedTest`\n* `setup()` or `tearDown()` methods that are not public, whose return type is not void or take arguments\n* `suite()` methods that are private, take arguments or are not static\n* Methods annotated by `@BeforeClass`, `@AfterClass`, `@BeforeAll` or `@AfterAll` that are not public, not static, whose return type is not void or do not have a valid parameter list\n* Methods annotated by `@Before`, `@After`, `@BeforeEach` or `@AfterEach` that are not public, whose return type is not void or take arguments\n* Injected `RepetitionInfo` in `@BeforeAll` or `@AfterAll` methods\n* Injected `RepetitionInfo` in `@BeforeEach` or `@AfterEach` methods that are used by `@Test` annotated tests\n* Fields and methods annotated by `@DataPoint` or `@DataPoints` that are not public or not static\n* Fields and methods annotated by `@Rule` that are not public or not a subtype of `TestRule` or `MethodRule`\n* Fields and methods annotated by `@ClassRule` that are not public, not static or not a subtype of `TestRule`\n* Methods inside a subclass of `TestCase` with a `test` prefix that are not public, whose return type is not void, take arguments or are static\n* Methods annotated by `@Test` that are not public, whose return type is not void, take arguments or are static\n\nNote that in Kotlin, suspending functions do have arguments and a non-void return type. Therefore, they also will not be executed by the JUnit test runner. This inspection will also report about this problem.\n\n**Malformed `@Before` method example (Java):**\n\n @Before private int foo(int arg) { ... } \n\nAfter the quick-fix is applied:\n\n @Before public void foo() { ... } \n\n**Missing method source example (Kotlin):**\n\n\n class Example {\n @MethodSource(\"parameters\")\n @ParameterizedTest\n fun foo(param: String) { ... }\n }\n\nAfter the quick-fix is applied:\n\n\n class Example {\n @MethodSource(\"parameters\")\n @ParameterizedTest\n fun foo(param: String) { ... }\n\n companion object {\n @JvmStatic\n fun parameters(): Stream<Arguments> {\n TODO(\"Not yet implemented\")\n }\n }\n }\n\nUse the inspection options to specify annotations. Any parameter annotated with one of these annotations will not be reported."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "JUnitMalformedDeclaration",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JVM languages/Test frameworks",
"index": 128,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonFinalFieldOfException",
"shortDescription": {
"text": "Non-final field of 'Exception' class"
},
"fullDescription": {
"text": "Reports fields in subclasses of 'java.lang.Exception' that are not declared 'final'. Data on exception objects should not be modified because this may result in losing the error context for later debugging and logging. Example: 'public class EditorException extends Exception {\n private String message; // warning: Non-final field 'message' of exception class\n }'",
"markdown": "Reports fields in subclasses of `java.lang.Exception` that are not declared `final`.\n\nData on exception objects should not be modified\nbecause this may result in losing the error context for later debugging and logging.\n\n**Example:**\n\n\n public class EditorException extends Exception {\n private String message; // warning: Non-final field 'message' of exception class\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonFinalFieldOfException",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Error handling",
"index": 9,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PointlessNullCheck",
"shortDescription": {
"text": "Unnecessary 'null' check before method call"
},
"fullDescription": {
"text": "Reports 'null' checks followed by a method call that will definitely return 'false' when 'null' is passed (e.g. 'Class.isInstance'). Such a check seems excessive as the method call will always return 'false' in this case. Example: 'if (x != null && myClass.isInstance(x)) { ... }' After the quick-fix is applied: 'if (myClass.isInstance(x)) { ... }'",
"markdown": "Reports `null` checks followed by a method call that will definitely return `false` when `null` is passed (e.g. `Class.isInstance`).\n\nSuch a check seems excessive as the method call will always return `false` in this case.\n\n**Example:**\n\n\n if (x != null && myClass.isInstance(x)) { ... }\n\nAfter the quick-fix is applied:\n\n\n if (myClass.isInstance(x)) { ... }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PointlessNullCheck",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ExtendsUtilityClass",
"shortDescription": {
"text": "Class extends utility class"
},
"fullDescription": {
"text": "Reports classes that extend a utility class. A utility class is a non-empty class in which all fields and methods are static. Extending a utility class also allows for inadvertent object instantiation of the utility class, because the constructor cannot be made private in order to allow extension. Configure the inspection: Use the Ignore if overriding class is a utility class option to ignore any classes that override a utility class but are also utility classes themselves.",
"markdown": "Reports classes that extend a utility class.\n\n\nA utility class is a non-empty class in which all fields and methods are static.\nExtending a utility class also allows for inadvertent object instantiation of the\nutility class, because the constructor cannot be made private in order to allow extension.\n\n\nConfigure the inspection:\n\n* Use the **Ignore if overriding class is a utility class** option to ignore any classes that override a utility class but are also utility classes themselves."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ExtendsUtilityClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Inheritance issues",
"index": 159,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UtilityClassWithoutPrivateConstructor",
"shortDescription": {
"text": "Utility class without 'private' constructor"
},
"fullDescription": {
"text": "Reports utility classes without 'private' constructors. Utility classes have all fields and methods declared as 'static'. Creating 'private' constructors in utility classes prevents them from being accidentally instantiated. Use the Ignore if annotated by option to specify special annotations. The inspection ignores classes marked with one of these annotations. Use the Ignore classes with only a main method option to ignore classes with no methods other than the main one.",
"markdown": "Reports utility classes without `private` constructors.\n\nUtility classes have all fields and methods declared as `static`. Creating `private`\nconstructors in utility classes prevents them from being accidentally instantiated.\n\n\nUse the **Ignore if annotated by** option to specify special annotations. The inspection ignores classes marked with one of\nthese annotations.\n\n\nUse the **Ignore classes with only a main method** option to ignore classes with no methods other than the main one."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UtilityClassWithoutPrivateConstructor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AssertMessageNotString",
"shortDescription": {
"text": "'assert' message is not a string"
},
"fullDescription": {
"text": "Reports 'assert' messages that are not of the 'java.lang.String' type. Using a string provides more information to help diagnose the failure or the assertion reason. Example: 'void foo(List<Integer> myList) {\n assert myList.isEmpty() : false;\n }' Use the Only warn when the 'assert' message type is 'boolean' or 'java.lang.Boolean' option to only warn when the 'assert' message type is 'boolean' or 'java.lang.Boolean'. A 'boolean' detail message is unlikely to provide additional information about an assertion failure and could result from a mistakenly entered ':' instead of '&'.",
"markdown": "Reports `assert` messages that are not of the `java.lang.String` type.\n\nUsing a string provides more information to help diagnose the failure\nor the assertion reason.\n\n**Example:**\n\n\n void foo(List<Integer> myList) {\n assert myList.isEmpty() : false;\n }\n\n\nUse the **Only warn when the `assert` message type is 'boolean' or 'java.lang.Boolean'** option to only warn when the `assert` message type is `boolean` or `java.lang.Boolean`.\nA `boolean` detail message is unlikely to provide additional information about an assertion failure\nand could result from a mistakenly entered `:` instead of `&`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AssertMessageNotString",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PatternVariableCanBeUsed",
"shortDescription": {
"text": "Pattern variable can be used"
},
"fullDescription": {
"text": "Reports local variable declarations that can be replaced with pattern variables, which are usually more compact. Example: 'if (obj instanceof String) {\n String str = (String) obj;\n System.out.println(str);\n }' Can be replaced with: 'if (obj instanceof String str) {\n System.out.println(str);\n }' This inspection only reports if the language level of the project or module is 16 or higher New in 2020.1",
"markdown": "Reports local variable declarations that can be replaced with pattern variables, which are usually more compact.\n\n**Example:**\n\n\n if (obj instanceof String) {\n String str = (String) obj;\n System.out.println(str);\n }\n\nCan be replaced with:\n\n\n if (obj instanceof String str) {\n System.out.println(str);\n }\n\nThis inspection only reports if the language level of the project or module is 16 or higher\n\nNew in 2020.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PatternVariableCanBeUsed",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 16",
"index": 226,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AnonymousClassVariableHidesContainingMethodVariable",
"shortDescription": {
"text": "Anonymous class variable hides variable in containing method"
},
"fullDescription": {
"text": "Reports fields in an anonymous class that are named identically to local variables or parameters of the containing method or lambda expression. As a result of such naming, you may accidentally use the anonymous class field where the identically named variable or parameter from the containing method is intended. A quick-fix is suggested to rename the field. Example: 'class Test {\n public Test(String value) {\n Object foo = new Object() {\n private String value = \"TEST\";\n public void foo() {\n System.out.println(value); //the field is accessed, not the parameter\n }\n };\n }\n }'",
"markdown": "Reports fields in an anonymous class that are named identically to local variables or parameters of the containing method or lambda expression.\n\n\nAs a result of such naming, you may accidentally use the anonymous class field where\nthe identically named variable or parameter from the containing method is intended.\n\nA quick-fix is suggested to rename the field.\n\n**Example:**\n\n\n class Test {\n public Test(String value) {\n Object foo = new Object() {\n private String value = \"TEST\";\n public void foo() {\n System.out.println(value); //the field is accessed, not the parameter\n }\n };\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AnonymousClassVariableHidesContainingMethodVariable",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Visibility",
"index": 97,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NestedSynchronizedStatement",
"shortDescription": {
"text": "Nested 'synchronized' statement"
},
"fullDescription": {
"text": "Reports nested 'synchronized' statements. It is recommended to avoid nested synchronization if possible, because in some cases it may lead to a deadlock. Example: 'synchronized (lockA){\n //thread 1 is waiting for lockB\n synchronized (lockB){ //warning\n }\n }\n ...\n synchronized (lockB) {\n //thread 2 is waiting for lockA\n synchronized (lockA) { //warning\n }\n }'",
"markdown": "Reports nested `synchronized` statements. It is recommended to avoid nested synchronization if possible, because in some cases it may lead to a deadlock.\n\n**Example:**\n\n\n synchronized (lockA){\n //thread 1 is waiting for lockB\n synchronized (lockB){ //warning\n }\n }\n ...\n synchronized (lockB) {\n //thread 2 is waiting for lockA\n synchronized (lockA) { //warning\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NestedSynchronizedStatement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryFullyQualifiedName",
"shortDescription": {
"text": "Unnecessary fully qualified name"
},
"fullDescription": {
"text": "Reports fully qualified class names that can be shortened. The quick-fix shortens fully qualified names and adds import statements if necessary. Example: 'class ListWrapper {\n java.util.List<Integer> l;\n }' After the quick-fix is applied: 'import java.util.List;\n class ListWrapper {\n List<Integer> l;\n }' Configure the inspection: Use the Ignore in Java 9 module statements option to ignore fully qualified names inside the Java 9 'provides' and 'uses' module statements. In Settings | Editor | Code Style | Java | Imports, use the following options to configure the inspection: Use the Insert imports for inner classes option if references to inner classes should be qualified with the outer class. Use the Use fully qualified class names in JavaDoc option to allow fully qualified names in Javadocs.",
"markdown": "Reports fully qualified class names that can be shortened.\n\nThe quick-fix shortens fully qualified names and adds import statements if necessary.\n\nExample:\n\n\n class ListWrapper {\n java.util.List<Integer> l;\n }\n\nAfter the quick-fix is applied:\n\n\n import java.util.List;\n class ListWrapper {\n List<Integer> l;\n }\n\nConfigure the inspection:\n\n\nUse the **Ignore in Java 9 module statements** option to ignore fully qualified names inside the Java 9\n`provides` and `uses` module statements.\n\n\nIn [Settings \\| Editor \\| Code Style \\| Java \\| Imports](settings://preferences.sourceCode.Java?JavaDoc%20Inner),\nuse the following options to configure the inspection:\n\n* Use the **Insert imports for inner classes** option if references to inner classes should be qualified with the outer class.\n* Use the **Use fully qualified class names in JavaDoc** option to allow fully qualified names in Javadocs."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "UnnecessaryFullyQualifiedName",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NegatedConditional",
"shortDescription": {
"text": "Conditional expression with negated condition"
},
"fullDescription": {
"text": "Reports conditional expressions whose conditions are negated. Flipping the order of the conditional expression branches usually increases the clarity of such statements. Use the Ignore '!= null' comparisons and Ignore '!= 0' comparisons options to ignore comparisons of the form 'obj != null' or 'num != 0'. Since 'obj != null' effectively means \"obj exists\", the meaning of the whole expression does not involve any negation and is therefore easy to understand. The same reasoning applies to 'num != 0' expressions, especially when using bit masks. These forms have the added benefit of mentioning the interesting case first. In most cases, the value for the '== null' branch is 'null' itself, like in the following examples: 'static String getName(Person p) {\n return p != null ? p.getName() : null;\n }\n\n static String getExecutableString(int fileMode) {\n return (fileMode & 0b001001001) != 0 ? \"executable\" : \"non-executable\";\n }'",
"markdown": "Reports conditional expressions whose conditions are negated.\n\nFlipping the order of the conditional expression branches usually increases the clarity of such statements.\n\n\nUse the **Ignore '!= null' comparisons** and **Ignore '!= 0' comparisons** options to ignore comparisons of the form\n`obj != null` or `num != 0`.\nSince `obj != null` effectively means \"obj exists\",\nthe meaning of the whole expression does not involve any negation\nand is therefore easy to understand.\n\n\nThe same reasoning applies to `num != 0` expressions, especially when using bit masks.\n\n\nThese forms have the added benefit of mentioning the interesting case first.\nIn most cases, the value for the `== null` branch is `null` itself,\nlike in the following examples:\n\n\n static String getName(Person p) {\n return p != null ? p.getName() : null;\n }\n\n static String getExecutableString(int fileMode) {\n return (fileMode & 0b001001001) != 0 ? \"executable\" : \"non-executable\";\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ConditionalExpressionWithNegatedCondition",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TestInProductSource",
"shortDescription": {
"text": "Test in product source"
},
"fullDescription": {
"text": "Reports test classes and test methods that are located in production source trees. This most likely a mistake and can result in test code being shipped into production.",
"markdown": "Reports test classes and test methods that are located in production source trees. This most likely a mistake and can result in test code being shipped into production."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "TestInProductSource",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JVM languages/Test frameworks",
"index": 128,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AssignmentToStaticFieldFromInstanceMethod",
"shortDescription": {
"text": "Assignment to static field from instance context"
},
"fullDescription": {
"text": "Reports assignment to, or modification of 'static' fields from within an instance method. Although legal, such assignments are tricky to do safely and are often a result of marking fields 'static' inadvertently. Example: 'class Counter {\n private static int count = 0;\n\n void increment() {\n // Warning: updating a static field\n // from an instance method\n count++;\n }\n }'",
"markdown": "Reports assignment to, or modification of `static` fields from within an instance method.\n\nAlthough legal, such assignments are tricky to do\nsafely and are often a result of marking fields `static` inadvertently.\n\n**Example:**\n\n\n class Counter {\n private static int count = 0;\n\n void increment() {\n // Warning: updating a static field\n // from an instance method\n count++;\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AssignmentToStaticFieldFromInstanceMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Assignment issues",
"index": 98,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AbstractClassWithOnlyOneDirectInheritor",
"shortDescription": {
"text": "Abstract class with a single direct inheritor"
},
"fullDescription": {
"text": "Reports abstract classes that have precisely one direct inheritor. While such classes may offer admirable clarity of design, in memory-constrained or bandwidth-limited environments, they needlessly increase the total footprint of the application. Consider merging the abstract class with its inheritor. This inspection is intended for Java ME and other highly resource constrained environments. Applying the results of this inspection without consideration might have negative effects on code clarity and design. Example: 'abstract class Base {} // will be reported\n\n class Inheritor extends Base {}'",
"markdown": "Reports abstract classes that have precisely one direct inheritor. While such classes may offer admirable clarity of design, in memory-constrained or bandwidth-limited environments, they needlessly increase the total footprint of the application. Consider merging the abstract class with its inheritor.\n\n\nThis inspection is intended for Java ME and other highly resource constrained environments.\nApplying the results of this inspection without consideration might have negative effects on code clarity and design.\n\n**Example:**\n\n\n abstract class Base {} // will be reported\n\n class Inheritor extends Base {}\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AbstractClassWithOnlyOneDirectInheritor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance/Embedded",
"index": 178,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DuplicateCondition",
"shortDescription": {
"text": "Duplicate condition"
},
"fullDescription": {
"text": "Reports duplicate conditions in '&&' and '||' expressions and branches of 'if' statements. While sometimes duplicate conditions are intended, in most cases they the result of an oversight. Example: 'boolean result = digit1 != digit2 || digit1 != digit2;' To ignore conditions that may produce side effects, use the Ignore conditions with side effects option. Disabling this option may lead to false-positives, for example, when the same method returns different values on subsequent invocations. Example: 'if (iterator.next() != null || iterator.next() != null) {\n System.out.println(\"Got it\");\n }' Due to possible side effects of 'iterator.next()' (on the example), the warning will only be triggered if the Ignore conditions with side effects option is disabled.",
"markdown": "Reports duplicate conditions in `&&` and `||` expressions and branches of `if` statements. While sometimes duplicate conditions are intended, in most cases they the result of an oversight.\n\nExample:\n\n\n boolean result = digit1 != digit2 || digit1 != digit2;\n\n\nTo ignore conditions that may produce side effects, use the **Ignore conditions with side effects** option.\nDisabling this option may lead to false-positives, for example, when the same method returns different values on subsequent invocations.\n\nExample:\n\n\n if (iterator.next() != null || iterator.next() != null) {\n System.out.println(\"Got it\");\n }\n\nDue to possible side effects of `iterator.next()` (on the example), the warning will only be\ntriggered if the **Ignore conditions with side effects** option is disabled."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "DuplicateCondition",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UseOfAnotherObjectsPrivateField",
"shortDescription": {
"text": "Accessing a non-public field of another object"
},
"fullDescription": {
"text": "Reports accesses to 'private' or 'protected' fields of another object. Java allows access to such fields for objects of the same class as the current object but some coding styles discourage this use. Additionally, such direct access to 'private' fields may fail in component-oriented architectures, such as Spring or Hibernate, that expect all access to other objects to be through method calls so the framework can mediate access using proxies. Example: 'public class Base {\n protected int bar;\n\n void increment(Base base) {\n bar++;\n base.bar++; // warning: direct access to another object's non-public field\n }\n }' A quick-fix to encapsulate the field is available. Configure the inspection: Use the Ignore accesses from the same class option to ignore access from the same class and only report access from inner or outer classes. To ignore access from inner classes as well, use the nested Ignore accesses from inner classes. Use the Ignore accesses from 'equals()' method to ignore access from an 'equals()' method.",
"markdown": "Reports accesses to `private` or `protected` fields of another object. Java allows access to such fields for objects of the same class as the current object but some coding styles discourage this use. Additionally, such direct access to `private` fields may fail in component-oriented architectures, such as Spring or Hibernate, that expect all access to other objects to be through method calls so the framework can mediate access using proxies.\n\n**Example:**\n\n\n public class Base {\n protected int bar;\n\n void increment(Base base) {\n bar++;\n base.bar++; // warning: direct access to another object's non-public field\n }\n }\n\nA quick-fix to encapsulate the field is available.\n\nConfigure the inspection:\n\n* Use the **Ignore accesses from the same class** option to ignore access from the same class and only report access from inner or outer classes.\n\n To ignore access from inner classes as well, use the nested **Ignore accesses from inner classes**.\n* Use the **Ignore accesses from 'equals()' method** to ignore access from an `equals()` method."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AccessingNonPublicFieldOfAnotherObject",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Encapsulation",
"index": 211,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SystemRunFinalizersOnExit",
"shortDescription": {
"text": "Call to 'System.runFinalizersOnExit()'"
},
"fullDescription": {
"text": "Reports calls to 'System.runFinalizersOnExit()'. This call is one of the most dangerous in the Java language. It is inherently non-thread-safe, may result in data corruption, a deadlock, and may affect parts of the program far removed from its call point. It is deprecated and was removed in JDK 11, and its use is strongly discouraged. This inspection only reports if the language level of the project or module is 10 or lower.",
"markdown": "Reports calls to `System.runFinalizersOnExit()`.\n\n\nThis call is one of the most dangerous in the Java language. It is inherently non-thread-safe,\nmay result in data corruption, a deadlock, and may affect parts of the program far removed from its call point.\nIt is deprecated and was removed in JDK 11, and its use is strongly discouraged.\n\nThis inspection only reports if the language level of the project or module is 10 or lower."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "CallToSystemRunFinalizersOnExit",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassIndependentOfModule",
"shortDescription": {
"text": "Class independent of its module"
},
"fullDescription": {
"text": "Reports classes that: do not depend on any other class in their module are not a dependency for any other class in their module Such classes are an indication of ad-hoc or incoherent modularisation strategies, and may often profitably be moved. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor.",
"markdown": "Reports classes that:\n\n* do not depend on any other class in their module\n* are not a dependency for any other class in their module\n\nSuch classes are an indication of ad-hoc or incoherent modularisation strategies,\nand may often profitably be moved.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ClassIndependentOfModule",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Modularization issues",
"index": 121,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceInefficientStreamCount",
"shortDescription": {
"text": "Inefficient Stream API call chains ending with count()"
},
"fullDescription": {
"text": "Reports Stream API call chains ending with the 'count()' operation that could be optimized. The following call chains are replaced by this inspection: 'Collection.stream().count()' → 'Collection.size()'. In Java 8 'Collection.stream().count()' actually iterates over the collection elements to count them, while 'Collection.size()' is much faster for most of the collections. 'Stream.flatMap(Collection::stream).count()' → 'Stream.mapToLong(Collection::size).sum()'. Similarly, there's no need to iterate over all the nested collections. Instead, their sizes could be summed up. 'Stream.filter(o -> ...).count() > 0' → 'Stream.anyMatch(o -> ...)'. Unlike the original call, 'anyMatch()' may stop the computation as soon as a matching element is found. 'Stream.filter(o -> ...).count() == 0' → 'Stream.noneMatch(o -> ...)'. Similar to the above. Note that if the replacement involves a short-circuiting operation like 'anyMatch()', there could be a visible behavior change, if the intermediate stream operations produce side effects. In general, side effects should be avoided in Stream API calls.",
"markdown": "Reports Stream API call chains ending with the `count()` operation that could be optimized.\n\n\nThe following call chains are replaced by this inspection:\n\n* `Collection.stream().count()` → `Collection.size()`. In Java 8 `Collection.stream().count()` actually iterates over the collection elements to count them, while `Collection.size()` is much faster for most of the collections.\n* `Stream.flatMap(Collection::stream).count()` → `Stream.mapToLong(Collection::size).sum()`. Similarly, there's no need to iterate over all the nested collections. Instead, their sizes could be summed up.\n* `Stream.filter(o -> ...).count() > 0` → `Stream.anyMatch(o -> ...)`. Unlike the original call, `anyMatch()` may stop the computation as soon as a matching element is found.\n* `Stream.filter(o -> ...).count() == 0` → `Stream.noneMatch(o -> ...)`. Similar to the above.\n\n\nNote that if the replacement involves a short-circuiting operation like `anyMatch()`, there could be a visible behavior change,\nif the intermediate stream operations produce side effects. In general, side effects should be avoided in Stream API calls."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ReplaceInefficientStreamCount",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ParameterTypePreventsOverriding",
"shortDescription": {
"text": "Parameter type prevents overriding"
},
"fullDescription": {
"text": "Reports parameter types of a subclass method that have the same name as the parameter type of the corresponding super method but belong to a different package. In these cases, the subclass method cannot override the super method. Example: 'public class A {\n public void method(Object o) {}\n}\n\npublic class B extends A {\n public void method(Object o) {} // warning on parameter type\n class Object {}\n}' After the quick-fix is applied: 'public class A {\n public void method(Object o) {}\n}\n\npublic class B extends A {\n public void method(java.lang.Object o) {} // new parameter type\n class Object {}\n}'",
"markdown": "Reports parameter types of a subclass method that have the same name as the parameter type of the corresponding super method but belong to a different package. In these cases, the subclass method cannot override the super method.\n\n**Example:**\n\n\n public class A {\n public void method(Object o) {}\n }\n\n public class B extends A {\n public void method(Object o) {} // warning on parameter type\n class Object {}\n }\n\nAfter the quick-fix is applied:\n\n\n public class A {\n public void method(Object o) {}\n }\n\n public class B extends A {\n public void method(java.lang.Object o) {} // new parameter type\n class Object {}\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ParameterTypePreventsOverriding",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Inheritance issues",
"index": 159,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ExtractMethodRecommender",
"shortDescription": {
"text": "Method can be extracted"
},
"fullDescription": {
"text": "Suggests extracting fragments of code to a separate method to make code more clear. This inspection has a number of heuristics to select good candidates for extraction, including the following ones. The extracted fragment has no non-local control flow The extracted fragment has exactly one output variable There are no similar uses of output variable inside the extracted fragment and outside it The extracted fragment has only few input parameters (no more than three by default; configured with the inspection option) The extracted fragment is not smaller than the configured length (500 characters by default) but no bigger than 60% of the containing method body",
"markdown": "Suggests extracting fragments of code to a separate method to make code more clear. This inspection has a number of heuristics to select good candidates for extraction, including the following ones.\n\n* The extracted fragment has no non-local control flow\n* The extracted fragment has exactly one output variable\n* There are no similar uses of output variable inside the extracted fragment and outside it\n* The extracted fragment has only few input parameters (no more than three by default; configured with the inspection option)\n* The extracted fragment is not smaller than the configured length (500 characters by default) but no bigger than 60% of the containing method body"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ExtractMethodRecommender",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code maturity",
"index": 67,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DateToString",
"shortDescription": {
"text": "Call to 'Date.toString()'"
},
"fullDescription": {
"text": "Reports 'toString()' calls on 'java.util.Date' objects. Such calls are usually incorrect in an internationalized environment.",
"markdown": "Reports `toString()` calls on `java.util.Date` objects. Such calls are usually incorrect in an internationalized environment."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CallToDateToString",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Internationalization",
"index": 110,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LambdaParameterNamingConvention",
"shortDescription": {
"text": "Lambda parameter naming convention"
},
"fullDescription": {
"text": "Reports lambda parameters whose names are too short, too long, or do not follow the specified regular expression pattern. Example: 'Function<String, String> id = X -> X;' should be reported if the inspection is enabled with the default settings in which a parameter name should start with a lowercase letter. Configure the inspection: Use the fields in the Options section to specify the minimum length, maximum length, and a regular expression expected for lambda parameter names. Specify 0 in order not to check the length of names. Regular expressions should be specified in the standard 'java.util.regex' format.",
"markdown": "Reports lambda parameters whose names are too short, too long, or do not follow the specified regular expression pattern.\n\n**Example:** `Function<String, String> id = X -> X;`\nshould be reported if the inspection is enabled with the default settings in which a parameter name should start with a lowercase letter.\n\nConfigure the inspection:\n\n\nUse the fields in the **Options** section to specify the minimum length, maximum length, and a regular expression expected for lambda parameter names.\nSpecify **0** in order not to check the length of names.\n\nRegular expressions should be specified in the standard `java.util.regex` format."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LambdaParameterNamingConvention",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Naming conventions",
"index": 106,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LawOfDemeter",
"shortDescription": {
"text": "Law of Demeter"
},
"fullDescription": {
"text": "Reports Law of Demeter violations. The Law of Demeter is not really a law, but specifies a style guideline: never call a method on an object received from another call. The code that follows this guideline is easier to maintain, adapt, and refactor, has less coupling between methods, less duplication, and better information hiding. On the other hand, you may need to write many wrapper methods to meet this guideline. Example: 'boolean pay(Customer c, Invoice invoice) {\n int dollars = c.getWallet().contents; // violation\n if (dollars >= invoice.getAmount()) {\n Wallet w = c.getWallet();\n w.subtract(invoice.getAmount()); // violation\n return true;\n }\n return false;\n }' The above example might be better implemented as a method 'payInvoice(Invoice invoice)' in 'Customer'. Use the Ignore calls to library methods and access to library fields option to ignore Law of Demeter violations that can't be fixed without changing a library.",
"markdown": "Reports [Law of Demeter](https://en.wikipedia.org/wiki/Law_of_Demeter) violations.\n\n\nThe Law of Demeter is not really a law, but specifies a style guideline: never call a method on an object received from another call.\nThe code that follows this guideline is easier to maintain, adapt, and refactor, has less coupling between methods, less duplication,\nand better information hiding. On the other hand, you may need to write many wrapper methods to meet this guideline.\n\n**Example:**\n\n\n boolean pay(Customer c, Invoice invoice) {\n int dollars = c.getWallet().contents; // violation\n if (dollars >= invoice.getAmount()) {\n Wallet w = c.getWallet();\n w.subtract(invoice.getAmount()); // violation\n return true;\n }\n return false;\n }\n\nThe above example might be better implemented as a method `payInvoice(Invoice invoice)` in `Customer`.\n\n\nUse the **Ignore calls to library methods and access to library fields** option to ignore Law of Demeter violations\nthat can't be fixed without changing a library."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LawOfDemeter",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Data flow",
"index": 61,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LoggingStringTemplateAsArgument",
"shortDescription": {
"text": "String template as argument to logging call"
},
"fullDescription": {
"text": "Reports string templates that are used as arguments to SLF4J and Log4j 2 logging methods. The method 'org.apache.logging.log4j.Logger.log()' and its overloads are supported only for all log levels option. String templates are evaluated at runtime even when the logging message is not logged; this can negatively impact performance. It is recommended to use a parameterized log message instead, which will not be evaluated when logging is disabled. Example (for Kotlin): 'val variable1 = getVariable()\n logger.info(\"variable1: $variable1\")' After the quick-fix is applied (for Kotlin): 'val variable1 = getVariable()\n logger.info(\"variable1: {}\", variable1)' Note that the suggested replacement might not be equivalent to the original code, for example, when string templates contain method calls or assignment expressions. Use the Warn on list to ignore certain higher logging levels. Higher logging levels may be always enabled, and the arguments will always be evaluated. Use the Do not warn when only expressions with primitive types, their wrappers or String are included option to ignore string templates, which contain only expressions with primitive types, their wrappers or String. For example, it could be useful to prevent loading lazy collections. Note that, creating string even only with expressions with primitive types, their wrappers or String at runtime can negatively impact performance. New in 2023.1",
"markdown": "Reports string templates that are used as arguments to **SLF4J** and **Log4j 2** logging methods. The method `org.apache.logging.log4j.Logger.log()` and its overloads are supported only for **all log levels** option. String templates are evaluated at runtime even when the logging message is not logged; this can negatively impact performance. It is recommended to use a parameterized log message instead, which will not be evaluated when logging is disabled.\n\n**Example (for Kotlin):**\n\n\n val variable1 = getVariable()\n logger.info(\"variable1: $variable1\")\n\n**After the quick-fix is applied (for Kotlin):**\n\n\n val variable1 = getVariable()\n logger.info(\"variable1: {}\", variable1)\n\n\nNote that the suggested replacement might not be equivalent to the original code, for example,\nwhen string templates contain method calls or assignment expressions.\n\n* Use the **Warn on** list to ignore certain higher logging levels. Higher logging levels may be always enabled, and the arguments will always be evaluated.\n* Use the **Do not warn when only expressions with primitive types, their wrappers or String are included** option to ignore string templates, which contain only expressions with primitive types, their wrappers or String. For example, it could be useful to prevent loading lazy collections. Note that, creating string even only with expressions with primitive types, their wrappers or String at runtime can negatively impact performance.\n\nNew in 2023.1"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "LoggingStringTemplateAsArgument",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JVM languages/Logging",
"index": 48,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IntegerDivisionInFloatingPointContext",
"shortDescription": {
"text": "Integer division in floating-point context"
},
"fullDescription": {
"text": "Reports integer divisions where the result is used as a floating-point number. Such division is often an error and may have unexpected results due to the truncation that happens in integer division. Example: 'float x = 3.0F + 3 * 2 / 5;' After the quick-fix is applied: 'float x = 3.0F + ((float) (3 * 2)) /5;'",
"markdown": "Reports integer divisions where the result is used as a floating-point number. Such division is often an error and may have unexpected results due to the truncation that happens in integer division.\n\n**Example:**\n\n\n float x = 3.0F + 3 * 2 / 5;\n\nAfter the quick-fix is applied:\n\n\n float x = 3.0F + ((float) (3 * 2)) /5;\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "IntegerDivisionInFloatingPointContext",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues",
"index": 49,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AssertWithoutMessage",
"shortDescription": {
"text": "Message missing on assertion"
},
"fullDescription": {
"text": "Reports calls to 'assertXXX()' or 'fail()' without an error message string argument. An error message on assertion failure may help clarify the test case's intent. Example: 'assertTrue(checkValid());' After the quick-fix is applied: 'assertTrue(checkValid(), \"|\");' The message argument is added before or after the existing arguments according to the assertions framework that you use.",
"markdown": "Reports calls to `assertXXX()` or `fail()` without an error message string argument. An error message on assertion failure may help clarify the test case's intent.\n\n**Example:**\n\n\n assertTrue(checkValid());\n\nAfter the quick-fix is applied:\n\n assertTrue(checkValid(), \"|\");\n\n\nThe message argument is added before or after the existing arguments according to the assertions framework that you use."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AssertWithoutMessage",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Test frameworks",
"index": 182,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnqualifiedInnerClassAccess",
"shortDescription": {
"text": "Unqualified inner class access"
},
"fullDescription": {
"text": "Reports references to inner classes that are not qualified with the name of the enclosing class. Example: 'import foo.Foo.Bar;\n\n class Foo {\n class Bar {}\n }\n\n class Baz {\n void f(Bar bar) {}\n }' After the quick-fix is applied: 'class Foo {\n class Bar {}\n }\n\n class Baz {\n void f(Foo.Bar bar) {}\n }' Use the inspection settings to ignore references to inner classes within the same class, which therefore do not require an import.",
"markdown": "Reports references to inner classes that are not qualified with the name of the enclosing class.\n\n**Example:**\n\n\n import foo.Foo.Bar;\n\n class Foo {\n class Bar {}\n }\n\n class Baz {\n void f(Bar bar) {}\n }\n\nAfter the quick-fix is applied:\n\n\n class Foo {\n class Bar {}\n }\n\n class Baz {\n void f(Foo.Bar bar) {}\n }\n\n\nUse the inspection settings to ignore references to inner classes within the same class,\nwhich therefore do not require an import."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnqualifiedInnerClassAccess",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryStringEscape",
"shortDescription": {
"text": "Unnecessarily escaped character"
},
"fullDescription": {
"text": "Reports unnecessarily escaped characters in 'String' and optionally 'char' literals. The escaped tab character '\\t' is not reported, because otherwise it will be invisible. Examples: 'String s = \"\\'Scare\\' quotes\";\n String t = \"\"\"\n All you need is\\n\\tLove\\n\"\"\";' After the quick-fix is applied: 'String s = \"'Scare' quotes\";\n String t = \"\"\"\n All you need is\n \\tLove\n \"\"\";' New in 2019.3",
"markdown": "Reports unnecessarily escaped characters in `String` and optionally `char` literals.\n\nThe escaped tab character `\\t` is not reported, because otherwise it will be invisible.\n\nExamples:\n\n\n String s = \"\\'Scare\\' quotes\";\n String t = \"\"\"\n All you need is\\n\\tLove\\n\"\"\";\n\nAfter the quick-fix is applied:\n\n\n String s = \"'Scare' quotes\";\n String t = \"\"\"\n All you need is\n \\tLove\n \"\"\";\n\nNew in 2019.3"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryStringEscape",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JUnit5AssertionsConverter",
"shortDescription": {
"text": "JUnit 5 obsolete assertions"
},
"fullDescription": {
"text": "Reports any calls to methods from the 'junit.framework.Assert', 'org.junit.Assert', or 'org.junit.Assume' classes inside JUnit 5 tests. Although the tests work properly, migration to 'org.junit.jupiter.api.Assertions'/'org.junit.jupiter.api.Assumptions' will help you avoid dependencies on old JUnit version. Example: 'import org.junit.Assert;\n import org.junit.jupiter.api.Test;\n\n public class MyTest {\n @Test\n public void simpleTest() {\n Assert.assertEquals(4, 2 + 2);\n }\n }' After the quick-fix is applied: 'import org.junit.jupiter.api.Assertions;\n import org.junit.jupiter.api.Test;\n\n public class MyTest {\n @Test\n public void simpleTest() {\n Assertions.assertEquals(4, 2 + 2);\n }\n }'",
"markdown": "Reports any calls to methods from the `junit.framework.Assert`, `org.junit.Assert`, or `org.junit.Assume`\nclasses inside JUnit 5 tests.\n\nAlthough the tests work properly, migration to `org.junit.jupiter.api.Assertions`/`org.junit.jupiter.api.Assumptions`\nwill help you avoid dependencies on old JUnit version.\n\n**Example:**\n\n\n import org.junit.Assert;\n import org.junit.jupiter.api.Test;\n\n public class MyTest {\n @Test\n public void simpleTest() {\n Assert.assertEquals(4, 2 + 2);\n }\n }\n\nAfter the quick-fix is applied:\n\n\n import org.junit.jupiter.api.Assertions;\n import org.junit.jupiter.api.Test;\n\n public class MyTest {\n @Test\n public void simpleTest() {\n Assertions.assertEquals(4, 2 + 2);\n }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "JUnit5AssertionsConverter",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JVM languages/Test frameworks",
"index": 128,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FieldCanBeLocal",
"shortDescription": {
"text": "Field can be local"
},
"fullDescription": {
"text": "Reports redundant class fields that can be replaced with local variables. If all local usages of a field are preceded by assignments to that field, the field can be removed, and its usages can be replaced with local variables.",
"markdown": "Reports redundant class fields that can be replaced with local variables.\n\nIf all local usages of a field are preceded by assignments to that field, the\nfield can be removed, and its usages can be replaced with local variables."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FieldCanBeLocal",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UrlHashCode",
"shortDescription": {
"text": "Call to 'equals()' or 'hashCode()' on 'URL' object"
},
"fullDescription": {
"text": "Reports 'hashCode()' and 'equals()' calls on 'java.net.URL' objects and calls that add 'URL' objects to maps and sets. 'URL''s 'equals()' and 'hashCode()' methods can perform a DNS lookup to resolve the host name. This may cause significant delays, depending on the availability and speed of the network and the DNS server. Using 'java.net.URI' instead of 'java.net.URL' will avoid the DNS lookup. Example: 'boolean urlEquals(URL url1, URL url2) {\n return url1.equals(url2);\n }'",
"markdown": "Reports `hashCode()` and `equals()` calls on `java.net.URL` objects and calls that add `URL` objects to maps and sets.\n\n\n`URL`'s `equals()` and `hashCode()` methods can perform a DNS lookup to resolve the host name.\nThis may cause significant delays, depending on the availability and speed of the network and the DNS server.\nUsing `java.net.URI` instead of `java.net.URL` will avoid the DNS lookup.\n\n**Example:**\n\n\n boolean urlEquals(URL url1, URL url2) {\n return url1.equals(url2);\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "UrlHashCode",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JVM languages",
"index": 47,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InstanceofChain",
"shortDescription": {
"text": "Chain of 'instanceof' checks"
},
"fullDescription": {
"text": "Reports any chains of 'if'-'else' statements all of whose conditions are 'instanceof' expressions or class equality expressions (e.g. comparison with 'String.class'). Such constructions usually indicate a failure in object-oriented design which dictates that such type-based dispatch should be done via polymorphic method calls rather than explicit chains of type tests. Example: 'double getArea(Shape shape) {\n // Warning: abstraction failure.\n // It would be better to declare a getArea()\n // abstract method in the shape interface\n // and implement it in every inheritor.\n if (shape instanceof Point) {\n return 0;\n }\n if (shape instanceof Circle) {\n return Math.PI *\n Math.pow(((Circle) shape).radius(), 2);\n }\n if (shape instanceof Rectangle) {\n return ((Rectangle) shape).width() *\n ((Rectangle) shape).height();\n }\n throw new IllegalArgumentException();\n }' Use the checkbox below to ignore 'instanceof' expressions on library classes.",
"markdown": "Reports any chains of `if`-`else` statements all of whose conditions are `instanceof` expressions or class equality expressions (e.g. comparison with `String.class`). Such constructions usually indicate a failure in object-oriented design which dictates that such type-based dispatch should be done via polymorphic method calls rather than explicit chains of type tests.\n\nExample:\n\n\n double getArea(Shape shape) {\n // Warning: abstraction failure.\n // It would be better to declare a getArea()\n // abstract method in the shape interface\n // and implement it in every inheritor.\n if (shape instanceof Point) {\n return 0;\n }\n if (shape instanceof Circle) {\n return Math.PI *\n Math.pow(((Circle) shape).radius(), 2);\n }\n if (shape instanceof Rectangle) {\n return ((Rectangle) shape).width() *\n ((Rectangle) shape).height();\n }\n throw new IllegalArgumentException();\n }\n\n\nUse the checkbox below to ignore `instanceof` expressions on library classes."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ChainOfInstanceofChecks",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Abstraction issues",
"index": 83,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BlockMarkerComments",
"shortDescription": {
"text": "Block marker comment"
},
"fullDescription": {
"text": "Reports comments which are used as code block markers. The quick-fix removes such comments. Example: 'while (i < 10) {\n i++;\n } // end while' After the quick-fix is applied: 'while (i < 10) {\n i++;\n }'",
"markdown": "Reports comments which are used as code block markers. The quick-fix removes such comments.\n\nExample:\n\n\n while (i < 10) {\n i++;\n } // end while\n\nAfter the quick-fix is applied:\n\n\n while (i < 10) {\n i++;\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "BlockMarkerComments",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantImplements",
"shortDescription": {
"text": "Redundant interface declaration"
},
"fullDescription": {
"text": "Reports interfaces in a class' 'implements' list or an interface's 'extends' list that are already implemented by a superclass or extended by a superinterface. Such declarations are unnecessary and may be safely removed. Example: 'class X implements One, Two {\n }\n interface One {}\n interface Two extends One {}' After the quick-fix is applied: 'class X implements Two {\n }\n interface One {}\n interface Two extends One {}' Use the options to not report on 'Serializable' or 'Externalizable' in an 'extends' or 'implements' list.",
"markdown": "Reports interfaces in a class' `implements` list or an interface's `extends` list that are already implemented by a superclass or extended by a superinterface. Such declarations are unnecessary and may be safely removed.\n\n**Example:**\n\n\n class X implements One, Two {\n }\n interface One {}\n interface Two extends One {}\n\nAfter the quick-fix is applied:\n\n\n class X implements Two {\n }\n interface One {}\n interface Two extends One {}\n\n\nUse the options to not report on `Serializable` or `Externalizable`\nin an `extends` or `implements` list."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantInterfaceDeclaration",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Inheritance issues",
"index": 159,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FrequentlyUsedInheritorInspection",
"shortDescription": {
"text": "Class may extend a commonly used base class"
},
"fullDescription": {
"text": "Reports classes or interfaces that can be replaced with an implementation or extension of a more specific commonly used class or interface. For this inspection to work, a superclass needs to be in project source files and the project needs to use the IntelliJ IDEA build system. Example: 'class MyInheritor implements A {} // B suggested on the A reference\n\n interface A {}\n\n abstract class B implements A {}\n\n abstract class C1 extends B {}\n abstract class C2 extends B {}\n abstract class C3 extends B {}\n abstract class C4 extends B {}\n abstract class C5 extends B {}' By default, this inspection doesn't highlight issues in the editor but only provides a quick-fix. New in 2017.2",
"markdown": "Reports classes or interfaces that can be replaced with an implementation or extension of a more specific commonly used class or interface.\n\nFor this inspection to work, a superclass needs to be in project source files and the project needs to use the IntelliJ IDEA build system.\n\n**Example:**\n\n\n class MyInheritor implements A {} // B suggested on the A reference\n\n interface A {}\n\n abstract class B implements A {}\n\n abstract class C1 extends B {}\n abstract class C2 extends B {}\n abstract class C3 extends B {}\n abstract class C4 extends B {}\n abstract class C5 extends B {}\n\nBy default, this inspection doesn't highlight issues in the editor but only provides a quick-fix.\n\nNew in 2017.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "FrequentlyUsedInheritorInspection",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Inheritance issues",
"index": 159,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassNamePrefixedWithPackageName",
"shortDescription": {
"text": "Class name prefixed with package name"
},
"fullDescription": {
"text": "Reports classes whose names are prefixed with their package names, ignoring differences in capitalization. While occasionally having such names is reasonable, they are often used due to a poor naming scheme, may be redundant and annoying. Example: 'package byteCode;\n class ByteCodeAnalyzer {}' A quick-fix that renames such classes is available only in the editor.",
"markdown": "Reports classes whose names are prefixed with their package names, ignoring differences in capitalization.\n\nWhile occasionally having such names is reasonable, they are often used due to a poor naming scheme, may be redundant and\nannoying.\n\n**Example:**\n\n\n package byteCode;\n class ByteCodeAnalyzer {}\n\nA quick-fix that renames such classes is available only in the editor."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ClassNamePrefixedWithPackageName",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Naming conventions/Class",
"index": 172,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConstantConditionalExpression",
"shortDescription": {
"text": "Constant conditional expression"
},
"fullDescription": {
"text": "Reports conditional expressions in which the condition is either a 'true' or 'false' constant. These expressions sometimes occur as a result of automatic refactorings and may be simplified. Example: 'return true ? \"Yes\" : \"No\";' After quick-fix is applied: 'return \"Yes\";'",
"markdown": "Reports conditional expressions in which the condition is either a `true` or `false` constant. These expressions sometimes occur as a result of automatic refactorings and may be simplified.\n\nExample:\n\n\n return true ? \"Yes\" : \"No\";\n\nAfter quick-fix is applied:\n\n\n return \"Yes\";\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ConstantConditionalExpression",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassWithTooManyDependents",
"shortDescription": {
"text": "Class with too many dependents"
},
"fullDescription": {
"text": "Reports a class on which too many other classes are directly dependent. Any modification to such a class may require changing many other classes, which may be expensive. Only top-level classes are reported. Use the field below to specify the maximum allowed number of dependents for a class. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor.",
"markdown": "Reports a class on which too many other classes are directly dependent.\n\nAny modification to such a class may require changing many other classes, which may be expensive.\n\nOnly top-level classes are reported.\n\nUse the field below to specify the maximum allowed number of dependents for a class.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ClassWithTooManyDependents",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Dependency issues",
"index": 200,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "WrongPackageStatement",
"shortDescription": {
"text": "Wrong package statement"
},
"fullDescription": {
"text": "Detects 'package' statements that do not correspond to the project directory structure. Also, reports classes without 'package' statements if the class is not located directly in source root directory. While it's not strictly mandated by Java language, it's good to keep classes from package 'com.example.myapp' inside the 'com/example/myapp' directory under the source root. Failure to do this may confuse code readers and make some tools working incorrectly.",
"markdown": "Detects `package` statements that do not correspond to the project directory structure. Also, reports classes without `package` statements if the class is not located directly in source root directory.\n\nWhile it's not strictly mandated by Java language, it's good to keep classes\nfrom package `com.example.myapp` inside the `com/example/myapp` directory under\nthe source root. Failure to do this may confuse code readers and make some tools working incorrectly."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "WrongPackageStatement",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CovariantEquals",
"shortDescription": {
"text": "Covariant 'equals()'"
},
"fullDescription": {
"text": "Reports 'equals()' methods taking an argument type other than 'java.lang.Object' if the containing class does not have other overloads of 'equals()' that take 'java.lang.Object' as its argument type. A covariant version of 'equals()' does not override the 'Object.equals(Object)' method. It may cause unexpected behavior at runtime. For example, if the class is used to construct one of the standard collection classes, which expect that the 'Object.equals(Object)' method is overridden. Example: 'class Foo {\n public boolean equals(Foo foo) { // warning\n return false;\n }\n }\n class Bar {\n public boolean equals(Bar bar) { // no warning here\n return false;\n }\n @Override\n public boolean equals(Object obj) {\n return false;\n }\n }'",
"markdown": "Reports `equals()` methods taking an argument type other than `java.lang.Object` if the containing class does not have other overloads of `equals()` that take `java.lang.Object` as its argument type.\n\n\nA covariant version of `equals()` does not override the\n`Object.equals(Object)` method. It may cause unexpected\nbehavior at runtime. For example, if the class is used to construct\none of the standard collection classes, which expect that the\n`Object.equals(Object)` method is overridden.\n\n**Example:**\n\n\n class Foo {\n public boolean equals(Foo foo) { // warning\n return false;\n }\n }\n class Bar {\n public boolean equals(Bar bar) { // no warning here\n return false;\n }\n @Override\n public boolean equals(Object obj) {\n return false;\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CovariantEquals",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Convert2Lambda",
"shortDescription": {
"text": "Anonymous type can be replaced with lambda"
},
"fullDescription": {
"text": "Reports anonymous classes which can be replaced with lambda expressions. Example: 'new Thread(new Runnable() {\n @Override\n public void run() {\n // run thread\n }\n });' After the quick-fix is applied: 'new Thread(() -> {\n // run thread\n });' Note that if an anonymous class is converted into a stateless lambda, the same lambda object can be reused by Java runtime during subsequent invocations. On the other hand, when an anonymous class is used, separate objects are created every time. Thus, applying the quick-fix can cause the semantics change in rare cases, e.g. when anonymous class instances are used as 'HashMap' keys. Lambda syntax is not supported in Java 1.7 and earlier JVMs. Use the Report when interface is not annotated with @FunctionalInterface option to ignore the cases in which an anonymous class implements an interface without '@FunctionalInterface' annotation.",
"markdown": "Reports anonymous classes which can be replaced with lambda expressions.\n\nExample:\n\n\n new Thread(new Runnable() {\n @Override\n public void run() {\n // run thread\n }\n });\n\nAfter the quick-fix is applied:\n\n\n new Thread(() -> {\n // run thread\n });\n\n\nNote that if an anonymous class is converted into a stateless lambda, the same lambda object\ncan be reused by Java runtime during subsequent invocations. On the other hand, when an anonymous class is used,\nseparate objects are created every time. Thus, applying the quick-fix can cause the semantics change in rare cases,\ne.g. when anonymous class instances are used as `HashMap` keys.\n\nLambda syntax is not supported in Java 1.7 and earlier JVMs.\n\n\nUse the **Report when interface is not annotated with @FunctionalInterface** option to ignore the cases in which an anonymous\nclass implements an interface without `@FunctionalInterface` annotation."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "Convert2Lambda",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 8",
"index": 119,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ParameterizedParametersStaticCollection",
"shortDescription": {
"text": "Parameterized test class without data provider method"
},
"fullDescription": {
"text": "Reports JUnit 4 parameterized test classes that are annotated with '@RunWith(Parameterized.class)' but either do not include a data provider method annotated with '@Parameterized.Parameters' or this method has an incorrect signature. Such test classes cannot be run. The data provider method should be 'public' and 'static' and have a return type of 'Iterable' or 'Object[]'. Suggests creating an empty parameter provider method or changing the signature of the incorrect data provider method. Example: '@RunWith(Parameterized.class)\n public class ImportantTest {\n private int input;\n private int expected;\n\n ImportantTest(int input, int expected) {\n this.input = input;\n this.expected = expected;\n }\n\n // ... test cases\n }' After the quick-fix is applied: '@RunWith(Parameterized.class)\n public class ImportantTest {\n private int input;\n private int expected;\n\n ImportantTest(int input, int expected) {\n this.input = input;\n this.expected = expected;\n }\n\n @Parameters\n public static Iterable<Object[]> parameters() {\n return null;\n }\n\n // ... test cases\n }'",
"markdown": "Reports JUnit 4 [parameterized test](https://github.com/junit-team/junit4/wiki/parameterized-tests) classes that are annotated with `@RunWith(Parameterized.class)` but either do not include a data provider method annotated with `@Parameterized.Parameters` or this method has an incorrect signature. Such test classes cannot be run. The data provider method should be `public` and `static` and have a return type of `Iterable` or `Object[]`.\n\nSuggests creating an empty parameter provider method or changing the signature of the incorrect data provider method.\n\n**Example:**\n\n\n\n @RunWith(Parameterized.class)\n public class ImportantTest {\n private int input;\n private int expected;\n\n ImportantTest(int input, int expected) {\n this.input = input;\n this.expected = expected;\n }\n\n // ... test cases\n }\n\nAfter the quick-fix is applied:\n\n\n @RunWith(Parameterized.class)\n public class ImportantTest {\n private int input;\n private int expected;\n\n ImportantTest(int input, int expected) {\n this.input = input;\n this.expected = expected;\n }\n\n @Parameters\n public static Iterable<Object[]> parameters() {\n return null;\n }\n\n // ... test cases\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ParameterizedParametersStaticCollection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/JUnit",
"index": 100,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SimplifiableIfStatement",
"shortDescription": {
"text": "'if' statement can be replaced with conditional or boolean expression"
},
"fullDescription": {
"text": "Reports 'if' statements that can be replaced with conditions using the '&&', '||', '==', '!=', or '?:' operator. The result is usually shorter, but not always clearer, so it's not advised to apply the fix in every case. Example: 'if (condition) return true; else return foo;' After the quick-fix is applied: 'return condition || foo;' Configure the inspection: Use the Don't suggest '?:' operator option to disable the warning when the '?:' operator is suggested. In this case, only '&&', '||', '==', and '!=' suggestions will be highlighted. The quick-fix will still be available in the editor. Use the Ignore chained 'if' statements option to disable the warning for 'if-else' chains. The quick-fix will still be available in the editor. New in 2018.2",
"markdown": "Reports `if` statements that can be replaced with conditions using the `&&`, `||`, `==`, `!=`, or `?:` operator.\n\nThe result is usually shorter, but not always clearer, so it's not advised to apply the fix in every case.\n\nExample:\n\n\n if (condition) return true; else return foo;\n\nAfter the quick-fix is applied:\n\n\n return condition || foo;\n\nConfigure the inspection:\n\n* Use the **Don't suggest '?:' operator** option to disable the warning when the `?:` operator is suggested. In this case, only `&&`, `||`, `==`, and `!=` suggestions will be highlighted. The quick-fix will still be available in the editor.\n* Use the **Ignore chained 'if' statements** option to disable the warning for `if-else` chains. The quick-fix will still be available in the editor.\n\nNew in 2018.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "SimplifiableIfStatement",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ThrowCaughtLocally",
"shortDescription": {
"text": "'throw' caught by containing 'try' statement"
},
"fullDescription": {
"text": "Reports 'throw' statements whose exceptions are always caught by containing 'try' statements. Using 'throw' statements as a \"goto\" to change the local flow of control is confusing and results in poor performance. Example: 'try {\n if (!Files.isDirectory(PROJECTS)) {\n throw new IllegalStateException(\"Directory not found.\"); // warning: 'throw' caught by containing 'try' statement\n }\n ...\n } catch (Exception e) {\n LOG.error(\"run failed\");\n }' Use the Ignore rethrown exceptions option to ignore exceptions that are rethrown.",
"markdown": "Reports `throw` statements whose exceptions are always caught by containing `try` statements.\n\nUsing `throw`\nstatements as a \"goto\" to change the local flow of control is confusing and results in poor performance.\n\n**Example:**\n\n\n try {\n if (!Files.isDirectory(PROJECTS)) {\n throw new IllegalStateException(\"Directory not found.\"); // warning: 'throw' caught by containing 'try' statement\n }\n ...\n } catch (Exception e) {\n LOG.error(\"run failed\");\n }\n\nUse the **Ignore rethrown exceptions** option to ignore exceptions that are rethrown."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ThrowCaughtLocally",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Error handling",
"index": 9,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonSerializableWithSerialVersionUIDField",
"shortDescription": {
"text": "Non-serializable class with 'serialVersionUID'"
},
"fullDescription": {
"text": "Reports non-'Serializable' classes that define a 'serialVersionUID' field. A 'serialVersionUID' field in that context normally indicates an error because the field will be ignored and the class will not be serialized. Example: 'public class IWantToSerializeThis {\n private static final long serialVersionUID = 2669293150219020249L;\n }'",
"markdown": "Reports non-`Serializable` classes that define a `serialVersionUID` field. A `serialVersionUID` field in that context normally indicates an error because the field will be ignored and the class will not be serialized.\n\n**Example:**\n\n\n public class IWantToSerializeThis {\n private static final long serialVersionUID = 2669293150219020249L;\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "NonSerializableClassWithSerialVersionUID",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Serialization issues",
"index": 54,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IncompatibleMask",
"shortDescription": {
"text": "Incompatible bitwise mask operation"
},
"fullDescription": {
"text": "Reports bitwise mask expressions which are guaranteed to evaluate to 'true' or 'false'. The inspection checks the expressions of the form '(var & constant1) == constant2' or '(var | constant1) == constant2', where 'constant1' and 'constant2' are incompatible bitmask constants. Example: '// Incompatible mask: as the mask ends in 00,\n // the result could be 0x1200 but not 0x1234\n if ((mask & 0xFF00) == 0x1234) {...}'",
"markdown": "Reports bitwise mask expressions which are guaranteed to evaluate to `true` or `false`.\n\n\nThe inspection checks the expressions of the form `(var & constant1) == constant2` or\n`(var | constant1) == constant2`, where `constant1`\nand `constant2` are incompatible bitmask constants.\n\n**Example:**\n\n // Incompatible mask: as the mask ends in 00,\n // the result could be 0x1200 but not 0x1234\n if ((mask & 0xFF00) == 0x1234) {...}\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "IncompatibleBitwiseMaskOperation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Bitwise operation issues",
"index": 231,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ExplicitArgumentCanBeLambda",
"shortDescription": {
"text": "Explicit argument can be lambda"
},
"fullDescription": {
"text": "Reports method calls that accept a non-trivial expression and can be replaced with an equivalent method call which accepts a lambda instead. Converting an expression to a lambda ensures that the expression won't be evaluated if it's not used inside the method. For example, 'optional.orElse(createDefaultValue())' can be converted to 'optional.orElseGet(this::createDefaultValue)'. New in 2018.1",
"markdown": "Reports method calls that accept a non-trivial expression and can be replaced with an equivalent method call which accepts a lambda instead.\n\n\nConverting an expression to a lambda ensures that the expression won't be evaluated\nif it's not used inside the method. For example, `optional.orElse(createDefaultValue())` can be converted\nto `optional.orElseGet(this::createDefaultValue)`.\n\nNew in 2018.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ExplicitArgumentCanBeLambda",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EqualsCalledOnEnumConstant",
"shortDescription": {
"text": "'equals()' called on enum value"
},
"fullDescription": {
"text": "Reports 'equals()' calls on enum constants. Such calls can be replaced by an identity comparison ('==') because two enum constants are equal only when they have the same identity. A quick-fix is available to change the call to a comparison. Example: 'boolean foo(MyEnum value) {\n return value.equals(MyEnum.FOO);\n }' After the quick-fix is applied: 'boolean foo(MyEnum value) {\n return value == MyEnum.FOO;\n }'",
"markdown": "Reports `equals()` calls on enum constants.\n\nSuch calls can be replaced by an identity comparison (`==`) because two\nenum constants are equal only when they have the same identity.\n\nA quick-fix is available to change the call to a comparison.\n\n**Example:**\n\n\n boolean foo(MyEnum value) {\n return value.equals(MyEnum.FOO);\n }\n\nAfter the quick-fix is applied:\n\n\n boolean foo(MyEnum value) {\n return value == MyEnum.FOO;\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EqualsCalledOnEnumConstant",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryConstantArrayCreationExpression",
"shortDescription": {
"text": "Redundant 'new' expression in constant array creation"
},
"fullDescription": {
"text": "Reports constant new array expressions that can be replaced with an array initializer. Array initializers can omit the type because it is already specified in the left side of the assignment. Example: 'int[] foo = new int[] {42};' After the quick-fix is applied: 'int[] foo = {42};'",
"markdown": "Reports constant new array expressions that can be replaced with an array initializer. Array initializers can omit the type because it is already specified in the left side of the assignment.\n\n**Example:**\n\n\n int[] foo = new int[] {42};\n\nAfter the quick-fix is applied:\n\n\n int[] foo = {42};\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryConstantArrayCreationExpression",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SuspiciousNameCombination",
"shortDescription": {
"text": "Suspicious variable/parameter name combination"
},
"fullDescription": {
"text": "Reports assignments and function calls in which the name of the target variable or the function parameter does not match the name of the value assigned to it. Example 1: 'int x = 0;\n int y = x; // x is used as a y-coordinate' Example 2: 'int x = 0, y = 0;\n // x is used as a y-coordinate and y as an x-coordinate\n Rectangle rc = new Rectangle(y, x, 20, 20);' Configure the inspection: Use the Group of names area to specify the names which should not be used together: an error is reported if the parameter name or assignment target name contains words from one group and the name of the assigned or passed variable contains words from a different group. Use the Ignore methods area to specify the methods that should not be checked but have a potentially suspicious name. For example, the 'Integer.compare()' parameters are named 'x' and 'y' but are unrelated to coordinates.",
"markdown": "Reports assignments and function calls in which the name of the target variable or the function parameter does not match the name of the value assigned to it.\n\nExample 1:\n\n\n int x = 0;\n int y = x; // x is used as a y-coordinate\n \nExample 2:\n\n\n int x = 0, y = 0;\n // x is used as a y-coordinate and y as an x-coordinate\n Rectangle rc = new Rectangle(y, x, 20, 20);\n\nConfigure the inspection:\n\nUse the **Group of names** area to specify the names which should not be used together: an error is reported\nif the parameter name or assignment target name contains words from one group and the name of the assigned or passed\nvariable contains words from a different group.\n\nUse the **Ignore methods** area to specify the methods that should not be checked but have a potentially suspicious name.\nFor example, the `Integer.compare()` parameters are named `x` and `y` but are unrelated to coordinates."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SuspiciousNameCombination",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ImplicitDefaultCharsetUsage",
"shortDescription": {
"text": "Implicit platform default charset"
},
"fullDescription": {
"text": "Reports method and constructor calls that implicitly use the platform default charset. Such calls can produce different results on systems that use a different default charset and may result in unexpected behaviour. Example: 'void foo(byte[] bytes) {\n String s = new String(bytes);\n}'\n You can use a quick-fix that specifies the explicit UTF-8 charset if the corresponding overloaded method is available. After the quick-fix is applied: 'void foo(byte[] bytes) {\n String s = new String(bytes, StandardCharsets.UTF_8);\n}'",
"markdown": "Reports method and constructor calls that implicitly use the platform default charset. Such calls can produce different results on systems that use a different default charset and may result in unexpected behaviour.\n\n**Example:**\n\n void foo(byte[] bytes) {\n String s = new String(bytes);\n }\n\nYou can use a quick-fix that specifies the explicit UTF-8 charset if the corresponding overloaded method is available.\nAfter the quick-fix is applied:\n\n void foo(byte[] bytes) {\n String s = new String(bytes, StandardCharsets.UTF_8);\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ImplicitDefaultCharsetUsage",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Internationalization",
"index": 110,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnknownGuard",
"shortDescription": {
"text": "Unknown '@GuardedBy' field"
},
"fullDescription": {
"text": "Reports '@GuardedBy' annotations in which the specified guarding field is unknown. Example: 'private Object state;\n\n @GuardedBy(\"lock\") //unknown guard reference\n public void bar() {\n state = new Object();\n }' Supported '@GuardedBy' annotations are: 'net.jcip.annotations.GuardedBy' 'javax.annotation.concurrent.GuardedBy' 'org.apache.http.annotation.GuardedBy' 'com.android.annotations.concurrency.GuardedBy' 'androidx.annotation.GuardedBy' 'com.google.errorprone.annotations.concurrent.GuardedBy'",
"markdown": "Reports `@GuardedBy` annotations in which the specified guarding field is unknown.\n\nExample:\n\n\n private Object state;\n\n @GuardedBy(\"lock\") //unknown guard reference\n public void bar() {\n state = new Object();\n }\n\nSupported `@GuardedBy` annotations are:\n\n* `net.jcip.annotations.GuardedBy`\n* `javax.annotation.concurrent.GuardedBy`\n* `org.apache.http.annotation.GuardedBy`\n* `com.android.annotations.concurrency.GuardedBy`\n* `androidx.annotation.GuardedBy`\n* `com.google.errorprone.annotations.concurrent.GuardedBy`"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnknownGuard",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Concurrency annotation issues",
"index": 99,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AbstractClassExtendsConcreteClass",
"shortDescription": {
"text": "Abstract class extends concrete class"
},
"fullDescription": {
"text": "Reports 'abstract' classes that extend concrete classes.",
"markdown": "Reports `abstract` classes that extend concrete classes."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AbstractClassExtendsConcreteClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Inheritance issues",
"index": 159,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java8CollectionRemoveIf",
"shortDescription": {
"text": "Loop can be replaced with 'Collection.removeIf()'"
},
"fullDescription": {
"text": "Reports loops which can be collapsed into a single 'Collection.removeIf' call. Example: 'for (Iterator<String> it = collection.iterator(); it.hasNext(); ) {\n String aValue = it.next();\n if(shouldBeRemoved(aValue)) {\n it.remove();\n }\n }' After the quick-fix is applied: 'collection.removeIf(aValue -> shouldBeRemoved(aValue));' This inspection only reports if the language level of the project or module is 8 or higher.",
"markdown": "Reports loops which can be collapsed into a single `Collection.removeIf` call.\n\nExample:\n\n\n for (Iterator<String> it = collection.iterator(); it.hasNext(); ) {\n String aValue = it.next();\n if(shouldBeRemoved(aValue)) {\n it.remove();\n }\n }\n\nAfter the quick-fix is applied:\n\n\n collection.removeIf(aValue -> shouldBeRemoved(aValue));\n\n\nThis inspection only reports if the language level of the project or module is 8 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "Java8CollectionRemoveIf",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 8",
"index": 119,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PrimitiveArrayArgumentToVariableArgMethod",
"shortDescription": {
"text": "Confusing primitive array argument to varargs method"
},
"fullDescription": {
"text": "Reports any calls to a variable arity method where the call has a primitive array in the variable arity parameter position (for example, 'System.out.printf(\"%s\", new int[]{1, 2, 3})'). Such a primitive-array argument may be confusing, as it will be wrapped as a single-element array, rather than each individual element being boxed, as might be expected. Example: 'String.format(\"%s\", new int[]{1, 2, 3});' After the quick-fix is applied: 'String.format(\"%s\", (Object) new int[]{1, 2, 3});'",
"markdown": "Reports any calls to a variable arity method where the call has a primitive array in the variable arity parameter position (for example, `System.out.printf(\"%s\", new int[]{1, 2, 3})`). Such a primitive-array argument may be confusing, as it will be wrapped as a single-element array, rather than each individual element being boxed, as might be expected.\n\n**Example:**\n\n\n String.format(\"%s\", new int[]{1, 2, 3});\n\nAfter the quick-fix is applied:\n\n\n String.format(\"%s\", (Object) new int[]{1, 2, 3});\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PrimitiveArrayArgumentToVarargsMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AccessToNonThreadSafeStaticFieldFromInstance",
"shortDescription": {
"text": "Non-thread-safe 'static' field access"
},
"fullDescription": {
"text": "Reports access to 'static' fields that are of a non-thread-safe type. When a 'static' field is accessed from an instance method or a non-synchronized block, multiple threads can access that field. This can lead to unspecified side effects, like exceptions and incorrect results. Example: 'class Sample {\n private static final SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n String method() {\n return df.format(\"\");\n }\n }' You can specify which types should be considered not thread-safe. Only fields with these exact types or initialized with these exact types are reported, because there may exist thread-safe subclasses of these types.",
"markdown": "Reports access to `static` fields that are of a non-thread-safe type.\n\n\nWhen a `static` field is accessed from an instance method or a non-synchronized block,\nmultiple threads can access that field.\nThis can lead to unspecified side effects, like exceptions and incorrect results.\n\n**Example:**\n\n\n class Sample {\n private static final SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n String method() {\n return df.format(\"\");\n }\n }\n\n\nYou can specify which types should be considered not thread-safe.\nOnly fields with these exact types or initialized with these exact types are reported,\nbecause there may exist thread-safe subclasses of these types."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AccessToNonThreadSafeStaticField",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BigDecimalEquals",
"shortDescription": {
"text": "'equals()' called on 'BigDecimal'"
},
"fullDescription": {
"text": "Reports 'equals()' calls that compare two 'java.math.BigDecimal' numbers. This is normally a mistake, as two 'java.math.BigDecimal' numbers are only equal if they are equal in both value and scale. Example: 'if (new BigDecimal(\"2.0\").equals(\n new BigDecimal(\"2.00\"))) {} // false' After the quick-fix is applied: 'if (new BigDecimal(\"2.0\").compareTo(\n new BigDecimal(\"2.00\")) == 0) {} // true'",
"markdown": "Reports `equals()` calls that compare two `java.math.BigDecimal` numbers. This is normally a mistake, as two `java.math.BigDecimal` numbers are only equal if they are equal in both value and scale.\n\n**Example:**\n\n\n if (new BigDecimal(\"2.0\").equals(\n new BigDecimal(\"2.00\"))) {} // false\n\nAfter the quick-fix is applied:\n\n\n if (new BigDecimal(\"2.0\").compareTo(\n new BigDecimal(\"2.00\")) == 0) {} // true\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "BigDecimalEquals",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues",
"index": 49,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AssignmentToCatchBlockParameter",
"shortDescription": {
"text": "Assignment to 'catch' block parameter"
},
"fullDescription": {
"text": "Reports assignments to, 'catch' block parameters. Changing a 'catch' block parameter is very confusing and should be discouraged. The quick-fix adds a declaration of a new variable. Example: 'void processFile(String fileName) throws Exception {\n try {\n doProcessFile(fileName);\n } catch(Exception ex) {\n if (ex instanceof UncheckedIOException) {\n // Warning: catch block parameter reassigned\n ex = ((UncheckedIOException) ex).getCause();\n }\n throw ex;\n }\n }' After the quick-fix is applied: 'void processFile(String fileName) throws Exception {\n try {\n doProcessFile(fileName);\n } catch(Exception ex) {\n Exception unwrapped = ex;\n if (unwrapped instanceof UncheckedIOException) {\n unwrapped = ((UncheckedIOException)\n unwrapped).getCause();\n }\n throw unwrapped;\n }\n }'",
"markdown": "Reports assignments to, `catch` block parameters.\n\nChanging a `catch` block parameter is very confusing and should be discouraged.\n\nThe quick-fix adds a declaration of a new variable.\n\n**Example:**\n\n\n void processFile(String fileName) throws Exception {\n try {\n doProcessFile(fileName);\n } catch(Exception ex) {\n if (ex instanceof UncheckedIOException) {\n // Warning: catch block parameter reassigned\n ex = ((UncheckedIOException) ex).getCause();\n }\n throw ex;\n }\n }\n\nAfter the quick-fix is applied:\n\n\n void processFile(String fileName) throws Exception {\n try {\n doProcessFile(fileName);\n } catch(Exception ex) {\n Exception unwrapped = ex;\n if (unwrapped instanceof UncheckedIOException) {\n unwrapped = ((UncheckedIOException)\n unwrapped).getCause();\n }\n throw unwrapped;\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AssignmentToCatchBlockParameter",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Assignment issues",
"index": 98,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LoopStatementsThatDontLoop",
"shortDescription": {
"text": "Loop statement that does not loop"
},
"fullDescription": {
"text": "Reports any instance of 'for', 'while', and 'do' statements whose bodies will be executed once at most. Normally, this is an indication of a bug. Use the Ignore enhanced for loops option to ignore the foreach loops. They are sometimes used to perform an action only on the first item of an iterable in a compact way. Example: 'for (String s : stringIterable) {\n doSomethingOnFirstString(s);\n break;\n }'",
"markdown": "Reports any instance of `for`, `while`, and `do` statements whose bodies will be executed once at most. Normally, this is an indication of a bug.\n\n\nUse the **Ignore enhanced for loops** option to ignore the foreach loops.\nThey are sometimes used to perform an action only on the first item of an iterable in a compact way.\n\nExample:\n\n\n for (String s : stringIterable) {\n doSomethingOnFirstString(s);\n break;\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "LoopStatementThatDoesntLoop",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ArrayCreationWithoutNewKeyword",
"shortDescription": {
"text": "Array creation without 'new' expression"
},
"fullDescription": {
"text": "Reports array initializers without 'new' array expressions and suggests adding them. Example: 'int[] a = {42}' After the quick-fix is applied: 'int[] a = new int[]{42}'",
"markdown": "Reports array initializers without `new` array expressions and suggests adding them.\n\nExample:\n\n\n int[] a = {42}\n\nAfter the quick-fix is applied:\n\n\n int[] a = new int[]{42}\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ArrayCreationWithoutNewKeyword",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConstantMathCall",
"shortDescription": {
"text": "Constant call to 'Math'"
},
"fullDescription": {
"text": "Reports calls to 'java.lang.Math' or 'java.lang.StrictMath' methods that can be replaced with simple compile-time constants. Example: 'double v = Math.sin(0.0);' After the quick-fix is applied: 'double v = 0.0;'",
"markdown": "Reports calls to `java.lang.Math` or `java.lang.StrictMath` methods that can be replaced with simple compile-time constants.\n\n**Example:**\n\n double v = Math.sin(0.0);\n\nAfter the quick-fix is applied:\n\n double v = 0.0;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ConstantMathCall",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues",
"index": 49,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SlowListContainsAll",
"shortDescription": {
"text": "Call to 'list.containsAll(collection)' may have poor performance"
},
"fullDescription": {
"text": "Reports calls to 'containsAll()' on 'java.util.List'. The time complexity of this method call is O(n·m), where n is the number of elements in the list on which the method is called, and m is the number of elements in the collection passed to the method as a parameter. When the list is large, this can be an expensive operation. The quick-fix wraps the list in 'new java.util.HashSet<>()' since the time required to create 'java.util.HashSet' from 'java.util.List' and execute 'containsAll()' on 'java.util.HashSet' is O(n+m). Example: 'public boolean check(List<String> list, Collection<String> collection) {\n // O(n·m) complexity\n return list.containsAll(collection);\n }' After the quick-fix is applied: 'public boolean check(List<String> list, Collection<String> collection) {\n // O(n+m) complexity\n return new HashSet<>(list).containsAll(collection);\n }' New in 2022.1",
"markdown": "Reports calls to `containsAll()` on `java.util.List`.\n\n\nThe time complexity of this method call is O(n·m), where n is the number of elements in the list on which\nthe method is called, and m is the number of elements in the collection passed to the method as a parameter.\nWhen the list is large, this can be an expensive operation.\n\n\nThe quick-fix wraps the list in `new java.util.HashSet<>()` since the time required to create\n`java.util.HashSet` from `java.util.List` and execute `containsAll()` on\n`java.util.HashSet` is O(n+m).\n\n**Example:**\n\n public boolean check(List<String> list, Collection<String> collection) {\n // O(n·m) complexity\n return list.containsAll(collection);\n }\n\nAfter the quick-fix is applied:\n\n public boolean check(List<String> list, Collection<String> collection) {\n // O(n+m) complexity\n return new HashSet<>(list).containsAll(collection);\n }\n\nNew in 2022.1"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SlowListContainsAll",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FeatureEnvy",
"shortDescription": {
"text": "Feature envy"
},
"fullDescription": {
"text": "Reports the Feature Envy code smell. The warning is thrown when a method calls methods on another class three or more times. Calls to library classes, parent classes, contained or containing classes are not counted by this inspection. Feature envy is often an indication of the fact that this functionality is located in a wrong class. Example: 'class JobManager {\n // Warning: this method calls three methods\n // of the Job class\n // It would be better to move this chain of\n // calls to the Job class itself.\n void performJob(Job job) {\n job.beforeStart();\n job.process();\n job.afterProcessing();\n }\n }'",
"markdown": "Reports the *Feature Envy* code smell. The warning is thrown when a method calls methods on another class three or more times. Calls to library classes, parent classes, contained or containing classes are not counted by this inspection. Feature envy is often an indication of the fact that this functionality is located in a wrong class.\n\nExample:\n\n\n class JobManager {\n // Warning: this method calls three methods\n // of the Job class\n // It would be better to move this chain of\n // calls to the Job class itself.\n void performJob(Job job) {\n job.beforeStart();\n job.process();\n job.afterProcessing();\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FeatureEnvy",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Abstraction issues",
"index": 83,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BoxingBoxedValue",
"shortDescription": {
"text": "Boxing of already boxed value"
},
"fullDescription": {
"text": "Reports boxing of already boxed values. This is a redundant operation since any boxed value will first be auto-unboxed before boxing the value again. If done inside an inner loop, such code may cause performance problems. Example: 'Integer value = 1;\n method(Integer.valueOf(value));' After the quick fix is applied: 'Integer value = 1;\n method(value);'",
"markdown": "Reports boxing of already boxed values.\n\n\nThis is a redundant\noperation since any boxed value will first be auto-unboxed before boxing the\nvalue again. If done inside an inner loop, such code may cause performance\nproblems.\n\n**Example:**\n\n\n Integer value = 1;\n method(Integer.valueOf(value));\n\nAfter the quick fix is applied:\n\n\n Integer value = 1;\n method(value);\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "BoxingBoxedValue",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AbstractClassWithoutAbstractMethods",
"shortDescription": {
"text": "Abstract class without 'abstract' methods"
},
"fullDescription": {
"text": "Reports 'abstract' classes that have no 'abstract' methods. In most cases it does not make sense to have an 'abstract' class without any 'abstract' methods, and the 'abstract' modifier can be removed from the class. If the class was declared 'abstract' to prevent instantiation, it is often a better option to use a 'private' constructor to prevent instantiation instead. Example: 'abstract class Example {\n public String getName() {\n return \"IntelliJ IDEA\";\n }\n }' Use the option to ignore utility classes.",
"markdown": "Reports `abstract` classes that have no `abstract` methods. In most cases it does not make sense to have an `abstract` class without any `abstract` methods, and the `abstract` modifier can be removed from the class. If the class was declared `abstract` to prevent instantiation, it is often a better option to use a `private` constructor to prevent instantiation instead.\n\n**Example:**\n\n\n abstract class Example {\n public String getName() {\n return \"IntelliJ IDEA\";\n }\n }\n\nUse the option to ignore utility classes."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AbstractClassWithoutAbstractMethods",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Inheritance issues",
"index": 159,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CastThatLosesPrecision",
"shortDescription": {
"text": "Numeric cast that loses precision"
},
"fullDescription": {
"text": "Reports cast operations between primitive numeric types that may result in precision loss. Such casts are not necessarily a problem but may result in difficult to trace bugs if the loss of precision is unexpected. Example: 'int a = 420;\n byte b = (byte) a;' Use the Ignore casts from int to char option to ignore casts from 'int' to 'char'. This type of cast is often used when implementing I/O operations because the 'read()' method of the 'java.io.Reader' class returns an 'int'. Use the Ignore casts from int 128-255 to byte option to ignore casts of constant values (128-255) from 'int' to 'byte'. Such values will overflow to negative numbers that still fit inside a byte.",
"markdown": "Reports cast operations between primitive numeric types that may result in precision loss.\n\nSuch casts are not necessarily a problem but may result in difficult to\ntrace bugs if the loss of precision is unexpected.\n\n**Example:**\n\n\n int a = 420;\n byte b = (byte) a;\n\nUse the **Ignore casts from int to char** option to ignore casts from `int` to `char`.\nThis type of cast is often used when implementing I/O operations because the `read()` method of the\n`java.io.Reader` class returns an `int`.\n\nUse the **Ignore casts from int 128-255 to byte** option to ignore casts of constant values (128-255) from `int` to\n`byte`.\nSuch values will overflow to negative numbers that still fit inside a byte."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NumericCastThatLosesPrecision",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues/Cast",
"index": 138,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StringBufferMustHaveInitialCapacity",
"shortDescription": {
"text": "'StringBuilder' without initial capacity"
},
"fullDescription": {
"text": "Reports attempts to instantiate a new 'StringBuffer' or 'StringBuilder' object without specifying its initial capacity. If no initial capacity is specified, a default capacity is used, which will rarely be optimal. Failing to specify the initial capacity for 'StringBuffer' may result in performance issues if space needs to be reallocated and memory copied when the initial capacity is exceeded. Example: '// Capacity is not specified\n var sb = new StringBuilder();'",
"markdown": "Reports attempts to instantiate a new `StringBuffer` or `StringBuilder` object without specifying its initial capacity.\n\n\nIf no initial capacity is specified, a default capacity is used, which will rarely be optimal.\nFailing to specify the initial capacity for `StringBuffer` may result\nin performance issues if space needs to be reallocated and memory copied\nwhen the initial capacity is exceeded.\n\nExample:\n\n\n // Capacity is not specified\n var sb = new StringBuilder();\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "StringBufferWithoutInitialCapacity",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ThrowablePrintStackTrace",
"shortDescription": {
"text": "Call to 'printStackTrace()'"
},
"fullDescription": {
"text": "Reports calls to 'Throwable.printStackTrace()' without arguments. Such statements are often used for temporary debugging and should be either removed from the production code or replaced with a more robust logging facility.",
"markdown": "Reports calls to `Throwable.printStackTrace()` without arguments.\n\nSuch statements are often used for temporary debugging and should be either removed from the production code\nor replaced with a more robust logging facility."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CallToPrintStackTrace",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code maturity",
"index": 67,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java8MapApi",
"shortDescription": {
"text": "Simplifiable 'Map' operations"
},
"fullDescription": {
"text": "Reports common usage patterns of 'java.util.Map' and suggests replacing them with: 'getOrDefault()', 'computeIfAbsent()', 'putIfAbsent()', 'merge()', or 'replaceAll()'. Example: 'map.containsKey(key) ? map.get(key) : \"default\";' After the quick-fix is applied: 'map.getOrDefault(key, \"default\");' Example: 'List<String> list = map.get(key);\n if (list == null) {\n list = new ArrayList<>();\n map.put(key, list);\n }' After the quick-fix is applied: 'map.computeIfAbsent(key, localKey -> new ArrayList<>());' Example: 'Integer val = map.get(key);\n if (val == null) map.put(key, 1);\n else map.put(key, val + 1);' After the quick-fix is applied: 'map.merge(key, 1, (localKey, localValue) -> localValue + 1);' Example: 'for (Map.Entry<String, String> entry : map.entrySet()) {\n map.put(entry.getKey(), transform(entry.getValue()));\n }' After the quick-fix is applied: 'map.replaceAll((localKey, localValue) -> transform(localValue));' Note that the replacement with 'computeIfAbsent()' or 'merge()' might work incorrectly for some 'Map' implementations if the code extracted to the lambda expression modifies the same 'Map'. By default, the warning doesn't appear if this code might have side effects. If necessary, enable the Suggest replacement even if lambda may have side effects option to always show the warning. Also, due to different handling of the 'null' value in old methods like 'put()' and newer methods like 'computeIfAbsent()' or 'merge()', semantics might change if storing the 'null' value into given 'Map' is important. The inspection won't suggest the replacement when the value is statically known to be nullable, but for values with unknown nullability the replacement is still suggested. In these cases, we recommended suppressing the warning and adding an explanatory comment. This inspection reports only if the language level of the project or module is 8 or higher.",
"markdown": "Reports common usage patterns of `java.util.Map` and suggests replacing them with: `getOrDefault()`, `computeIfAbsent()`, `putIfAbsent()`, `merge()`, or `replaceAll()`.\n\nExample:\n\n\n map.containsKey(key) ? map.get(key) : \"default\";\n\nAfter the quick-fix is applied:\n\n\n map.getOrDefault(key, \"default\");\n\nExample:\n\n\n List<String> list = map.get(key);\n if (list == null) {\n list = new ArrayList<>();\n map.put(key, list);\n }\n\nAfter the quick-fix is applied:\n\n\n map.computeIfAbsent(key, localKey -> new ArrayList<>());\n\nExample:\n\n\n Integer val = map.get(key);\n if (val == null) map.put(key, 1);\n else map.put(key, val + 1);\n\nAfter the quick-fix is applied:\n\n\n map.merge(key, 1, (localKey, localValue) -> localValue + 1);\n\nExample:\n\n\n for (Map.Entry<String, String> entry : map.entrySet()) {\n map.put(entry.getKey(), transform(entry.getValue()));\n }\n\nAfter the quick-fix is applied:\n\n\n map.replaceAll((localKey, localValue) -> transform(localValue));\n\nNote that the replacement with `computeIfAbsent()` or `merge()` might work incorrectly for some `Map`\nimplementations if the code extracted to the lambda expression modifies the same `Map`. By default,\nthe warning doesn't appear if this code might have side effects. If necessary, enable the\n**Suggest replacement even if lambda may have side effects** option to always show the warning.\n\nAlso, due to different handling of the `null` value in old methods like `put()` and newer methods like\n`computeIfAbsent()` or `merge()`, semantics might change if storing the `null` value into given\n`Map` is important. The inspection won't suggest the replacement when the value is statically known to be nullable,\nbut for values with unknown nullability the replacement is still suggested. In these cases, we recommended suppressing the warning\nand adding an explanatory comment.\n\nThis inspection reports only if the language level of the project or module is 8 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "Java8MapApi",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 8",
"index": 119,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FillPermitsList",
"shortDescription": {
"text": "Same file subclasses are missing from permits clause of a sealed class"
},
"fullDescription": {
"text": "Reports sealed classes whose permits clauses do not contain some of the subclasses from the same file. Example: 'sealed class A {}\n final class B extends A {}' After the quick-fix is applied: 'sealed class A permits B {}\n final class B extends A {}' New in 2020.3",
"markdown": "Reports sealed classes whose permits clauses do not contain some of the subclasses from the same file.\n\nExample:\n\n\n sealed class A {}\n final class B extends A {}\n\nAfter the quick-fix is applied:\n\n\n sealed class A permits B {}\n final class B extends A {}\n\nNew in 2020.3"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "FillPermitsList",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Junit4Converter",
"shortDescription": {
"text": "JUnit 3 test can be JUnit 4"
},
"fullDescription": {
"text": "Reports JUnit 3 test classes that can be converted to JUnit 4 test classes. Example: 'public class MainTestCase extends junit.framework.TestCase {\n public void test() {\n Assert.assertTrue(true);\n }\n }' After the quick-fix is applied: 'public class MainTestCase {\n @org.junit.Test\n public void test() {\n Assert.assertTrue(true);\n }\n }' This inspection only reports if the language level of the project or module is 5 or higher, and JUnit 4 is available on the classpath.",
"markdown": "Reports JUnit 3 test classes that can be converted to JUnit 4 test classes.\n\n**Example:**\n\n\n public class MainTestCase extends junit.framework.TestCase {\n public void test() {\n Assert.assertTrue(true);\n }\n }\n\nAfter the quick-fix is applied:\n\n\n public class MainTestCase {\n @org.junit.Test\n public void test() {\n Assert.assertTrue(true);\n }\n }\n\nThis inspection only reports if the language level of the project or module is 5 or higher, and JUnit 4 is available on the classpath."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "Junit4Converter",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "JVM languages/Test frameworks",
"index": 128,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NumericToString",
"shortDescription": {
"text": "Call to 'Number.toString()'"
},
"fullDescription": {
"text": "Reports 'toString()' calls on objects of a class extending 'Number'. Such calls are usually incorrect in an internationalized environment and some locale specific formatting should be used instead. Example: 'void print(Double d) {\n System.out.println(d.toString());\n }' A possible way to fix this problem could be: 'void print(Double d) {\n System.out.printf(\"%f%n\", d);\n }' This formats the number using the default locale which is set during the startup of the JVM and is based on the host environment.",
"markdown": "Reports `toString()` calls on objects of a class extending `Number`. Such calls are usually incorrect in an internationalized environment and some locale specific formatting should be used instead.\n\n**Example:**\n\n\n void print(Double d) {\n System.out.println(d.toString());\n }\n\nA possible way to fix this problem could be:\n\n\n void print(Double d) {\n System.out.printf(\"%f%n\", d);\n }\n\nThis formats the number using the default locale which is set during the startup of the JVM and is based on the host environment."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CallToNumericToString",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Internationalization",
"index": 110,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryDefault",
"shortDescription": {
"text": "Unnecessary 'default' for enum 'switch' statement"
},
"fullDescription": {
"text": "Reports enum 'switch' statements or expression with 'default' branches which can never be taken, because all possible values are covered by a 'case' branch. Such elements are redundant, especially for 'switch' expressions, because they don't compile when all enum constants are not covered by a 'case' branch. The language level needs to be configured to 14 to report 'switch' expressions. The provided quick-fix removes 'default' branches. Example: 'enum E { A, B }\n int foo(E e) {\n return switch (e) {\n case A -> 1;\n case B -> 2;\n default -> 3;\n };\n }' After the quick-fix is applied: 'enum E { A, B }\n int foo(E e) {\n return switch (e) {\n case A -> 1;\n case B -> 2;\n };\n }' Use the Only report switch expressions option to report only redundant 'default' branches in switch expressions.",
"markdown": "Reports enum `switch` statements or expression with `default` branches which can never be taken, because all possible values are covered by a `case` branch.\n\nSuch elements are redundant, especially for `switch` expressions, because they don't compile when all\nenum constants are not covered by a `case` branch.\n\n\nThe language level needs to be configured to 14 to report `switch` expressions.\n\nThe provided quick-fix removes `default` branches.\n\nExample:\n\n\n enum E { A, B }\n int foo(E e) {\n return switch (e) {\n case A -> 1;\n case B -> 2;\n default -> 3;\n };\n }\n\nAfter the quick-fix is applied:\n\n\n enum E { A, B }\n int foo(E e) {\n return switch (e) {\n case A -> 1;\n case B -> 2;\n };\n }\n\nUse the **Only report switch expressions** option to report only redundant `default` branches in switch expressions."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryDefault",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnqualifiedFieldAccess",
"shortDescription": {
"text": "Instance field access not qualified with 'this'"
},
"fullDescription": {
"text": "Reports field access operations that are not qualified with 'this' or some other qualifier. Some coding styles mandate that all field access operations are qualified to prevent confusion with local variable or parameter access. Example: 'class Foo {\n int foo;\n\n void bar() {\n foo += 1;\n }\n }' After the quick-fix is applied: 'class Foo {\n int foo;\n\n void bar() {\n this.foo += 1;\n }\n }'",
"markdown": "Reports field access operations that are not qualified with `this` or some other qualifier.\n\n\nSome coding styles mandate that all field access operations are qualified to prevent confusion with local\nvariable or parameter access.\n\n**Example:**\n\n\n class Foo {\n int foo;\n\n void bar() {\n foo += 1;\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class Foo {\n int foo;\n\n void bar() {\n this.foo += 1;\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnqualifiedFieldAccess",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MismatchedCollectionQueryUpdate",
"shortDescription": {
"text": "Mismatched query and update of collection"
},
"fullDescription": {
"text": "Reports collections whose contents are either queried and not updated, or updated and not queried. Such inconsistent queries and updates are pointless and may indicate either dead code or a typo. Use the inspection settings to specify name patterns that correspond to update/query methods. Query methods that return an element are automatically detected, and only those that write data to an output parameter (for example, an 'OutputStream') need to be specified. Example: Suppose you have your custom 'FixedStack' class with method 'store()': 'public class FixedStack<T> extends Collection<T> {\n public T store(T t) {\n // implementation\n }\n }' You can add 'store' to the update methods table in order to report mismatched queries like: 'void test(int i) {\n FixedStack<Integer> stack = new FixedStack<>();\n stack.store(i);\n }'",
"markdown": "Reports collections whose contents are either queried and not updated, or updated and not queried.\n\n\nSuch inconsistent queries and updates are pointless and may indicate\neither dead code or a typo.\n\n\nUse the inspection settings to specify name patterns that correspond to update/query methods.\nQuery methods that return an element are automatically detected, and only\nthose that write data to an output parameter (for example, an `OutputStream`) need to be specified.\n\n\n**Example:**\n\nSuppose you have your custom `FixedStack` class with method `store()`:\n\n\n public class FixedStack<T> extends Collection<T> {\n public T store(T t) {\n // implementation\n }\n }\n\nYou can add `store` to the update methods table in order to report mismatched queries like:\n\n\n void test(int i) {\n FixedStack<Integer> stack = new FixedStack<>();\n stack.store(i);\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "MismatchedQueryAndUpdateOfCollection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CharacterComparison",
"shortDescription": {
"text": "Character comparison"
},
"fullDescription": {
"text": "Reports ordinal comparisons of 'char' values. In an internationalized environment, such comparisons are rarely correct.",
"markdown": "Reports ordinal comparisons of `char` values. In an internationalized environment, such comparisons are rarely correct."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CharacterComparison",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Internationalization",
"index": 110,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SynchronizeOnThis",
"shortDescription": {
"text": "Synchronization on 'this'"
},
"fullDescription": {
"text": "Reports synchronization on 'this' or 'class' expressions. The reported constructs include 'synchronized' blocks and calls to 'wait()', 'notify()' or 'notifyAll()'. There are several reasons synchronization on 'this' or 'class' expressions may be a bad idea: it makes synchronization a part of the external interface of the class, which makes a future change to a different locking mechanism difficult, it becomes hard to track just who is locking on a given object, it makes a denial-of-service attack possible, either on purpose or it can happen easily by accident when subclassing. As an alternative, consider synchronizing on a 'private final' lock object, access to which can be completely controlled. Example: 'public void print() {\n synchronized(this) { // warning: Lock operations on 'this' may have unforeseen side-effects\n System.out.println(\"synchronized\");\n }\n }'",
"markdown": "Reports synchronization on `this` or `class` expressions. The reported constructs include `synchronized` blocks and calls to `wait()`, `notify()` or `notifyAll()`.\n\nThere are several reasons synchronization on `this` or `class` expressions may be a bad idea:\n\n1. it makes synchronization a part of the external interface of the class, which makes a future change to a different locking mechanism difficult,\n2. it becomes hard to track just who is locking on a given object,\n3. it makes a denial-of-service attack possible, either on purpose or it can happen easily by accident when subclassing.\n\nAs an alternative, consider synchronizing on a `private final` lock object, access to which can be completely controlled.\n\n**Example:**\n\n\n public void print() {\n synchronized(this) { // warning: Lock operations on 'this' may have unforeseen side-effects\n System.out.println(\"synchronized\");\n }\n }\n \n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SynchronizeOnThis",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HashCodeUsesNonFinalVariable",
"shortDescription": {
"text": "Non-final field referenced in 'hashCode()'"
},
"fullDescription": {
"text": "Reports implementations of 'hashCode()' that access non-'final' variables. Such access may result in 'hashCode()' returning different values at different points in the object's lifecycle, which may in turn cause problems when using the standard collections classes. Example: 'class Drink {\n String name;\n Drink(String name) { this.name = name; }\n @Override public int hashCode() {\n return Objects.hash(name); //warning\n }\n }\n ...\n Drink coffee = new Drink(\"Coffee\");\n priceMap.put(coffee, 10.0);\n coffee.name = \"Tea\";\n double coffeePrice = priceMap.get(coffee); //not found' A quick-fix is suggested to make the field final: 'class Drink {\n final String name;\n ...\n }'",
"markdown": "Reports implementations of `hashCode()` that access non-`final` variables.\n\n\nSuch access may result in `hashCode()`\nreturning different values at different points in the object's lifecycle, which may in turn cause problems when\nusing the standard collections classes.\n\n**Example:**\n\n\n class Drink {\n String name;\n Drink(String name) { this.name = name; }\n @Override public int hashCode() {\n return Objects.hash(name); //warning\n }\n }\n ...\n Drink coffee = new Drink(\"Coffee\");\n priceMap.put(coffee, 10.0);\n coffee.name = \"Tea\";\n double coffeePrice = priceMap.get(coffee); //not found\n\nA quick-fix is suggested to make the field final:\n\n\n class Drink {\n final String name;\n ...\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonFinalFieldReferencedInHashCode",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InstanceofThis",
"shortDescription": {
"text": "'instanceof' check for 'this'"
},
"fullDescription": {
"text": "Reports usages of 'instanceof' or 'getClass() == SomeClass.class' in which a 'this' expression is checked. Such expressions indicate a failure of the object-oriented design, and should be replaced by polymorphic constructions. Example: 'class Super {\n void process() {\n if (this instanceof Sub) { // warning\n doSomething();\n } else {\n doSomethingElse();\n }\n }\n}\n \nclass Sub extends Super {}' To fix the problem, use an overriding method: 'class Super {\n void process() {\n doSomethingElse();\n }\n}\n \nclass Sub extends Super {\n @Override\n void process() {\n doSomething();\n }\n}'",
"markdown": "Reports usages of `instanceof` or `getClass() == SomeClass.class` in which a `this` expression is checked.\n\nSuch expressions indicate a failure of the object-oriented design, and should be replaced by\npolymorphic constructions.\n\nExample:\n\n\n class Super {\n void process() {\n if (this instanceof Sub) { // warning\n doSomething();\n } else {\n doSomethingElse();\n }\n }\n }\n \n class Sub extends Super {}\n\nTo fix the problem, use an overriding method:\n\n\n class Super {\n void process() {\n doSomethingElse();\n }\n }\n \n class Sub extends Super {\n @Override\n void process() {\n doSomething();\n }\n } \n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "InstanceofThis",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Abstraction issues",
"index": 83,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PackageInMultipleModules",
"shortDescription": {
"text": "Package with classes in multiple modules"
},
"fullDescription": {
"text": "Reports non-empty packages that are present in several modules. When packages are contained in several modules, it is very easy to create a class with the same name in two modules. A module which depends on these modules will see a conflict if it tries to use such a class. The Java Platform Module System disallows packages contained in more than one module (also called split packages) Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor.",
"markdown": "Reports non-empty packages that are present in several modules. When packages are contained in several modules, it is very easy to create a class with the same name in two modules. A module which depends on these modules will see a conflict if it tries to use such a class. The Java Platform Module System disallows packages contained in more than one module (also called *split packages* )\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PackageInMultipleModules",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Packaging issues",
"index": 190,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FloatingPointEquality",
"shortDescription": {
"text": "Floating-point equality comparison"
},
"fullDescription": {
"text": "Reports floating-point values that are being compared using the '==' or '!=' operator. Floating-point values are inherently inaccurate, and comparing them for exact equality is seldom the desired semantics. This inspection ignores comparisons with zero and infinity literals. Example: 'void m(double d1, double d2) {\n if (d1 == d2) {}\n }'",
"markdown": "Reports floating-point values that are being compared using the `==` or `!=` operator.\n\nFloating-point values are inherently inaccurate, and comparing them for exact equality is seldom the desired semantics.\n\nThis inspection ignores comparisons with zero and infinity literals.\n\n**Example:**\n\n\n void m(double d1, double d2) {\n if (d1 == d2) {}\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FloatingPointEquality",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues",
"index": 49,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StringBufferToStringInConcatenation",
"shortDescription": {
"text": "'StringBuilder.toString()' in concatenation"
},
"fullDescription": {
"text": "Reports 'StringBuffer.toString()' or 'StringBuilder.toString()' calls in string concatenations. Such calls are unnecessary when concatenating and can be removed, saving a method call and an object allocation, which may improve performance.",
"markdown": "Reports `StringBuffer.toString()` or `StringBuilder.toString()` calls in string concatenations. Such calls are unnecessary when concatenating and can be removed, saving a method call and an object allocation, which may improve performance."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "StringBufferToStringInConcatenation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SerialAnnotationUsedOnWrongMember",
"shortDescription": {
"text": "'@Serial' annotation used on wrong member"
},
"fullDescription": {
"text": "Reports methods and fields in the 'Serializable' and 'Externalizable' classes that are not suitable to be annotated with the 'java.io.Serial' annotation. Examples: 'class Test implements Serializable {\n @Serial // The annotated field is not a part of serialization mechanism because it's not final\n private static long serialVersionUID = 7874493593505141603L;\n\n @Serial // The annotated method is not a part of the serialization mechanism because it's not private\n void writeObject(ObjectOutputStream out) throws IOException {\n }\n}' 'class Test implements Externalizable {\n @Serial // The annotated method is not a part of the serialization mechanism as it's inside Externalizable class\n private void writeObject(ObjectOutputStream out) throws IOException {\n }\n}' For information about all valid cases, refer the documentation for 'java.io.Serial'. This inspection only reports if the language level of the project or module is 14 or higher. New in 2020.3",
"markdown": "Reports methods and fields in the `Serializable` and `Externalizable` classes that are not suitable to be annotated with the `java.io.Serial` annotation.\n\n**Examples:**\n\n\n class Test implements Serializable {\n @Serial // The annotated field is not a part of serialization mechanism because it's not final\n private static long serialVersionUID = 7874493593505141603L;\n\n @Serial // The annotated method is not a part of the serialization mechanism because it's not private\n void writeObject(ObjectOutputStream out) throws IOException {\n }\n }\n\n\n class Test implements Externalizable {\n @Serial // The annotated method is not a part of the serialization mechanism as it's inside Externalizable class\n private void writeObject(ObjectOutputStream out) throws IOException {\n }\n }\n\nFor information about all valid cases, refer the documentation for `java.io.Serial`.\n\nThis inspection only reports if the language level of the project or module is 14 or higher.\n\nNew in 2020.3"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "serial",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Serialization issues",
"index": 54,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JNDIResource",
"shortDescription": {
"text": "JNDI resource opened but not safely closed"
},
"fullDescription": {
"text": "Reports JNDI resources that are not safely closed. JNDI resources reported by this inspection include 'javax.naming.InitialContext', and 'javax.naming.NamingEnumeration'. By default, the inspection assumes that the resources can be closed by any method with 'close' or 'cleanup' in its name. Example: 'Object findObject(Properties properties, String name) throws NamingException {\n Context context = new InitialContext(properties); //context is not closed\n return context.lookup(name);\n }' Use the following options to configure the inspection: Whether a JNDI Resource is allowed to be opened inside a 'try' block. This style is less desirable because it is more verbose than opening a resource in front of a 'try' block. Whether the resource can be closed by any method call with the resource passed as argument.",
"markdown": "Reports JNDI resources that are not safely closed. JNDI resources reported by this inspection include `javax.naming.InitialContext`, and `javax.naming.NamingEnumeration`.\n\n\nBy default, the inspection assumes that the resources can be closed by any method with\n'close' or 'cleanup' in its name.\n\n**Example:**\n\n\n Object findObject(Properties properties, String name) throws NamingException {\n Context context = new InitialContext(properties); //context is not closed\n return context.lookup(name);\n }\n\n\nUse the following options to configure the inspection:\n\n* Whether a JNDI Resource is allowed to be opened inside a `try` block. This style is less desirable because it is more verbose than opening a resource in front of a `try` block.\n* Whether the resource can be closed by any method call with the resource passed as argument."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JNDIResourceOpenedButNotSafelyClosed",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Resource management",
"index": 155,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantCompareCall",
"shortDescription": {
"text": "Redundant 'compare()' method call"
},
"fullDescription": {
"text": "Reports comparisons in which the 'compare' method is superfluous. Example: 'boolean result = Integer.compare(a, b) == 0;' After the quick-fix is applied: 'boolean result = a == b;' New in 2018.2",
"markdown": "Reports comparisons in which the `compare` method is superfluous.\n\nExample:\n\n\n boolean result = Integer.compare(a, b) == 0;\n\nAfter the quick-fix is applied:\n\n\n boolean result = a == b;\n\nNew in 2018.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantCompareCall",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TextBlockBackwardMigration",
"shortDescription": {
"text": "Text block can be replaced with regular string literal"
},
"fullDescription": {
"text": "Reports text blocks that can be replaced with regular string literals. Example: 'Object obj = engine.eval(\"\"\"\n function hello() {\n print('\"Hello, world\"');\n }\n\n hello();\n \"\"\");' After the quick fix is applied: 'Object obj = engine.eval(\"function hello() {\\n\" +\n \" print('\\\"Hello, world\\\"');\\n\" +\n \"}\\n\" +\n \"\\n\" +\n \"hello();\\n\");' Text block appeared in Java 15. This inspection can help to downgrade for backward compatibility with earlier Java versions. New in 2019.3",
"markdown": "Reports text blocks that can be replaced with regular string literals.\n\n**Example:**\n\n\n Object obj = engine.eval(\"\"\"\n function hello() {\n print('\"Hello, world\"');\n }\n\n hello();\n \"\"\");\n\nAfter the quick fix is applied:\n\n\n Object obj = engine.eval(\"function hello() {\\n\" +\n \" print('\\\"Hello, world\\\"');\\n\" +\n \"}\\n\" +\n \"\\n\" +\n \"hello();\\n\");\n\n\n*Text block* appeared in Java 15.\nThis inspection can help to downgrade for backward compatibility with earlier Java versions.\n\nNew in 2019.3"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "TextBlockBackwardMigration",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 15",
"index": 235,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EmptyClass",
"shortDescription": {
"text": "Redundant empty class"
},
"fullDescription": {
"text": "Reports empty classes and Java files without any defined classes. A class is empty if it doesn't contain any fields, methods, constructors, or initializers. Empty classes often remain after significant changes or refactorings. Configure the inspection: Use the Ignore if annotated by option to specify special annotations. The inspection will ignore the classes marked with these annotations. Use the Ignore class if it is a parametrization of a super type option to ignore classes that parameterize a superclass. For example: 'class MyList extends ArrayList<String> {}' Use the Ignore subclasses of java.lang.Throwable to ignore classes that extend 'java.lang.Throwable'. Use the Comments count as content option to ignore classes that contain comments.",
"markdown": "Reports empty classes and Java files without any defined classes.\n\nA class is empty if it\ndoesn't contain any fields, methods, constructors, or initializers. Empty classes often remain\nafter significant changes or refactorings.\n\nConfigure the inspection:\n\n* Use the **Ignore if annotated by** option to specify special annotations. The inspection will ignore the classes marked with these annotations.\n*\n Use the **Ignore class if it is a parametrization of a super type** option to ignore classes that parameterize a superclass. For example:\n\n class MyList extends ArrayList<String> {}\n\n* Use the **Ignore subclasses of java.lang.Throwable** to ignore classes that extend `java.lang.Throwable`.\n* Use the **Comments count as content** option to ignore classes that contain comments."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EmptyClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConditionalCanBeOptional",
"shortDescription": {
"text": "Conditional can be replaced with Optional"
},
"fullDescription": {
"text": "Reports null-check conditions and suggests replacing them with 'Optional' chains. Example: 'return str == null ? \"\" : str.trim();' After applying the quick-fix: 'return Optional.ofNullable(str).map(String::trim).orElse(\"\");' While the replacement is not always shorter, it could be helpful for further refactoring (for example, for changing the method return value to 'Optional'). Note that when a not-null branch of the condition returns null, the corresponding mapping step will produce an empty 'Optional' possibly changing the semantics. If it cannot be statically proven that semantics will be preserved, the quick-fix action name will contain the \"(may change semantics)\" notice, and the inspection highlighting will be turned off. This inspection only reports if the language level of the project or module is 8 or higher. New in 2018.1",
"markdown": "Reports null-check conditions and suggests replacing them with `Optional` chains.\n\nExample:\n\n\n return str == null ? \"\" : str.trim();\n\nAfter applying the quick-fix:\n\n\n return Optional.ofNullable(str).map(String::trim).orElse(\"\");\n\nWhile the replacement is not always shorter, it could be helpful for further refactoring\n(for example, for changing the method return value to `Optional`).\n\nNote that when a not-null branch of the condition returns null, the corresponding mapping step will\nproduce an empty `Optional` possibly changing the semantics. If it cannot be statically\nproven that semantics will be preserved, the quick-fix action name will contain the \"(may change semantics)\"\nnotice, and the inspection highlighting will be turned off.\n\nThis inspection only reports if the language level of the project or module is 8 or higher.\n\nNew in 2018.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ConditionalCanBeOptional",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AssignmentToLambdaParameter",
"shortDescription": {
"text": "Assignment to lambda parameter"
},
"fullDescription": {
"text": "Reports assignment to, or modification of lambda parameters. Although occasionally intended, this construct may be confusing and is often caused by a typo or use of a wrong variable. The quick-fix adds a declaration of a new variable. Example: 'list.forEach(s -> {\n s = s.trim();\n System.out.println(\"String: \" + s);\n });' After the quick-fix is applied: 'list.forEach(s -> {\n String trimmed = s.trim();\n System.out.println(\"String: \" + trimmed);\n });' Use the Ignore if assignment is a transformation of the original parameter option to ignore assignments that modify the parameter value based on its previous value.",
"markdown": "Reports assignment to, or modification of lambda parameters. Although occasionally intended, this construct may be confusing and is often caused by a typo or use of a wrong variable.\n\nThe quick-fix adds a declaration of a new variable.\n\n**Example:**\n\n\n list.forEach(s -> {\n s = s.trim();\n System.out.println(\"String: \" + s);\n });\n\nAfter the quick-fix is applied:\n\n\n list.forEach(s -> {\n String trimmed = s.trim();\n System.out.println(\"String: \" + trimmed);\n });\n\nUse the **Ignore if assignment is a transformation of the original parameter** option to ignore assignments that modify the parameter\nvalue based on its previous value."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AssignmentToLambdaParameter",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Assignment issues",
"index": 98,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SystemGetenv",
"shortDescription": {
"text": "Call to 'System.getenv()'"
},
"fullDescription": {
"text": "Reports calls to 'System.getenv()'. Calls to 'System.getenv()' are inherently unportable.",
"markdown": "Reports calls to `System.getenv()`. Calls to `System.getenv()` are inherently unportable."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CallToSystemGetenv",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Portability",
"index": 179,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConstantExpression",
"shortDescription": {
"text": "Constant expression can be evaluated"
},
"fullDescription": {
"text": "Reports compile-time constant expressions and suggests replacing them with their actual values. For example, you will be prompted to replace \"2 + 2\" with \"4\". Use the Don't report when the expression contains references to defined constants option to ignore the expressions which contain references to non-literal operands, such as fields, and variables. New in 2018.1",
"markdown": "Reports compile-time constant expressions and suggests replacing them with their actual values. For example, you will be prompted to replace \"2 + 2\" with \"4\".\n\n\nUse the **Don't report when the expression contains references to defined constants** option to ignore the expressions which contain references to non-literal operands,\nsuch as fields, and variables.\n\nNew in 2018.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ConstantExpression",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LongLiteralsEndingWithLowercaseL",
"shortDescription": {
"text": "'long' literal ending with 'l' instead of 'L'"
},
"fullDescription": {
"text": "Reports 'long' literals ending with lowercase 'l'. These literals may be confusing, as the lowercase 'l' looks very similar to a literal '1' (one). Example: 'long nights = 100l;' After the quick-fix is applied: 'long nights = 100L;'",
"markdown": "Reports `long` literals ending with lowercase 'l'. These literals may be confusing, as the lowercase 'l' looks very similar to a literal '1' (one).\n\n**Example:**\n\n\n long nights = 100l;\n\nAfter the quick-fix is applied:\n\n\n long nights = 100L;\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "LongLiteralEndingWithLowercaseL",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues",
"index": 49,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantRecordConstructor",
"shortDescription": {
"text": "Redundant record constructor"
},
"fullDescription": {
"text": "Reports redundant constructors declared inside Java records. Example 1: 'record Point(int x, int y) {\n public Point {} // could be removed\n }\n \n record Point(int x, int y) {\n public Point(int x, int y) { // could be removed\n this.x = x;\n this.y = y;\n }\n }' The quick-fix removes the redundant constructors. Example 2: '// could be converted to compact constructor\n record Range(int from, int to) {\n public Range(int from, int to) {\n if (from > to) throw new IllegalArgumentException();\n this.from = from;\n this.to = to;\n }\n }' The quick-fix converts this code into a compact constructor. This inspection only reports if the language level of the project or module is 16 or higher. New in 2020.1",
"markdown": "Reports redundant constructors declared inside Java records.\n\n**Example 1:**\n\n\n record Point(int x, int y) {\n public Point {} // could be removed\n }\n \n record Point(int x, int y) {\n public Point(int x, int y) { // could be removed\n this.x = x;\n this.y = y;\n }\n }\n\nThe quick-fix removes the redundant constructors.\n\n**Example 2:**\n\n\n // could be converted to compact constructor\n record Range(int from, int to) {\n public Range(int from, int to) {\n if (from > to) throw new IllegalArgumentException();\n this.from = from;\n this.to = to;\n }\n }\n\nThe quick-fix converts this code into a compact constructor.\n\nThis inspection only reports if the language level of the project or module is 16 or higher.\n\nNew in 2020.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantRecordConstructor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Declaration redundancy",
"index": 10,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Convert2Diamond",
"shortDescription": {
"text": "Explicit type can be replaced with '<>'"
},
"fullDescription": {
"text": "Reports 'new' expressions with type arguments that can be replaced a with diamond type '<>'. Example: 'List<String> list = new ArrayList<String>(); // reports array list type argument' After the quick-fix is applied: 'List<String> list = new ArrayList<>();' This inspection only reports if the language level of the project or module is 7 or higher.",
"markdown": "Reports `new` expressions with type arguments that can be replaced a with diamond type `<>`.\n\nExample:\n\n\n List<String> list = new ArrayList<String>(); // reports array list type argument\n\nAfter the quick-fix is applied:\n\n\n List<String> list = new ArrayList<>();\n\nThis inspection only reports if the language level of the project or module is 7 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "Convert2Diamond",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 7",
"index": 163,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CheckForOutOfMemoryOnLargeArrayAllocation",
"shortDescription": {
"text": "Large array allocation with no OutOfMemoryError check"
},
"fullDescription": {
"text": "Reports large array allocations which do not check for 'java.lang.OutOfMemoryError'. In memory constrained environments, allocations of large data objects should probably be checked for memory depletion. This inspection is intended for Java ME and other highly resource constrained environments. Applying the results of this inspection without consideration might have negative effects on code clarity and design. Use the option to specify the maximum number of elements to allow in unchecked array allocations.",
"markdown": "Reports large array allocations which do not check for `java.lang.OutOfMemoryError`. In memory constrained environments, allocations of large data objects should probably be checked for memory depletion.\n\n\nThis inspection is intended for Java ME and other highly resource constrained environments.\nApplying the results of this inspection without consideration might have negative effects on code clarity and design.\n\n\nUse the option to specify the maximum number of elements to allow in unchecked array allocations."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CheckForOutOfMemoryOnLargeArrayAllocation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance/Embedded",
"index": 178,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassWithoutConstructor",
"shortDescription": {
"text": "Class without constructor"
},
"fullDescription": {
"text": "Reports classes without constructors. Some coding standards prohibit such classes.",
"markdown": "Reports classes without constructors.\n\nSome coding standards prohibit such classes."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ClassWithoutConstructor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/JavaBeans issues",
"index": 142,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PackageInfoWithoutPackage",
"shortDescription": {
"text": "'package-info.java' without 'package' statement"
},
"fullDescription": {
"text": "Reports 'package-info.java' files without a 'package' statement. The Javadoc tool considers such files documentation for the default package even when the file is located somewhere else.",
"markdown": "Reports `package-info.java` files without a `package` statement.\n\n\nThe Javadoc tool considers such files documentation for the default package even when the file is located somewhere else."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PackageInfoWithoutPackage",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Javadoc",
"index": 95,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BigDecimalMethodWithoutRoundingCalled",
"shortDescription": {
"text": "Call to 'BigDecimal' method without a rounding mode argument"
},
"fullDescription": {
"text": "Reports calls to 'divide()' or 'setScale()' without a rounding mode argument. Such calls can lead to an 'ArithmeticException' when the exact value cannot be represented in the result (for example, because it has a non-terminating decimal expansion). Specifying a rounding mode prevents the 'ArithmeticException'. Example: 'BigDecimal.valueOf(1).divide(BigDecimal.valueOf(3));'",
"markdown": "Reports calls to `divide()` or `setScale()` without a rounding mode argument.\n\nSuch calls can lead to an `ArithmeticException` when the exact value cannot be represented in the result\n(for example, because it has a non-terminating decimal expansion).\n\nSpecifying a rounding mode prevents the `ArithmeticException`.\n\n**Example:**\n\n\n BigDecimal.valueOf(1).divide(BigDecimal.valueOf(3));\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "BigDecimalMethodWithoutRoundingCalled",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues",
"index": 49,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DriverManagerGetConnection",
"shortDescription": {
"text": "Use of 'DriverManager' to get JDBC connection"
},
"fullDescription": {
"text": "Reports any uses of 'java.sql.DriverManager' to acquire a JDBC connection. 'java.sql.DriverManager' has been superseded by 'javax.sql.Datasource', which allows for connection pooling and other optimizations. Example: 'Connection conn = DriverManager.getConnection(url, username, password);'",
"markdown": "Reports any uses of `java.sql.DriverManager` to acquire a JDBC connection.\n\n\n`java.sql.DriverManager`\nhas been superseded by `javax.sql.Datasource`, which\nallows for connection pooling and other optimizations.\n\n**Example:**\n\n Connection conn = DriverManager.getConnection(url, username, password);\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CallToDriverManagerGetConnection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Resource management",
"index": 155,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FinalMethodInFinalClass",
"shortDescription": {
"text": "'final' method in 'final' class"
},
"fullDescription": {
"text": "Reports 'final' methods in 'final' classes. Since 'final' classes cannot be inherited, marking a method as 'final' may be unnecessary and confusing. Example: 'record Bar(int a, int b) {\n public final int sum() { \n return a + b;\n }\n}'\n After the quick-fix is applied: 'record Bar(int a, int b) {\n public int sum() { \n return a + b;\n }\n}' As shown in the example, a class can be marked as 'final' explicitly or implicitly.",
"markdown": "Reports `final` methods in `final` classes.\n\nSince `final` classes cannot be inherited, marking a method as `final`\nmay be unnecessary and confusing.\n\n**Example:**\n\n record Bar(int a, int b) {\n public final int sum() { \n return a + b;\n }\n }\n\nAfter the quick-fix is applied:\n\n record Bar(int a, int b) {\n public int sum() { \n return a + b;\n }\n }\n\nAs shown in the example, a class can be marked as `final` explicitly or implicitly."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FinalMethodInFinalClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Declaration redundancy",
"index": 10,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FinalPrivateMethod",
"shortDescription": {
"text": "'private' method declared 'final'"
},
"fullDescription": {
"text": "Reports methods that are marked with both 'final' and 'private' keywords. Since 'private' methods cannot be meaningfully overridden because of their visibility, declaring them 'final' is redundant.",
"markdown": "Reports methods that are marked with both `final` and `private` keywords.\n\nSince `private` methods cannot be meaningfully overridden because of their visibility, declaring them\n`final` is redundant."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FinalPrivateMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AssignmentOrReturnOfFieldWithMutableType",
"shortDescription": {
"text": "Assignment or return of field with mutable type"
},
"fullDescription": {
"text": "Reports return of, or assignment from a method parameter to an array or a mutable type like 'Collection', 'Date', 'Map', 'Calendar', etc. Because such types are mutable, this construct may result in unexpected modifications of an object's state from outside the owning class. Although this construct may be useful for performance reasons, it is inherently prone to bugs. The following mutable types are reported: 'java.util.Date' 'java.util.Calendar' 'java.util.Collection' 'java.util.Map' 'com.google.common.collect.Multimap' 'com.google.common.collect.Table' The quick-fix adds a call to the field's '.clone()' method. Example: 'class Log {\n String[] messages;\n ...\n\n String[] getMessages() {\n return messages; // warning: Return of String[] field 'messages'\n }\n }' After the quick-fix is applied: 'class Log {\n String[] messages;\n ...\n\n String[] getMessages() {\n return messages.clone();\n }\n }' Use the Ignore assignments in and returns from private methods option to ignore assignments and returns in 'private' methods.",
"markdown": "Reports return of, or assignment from a method parameter to an array or a mutable type like `Collection`, `Date`, `Map`, `Calendar`, etc.\n\nBecause such types are mutable, this construct may\nresult in unexpected modifications of an object's state from outside the owning class. Although this construct may be useful for\nperformance reasons, it is inherently prone to bugs.\n\nThe following mutable types are reported:\n\n* `java.util.Date`\n* `java.util.Calendar`\n* `java.util.Collection`\n* `java.util.Map`\n* `com.google.common.collect.Multimap`\n* `com.google.common.collect.Table`\n\nThe quick-fix adds a call to the field's `.clone()` method.\n\n**Example:**\n\n\n class Log {\n String[] messages;\n ...\n\n String[] getMessages() {\n return messages; // warning: Return of String[] field 'messages'\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class Log {\n String[] messages;\n ...\n\n String[] getMessages() {\n return messages.clone();\n }\n }\n\nUse the **Ignore assignments in and returns from private methods** option to ignore assignments and returns in `private` methods."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AssignmentOrReturnOfFieldWithMutableType",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Encapsulation",
"index": 211,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OptionalAssignedToNull",
"shortDescription": {
"text": "Null value for Optional type"
},
"fullDescription": {
"text": "Reports 'null' assigned to 'Optional' variable or returned from method returning 'Optional'. It's recommended that you use 'Optional.empty()' (or 'Optional.absent()' for Guava) to denote an empty value. Example: 'Optional<Integer> foo(boolean flag) {\n return flag ? Optional.of(42) : null;\n }' After the quick-fix is applied: 'Optional<Integer> foo(boolean flag) {\n return flag ? Optional.of(42) : Optional.empty();\n }' Configure the inspection: Use the Report comparison of Optional with null option to also report comparisons like 'optional == null'. While in rare cases (e.g. lazily initialized optional field) this might be correct, optional variable is usually never null, and probably 'optional.isPresent()' was intended. This inspection only reports if the language level of the project or module is 8 or higher. New in 2017.2",
"markdown": "Reports `null` assigned to `Optional` variable or returned from method returning `Optional`.\n\nIt's recommended that you use `Optional.empty()` (or `Optional.absent()` for Guava) to denote an empty value.\n\nExample:\n\n\n Optional<Integer> foo(boolean flag) {\n return flag ? Optional.of(42) : null;\n }\n\nAfter the quick-fix is applied:\n\n\n Optional<Integer> foo(boolean flag) {\n return flag ? Optional.of(42) : Optional.empty();\n }\n\nConfigure the inspection:\n\n\nUse the **Report comparison of Optional with null** option to also report comparisons like `optional == null`. While in rare cases (e.g. lazily initialized\noptional field) this might be correct, optional variable is usually never null, and probably `optional.isPresent()` was\nintended.\n\nThis inspection only reports if the language level of the project or module is 8 or higher.\n\nNew in 2017.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OptionalAssignedToNull",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code maturity",
"index": 67,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PointlessIndexOfComparison",
"shortDescription": {
"text": "Pointless 'indexOf()' comparison"
},
"fullDescription": {
"text": "Reports unnecessary comparisons with '.indexOf()' expressions. An example of such an expression is comparing the result of '.indexOf()' with numbers smaller than -1.",
"markdown": "Reports unnecessary comparisons with `.indexOf()` expressions. An example of such an expression is comparing the result of `.indexOf()` with numbers smaller than -1."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PointlessIndexOfComparison",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MathRoundingWithIntArgument",
"shortDescription": {
"text": "Call math rounding with 'int' argument"
},
"fullDescription": {
"text": "Reports calls to 'round()', 'ceil()', 'floor()', 'rint()' methods for 'Math' and 'StrictMath' with 'int' as the argument. These methods could be called in case the argument is expected to be 'long' or 'double', and it may have unexpected results. The inspection provides a fix that simplify such expressions (except 'round') to cast to 'double'. Example: 'int i = 2;\n double d1 = Math.floor(i);' After the quick-fix is applied: 'int i = 2;\n double d1 = i;' New in 2023.1",
"markdown": "Reports calls to `round()`, `ceil()`, `floor()`, `rint()` methods for `Math` and `StrictMath` with `int` as the argument.\n\nThese methods could be called in case the argument is expected to be `long` or `double`, and it may have unexpected results.\n\nThe inspection provides a fix that simplify such expressions (except `round`) to cast to `double`.\n\n**Example:**\n\n\n int i = 2;\n double d1 = Math.floor(i);\n\nAfter the quick-fix is applied:\n\n\n int i = 2;\n double d1 = i;\n\nNew in 2023.1"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "MathRoundingWithIntArgument",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FieldMayBeFinal",
"shortDescription": {
"text": "Field may be 'final'"
},
"fullDescription": {
"text": "Reports fields that can be safely made 'final'. All 'final' fields have a value and this value does not change, which can make the code easier to reason about. To avoid too expensive analysis, this inspection only reports if the field has a 'private' modifier or it is defined in a local or anonymous class. A field can be 'final' if: It is 'static' and initialized once in its declaration or in one 'static' initializer. It is non-'static' and initialized once in its declaration, in one instance initializer or in every constructor And it is not modified anywhere else. Example: 'public class Person {\n private String name; // can be final\n\n Person(String name) {\n this.name = name;\n }\n\n public String getName() {\n return name;\n }\n }' After the quick-fix is applied: 'public class Person {\n private final String name;\n\n Person(String name) {\n this.name = name;\n }\n\n public String getName() {\n return name;\n }\n }' Use the \"Annotations\" button to modify the list of annotations that assume implicit field write.",
"markdown": "Reports fields that can be safely made `final`. All `final` fields have a value and this value does not change, which can make the code easier to reason about.\n\nTo avoid too expensive analysis, this inspection only reports if the field has a `private` modifier\nor it is defined in a local or anonymous class.\nA field can be `final` if:\n\n* It is `static` and initialized once in its declaration or in one `static` initializer.\n* It is non-`static` and initialized once in its declaration, in one instance initializer or in every constructor\n\nAnd it is not modified anywhere else.\n\n**Example:**\n\n\n public class Person {\n private String name; // can be final\n\n Person(String name) {\n this.name = name;\n }\n\n public String getName() {\n return name;\n }\n }\n\nAfter the quick-fix is applied:\n\n\n public class Person {\n private final String name;\n\n Person(String name) {\n this.name = name;\n }\n\n public String getName() {\n return name;\n }\n }\n\n\nUse the \"Annotations\" button to modify the list of annotations that assume implicit field write."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FieldMayBeFinal",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PublicStaticArrayField",
"shortDescription": {
"text": "'public static' array field"
},
"fullDescription": {
"text": "Reports 'public' 'static' array fields. Such fields are often used to store arrays of constant values. Still, they represent a security hazard, as their contents may be modified, even if the field is declared 'final'. Example: 'public static String[] allowedPasswords = {\"foo\", \"bar\"};'",
"markdown": "Reports `public` `static` array fields.\n\n\nSuch fields are often used to store arrays of constant values. Still, they represent a security\nhazard, as their contents may be modified, even if the field is declared `final`.\n\n**Example:**\n\n\n public static String[] allowedPasswords = {\"foo\", \"bar\"};\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PublicStaticArrayField",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Security",
"index": 32,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EnumSwitchStatementWhichMissesCases",
"shortDescription": {
"text": "Enum 'switch' statement that misses case"
},
"fullDescription": {
"text": "Reports 'switch' statements over enumerated types that are not exhaustive. Example: 'enum AlphaBetaGamma {\n A, B, C;\n\n void x(AlphaBetaGamma e) {\n switch (e) {\n\n }\n }\n }' After the quick-fix is applied: 'enum AlphaBetaGamma {\n A, B, C;\n\n void x(AlphaBetaGamma e) {\n switch (e) {\n case A -> {}\n case B -> {}\n case C -> {}\n }\n }\n }' Use the Ignore switch statements with a default branch option to ignore 'switch' statements that have a 'default' branch.",
"markdown": "Reports `switch` statements over enumerated types that are not exhaustive.\n\n**Example:**\n\n\n enum AlphaBetaGamma {\n A, B, C;\n\n void x(AlphaBetaGamma e) {\n switch (e) {\n\n }\n }\n }\n\nAfter the quick-fix is applied:\n\n\n enum AlphaBetaGamma {\n A, B, C;\n\n void x(AlphaBetaGamma e) {\n switch (e) {\n case A -> {}\n case B -> {}\n case C -> {}\n }\n }\n }\n\n\nUse the **Ignore switch statements with a default branch** option to ignore `switch`\nstatements that have a `default` branch."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "EnumSwitchStatementWhichMissesCases",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SuspiciousIntegerDivAssignment",
"shortDescription": {
"text": "Suspicious integer division assignment"
},
"fullDescription": {
"text": "Reports assignments whose right side is a division that shouldn't be truncated to integer. While occasionally intended, this construction is often buggy. Example: 'int x = 18;\n x *= 3/2; // doesn't change x because of the integer division result' This code should be replaced with: 'int x = 18;\n x *= 3.0/2;' In the inspection options, you can disable warnings for suspicious but possibly correct divisions, for example, when the dividend can't be calculated statically. 'void calc(int d) {\n int x = 18;\n x *= d/2;\n }' New in 2019.2",
"markdown": "Reports assignments whose right side is a division that shouldn't be truncated to integer.\n\nWhile occasionally intended, this construction is often buggy.\n\n**Example:**\n\n\n int x = 18;\n x *= 3/2; // doesn't change x because of the integer division result\n\n\nThis code should be replaced with:\n\n\n int x = 18;\n x *= 3.0/2;\n\n\nIn the inspection options, you can disable warnings for suspicious but possibly correct divisions,\nfor example, when the dividend can't be calculated statically.\n\n\n void calc(int d) {\n int x = 18;\n x *= d/2;\n }\n\n\nNew in 2019.2"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SuspiciousIntegerDivAssignment",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MethodWithMultipleLoops",
"shortDescription": {
"text": "Method with multiple loops"
},
"fullDescription": {
"text": "Reports methods that contain more than one loop statement. Example: The method below will be reported because it contains two loops: 'void methodWithTwoLoops(int n1, int n2) {\n for (int i = 0; i < n1; i++) {\n System.out.println(i);\n }\n\n int j = 0;\n while (j < n2) {\n System.out.println(j);\n j++;\n }\n }' The following method will also be reported because it contains a nested loop: 'void methodWithNestedLoop(int n1, int n2) {\n for (int i = 0; i < n1; i++) {\n for (int j = 0; j < n2; j++) {\n System.out.println(i + j);\n }\n }\n }'",
"markdown": "Reports methods that contain more than one loop statement.\n\n**Example:**\n\nThe method below will be reported because it contains two loops:\n\n\n void methodWithTwoLoops(int n1, int n2) {\n for (int i = 0; i < n1; i++) {\n System.out.println(i);\n }\n\n int j = 0;\n while (j < n2) {\n System.out.println(j);\n j++;\n }\n }\n\nThe following method will also be reported because it contains a nested loop:\n\n\n void methodWithNestedLoop(int n1, int n2) {\n for (int i = 0; i < n1; i++) {\n for (int j = 0; j < n2; j++) {\n System.out.println(i + j);\n }\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MethodWithMultipleLoops",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Method metrics",
"index": 139,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SleepWhileHoldingLock",
"shortDescription": {
"text": "Call to 'Thread.sleep()' while synchronized"
},
"fullDescription": {
"text": "Reports calls to 'java.lang.Thread.sleep()' methods that occur within a 'synchronized' block or method. 'sleep()' within a 'synchronized' block may result in decreased performance, poor scalability, and possibly even deadlocking. Consider using 'wait()' instead, as it will release the lock held. Example: 'synchronized (lock) {\n Thread.sleep(100);\n }'",
"markdown": "Reports calls to `java.lang.Thread.sleep()` methods that occur within a `synchronized` block or method.\n\n\n`sleep()` within a\n`synchronized` block may result in decreased performance, poor scalability, and possibly\neven deadlocking. Consider using `wait()` instead,\nas it will release the lock held.\n\n**Example:**\n\n\n synchronized (lock) {\n Thread.sleep(100);\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SleepWhileHoldingLock",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DeprecatedClassUsageInspection",
"shortDescription": {
"text": "Deprecated API usage in XML"
},
"fullDescription": {
"text": "Reports usages of deprecated classes and methods in XML files.",
"markdown": "Reports usages of deprecated classes and methods in XML files."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DeprecatedClassUsageInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "XML",
"index": 112,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DuplicateBranchesInSwitch",
"shortDescription": {
"text": "Duplicate branches in 'switch'"
},
"fullDescription": {
"text": "Reports 'switch' statements or expressions that contain the same code in different branches and suggests merging the duplicate branches. Example: 'switch (n) {\n case 1:\n System.out.println(n);\n break;\n case 2:\n System.out.println(n);\n break;\n default:\n System.out.println(\"default\");\n }' After the quick-fix is applied: 'switch (n) {\n case 1:\n case 2:\n System.out.println(n);\n break;\n default:\n System.out.println(\"default\");\n }' New in 2019.1",
"markdown": "Reports `switch` statements or expressions that contain the same code in different branches and suggests merging the duplicate branches.\n\nExample:\n\n\n switch (n) {\n case 1:\n System.out.println(n);\n break;\n case 2:\n System.out.println(n);\n break;\n default:\n System.out.println(\"default\");\n }\n\nAfter the quick-fix is applied:\n\n\n switch (n) {\n case 1:\n case 2:\n System.out.println(n);\n break;\n default:\n System.out.println(\"default\");\n }\n\nNew in 2019.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "DuplicateBranchesInSwitch",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SingleElementAnnotation",
"shortDescription": {
"text": "Non-normalized annotation"
},
"fullDescription": {
"text": "Reports annotations in a shorthand form and suggests rewriting them in a normal form with an attribute name. Example: '@SuppressWarnings(\"foo\")' After the quick-fix is applied: '@SuppressWarnings(value = \"foo\")'",
"markdown": "Reports annotations in a shorthand form and suggests rewriting them in a normal form with an attribute name.\n\nExample:\n\n\n @SuppressWarnings(\"foo\")\n\nAfter the quick-fix is applied:\n\n\n @SuppressWarnings(value = \"foo\")\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "SingleElementAnnotation",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ManualMinMaxCalculation",
"shortDescription": {
"text": "Manual min/max calculation"
},
"fullDescription": {
"text": "Reports cases where the minimum or the maximum of two numbers can be calculated using a 'Math.max()' or 'Math.min()' call, instead of doing it manually. Example: 'public int min(int a, int b) {\n return b < a ? b : a;\n }' After the quick-fix is applied: 'public int min(int a, int b) {\n return Math.min(a, b);\n }' Use the Disable for float and double option to disable this inspection for 'double' and 'float' types. This is useful because the quick-fix may slightly change the semantics for 'float'/ 'double' types when handling 'NaN'. Nevertheless, in most cases this will actually fix a subtle bug where 'NaN' is not taken into account. New in 2019.2",
"markdown": "Reports cases where the minimum or the maximum of two numbers can be calculated using a `Math.max()` or `Math.min()` call, instead of doing it manually.\n\n**Example:**\n\n\n public int min(int a, int b) {\n return b < a ? b : a;\n }\n\nAfter the quick-fix is applied:\n\n\n public int min(int a, int b) {\n return Math.min(a, b);\n }\n\n\nUse the **Disable for float and double** option to disable this inspection for `double` and `float` types.\nThis is useful because the quick-fix may slightly change the semantics for `float`/\n`double` types when handling `NaN`. Nevertheless, in most cases this will actually fix\na subtle bug where `NaN` is not taken into account.\n\nNew in 2019.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ManualMinMaxCalculation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MigrateAssertToMatcherAssert",
"shortDescription": {
"text": "JUnit assertion can be 'assertThat()' call"
},
"fullDescription": {
"text": "Reports calls to 'Assert.assertEquals()', 'Assert.assertTrue()', etc. methods which can be migrated to Hamcrest declarative style 'Assert.assertThat()' calls. For example: 'public class SubstantialTest {\n @Test\n public void testContents(Collection<String> c, String s) {\n Assert.assertTrue(c.contains(s));\n Assert.assertEquals(c, s);\n Assert.assertNotNull(c);\n Assert.assertNull(c);\n Assert.assertFalse(c.contains(s));\n }\n }' A quick-fix is provided to perform the migration: 'public class SubstantialTest {\n @Test\n public void testContents(Collection<String> c, String s) {\n assertThat(c, hasItem(o));\n assertThat(o, is(c));\n assertThat(c, notNullValue());\n assertThat(c, nullValue());\n assertThat(c, not(hasItem(o)));\n }\n }' This inspection requires that the Hamcrest library is available on the classpath. Use the Statically import matcher's methods option to specify if you want the quick-fix to statically import the Hamcrest matcher methods.",
"markdown": "Reports calls to `Assert.assertEquals()`, `Assert.assertTrue()`, etc. methods which can be migrated to Hamcrest declarative style `Assert.assertThat()` calls.\n\nFor example:\n\n\n public class SubstantialTest {\n @Test\n public void testContents(Collection<String> c, String s) {\n Assert.assertTrue(c.contains(s));\n Assert.assertEquals(c, s);\n Assert.assertNotNull(c);\n Assert.assertNull(c);\n Assert.assertFalse(c.contains(s));\n }\n }\n\nA quick-fix is provided to perform the migration:\n\n\n public class SubstantialTest {\n @Test\n public void testContents(Collection<String> c, String s) {\n assertThat(c, hasItem(o));\n assertThat(o, is(c));\n assertThat(c, notNullValue());\n assertThat(c, nullValue());\n assertThat(c, not(hasItem(o)));\n }\n }\n\nThis inspection requires that the Hamcrest library is available on the classpath.\n\nUse the **Statically import matcher's methods** option to specify if you want the quick-fix to statically import the Hamcrest matcher methods."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MigrateAssertToMatcherAssert",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JVM languages/Test frameworks",
"index": 128,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InstanceVariableInitialization",
"shortDescription": {
"text": "Instance field may not be initialized"
},
"fullDescription": {
"text": "Reports instance variables that may be uninitialized upon object initialization. Example: 'class Foo {\n public int bar;\n\n static { }\n }' Note that this inspection uses a very conservative dataflow algorithm and may incorrectly report instance variables as uninitialized. Variables reported as initialized will always be initialized. Use the Ignore primitive fields option to ignore uninitialized primitive fields.",
"markdown": "Reports instance variables that may be uninitialized upon object initialization.\n\n**Example:**\n\n\n class Foo {\n public int bar;\n\n static { }\n }\n\nNote that this inspection uses a very conservative dataflow algorithm and may incorrectly report instance variables as uninitialized. Variables\nreported as initialized will always be initialized.\n\nUse the **Ignore primitive fields** option to ignore uninitialized primitive fields."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "InstanceVariableMayNotBeInitialized",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Initialization",
"index": 26,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ModuleWithTooFewClasses",
"shortDescription": {
"text": "Module with too few classes"
},
"fullDescription": {
"text": "Reports modules that contain too few classes. Overly small modules may indicate a too fragmented design. Java, Kotlin and Groovy classes are counted. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor. Use the Minimum number of classes field to specify the minimum number of classes a module may have.",
"markdown": "Reports modules that contain too few classes. Overly small modules may indicate a too fragmented design. Java, Kotlin and Groovy classes are counted.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor.\n\nUse the **Minimum number of classes** field to specify the minimum number of classes a module may have."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ModuleWithTooFewClasses",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Modularization issues",
"index": 121,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OverloadedVarargsMethod",
"shortDescription": {
"text": "Overloaded varargs method"
},
"fullDescription": {
"text": "Reports varargs methods with the same name as other methods in the class or in a superclass. Overloaded methods that take a variable number of arguments can be very confusing because it is often unclear which overload gets called. Example: 'public void execute(Runnable... r) {} // warning\n public void execute(Runnable r1, Runnable r2) {}' Use the option to ignore overloaded methods whose parameter types are definitely incompatible.",
"markdown": "Reports varargs methods with the same name as other methods in the class or in a superclass. Overloaded methods that take a variable number of arguments can be very confusing because it is often unclear which overload gets called.\n\n**Example:**\n\n\n public void execute(Runnable... r) {} // warning\n public void execute(Runnable r1, Runnable r2) {}\n\n\nUse the option to ignore overloaded methods whose parameter types are definitely incompatible."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OverloadedVarargsMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Naming conventions/Method",
"index": 107,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PublicConstructor",
"shortDescription": {
"text": "'public' constructor can be replaced with factory method"
},
"fullDescription": {
"text": "Reports 'public' constructors. Some coding standards discourage the use of 'public' constructors and recommend 'static' factory methods instead. This way the implementation can be swapped out without affecting the call sites. Example: 'class Test {\n private String name;\n\n public Test(String name) {\n this.name = name;\n }\n\n public void test() {\n System.out.println(name);\n }\n\n public static void main(String[] args) {\n new Test(\"str\").test();\n }\n }' After quick-fix is applied: 'class Test {\n private String name;\n\n private Test(String name) {\n this.name = name;\n }\n\n public static Test getInstance(String name) {\n return new Test(name);\n }\n\n public void test() {\n System.out.println(name);\n }\n\n public static void main(String[] args) {\n getInstance(\"str\").test();\n }\n }'",
"markdown": "Reports `public` constructors.\n\nSome coding standards discourage the use of `public` constructors and recommend\n`static` factory methods instead.\nThis way the implementation can be swapped out without affecting the call sites.\n\n**Example:**\n\n\n class Test {\n private String name;\n\n public Test(String name) {\n this.name = name;\n }\n\n public void test() {\n System.out.println(name);\n }\n\n public static void main(String[] args) {\n new Test(\"str\").test();\n }\n }\n\nAfter quick-fix is applied:\n\n\n class Test {\n private String name;\n\n private Test(String name) {\n this.name = name;\n }\n\n public static Test getInstance(String name) {\n return new Test(name);\n }\n\n public void test() {\n System.out.println(name);\n }\n\n public static void main(String[] args) {\n getInstance(\"str\").test();\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PublicConstructor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SwitchStatementWithTooFewBranches",
"shortDescription": {
"text": "Minimum 'switch' branches"
},
"fullDescription": {
"text": "Reports 'switch' statements and expressions with too few 'case' labels, and suggests rewriting them as 'if' and 'else if' statements. Example (minimum branches == 3): 'switch (expression) {\n case \"foo\" -> foo();\n case \"bar\" -> bar();\n }' After the quick-fix is applied: 'if (\"foo\".equals(expression)) {\n foo();\n } else if (\"bar\".equals(expression)) {\n bar();\n }' Exhaustive switch expressions (Java 14+) or pattern switch statements (Java 17 preview) without the 'default' branch are not reported. That's because compile-time exhaustiveness check will be lost when the 'switch' is converted to 'if' which might be undesired. Configure the inspection: Use the Minimum number of branches field to specify the minimum expected number of 'case' labels. Use the Do not report pattern switch statements option to avoid reporting switch statements and expressions that have pattern branches. E.g.: 'String result = switch(obj) {\n case String str -> str.trim();\n default -> \"none\";\n };' It might be preferred to keep the switch even with a single pattern branch, rather than using the 'instanceof' statement.",
"markdown": "Reports `switch` statements and expressions with too few `case` labels, and suggests rewriting them as `if` and `else if` statements.\n\nExample (minimum branches == 3):\n\n\n switch (expression) {\n case \"foo\" -> foo();\n case \"bar\" -> bar();\n }\n\nAfter the quick-fix is applied:\n\n\n if (\"foo\".equals(expression)) {\n foo();\n } else if (\"bar\".equals(expression)) {\n bar();\n }\n\nExhaustive switch expressions (Java 14+) or pattern switch statements (Java 17 preview) without the 'default' branch are not reported.\nThat's because compile-time exhaustiveness check will be lost when the `switch` is converted to `if`\nwhich might be undesired.\n\nConfigure the inspection:\n\nUse the **Minimum number of branches** field to specify the minimum expected number of `case` labels.\n\nUse the **Do not report pattern switch statements** option to avoid reporting switch statements and expressions that\nhave pattern branches. E.g.:\n\n\n String result = switch(obj) {\n case String str -> str.trim();\n default -> \"none\";\n };\n\nIt might be preferred to keep the switch even with a single pattern branch, rather than using the `instanceof` statement."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SwitchStatementWithTooFewBranches",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NegatedIfElse",
"shortDescription": {
"text": "'if' statement with negated condition"
},
"fullDescription": {
"text": "Reports 'if' statements that contain 'else' branches and whose conditions are negated. Flipping the order of the 'if' and 'else' branches usually increases the clarity of such statements. There is a fix that inverts the current 'if' statement. Example: 'void m(Object o1, Object o2) {\n if (o1 != o2) {\n System.out.println(1);\n }\n else {\n System.out.println(2);\n }\n }' After applying the quick-fix: 'void m(Object o1, Object o2) {\n if (o1 == o2) {\n System.out.println(2);\n } else {\n System.out.println(1);\n }\n }' Use the Ignore '!= null' comparisons option to ignore comparisons of the '!= null' form. Use the Ignore '!= 0' comparisons option to ignore comparisons of the '!= 0' form.",
"markdown": "Reports `if` statements that contain `else` branches and whose conditions are negated.\n\nFlipping the order of the `if` and `else`\nbranches usually increases the clarity of such statements.\n\nThere is a fix that inverts the current `if` statement.\n\nExample:\n\n\n void m(Object o1, Object o2) {\n if (o1 != o2) {\n System.out.println(1);\n }\n else {\n System.out.println(2);\n }\n }\n\nAfter applying the quick-fix:\n\n\n void m(Object o1, Object o2) {\n if (o1 == o2) {\n System.out.println(2);\n } else {\n System.out.println(1);\n }\n }\n\nUse the **Ignore '!= null' comparisons** option to ignore comparisons of the `!= null` form.\n\nUse the **Ignore '!= 0' comparisons** option to ignore comparisons of the `!= 0` form."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "IfStatementWithNegatedCondition",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OverrideOnly",
"shortDescription": {
"text": "Method can only be overridden"
},
"fullDescription": {
"text": "Reports calls to API methods marked with '@ApiStatus.OverrideOnly'. The '@ApiStatus.OverrideOnly' annotation indicates that the method is part of SPI (Service Provider Interface). Clients of the declaring library should implement or override such methods, not call them directly. Marking a class or interface with this annotation is the same as marking every method with it.",
"markdown": "Reports calls to API methods marked with `@ApiStatus.OverrideOnly`.\n\n\nThe `@ApiStatus.OverrideOnly` annotation indicates that the method is part of SPI (Service Provider Interface).\nClients of the declaring library should implement or override such methods, not call them directly.\nMarking a class or interface with this annotation is the same as marking every method with it."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "OverrideOnly",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JVM languages",
"index": 47,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CallToSuspiciousStringMethod",
"shortDescription": {
"text": "Call to suspicious 'String' method"
},
"fullDescription": {
"text": "Reports calls of: 'equals()' 'equalsIgnoreCase()' 'compareTo()' 'compareToIgnoreCase()' and 'trim()' on 'String' objects. Comparison of internationalized strings should probably use a 'java.text.Collator' instead. 'String.trim()' only removes control characters between 0x00 and 0x20. The 'String.strip()' method introduced in Java 11 is more Unicode aware and can be used as a replacement.",
"markdown": "Reports calls of:\n\n* `equals()`\n* `equalsIgnoreCase()`\n* `compareTo()`\n* `compareToIgnoreCase()` and\n* `trim()`\n\n\non `String` objects.\nComparison of internationalized strings should probably use a `java.text.Collator` instead.\n`String.trim()` only removes control characters between 0x00 and 0x20.\nThe `String.strip()` method introduced in Java 11 is more Unicode aware and can be used as a replacement."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CallToSuspiciousStringMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Internationalization",
"index": 110,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryQualifierForThis",
"shortDescription": {
"text": "Unnecessary qualifier for 'this' or 'super'"
},
"fullDescription": {
"text": "Reports unnecessary qualification of 'this' or 'super'. Using a qualifier on 'this' or 'super' to disambiguate a code reference may easily become unnecessary via automatic refactorings and should be deleted for clarity. Example: 'class Foo {\n void foo() {}\n }\n\n class Bar extends Foo {\n void bar() {\n Bar.super.foo();\n }\n }' After the quick-fix is applied: 'class Foo {\n void foo() {}\n }\n\n class Bar extends Foo {\n void bar() {\n super.foo();\n }\n }'",
"markdown": "Reports unnecessary qualification of `this` or `super`.\n\n\nUsing a qualifier on `this` or `super` to\ndisambiguate a code reference may easily become unnecessary via automatic refactorings and should be deleted for clarity.\n\n**Example:**\n\n\n class Foo {\n void foo() {}\n }\n\n class Bar extends Foo {\n void bar() {\n Bar.super.foo();\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class Foo {\n void foo() {}\n }\n\n class Bar extends Foo {\n void bar() {\n super.foo();\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryQualifierForThis",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SizeReplaceableByIsEmpty",
"shortDescription": {
"text": "'size() == 0' can be replaced with 'isEmpty()'"
},
"fullDescription": {
"text": "Reports '.size()' or '.length()' comparisons with a '0' literal that can be replaced with a call to '.isEmpty()'. Example: 'boolean emptyList = list.size() == 0;' After the quick-fix is applied: 'boolean emptyList = list.isEmpty();' Use the Ignored classes table to add classes for which any '.size()' or '.length()' comparisons should not be replaced. Use the Ignore expressions which would be replaced with '!isEmpty()' option to ignore any expressions which would be replaced with '!isEmpty()'.",
"markdown": "Reports `.size()` or `.length()` comparisons with a `0` literal that can be replaced with a call to `.isEmpty()`.\n\n**Example:**\n\n\n boolean emptyList = list.size() == 0;\n\nAfter the quick-fix is applied:\n\n\n boolean emptyList = list.isEmpty();\n \n\nUse the **Ignored classes** table to add classes for which any `.size()` or `.length()` comparisons should not be replaced.\n\nUse the **Ignore expressions which would be replaced with `!isEmpty()`** option to ignore any expressions which would be replaced with `!isEmpty()`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SizeReplaceableByIsEmpty",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnsupportedChronoFieldUnitCall",
"shortDescription": {
"text": "Call methods with unsupported 'java.time.temporal.ChronoUnit' and 'java.time.temporal.ChronoField'"
},
"fullDescription": {
"text": "Reports 'java.time' method calls ('get()', 'getLong()', 'with()', 'plus()', 'minus()') with unsupported 'java.time.temporal.ChronoField' or 'java.time.temporal.ChronoUnit' enum constants as arguments. Such calls will throw a 'UnsupportedTemporalTypeException' at runtime. Example: 'LocalTime localTime = LocalTime.now();\nint year = localTime.get(ChronoField.YEAR);' New in 2023.2",
"markdown": "Reports `java.time` method calls (`get()`, `getLong()`, `with()`, `plus()`, `minus()`) with unsupported `java.time.temporal.ChronoField` or `java.time.temporal.ChronoUnit` enum constants as arguments. Such calls will throw a `UnsupportedTemporalTypeException` at runtime.\n\nExample:\n\n\n LocalTime localTime = LocalTime.now();\n int year = localTime.get(ChronoField.YEAR);\n\nNew in 2023.2"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "UnsupportedChronoFieldUnitCall",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ComparatorNotSerializable",
"shortDescription": {
"text": "'Comparator' class not declared 'Serializable'"
},
"fullDescription": {
"text": "Reports classes that implement 'java.lang.Comparator', but do not implement 'java.io.Serializable'. If a non-serializable comparator is used to construct an ordered collection such as a 'java.util.TreeMap' or 'java.util.TreeSet', then the collection will also be non-serializable. This can result in unexpected and difficult-to-diagnose bugs. Since subclasses of 'java.lang.Comparator' are often stateless, simply marking them serializable is a small cost to avoid such issues. Example: 'class Foo implements Comparator { // warning\n @Override\n public int compare(Object o1, Object o2) {\n /* ... */\n }\n }' After the quick-fix is applied: 'class Foo implements Comparator, Serializable { // no warning here\n @Override\n public int compare(Object o1, Object o2) {\n /* ... */\n }\n }'",
"markdown": "Reports classes that implement `java.lang.Comparator`, but do not implement `java.io.Serializable`.\n\n\nIf a non-serializable comparator is used to construct an ordered collection such\nas a `java.util.TreeMap` or `java.util.TreeSet`, then the\ncollection will also be non-serializable. This can result in unexpected and\ndifficult-to-diagnose bugs.\n\n\nSince subclasses of `java.lang.Comparator` are often stateless,\nsimply marking them serializable is a small cost to avoid such issues.\n\n**Example:**\n\n\n class Foo implements Comparator { // warning\n @Override\n public int compare(Object o1, Object o2) {\n /* ... */\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class Foo implements Comparator, Serializable { // no warning here\n @Override\n public int compare(Object o1, Object o2) {\n /* ... */\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ComparatorNotSerializable",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Serialization issues",
"index": 54,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UNUSED_IMPORT",
"shortDescription": {
"text": "Unused import"
},
"fullDescription": {
"text": "Reports redundant 'import' statements. Regular 'import' statements are unnecessary when not using imported classes and packages in the source file. The same applies to imported 'static' fields and methods that aren't used in the source file. Example: 'import java.util.ArrayList;\n public class Example {\n public static void main(String[] args) {\n System.out.println(\"Hello World!\");\n }\n }' After the quick fix is applied: 'public class Example {\n public static void main(String[] args) {\n System.out.println(\"Hello World!\");\n }\n }'",
"markdown": "Reports redundant `import` statements.\n\nRegular `import` statements are unnecessary when not using imported classes and packages in the source file.\nThe same applies to imported `static` fields and methods that aren't used in the source file.\n\n**Example:**\n\n\n import java.util.ArrayList;\n public class Example {\n public static void main(String[] args) {\n System.out.println(\"Hello World!\");\n }\n }\n\nAfter the quick fix is applied:\n\n\n public class Example {\n public static void main(String[] args) {\n System.out.println(\"Hello World!\");\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UNUSED_IMPORT",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Imports",
"index": 43,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FieldAccessedSynchronizedAndUnsynchronized",
"shortDescription": {
"text": "Field accessed in both 'synchronized' and unsynchronized contexts"
},
"fullDescription": {
"text": "Reports non-final fields that are accessed in both 'synchronized' and non-'synchronized' contexts. 'volatile' fields as well as accesses in constructors and initializers are ignored by this inspection. Such \"partially synchronized\" access is often the result of a coding oversight and may lead to unexpectedly inconsistent data structures. Example: 'public class Program {\n Console console; // warning: Field 'console' is accessed in both synchronized and unsynchronized contexts\n\n public synchronized void execute() {\n console.print(\"running\");\n }\n\n public void check() {\n console.check();\n }\n }'\n Use the option to specify if simple getters and setters are counted as accesses too.",
"markdown": "Reports non-final fields that are accessed in both `synchronized` and non-`synchronized` contexts. `volatile` fields as well as accesses in constructors and initializers are ignored by this inspection.\n\n\nSuch \"partially synchronized\" access is often the result of a coding oversight\nand may lead to unexpectedly inconsistent data structures.\n\n**Example:**\n\n\n public class Program {\n Console console; // warning: Field 'console' is accessed in both synchronized and unsynchronized contexts\n\n public synchronized void execute() {\n console.print(\"running\");\n }\n\n public void check() {\n console.check();\n }\n }\n\n\nUse the option to specify if simple getters and setters are counted as accesses too."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FieldAccessedSynchronizedAndUnsynchronized",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RemoveLiteralUnderscores",
"shortDescription": {
"text": "Underscores in numeric literal"
},
"fullDescription": {
"text": "Reports numeric literals with underscores and suggests removing them with a quick-fix. This may be useful if you need to lower the language level. The quick-fix removes underscores from numeric literals. For example '1_000_000' will be converted to '1000000'. Numeric literals with underscores appeared in Java 7. This inspection can help to downgrade for backward compatibility with earlier Java versions. New in 2020.2",
"markdown": "Reports numeric literals with underscores and suggests removing them with a quick-fix. This may be useful if you need to lower the language level.\n\nThe quick-fix removes underscores from numeric literals. For example `1_000_000` will be converted to `1000000`.\n\n\n*Numeric literals with underscores* appeared in Java 7.\nThis inspection can help to downgrade for backward compatibility with earlier Java versions.\n\nNew in 2020.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RemoveLiteralUnderscores",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues",
"index": 49,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NegatedEqualityExpression",
"shortDescription": {
"text": "Negated equality expression"
},
"fullDescription": {
"text": "Reports equality expressions which are negated by a prefix expression. Such expressions can be simplified using the '!=' operator. Example: '!(i == 1)' After the quick-fix is applied: 'i != 1'",
"markdown": "Reports equality expressions which are negated by a prefix expression.\n\nSuch expressions can be simplified using the `!=` operator.\n\nExample:\n\n\n !(i == 1)\n\nAfter the quick-fix is applied:\n\n\n i != 1\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NegatedEqualityExpression",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StringConcatenationInLoops",
"shortDescription": {
"text": "String concatenation in loop"
},
"fullDescription": {
"text": "Reports String concatenation in loops. As every String concatenation copies the whole string, usually it is preferable to replace it with explicit calls to 'StringBuilder.append()' or 'StringBuffer.append()'. Example: 'String str = \"\";\n for(int i=0; i<10; i++) {\n str += i;\n }' After the quick-fix is applied: 'String str = \"\";\n StringBuilder strBuilder = new StringBuilder(str);\n for(int i = 0; i<10; i++) {\n strBuilder.append(i);\n }\n str = strBuilder.toString();' Sometimes, the quick-fixes allow you to convert a 'String' variable to a 'StringBuilder' or introduce a new 'StringBuilder'. Be careful if the original code specially handles the 'null' value, as the replacement may change semantics. If 'null' is possible, null-safe fixes that generate necessary null-checks are suggested. Also, it's not guaranteed that the automatic replacement will always be more performant.",
"markdown": "Reports String concatenation in loops.\n\n\nAs every String concatenation copies the whole\nstring, usually it is preferable to replace it with explicit calls to `StringBuilder.append()` or\n`StringBuffer.append()`.\n\n**Example:**\n\n\n String str = \"\";\n for(int i=0; i<10; i++) {\n str += i;\n }\n\nAfter the quick-fix is applied:\n\n\n String str = \"\";\n StringBuilder strBuilder = new StringBuilder(str);\n for(int i = 0; i<10; i++) {\n strBuilder.append(i);\n }\n str = strBuilder.toString();\n\n\nSometimes, the quick-fixes allow you to convert a `String` variable to a `StringBuilder` or\nintroduce a new `StringBuilder`. Be careful if the original code specially handles the `null` value, as the\nreplacement may change semantics. If `null` is possible, null-safe fixes that generate\nnecessary null-checks are suggested. Also, it's not guaranteed that the automatic replacement will always be more performant."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "StringConcatenationInLoop",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InconsistentTextBlockIndent",
"shortDescription": {
"text": "Inconsistent whitespace indentation in text block"
},
"fullDescription": {
"text": "Reports text blocks that are indented using both spaces and tabs. Such cases produce unexpected results since spaces and tabs are treated equally by the text block processing. In the following example, spaces and tabs are visualized as '·' and '␉' respectively, and a tab is equal to 4 spaces in the editor. Example: 'String colors = \"\"\"\n········red\n␉ ␉ green\n········blue\"\"\";' After printing such a string, the result will be: '······red\ngreen\n······blue' After the compiler removes an equal amount of spaces or tabs from the beginning of each line, some lines remain with leading spaces. This inspection only reports if the configured language level is 15 or higher. New in 2021.1",
"markdown": "Reports text blocks that are indented using both spaces and tabs. Such cases produce unexpected results since spaces and tabs are treated equally by the text block processing.\n\nIn the following example, spaces and tabs are visualized as `·` and `␉` respectively,\nand a tab is equal to 4 spaces in the editor.\n\n**Example:**\n\n\n String colors = \"\"\"\n ········red\n ␉ ␉ green\n ········blue\"\"\";\n\nAfter printing such a string, the result will be:\n\n\n ······red\n green\n ······blue\n\nAfter the compiler removes an equal amount of spaces or tabs from the beginning of each line,\nsome lines remain with leading spaces.\n\nThis inspection only reports if the configured language level is 15 or higher.\n\nNew in 2021.1"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "InconsistentTextBlockIndent",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PackageWithTooFewClasses",
"shortDescription": {
"text": "Package with too few classes"
},
"fullDescription": {
"text": "Reports packages that contain fewer classes than the specified minimum. Packages which contain subpackages are not reported. Overly small packages may indicate a fragmented design. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor. Use the Minimum number of classes field to specify the minimum allowed number of classes in a package.",
"markdown": "Reports packages that contain fewer classes than the specified minimum.\n\nPackages which contain subpackages are not reported. Overly small packages may indicate a fragmented design.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor.\n\nUse the **Minimum number of classes** field to specify the minimum allowed number of classes in a package."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PackageWithTooFewClasses",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Packaging issues",
"index": 190,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceOnLiteralHasNoEffect",
"shortDescription": {
"text": "Replacement operation has no effect"
},
"fullDescription": {
"text": "Reports calls to the 'String' methods 'replace()', 'replaceAll()' or 'replaceFirst()' that have no effect. Such calls can be guaranteed to have no effect when the qualifier and search string are compile-time constants and the search string is not found in the qualifier. This is redundant and may indicate an error. Example: '// replacement does nothing\n \"hello\".replace(\"$value$\", value);' New in 2022.1",
"markdown": "Reports calls to the `String` methods `replace()`, `replaceAll()` or `replaceFirst()` that have no effect. Such calls can be guaranteed to have no effect when the qualifier and search string are compile-time constants and the search string is not found in the qualifier. This is redundant and may indicate an error.\n\n**Example:**\n\n\n // replacement does nothing\n \"hello\".replace(\"$value$\", value);\n\nNew in 2022.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ReplaceOnLiteralHasNoEffect",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SystemOutErr",
"shortDescription": {
"text": "Use of 'System.out' or 'System.err'"
},
"fullDescription": {
"text": "Reports usages of 'System.out' or 'System.err'. Such statements are often used for temporary debugging and should be either removed from the production code, or replaced by a more robust logging facility.",
"markdown": "Reports usages of `System.out` or `System.err`.\n\nSuch statements are often used for temporary debugging and should be either removed from the production code, or replaced by a more robust\nlogging facility."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UseOfSystemOutOrSystemErr",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code maturity",
"index": 67,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BreakStatement",
"shortDescription": {
"text": "'break' statement"
},
"fullDescription": {
"text": "Reports 'break' statements that are used in places other than at the end of a 'switch' statement branch. 'break' statements complicate refactoring and can be confusing. Example: 'void foo(List<String> strs) {\n for (String str : strs) {\n if (str.contains(\"stop\")) break;\n handleStr(str);\n }\n}'",
"markdown": "Reports `break` statements that are used in places other than at the end of a `switch` statement branch.\n\n`break` statements complicate refactoring and can be confusing.\n\nExample:\n\n\n void foo(List<String> strs) {\n for (String str : strs) {\n if (str.contains(\"stop\")) break;\n handleStr(str);\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "BreakStatement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JDBCExecuteWithNonConstantString",
"shortDescription": {
"text": "Call to 'Statement.execute()' with non-constant string"
},
"fullDescription": {
"text": "Reports calls to 'java.sql.Statement.execute()' or any of its variants which take a dynamically-constructed string as the query to execute. Constructed SQL statements are a common source of security breaches. By default, this inspection ignores compile-time constants. Example: 'ResultSet execute(Statement statement, String name) throws SQLException {\n return statement.executeQuery(\"select * from \" + name); // reports warning\n }' Use the inspection options to consider any 'static' 'final' fields as constant. Be careful, because strings like the following will be ignored when the option is enabled: 'private static final String SQL = \"SELECT * FROM user WHERE name='\" + getUserInput() + \"'\";'",
"markdown": "Reports calls to `java.sql.Statement.execute()` or any of its variants which take a dynamically-constructed string as the query to execute.\n\nConstructed SQL statements are a common source of security breaches.\nBy default, this inspection ignores compile-time constants.\n\n**Example:**\n\n\n ResultSet execute(Statement statement, String name) throws SQLException {\n return statement.executeQuery(\"select * from \" + name); // reports warning\n }\n\n\nUse the inspection options to consider any `static` `final` fields as constant.\nBe careful, because strings like the following will be ignored when the option is enabled:\n\n\n private static final String SQL = \"SELECT * FROM user WHERE name='\" + getUserInput() + \"'\";\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JDBCExecuteWithNonConstantString",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Security",
"index": 32,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NewStringBufferWithCharArgument",
"shortDescription": {
"text": "StringBuilder constructor call with 'char' argument"
},
"fullDescription": {
"text": "Reports calls to 'StringBuffer' and 'StringBuilder' constructors with 'char' as the argument. In this case, 'char' is silently cast to an integer and interpreted as the initial capacity of the buffer. Example: 'new StringBuilder('(').append(\"1\").append(')');' After the quick-fix is applied: 'new StringBuilder(\"(\").append(\"1\").append(')');'",
"markdown": "Reports calls to `StringBuffer` and `StringBuilder` constructors with `char` as the argument. In this case, `char` is silently cast to an integer and interpreted as the initial capacity of the buffer.\n\n**Example:**\n\n\n new StringBuilder('(').append(\"1\").append(')');\n\nAfter the quick-fix is applied:\n\n\n new StringBuilder(\"(\").append(\"1\").append(')');\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "NewStringBufferWithCharArgument",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassGetClass",
"shortDescription": {
"text": "Suspicious 'Class.getClass()' call"
},
"fullDescription": {
"text": "Reports 'getClass()' methods that are called on a 'java.lang.Class' instance. This is usually a mistake as the result is always equivalent to 'Class.class'. If it's a mistake, then it's better to remove the 'getClass()' call and use the qualifier directly. If the behavior is intended, then it's better to write 'Class.class' explicitly to avoid confusion. Example: 'void test(Class<?> clazz) {\n String name = clazz.getClass().getName();\n }' After one of the possible quick-fixes is applied: 'void test(Class<?> clazz) {\n String name = clazz.getName();\n }' New in 2018.2",
"markdown": "Reports `getClass()` methods that are called on a `java.lang.Class` instance.\n\nThis is usually a mistake as the result is always equivalent to `Class.class`.\nIf it's a mistake, then it's better to remove the `getClass()` call and use the qualifier directly.\nIf the behavior is intended, then it's better to write `Class.class` explicitly to avoid confusion.\n\nExample:\n\n\n void test(Class<?> clazz) {\n String name = clazz.getClass().getName();\n }\n\nAfter one of the possible quick-fixes is applied:\n\n\n void test(Class<?> clazz) {\n String name = clazz.getName();\n }\n\nNew in 2018.2"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ClassGetClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MismatchedStringBuilderQueryUpdate",
"shortDescription": {
"text": "Mismatched query and update of 'StringBuilder'"
},
"fullDescription": {
"text": "Reports 'StringBuilder', 'StringBuffer' or 'StringJoiner' objects whose contents are read but not written to, or written to but not read. Such inconsistent reads and writes are pointless and probably indicate dead, incomplete, or erroneous code. Example: 'public void m1() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"a\");\n }'",
"markdown": "Reports `StringBuilder`, `StringBuffer` or `StringJoiner` objects whose contents are read but not written to, or written to but not read.\n\nSuch inconsistent reads and writes are pointless and probably indicate\ndead, incomplete, or erroneous code.\n\n**Example:**\n\n\n public void m1() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"a\");\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "MismatchedQueryAndUpdateOfStringBuilder",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ModuleWithTooManyClasses",
"shortDescription": {
"text": "Module with too many classes"
},
"fullDescription": {
"text": "Reports modules that contain too many classes. Overly large modules may indicate a lack of design clarity. Java, Kotlin and Groovy classes are counted. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor. Use the Maximum number of classes field to specify the maximum number of classes a module may have.",
"markdown": "Reports modules that contain too many classes. Overly large modules may indicate a lack of design clarity. Java, Kotlin and Groovy classes are counted.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor.\n\nUse the **Maximum number of classes** field to specify the maximum number of classes a module may have."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ModuleWithTooManyClasses",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Modularization issues",
"index": 121,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InfiniteLoopStatement",
"shortDescription": {
"text": "Infinite loop statement"
},
"fullDescription": {
"text": "Reports 'for', 'while', or 'do' statements that can only exit by throwing an exception. While such statements may be correct, they often happen due to coding errors. Example: 'for (;;) {\n }' Use the Ignore when placed in Thread.run option to ignore the infinite loop statements inside 'Thread.run'. It may be useful for the daemon threads. Example: 'new Thread(() -> {\n while (true) {\n }\n }).start();'",
"markdown": "Reports `for`, `while`, or `do` statements that can only exit by throwing an exception. While such statements may be correct, they often happen due to coding errors.\n\nExample:\n\n\n for (;;) {\n }\n\n\nUse the **Ignore when placed in Thread.run** option to ignore the\ninfinite loop statements inside `Thread.run`.\nIt may be useful for the daemon threads.\n\nExample:\n\n\n new Thread(() -> {\n while (true) {\n }\n }).start();\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "InfiniteLoopStatement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavadocHtmlLint",
"shortDescription": {
"text": "HTML problems in Javadoc (DocLint)"
},
"fullDescription": {
"text": "Reports the same HTML issues in the Javadoc comments that have been reported by DocLint since Java 8. The inspection detects the following issues: Self-closed, unclosed, unknown, misplaced, or empty tag Unknown or wrong attribute Misplaced text Example: '/**\n * Unknown tag: List<String>\n * Unclosed tag: error</b>\n * Misplaced text or tag: <ul><li>one</li>, <li>two</li></ul>\n * Wrong or empty attribute: <a href=\"\"></a>\n * Self-closed tag: <br/>\n * ...\n */\nvoid sample(){ }'",
"markdown": "Reports the same HTML issues in the Javadoc comments that have been reported by DocLint since Java 8.\n\nThe inspection detects the following issues:\n\n* Self-closed, unclosed, unknown, misplaced, or empty tag\n* Unknown or wrong attribute\n* Misplaced text\n\nExample:\n\n\n /**\n * Unknown tag: List<String>\n * Unclosed tag: error</b>\n * Misplaced text or tag: <ul><li>one</li>, <li>two</li></ul>\n * Wrong or empty attribute: <a href=\"\"></a>\n * Self-closed tag: <br/>\n * ...\n */\n void sample(){ }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "JavadocHtmlLint",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Java/Javadoc",
"index": 95,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassUnconnectedToPackage",
"shortDescription": {
"text": "Class independent of its package"
},
"fullDescription": {
"text": "Reports classes that don't depend on any other class in their package and are not a dependency for any other class in their package. Such classes indicate ad-hoc or incoherent packaging strategies and often may be profitably moved. Classes that are the only class in their package are not reported. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor.",
"markdown": "Reports classes that don't depend on any other class in their package and are not a dependency for any other class in their package. Such classes indicate ad-hoc or incoherent packaging strategies and often may be profitably moved. Classes that are the only class in their package are not reported.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ClassUnconnectedToPackage",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Packaging issues",
"index": 190,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ExceptionNameDoesntEndWithException",
"shortDescription": {
"text": "Exception class name does not end with 'Exception'"
},
"fullDescription": {
"text": "Reports exception classes whose names don't end with 'Exception'. Example: 'class NotStartedEx extends Exception {}' A quick-fix that renames such classes is available only in the editor.",
"markdown": "Reports exception classes whose names don't end with `Exception`.\n\n**Example:** `class NotStartedEx extends Exception {}`\n\nA quick-fix that renames such classes is available only in the editor."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ExceptionClassNameDoesntEndWithException",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Naming conventions/Class",
"index": 172,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonFinalStaticVariableUsedInClassInitialization",
"shortDescription": {
"text": "Non-final static field is used during class initialization"
},
"fullDescription": {
"text": "Reports the use of non-'final' 'static' variables during class initialization. In such cases, the code semantics may become dependent on the class creation order. Additionally, such cases may lead to the use of variables before their initialization, and generally cause difficult and confusing bugs. Example: 'class Foo {\n public static int bar = 0;\n\n static {\n System.out.println(bar);\n }\n }'",
"markdown": "Reports the use of non-`final` `static` variables during class initialization.\n\nIn such cases, the code semantics may become dependent on the class creation order. Additionally, such cases may lead to the use of\nvariables before their initialization, and generally cause difficult and confusing bugs.\n\n**Example:**\n\n\n class Foo {\n public static int bar = 0;\n\n static {\n System.out.println(bar);\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonFinalStaticVariableUsedInClassInitialization",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Initialization",
"index": 26,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantLabeledSwitchRuleCodeBlock",
"shortDescription": {
"text": "Labeled switch rule has redundant code block"
},
"fullDescription": {
"text": "Reports labeled rules of 'switch' statements or 'switch' expressions that have a redundant code block. Example: 'String s = switch (n) {\n case 1 -> { yield Integer.toString(n); }\n default -> \"default\";\n };' After the quick-fix is applied: 'String s = switch (n) {\n case 1 -> Integer.toString(n);\n default -> \"default\";\n };' This inspection only reports if the language level of the project or module is 14 or higher. New in 2019.1",
"markdown": "Reports labeled rules of `switch` statements or `switch` expressions that have a redundant code block.\n\nExample:\n\n\n String s = switch (n) {\n case 1 -> { yield Integer.toString(n); }\n default -> \"default\";\n };\n\nAfter the quick-fix is applied:\n\n\n String s = switch (n) {\n case 1 -> Integer.toString(n);\n default -> \"default\";\n };\n\nThis inspection only reports if the language level of the project or module is 14 or higher.\n\nNew in 2019.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantLabeledSwitchRuleCodeBlock",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IOStreamConstructor",
"shortDescription": {
"text": "'InputStream' and 'OutputStream' can be constructed using 'Files' methods"
},
"fullDescription": {
"text": "Reports 'new FileInputStream()' or 'new FileOutputStream()' expressions that can be replaced with 'Files.newInputStream()' or 'Files.newOutputStream()' calls respectively. The streams created using 'Files' methods are usually more efficient than those created by stream constructors. Example: 'InputStream is = new BufferedInputStream(new FileInputStream(file));' After the quick-fix is applied: 'InputStream is = new BufferedInputStream(Files.newInputStream(file.toPath()));' This inspection does not show warning if the language level 10 or higher, but the quick-fix is still available. This inspection only reports if the language level of the project or module is 7 or higher. New in 2022.1",
"markdown": "Reports `new FileInputStream()` or `new FileOutputStream()` expressions that can be replaced with `Files.newInputStream()` or `Files.newOutputStream()` calls respectively. \nThe streams created using `Files` methods are usually more efficient than those created by stream constructors.\n\nExample:\n\n\n InputStream is = new BufferedInputStream(new FileInputStream(file));\n\nAfter the quick-fix is applied:\n\n\n InputStream is = new BufferedInputStream(Files.newInputStream(file.toPath()));\n\nThis inspection does not show warning if the language level 10 or higher, but the quick-fix is still available.\n\nThis inspection only reports if the language level of the project or module is 7 or higher.\n\nNew in 2022.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "IOStreamConstructor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AssignmentToForLoopParameter",
"shortDescription": {
"text": "Assignment to 'for' loop parameter"
},
"fullDescription": {
"text": "Reports assignment to, or modification of a 'for' loop parameter inside the body of the loop. Although occasionally intended, this construct may be confusing and is often the result of a typo or a wrong variable being used. The quick-fix adds a declaration of a new variable. Example: 'for (String s : list) {\n // Warning: s is changed inside the loop\n s = s.trim();\n System.out.println(\"String: \" + s);\n }' After the quick-fix is applied: 'for (String s : list) {\n String trimmed = s.trim();\n System.out.println(\"String: \" + trimmed);\n }' Assignments in basic 'for' loops without an update statement are not reported. In such cases the assignment is probably intended and can't be easily moved to the update part of the 'for' loop. Example: 'for (int i = 0; i < list.size(); ) {\n if (element.equals(list.get(i))) {\n list.remove(i);\n } else {\n // modification of for loop parameter is not reported\n // as there's no update statement\n i++;\n }\n }' Use the Check enhanced 'for' loop parameters option to specify whether modifications of enhanced 'for' loop parameters should be also reported.",
"markdown": "Reports assignment to, or modification of a `for` loop parameter inside the body of the loop.\n\nAlthough occasionally intended, this construct may be confusing and is often the result of a typo or a wrong variable being used.\n\nThe quick-fix adds a declaration of a new variable.\n\n**Example:**\n\n\n for (String s : list) {\n // Warning: s is changed inside the loop\n s = s.trim();\n System.out.println(\"String: \" + s);\n }\n\nAfter the quick-fix is applied:\n\n\n for (String s : list) {\n String trimmed = s.trim();\n System.out.println(\"String: \" + trimmed);\n }\n\nAssignments in basic `for` loops without an update statement are not reported.\nIn such cases the assignment is probably intended and can't be easily moved to the update part of the `for` loop.\n\n**Example:**\n\n\n for (int i = 0; i < list.size(); ) {\n if (element.equals(list.get(i))) {\n list.remove(i);\n } else {\n // modification of for loop parameter is not reported\n // as there's no update statement\n i++;\n }\n }\n\nUse the **Check enhanced 'for' loop parameters** option to specify whether modifications of enhanced `for` loop parameters\nshould be also reported."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AssignmentToForLoopParameter",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Assignment issues",
"index": 98,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java9CollectionFactory",
"shortDescription": {
"text": "Immutable collection creation can be replaced with collection factory call"
},
"fullDescription": {
"text": "Reports 'java.util.Collections' unmodifiable collection calls that can be converted to newer collection factory methods. These can be replaced with e.g. 'List.of()' or 'Set.of()' introduced in Java 9 or 'List.copyOf()' introduced in Java 10. Note that in contrast to 'java.util.Collections' methods, Java 9 collection factory methods: Do not accept 'null' values. Require unique set elements and map keys. Do not accept 'null' arguments to query methods like 'List.contains()' or 'Map.get()' of the collections returned. When these cases are violated, exceptions are thrown. This can change the semantics of the code after the migration. Example: 'List<Integer> even = Collections.unmodifiableList(\n Arrays.asList(2, 4, 6, 8, 10, 2));\n List<Integer> evenCopy = Collections.unmodifiableList(\n new ArrayList<>(list1));' After the quick-fix is applied: 'List<Integer> even = List.of(2, 4, 6, 8, 10, 2);\n List<Integer> evenCopy = List.copyOf(list);' This inspection only reports if the language level of the project or module is 9 or higher. Use the Do not warn when content is non-constant option to report only in cases when the supplied arguments are compile-time constants. This reduces the chances that the behavior changes, because it's not always possible to statically check whether original elements are unique and not 'null'. Use the Suggest 'Map.ofEntries' option to suggest replacing unmodifiable maps with more than 10 entries with 'Map.ofEntries()'. New in 2017.2",
"markdown": "Reports `java.util.Collections` unmodifiable collection calls that can be converted to newer collection factory methods. These can be replaced with e.g. `List.of()` or `Set.of()` introduced in Java 9 or `List.copyOf()` introduced in Java 10.\n\nNote that in contrast to `java.util.Collections` methods, Java 9 collection factory methods:\n\n* Do not accept `null` values.\n* Require unique set elements and map keys.\n* Do not accept `null` arguments to query methods like `List.contains()` or `Map.get()` of the collections returned.\n\nWhen these cases are violated, exceptions are thrown.\nThis can change the semantics of the code after the migration.\n\nExample:\n\n\n List<Integer> even = Collections.unmodifiableList(\n Arrays.asList(2, 4, 6, 8, 10, 2));\n List<Integer> evenCopy = Collections.unmodifiableList(\n new ArrayList<>(list1));\n\nAfter the quick-fix is applied:\n\n\n List<Integer> even = List.of(2, 4, 6, 8, 10, 2);\n List<Integer> evenCopy = List.copyOf(list);\n\nThis inspection only reports if the language level of the project or module is 9 or higher.\n\n\nUse the **Do not warn when content is non-constant** option to report only in cases when the supplied arguments are compile-time constants.\nThis reduces the chances that the behavior changes,\nbecause it's not always possible to statically check whether original elements are unique and not `null`.\n\n\nUse the **Suggest 'Map.ofEntries'** option to suggest replacing unmodifiable maps with more than 10 entries with `Map.ofEntries()`.\n\nNew in 2017.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "Java9CollectionFactory",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 9",
"index": 205,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MetaAnnotationWithoutRuntimeRetention",
"shortDescription": {
"text": "Test annotation without '@Retention(RUNTIME)' annotation"
},
"fullDescription": {
"text": "Reports annotations with a 'SOURCE' or 'CLASS' retention policy that are supposed to be used by JUnit 5. Such annotations are not available at runtime and most probably their retention policy should be fixed to be accessible through reflection. Note that if the retention policy is not specified, then the default retention policy 'CLASS' is used. Example: '@Testable\n public @interface UnitTest {}' After the quick-fix is applied: '@Retention(RetentionPolicy.RUNTIME)\n @Testable\n public @interface UnitTest {}'",
"markdown": "Reports annotations with a `SOURCE` or `CLASS` retention policy that are supposed to be used by JUnit 5. Such annotations are not available at runtime and most probably their retention policy should be fixed to be accessible through reflection.\n\nNote that if the retention policy is not specified, then the default retention policy `CLASS` is used.\n\n**Example:**\n\n\n @Testable\n public @interface UnitTest {}\n\nAfter the quick-fix is applied:\n\n\n @Retention(RetentionPolicy.RUNTIME)\n @Testable\n public @interface UnitTest {}\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "MetaAnnotationWithoutRuntimeRetention",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/JUnit",
"index": 100,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CStyleArrayDeclaration",
"shortDescription": {
"text": "C-style array declaration"
},
"fullDescription": {
"text": "Reports array declarations written in C-style syntax, where the array brackets are placed after a variable name or after a method parameter list. Most code styles prefer Java-style array declarations, where the array brackets are placed after the type name. Example: 'public String process(String value[])[] {\n return value;\n }' After the quick-fix is applied: 'public String[] process(String[] value) {\n return value;\n }' Configure the inspection: Use the Ignore C-style declarations in variables option to report C-style array declaration of method return types only.",
"markdown": "Reports array declarations written in C-style syntax, where the array brackets are placed after a variable name or after a method parameter list. Most code styles prefer Java-style array declarations, where the array brackets are placed after the type name.\n\n**Example:**\n\n\n public String process(String value[])[] {\n return value;\n }\n\nAfter the quick-fix is applied:\n\n\n public String[] process(String[] value) {\n return value;\n }\n\nConfigure the inspection:\n\n\nUse the **Ignore C-style declarations in variables** option to report C-style array declaration of method return types only."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CStyleArrayDeclaration",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SystemExit",
"shortDescription": {
"text": "Call to 'System.exit()' or related methods"
},
"fullDescription": {
"text": "Reports calls to 'System.exit()', 'Runtime.exit()', and 'Runtime.halt()'. Invoking 'System.exit()' or 'Runtime.exit()' calls the shutdown hooks and terminates the currently running Java virtual machine. Invoking 'Runtime.halt()' forcibly terminates the JVM without causing shutdown hooks to be started. Each of these methods should be used with extreme caution. Calls to these methods make the calling code unportable to most application servers. Use the option to ignore calls in main methods.",
"markdown": "Reports calls to `System.exit()`, `Runtime.exit()`, and `Runtime.halt()`.\n\n\nInvoking `System.exit()` or `Runtime.exit()`\ncalls the shutdown hooks and terminates the currently running Java\nvirtual machine. Invoking `Runtime.halt()` forcibly\nterminates the JVM without causing shutdown hooks to be started.\nEach of these methods should be used with extreme caution. Calls\nto these methods make the calling code unportable to most\napplication servers.\n\n\nUse the option to ignore calls in main methods."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CallToSystemExit",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Portability",
"index": 179,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DeclareCollectionAsInterface",
"shortDescription": {
"text": "Collection declared by class, not interface"
},
"fullDescription": {
"text": "Reports declarations of 'Collection' variables made by using the collection class as a type, rather than an appropriate interface. The warning is not issued if weakening the variable type will cause a compilation error. Example: '// Warning: concrete collection class ArrayList used.\n int getTotalLength(ArrayList<String> list) {\n return list.stream().mapToInt(String::length).sum();\n }\n\n // No warning, as trimToSize() method is not\n // available in the List interface\n void addData(ArrayList<String> data) {\n data.add(\"Hello\");\n data.add(\"World\");\n data.trimToSize();\n }' A quick-fix is suggested to use the appropriate collection interface (e.g. 'Collection', 'Set', or 'List').",
"markdown": "Reports declarations of `Collection` variables made by using the collection class as a type, rather than an appropriate interface. The warning is not issued if weakening the variable type will cause a compilation error.\n\nExample:\n\n\n // Warning: concrete collection class ArrayList used.\n int getTotalLength(ArrayList<String> list) {\n return list.stream().mapToInt(String::length).sum();\n }\n\n // No warning, as trimToSize() method is not\n // available in the List interface\n void addData(ArrayList<String> data) {\n data.add(\"Hello\");\n data.add(\"World\");\n data.trimToSize();\n }\n\nA quick-fix is suggested to use the appropriate collection interface (e.g. `Collection`, `Set`, or `List`)."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CollectionDeclaredAsConcreteClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Abstraction issues",
"index": 83,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TrivialStringConcatenation",
"shortDescription": {
"text": "Concatenation with empty string"
},
"fullDescription": {
"text": "Reports string concatenations where one of the arguments is the empty string. Such a concatenation is unnecessary. Sometimes, it's used as an idiom for converting non-'String' objects or primitives into 'String's, but in this case, it's clearer to use a method like 'String.valueOf'. A quick-fix is suggested to simplify the concatenation. Example: 'void foo(int x, int y) {\n String s = \"\" + x + \" ; \" + y;\n }' After the quick-fix is applied: 'void foo(int x, int y) {\n String s = x + \" ; \" + y;\n }' Use the Report only cases when empty string can be deleted without other changes option to only report cases when empty string can be deleted without conversion other operands with 'String.valueOf'.",
"markdown": "Reports string concatenations where one of the arguments is the empty string. Such a concatenation is unnecessary. Sometimes, it's used as an idiom for converting non-`String` objects or primitives into `String`s, but in this case, it's clearer to use a method like `String.valueOf`.\n\n\nA quick-fix is suggested to simplify the concatenation.\n\n**Example:**\n\n\n void foo(int x, int y) {\n String s = \"\" + x + \" ; \" + y;\n }\n\nAfter the quick-fix is applied:\n\n\n void foo(int x, int y) {\n String s = x + \" ; \" + y;\n }\n\n\nUse the **Report only cases when empty string can be deleted without other changes**\noption to only report cases when empty string can be deleted\nwithout conversion other operands with `String.valueOf`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ConcatenationWithEmptyString",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AutoUnboxing",
"shortDescription": {
"text": "Auto-unboxing"
},
"fullDescription": {
"text": "Reports expressions that are affected by unboxing conversion (automatic unwrapping of objects into primitive values). Try not to use objects instead of primitives. It might significantly affect the performance. Example: 'int x = new Integer(42);' The quick-fix makes the conversion explicit: 'int x = new Integer(42).intValue();' AutoUnboxing appeared in Java 5. This inspection can help to downgrade for backward compatibility with earlier Java versions.",
"markdown": "Reports expressions that are affected by unboxing conversion (automatic unwrapping of objects into primitive values). Try not to use objects instead of primitives. It might significantly affect the performance.\n\n**Example:**\n\n int x = new Integer(42);\n\nThe quick-fix makes the conversion explicit:\n\n int x = new Integer(42).intValue();\n\n\n*AutoUnboxing* appeared in Java 5.\nThis inspection can help to downgrade for backward compatibility with earlier Java versions."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AutoUnboxing",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CallToStringConcatCanBeReplacedByOperator",
"shortDescription": {
"text": "Call to 'String.concat()' can be replaced with '+'"
},
"fullDescription": {
"text": "Reports calls to 'java.lang.String.concat()'. Such calls can be replaced with the '+' operator for clarity and possible increased performance if the method was invoked on a constant with a constant argument. Example: 'String foo(String name) {\n return name.concat(\"foo\");\n }' After the quick-fix is applied: 'String foo(String name) {\n return name + \"foo\";\n }'",
"markdown": "Reports calls to `java.lang.String.concat()`.\n\n\nSuch calls can be replaced with the `+` operator for clarity and possible increased\nperformance if the method was invoked on a constant with a constant argument.\n\n**Example:**\n\n\n String foo(String name) {\n return name.concat(\"foo\");\n }\n\nAfter the quick-fix is applied:\n\n\n String foo(String name) {\n return name + \"foo\";\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CallToStringConcatCanBeReplacedByOperator",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HardcodedFileSeparators",
"shortDescription": {
"text": "Hardcoded file separator"
},
"fullDescription": {
"text": "Reports the forward ('/') or backward ('\\') slash in a string or character literal. These characters are commonly used as file separators, and portability may suffer if they are hardcoded. The inspection will not report backward slashes inside escape sequences and forward slashes immediately following the '<' character or immediately preceding the '>' character, as those often indicate XML or HTML tags rather than file names. Strings representing a 'java.util.TimeZone' ID, strings that are valid regular expressions, or strings that equal IANA-registered MIME media types will not be reported either. Example: 'new File(\"C:\\\\Users\\\\Name\");' Use the option to include 'example/*' in the set of recognized media types. Normally, usage of the 'example/*' MIME media type outside of an example (e.g. in a 'Content-Type' header) is an error.",
"markdown": "Reports the forward (`/`) or backward (`\\`) slash in a string or character literal. These characters are commonly used as file separators, and portability may suffer if they are hardcoded.\n\n\nThe inspection will not report backward slashes inside escape sequences and forward slashes immediately following the '\\<' character\nor immediately preceding the '\\>' character, as those often indicate XML or HTML tags rather than file names.\nStrings representing a `java.util.TimeZone` ID, strings that are valid regular expressions,\nor strings that equal IANA-registered MIME media types will not be reported either.\n\n**Example:**\n\n\n new File(\"C:\\\\Users\\\\Name\");\n\n\nUse the option to include `example/*` in the set of recognized media types.\nNormally, usage of the `example/*` MIME media type outside of an example (e.g. in a `Content-Type`\nheader) is an error."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "HardcodedFileSeparator",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Portability",
"index": 179,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LoggingPlaceholderCountMatchesArgumentCount",
"shortDescription": {
"text": "Number of placeholders does not match number of arguments in logging call"
},
"fullDescription": {
"text": "Reports SLF4J, Log4j2 and akka.event.LoggingAdapter logging calls, such as 'logger.info(\"{}: {}\", key)' where the number of '{}' placeholders in the logger message doesn't match the number of other arguments to the logging call. Use the inspection option to specify which implementation SLF4J uses. If Check automatically is chosen, then 'org.apache.logging.slf4j.Log4jLogger' is searched in the classpath. If this file is founded or Yes is chosen, then cases, when the last parameter with an exception type has a placeholder, will not be reported for SLFJ4 API. For example: '// will not be reported\nlog.error(\"For id {}: {}\", id, new RuntimeException());' This option works only for SLF4J.",
"markdown": "Reports SLF4J, Log4j2 and akka.event.LoggingAdapter logging calls, such as `logger.info(\"{}: {}\", key)` where the number of `{}` placeholders in the logger message doesn't match the number of other arguments to the logging call.\n\n\nUse the inspection option to specify which implementation SLF4J uses.\nIf **Check automatically** is chosen, then `org.apache.logging.slf4j.Log4jLogger` is searched in the classpath.\nIf this file is founded or **Yes** is chosen, then cases, when the last parameter with an exception type has a placeholder, will\nnot be reported for SLFJ4 API.\nFor example:\n\n\n // will not be reported\n log.error(\"For id {}: {}\", id, new RuntimeException());\n\nThis option works only for SLF4J."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "LoggingPlaceholderCountMatchesArgumentCount",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JVM languages/Logging",
"index": 48,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReuseOfLocalVariable",
"shortDescription": {
"text": "Reuse of local variable"
},
"fullDescription": {
"text": "Reports local variables that are \"reused\" overwriting their values with new values unrelated to their original use. Such a local variable reuse may be confusing, as the intended semantics of the local variable may vary with each use. It may also be prone to bugs if due to the code changes, the values that have been considered overwritten actually appear to be alive. It is a good practice to keep variable lifetimes as short as possible, and not to reuse local variables for the sake of brevity. Example: 'void x() {\n String s = \"one\";\n System.out.println(\"s = \" + s);\n s = \"two\"; //reuse of local variable 's'\n System.out.println(\"s = \" + s);\n }'",
"markdown": "Reports local variables that are \"reused\" overwriting their values with new values unrelated to their original use.\n\nSuch a local variable reuse may be confusing,\nas the intended semantics of the local variable may vary with each use. It may also be\nprone to bugs if due to the code changes, the values that have been considered overwritten actually\nappear to be alive. It is a good practice to keep variable lifetimes as short as possible, and not\nto reuse local variables for the sake of brevity.\n\nExample:\n\n\n void x() {\n String s = \"one\";\n System.out.println(\"s = \" + s);\n s = \"two\"; //reuse of local variable 's'\n System.out.println(\"s = \" + s);\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReuseOfLocalVariable",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Data flow",
"index": 61,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SynchronizationOnLocalVariableOrMethodParameter",
"shortDescription": {
"text": "Synchronization on local variable or method parameter"
},
"fullDescription": {
"text": "Reports synchronization on a local variable or parameter. It is very difficult to guarantee correct operation when such synchronization is used. It may be possible to improve such code, for example, by controlling access using a synchronized wrapper class or by synchronizing on a field. Example: 'void bar() {\n final Object lock = new Object();\n synchronized (lock) { }\n }'",
"markdown": "Reports synchronization on a local variable or parameter.\n\n\nIt is very difficult to guarantee correct operation when such synchronization is used.\nIt may be possible to improve such code, for example, by controlling access using a synchronized wrapper class or by synchronizing on a\nfield.\n\n**Example:**\n\n\n void bar() {\n final Object lock = new Object();\n synchronized (lock) { }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SynchronizationOnLocalVariableOrMethodParameter",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NegatedConditionalExpression",
"shortDescription": {
"text": "Negated conditional expression"
},
"fullDescription": {
"text": "Reports conditional expressions which are negated with a prefix expression, as such constructions may be confusing. There is a fix that propagates the outer negation to both branches. Example: '!(i == 1 ? a : b)' After the quick-fix is applied: 'i == 1 ? !a : !b'",
"markdown": "Reports conditional expressions which are negated with a prefix expression, as such constructions may be confusing.\n\nThere is a fix that propagates the outer negation to both branches.\n\nExample:\n\n\n !(i == 1 ? a : b)\n\nAfter the quick-fix is applied:\n\n\n i == 1 ? !a : !b\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NegatedConditionalExpression",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SuspiciousSystemArraycopy",
"shortDescription": {
"text": "Suspicious 'System.arraycopy()' call"
},
"fullDescription": {
"text": "Reports suspicious calls to 'System.arraycopy()'. Such calls are suspicious when: the source or destination is not of an array type the source and destination are of different types the copied chunk length is greater than 'src.length - srcPos' the copied chunk length is greater than 'dest.length - destPos' the ranges always intersect when the source and destination are the same array Example: 'void foo() {\n int[] src = new int[] { 1, 2, 3, 4 };\n System.arraycopy(src, 0, src, 1, 2); // warning: Copying to the same array with intersecting ranges\n }'",
"markdown": "Reports suspicious calls to `System.arraycopy()`.\n\nSuch calls are suspicious when:\n\n* the source or destination is not of an array type\n* the source and destination are of different types\n* the copied chunk length is greater than `src.length - srcPos`\n* the copied chunk length is greater than `dest.length - destPos`\n* the ranges always intersect when the source and destination are the same array\n\n**Example:**\n\n\n void foo() {\n int[] src = new int[] { 1, 2, 3, 4 };\n System.arraycopy(src, 0, src, 1, 2); // warning: Copying to the same array with intersecting ranges\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SuspiciousSystemArraycopy",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantLambdaParameterType",
"shortDescription": {
"text": "Redundant lambda parameter types"
},
"fullDescription": {
"text": "Reports lambda formal parameter types that are redundant because they can be inferred from the context. Example: 'Map<String, Integer> map = ...\n map.forEach((String s, Integer i) -> log.info(s + \"=\" + i));' The quick-fix removes the parameter types from the lambda. 'Map<String, Integer> map = ...\n map.forEach((s, i) -> log.info(s + \"=\" + i));'",
"markdown": "Reports lambda formal parameter types that are redundant because they can be inferred from the context.\n\n**Example:**\n\n\n Map<String, Integer> map = ...\n map.forEach((String s, Integer i) -> log.info(s + \"=\" + i));\n\nThe quick-fix removes the parameter types from the lambda.\n\n\n Map<String, Integer> map = ...\n map.forEach((s, i) -> log.info(s + \"=\" + i));\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RedundantLambdaParameterType",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Declaration redundancy",
"index": 10,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConditionalExpression",
"shortDescription": {
"text": "Conditional expression"
},
"fullDescription": {
"text": "Reports usages of the ternary condition operator and suggests converting them to 'if'/'else' statements. Some code standards prohibit the use of the condition operator. Example: 'Object result = (condition) ? foo() : bar();' After the quick-fix is applied: 'Object result;\n if (condition) {\n comp = foo();\n }\n else {\n comp = bar();\n }' Configure the inspection: Use the Ignore for simple assignments and returns option to ignore simple assignments and returns and allow the following constructs: 'String s = (foo == null) ? \"\" : foo.toString();' Use the Ignore places where an if statement is not possible option to ignore conditional expressions in contexts in which automatic replacement with an if statement is not possible (for example, when the conditional expression is used as an argument to a 'super()' constructor call).",
"markdown": "Reports usages of the ternary condition operator and suggests converting them to `if`/`else` statements.\n\nSome code standards prohibit the use of the condition operator.\n\nExample:\n\n\n Object result = (condition) ? foo() : bar();\n\nAfter the quick-fix is applied:\n\n\n Object result;\n if (condition) {\n comp = foo();\n }\n else {\n comp = bar();\n }\n\nConfigure the inspection:\n\nUse the **Ignore for simple assignments and returns** option to ignore simple assignments and returns and allow the following constructs:\n\n\n String s = (foo == null) ? \"\" : foo.toString();\n\n\nUse the **Ignore places where an if statement is not possible** option to ignore conditional expressions in contexts in which automatic\nreplacement with an if statement is not possible (for example, when the conditional expression is used as an argument to a\n`super()` constructor call)."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ConditionalExpression",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UseOfClone",
"shortDescription": {
"text": "Use of 'clone()' or 'Cloneable'"
},
"fullDescription": {
"text": "Reports implementations of, and calls to, the 'clone()' method and uses of the 'java.lang.Cloneable' interface. Some coding standards prohibit the use of 'clone()', and recommend using a copy constructor or a 'static' factory method instead. The inspection ignores calls to 'clone()' on arrays because it's a correct and compact way to copy an array. Example: 'class Copy implements Cloneable /*warning*/ {\n\n public Copy clone() /*warning*/ {\n try {\n return (Copy) super.clone(); // warning\n } catch (CloneNotSupportedException e) {\n throw new AssertionError();\n }\n }\n }'",
"markdown": "Reports implementations of, and calls to, the `clone()` method and uses of the `java.lang.Cloneable` interface.\n\nSome coding standards prohibit the use of `clone()`, and recommend using a copy constructor or\na `static` factory method instead.\n\nThe inspection ignores calls to `clone()` on arrays because it's a correct and compact way to copy an array.\n\n**Example:**\n\n\n class Copy implements Cloneable /*warning*/ {\n\n public Copy clone() /*warning*/ {\n try {\n return (Copy) super.clone(); // warning\n } catch (CloneNotSupportedException e) {\n throw new AssertionError();\n }\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UseOfClone",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Cloning issues",
"index": 140,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NestedTryStatement",
"shortDescription": {
"text": "Nested 'try' statement"
},
"fullDescription": {
"text": "Reports nested 'try' statements. Nested 'try' statements may result in unclear code and should probably have their 'catch' and 'finally' sections merged.",
"markdown": "Reports nested `try` statements.\n\nNested `try` statements\nmay result in unclear code and should probably have their `catch` and `finally` sections\nmerged."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NestedTryStatement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Error handling",
"index": 9,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConditionalExpressionWithIdenticalBranches",
"shortDescription": {
"text": "Conditional expression with identical branches"
},
"fullDescription": {
"text": "Reports conditional expressions with identical 'then' and 'else' branches. Such expressions almost certainly indicate bugs. The inspection provides a fix that collapses conditional expressions. Example: 'int y = x == 10 ? 4 : 4;' After the quick-fix is applied: 'int y = 4;'",
"markdown": "Reports conditional expressions with identical `then` and `else` branches.\n\nSuch expressions almost certainly indicate bugs. The inspection provides a fix that collapses conditional expressions.\n\nExample:\n\n\n int y = x == 10 ? 4 : 4;\n\nAfter the quick-fix is applied:\n\n\n int y = 4;\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ConditionalExpressionWithIdenticalBranches",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OnlyOneElementUsed",
"shortDescription": {
"text": "Only one element is used"
},
"fullDescription": {
"text": "Reports lists, arrays, and strings where exactly one element is queried right upon the creation. Such expressions may appear after refactoring and usually could be replaced with an accessed element. Example: 'System.out.println(new int[] {1,2,3,4,5}[2]);' After the quick-fix is applied: 'System.out.println(3);' New in 2022.3",
"markdown": "Reports lists, arrays, and strings where exactly one element is queried right upon the creation. Such expressions may appear after refactoring and usually could be replaced with an accessed element.\n\nExample:\n\n\n System.out.println(new int[] {1,2,3,4,5}[2]);\n\nAfter the quick-fix is applied:\n\n\n System.out.println(3);\n\nNew in 2022.3"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OnlyOneElementUsed",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BadExceptionThrown",
"shortDescription": {
"text": "Prohibited exception thrown"
},
"fullDescription": {
"text": "Reports 'throw' statements that throw an inappropriate exception. For example an exception can be inappropriate because it is overly generic, such as 'java.lang.Exception' or 'java.io.IOException'. Example: 'void setup(Mode mode) {\n if (mode == null)\n throw new RuntimeException(\"Problem during setup\"); // warning: Prohibited exception 'RuntimeException' thrown\n ...\n }' Use the Prohibited exceptions list to specify which exceptions should be reported.",
"markdown": "Reports `throw` statements that throw an inappropriate exception. For example an exception can be inappropriate because it is overly generic, such as `java.lang.Exception` or `java.io.IOException`.\n\n**Example:**\n\n\n void setup(Mode mode) {\n if (mode == null)\n throw new RuntimeException(\"Problem during setup\"); // warning: Prohibited exception 'RuntimeException' thrown\n ...\n }\n\nUse the **Prohibited exceptions** list to specify which exceptions should be reported."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ProhibitedExceptionThrown",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Error handling",
"index": 9,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TestCaseWithNoTestMethods",
"shortDescription": {
"text": "Test class with no tests"
},
"fullDescription": {
"text": "Reports non-'abstract' test cases without any test methods. Such test cases usually indicate unfinished code or could be a refactoring leftover that should be removed. Example: 'public class CrucialTest {\n @Before\n public void setUp() {\n System.out.println(\"setting up\");\n }\n }' Use the Ignore test cases which have superclasses with test methods option to ignore test cases which have super classes with test methods.",
"markdown": "Reports non-`abstract` test cases without any test methods.\n\nSuch test cases usually indicate unfinished code\nor could be a refactoring leftover that should be removed.\n\nExample:\n\n\n public class CrucialTest {\n @Before\n public void setUp() {\n System.out.println(\"setting up\");\n }\n }\n\nUse the **Ignore test cases which have superclasses with test methods** option to ignore test cases which have super classes\nwith test methods."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JUnitTestCaseWithNoTests",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/JUnit",
"index": 100,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessarilyQualifiedStaticUsage",
"shortDescription": {
"text": "Unnecessarily qualified static access"
},
"fullDescription": {
"text": "Reports usages of static members qualified with the class name. Such qualification is unnecessary and may be safely removed. Example: 'class Foo {\n static void foo() {}\n static int x;\n\n void bar() {\n Foo.foo();\n System.out.println(Foo.x);\n }\n\n static void baz() { Foo.foo(); }\n }' After the quick-fix is applied: 'class Foo {\n static void foo() {}\n static int x;\n\n void bar() {\n foo();\n System.out.println(x);\n }\n\n static void baz() { foo(); }\n }' Use the inspection options to toggle the reporting for: Static fields access: 'void bar() { System.out.println(Foo.x); }' Calls to static methods: 'void bar() { Foo.foo(); }' Also, you can configure the inspection to only report static member usage in a static context. In this case, only 'static void baz() { Foo.foo(); }' will be reported.",
"markdown": "Reports usages of static members qualified with the class name.\n\n\nSuch qualification is unnecessary and may be safely removed.\n\n**Example:**\n\n\n class Foo {\n static void foo() {}\n static int x;\n\n void bar() {\n Foo.foo();\n System.out.println(Foo.x);\n }\n\n static void baz() { Foo.foo(); }\n }\n\nAfter the quick-fix is applied:\n\n\n class Foo {\n static void foo() {}\n static int x;\n\n void bar() {\n foo();\n System.out.println(x);\n }\n\n static void baz() { foo(); }\n }\n\n\nUse the inspection options to toggle the reporting for:\n\n* Static fields access: \n `void bar() { System.out.println(Foo.x); }`\n\n* Calls to static methods: \n `void bar() { Foo.foo(); }`\n\n\nAlso, you can configure the inspection to only report static member usage\nin a static context. In this case, only `static void baz() { Foo.foo(); }` will be reported."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessarilyQualifiedStaticUsage",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TryStatementWithMultipleResources",
"shortDescription": {
"text": "'try' statement with multiple resources can be split"
},
"fullDescription": {
"text": "Reports 'try' statements with multiple resources that can be automatically split into multiple try-with-resources statements. This conversion can be useful for further refactoring (for example, for extracting the nested 'try' statement into a separate method). Example: 'try (FileInputStream in = new FileInputStream(\"in.txt\");\n FileOutputStream out = new FileOutputStream(\"out.txt\")) {\n /*read and write*/\n }' After the quick-fix is applied: 'try (FileInputStream in = new FileInputStream(\"in.txt\")) {\n try (FileOutputStream out = new FileOutputStream(\"out.txt\")) {\n /*read and write*/\n }\n }'",
"markdown": "Reports `try` statements with multiple resources that can be automatically split into multiple try-with-resources statements.\n\nThis conversion can be useful for further refactoring\n(for example, for extracting the nested `try` statement into a separate method).\n\nExample:\n\n\n try (FileInputStream in = new FileInputStream(\"in.txt\");\n FileOutputStream out = new FileOutputStream(\"out.txt\")) {\n /*read and write*/\n }\n\nAfter the quick-fix is applied:\n\n\n try (FileInputStream in = new FileInputStream(\"in.txt\")) {\n try (FileOutputStream out = new FileOutputStream(\"out.txt\")) {\n /*read and write*/\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "TryStatementWithMultipleResources",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TypeMayBeWeakened",
"shortDescription": {
"text": "Type may be weakened"
},
"fullDescription": {
"text": "Reports variable and method return types that can be changed to a more abstract (weaker) type. This allows making the code more abstract, hence more reusable. Example: '// Type of parameter can be weakened to java.util.List\n void processList(ArrayList<String> list) {\n if (list.isEmpty()) return;\n System.out.println(\"Processing\");\n for (String s : list) {\n System.out.println(\"String: \" + s);\n }\n }' Enable the Use righthand type checkbox below to prevent weakening the left side of assignments when the right side is not a type cast or a new expression. When storing the result of a method call in a variable, it is useful to retain the type of the method call result instead of unnecessarily weakening it. Enable the Use parameterized type checkbox below to use the parameterized type of the collection as the weakest type when the object evaluated is used as an argument to a collection method with a parameter type of 'java.lang.Object'. Use this option to prevent weakening to 'Object' when passing an object to the following collection methods: 'get()', 'remove()', 'contains()', 'indexOf()', 'lastIndexOf()', 'containsKey()' and 'containsValue()'. Enable the Do not weaken to Object checkbox below to specify whether a type should be weakened to 'java.lang.Object'. Weakening to 'java.lang.Object' is rarely very useful. Enable the Only weaken to an interface checkbox below to only report a problem when the type can be weakened to an interface type. Enable the Do not weaken return type checkbox below to prevent reporting a problem when the return type may be weakened. Only variables will be analyzed. Enable the Do not suggest weakening variable declared as 'var' checkbox below to prevent reporting on local variables declared using the 'var' keyword (Java 10+) Stop classes are intended to prevent weakening to classes lower than stop classes, even if it is possible. In some cases, this may improve readability.",
"markdown": "Reports variable and method return types that can be changed to a more abstract (weaker) type. This allows making the code more abstract, hence more reusable.\n\nExample:\n\n\n // Type of parameter can be weakened to java.util.List\n void processList(ArrayList<String> list) {\n if (list.isEmpty()) return;\n System.out.println(\"Processing\");\n for (String s : list) {\n System.out.println(\"String: \" + s);\n }\n }\n\n\nEnable the **Use righthand type** checkbox below\nto prevent weakening the left side of assignments when the right side is not\na type cast or a new expression. When storing the result of a method call in a variable, it is\nuseful to retain the type of the method call result instead of unnecessarily weakening it.\n\n\nEnable the **Use parameterized type** checkbox below\nto use the parameterized type of the collection as the weakest type when\nthe object evaluated is used as an argument to a collection method with a parameter type of\n`java.lang.Object`.\nUse this option to prevent weakening to `Object` when passing an object to the following collection methods:\n`get()`, `remove()`,\n`contains()`, `indexOf()`,\n`lastIndexOf()`, `containsKey()` and `containsValue()`.\n\n\nEnable the **Do not weaken to Object** checkbox below\nto specify whether a type should be weakened to `java.lang.Object`.\nWeakening to `java.lang.Object` is rarely very useful.\n\n\nEnable the **Only weaken to an interface** checkbox below\nto only report a problem when the type can be weakened to an interface type.\n\n\nEnable the **Do not weaken return type** checkbox below\nto prevent reporting a problem when the return type may be weakened.\nOnly variables will be analyzed.\n\n\nEnable the **Do not suggest weakening variable declared as 'var'** checkbox below\nto prevent reporting on local variables declared using the 'var' keyword (Java 10+)\n\n\n**Stop classes** are intended to prevent weakening to classes\nlower than stop classes, even if it is possible.\nIn some cases, this may improve readability."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "TypeMayBeWeakened",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Abstraction issues",
"index": 83,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CloneableImplementsClone",
"shortDescription": {
"text": "Cloneable class without 'clone()' method"
},
"fullDescription": {
"text": "Reports classes implementing the 'Cloneable' interface that don't override the 'clone()' method. Such classes use the default implementation of 'clone()', which isn't 'public' but 'protected', and which does not copy the mutable state of the class. A quick-fix is available to generate a basic 'clone()' method, which can be used as a basis for a properly functioning 'clone()' method expected from a 'Cloneable' class. Example: 'public class Data implements Cloneable {\n private String[] names;\n }' After the quick-fix is applied: 'public class Data implements Cloneable {\n private String[] names;\n\n @Override\n public Data clone() {\n try {\n Data clone = (Data) super.clone();\n // TODO: copy mutable state here, so the clone can't change the internals of the original\n return clone;\n } catch (CloneNotSupportedException e) {\n throw new AssertionError();\n }\n }\n }' Use the Ignore classes cloneable due to inheritance option to ignore classes that are 'Cloneable' because they inherit from the 'Cloneable' class. Use the Ignore when Cloneable is necessary to call clone() method of super class option to ignore classes that require implementing 'Cloneable' because they call the 'clone()' method from a superclass.",
"markdown": "Reports classes implementing the `Cloneable` interface that don't override the `clone()` method.\n\nSuch classes use the default implementation of `clone()`,\nwhich isn't `public` but `protected`, and which does not copy the mutable state of the class.\n\nA quick-fix is available to generate a basic `clone()` method,\nwhich can be used as a basis for a properly functioning `clone()` method\nexpected from a `Cloneable` class.\n\n**Example:**\n\n\n public class Data implements Cloneable {\n private String[] names;\n }\n\nAfter the quick-fix is applied:\n\n\n public class Data implements Cloneable {\n private String[] names;\n\n @Override\n public Data clone() {\n try {\n Data clone = (Data) super.clone();\n // TODO: copy mutable state here, so the clone can't change the internals of the original\n return clone;\n } catch (CloneNotSupportedException e) {\n throw new AssertionError();\n }\n }\n }\n\nUse the **Ignore classes cloneable due to inheritance** option to ignore classes that are\n`Cloneable` because they inherit from the `Cloneable` class.\n\nUse the **Ignore when Cloneable is necessary to call clone() method of super class**\noption to ignore classes that require implementing `Cloneable` because they call the `clone()` method from a superclass."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "CloneableClassWithoutClone",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Cloning issues",
"index": 140,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OctalAndDecimalIntegersMixed",
"shortDescription": {
"text": "Octal and decimal integers in same array"
},
"fullDescription": {
"text": "Reports mixed octal and decimal integer literals in a single array initializer. This situation might happen when you copy a list of numbers into an array initializer. Some numbers in the array might be zero-padded and the compiler will interpret them as octal. Example: 'int[] elapsed = {1, 13, 052};' After the quick-fix that removes a leading zero is applied: 'int[] elapsed = {1, 13, 52};' If it is an octal number (for example, after a variable inline), then you can use another quick-fix that converts octal to decimal: 'int[] elapsed = {1, 13, 42};'",
"markdown": "Reports mixed octal and decimal integer literals in a single array initializer. This situation might happen when you copy a list of numbers into an array initializer. Some numbers in the array might be zero-padded and the compiler will interpret them as octal.\n\n**Example:**\n\n int[] elapsed = {1, 13, 052};\n\nAfter the quick-fix that removes a leading zero is applied:\n\n int[] elapsed = {1, 13, 52};\n\nIf it is an octal number (for example, after a variable inline), then you can use another quick-fix that converts octal to decimal:\n`int[] elapsed = {1, 13, 42};`"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OctalAndDecimalIntegersInSameArray",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues",
"index": 49,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Deprecation",
"shortDescription": {
"text": "Deprecated API usage"
},
"fullDescription": {
"text": "Reports usages of deprecated classes, fields, and methods. A quick-fix is available to automatically convert the deprecated usage, when the necessary information can be extracted from the Javadoc of the deprecated member. Example: 'class Interesting {\n\n /**\n * @deprecated Use {@link #newHotness()} instead\n */\n @Deprecated\n public void oldAndBusted() {}\n\n public void newHotness() {}\n }\n class ElseWhere {\n void x(Interesting i) {\n i.oldAndBusted(); // deprecated warning here\n }\n }' After the quick-fix is applied: 'class Interesting {\n\n /**\n * @deprecated Use {@link #newHotness()} instead\n */\n @Deprecated\n public void oldAndBusted() {}\n\n public void newHotness() {}\n }\n class ElseWhere {\n void x(Interesting i) {\n i.newHotness();\n }\n }' By default, the inspection doesn't produce a warning if it's impossible or hard to avoid it. For example, the following code won't be reported: 'abstract class A { //library code\n @Deprecated\n abstract void m();\n }\n class B extends A { //project code\n @Override\n void m() {\n //doSmth;\n }\n }' Configure the inspection: Use the options to disable this inspection inside deprecated members, overrides of abstract deprecated methods, non-static import statements, methods of deprecated classes, or same top-level classes.",
"markdown": "Reports usages of deprecated classes, fields, and methods. A quick-fix is available to automatically convert the deprecated usage, when the necessary information can be extracted from the Javadoc of the deprecated member.\n\n**Example:**\n\n\n class Interesting {\n\n /**\n * @deprecated Use {@link #newHotness()} instead\n */\n @Deprecated\n public void oldAndBusted() {}\n\n public void newHotness() {}\n }\n class ElseWhere {\n void x(Interesting i) {\n i.oldAndBusted(); // deprecated warning here\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class Interesting {\n\n /**\n * @deprecated Use {@link #newHotness()} instead\n */\n @Deprecated\n public void oldAndBusted() {}\n\n public void newHotness() {}\n }\n class ElseWhere {\n void x(Interesting i) {\n i.newHotness();\n }\n }\n\nBy default, the inspection doesn't produce a warning if it's impossible or hard to avoid it. For example,\nthe following code won't be reported:\n\n\n abstract class A { //library code\n @Deprecated\n abstract void m();\n }\n class B extends A { //project code\n @Override\n void m() {\n //doSmth;\n }\n }\n\nConfigure the inspection:\n\n\nUse the options to disable this inspection inside deprecated members,\noverrides of abstract deprecated methods, non-static import statements, methods of deprecated classes, or same top-level classes."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "deprecation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code maturity",
"index": 67,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LambdaParameterTypeCanBeSpecified",
"shortDescription": {
"text": "Lambda parameter type can be specified"
},
"fullDescription": {
"text": "Reports lambda parameters that do not have their type specified and suggests adding the missing type declarations. Example: 'Function<String, Integer> length = a -> a.length();' After the quick-fix is applied: 'Function<String, Integer> length = (String a) -> a.length();' This inspection only reports if the language level of the project or module is 8 or higher.",
"markdown": "Reports lambda parameters that do not have their type specified and suggests adding the missing type declarations.\n\nExample:\n\n\n Function<String, Integer> length = a -> a.length();\n\nAfter the quick-fix is applied:\n\n\n Function<String, Integer> length = (String a) -> a.length();\n\nThis inspection only reports if the language level of the project or module is 8 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "LambdaParameterTypeCanBeSpecified",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TextLabelInSwitchStatement",
"shortDescription": {
"text": "Text label in 'switch' statement"
},
"fullDescription": {
"text": "Reports labeled statements inside of 'switch' statements. While occasionally intended, this construction is often the result of a typo. Example: 'switch (x) {\n case 1:\n case2: //warning: Text label 'case2:' in 'switch' statement\n case 3:\n break;\n }'",
"markdown": "Reports labeled statements inside of `switch` statements. While occasionally intended, this construction is often the result of a typo.\n\n**Example:**\n\n\n switch (x) {\n case 1:\n case2: //warning: Text label 'case2:' in 'switch' statement\n case 3:\n break;\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "TextLabelInSwitchStatement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PackageVisibleInnerClass",
"shortDescription": {
"text": "Package-visible nested class"
},
"fullDescription": {
"text": "Reports nested classes that are declared without any access modifier (also known as package-private). Example: 'public class Outer {\n static class Nested {} // warning\n class Inner {} // warning\n enum Mode {} // warning depends on the setting\n interface I {} // warning depends on the setting\n }' Configure the inspection: Use the Ignore package-visible inner enums option to ignore package-private inner enums. Use the Ignore package-visible inner interfaces option to ignore package-private inner interfaces.",
"markdown": "Reports nested classes that are declared without any access modifier (also known as package-private).\n\n**Example:**\n\n\n public class Outer {\n static class Nested {} // warning\n class Inner {} // warning\n enum Mode {} // warning depends on the setting\n interface I {} // warning depends on the setting\n }\n\nConfigure the inspection:\n\n* Use the **Ignore package-visible inner enums** option to ignore package-private inner enums.\n* Use the **Ignore package-visible inner interfaces** option to ignore package-private inner interfaces."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PackageVisibleInnerClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Encapsulation",
"index": 211,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EscapedSpace",
"shortDescription": {
"text": "Non-terminal use of '\\s' escape sequence"
},
"fullDescription": {
"text": "Reports uses of '\"\\s\"' escape sequence anywhere except text-block line endings or within series of several spaces. The '\"\\s\"' escape sequence is intended to encode a space at the end of text-block lines where normal spaces are trimmed. In other locations, as well as in regular string literals, '\"\\s\"' is identical to an ordinary space character ('\" \"'). Use of '\"\\s\"' is confusing and can be a mistake, especially if the string is interpreted as a regular expression. Example: 'if (str.matches(\"\\s+\")) {...}' Here it's likely that '\"\\\\s+\"' was intended (to match any whitespace character). If not, using 'str.matches(\" +\")' would be less confusing. The quick-fix is provided that simply replaces '\\s' with a space character. This inspection reports only if the language level of the project or module is 15 or higher. New in 2022.3",
"markdown": "Reports uses of `\"\\s\"` escape sequence anywhere except text-block line endings or within series of several spaces. The `\"\\s\"` escape sequence is intended to encode a space at the end of text-block lines where normal spaces are trimmed. In other locations, as well as in regular string literals, `\"\\s\"` is identical to an ordinary space character (`\" \"`). Use of `\"\\s\"` is confusing and can be a mistake, especially if the string is interpreted as a regular expression.\n\n**Example:**\n\n\n if (str.matches(\"\\s+\")) {...}\n\nHere it's likely that `\"\\\\s+\"` was intended (to match any whitespace character). If not, using `str.matches(\" +\")` would be less confusing.\n\n\nThe quick-fix is provided that simply replaces `\\s` with a space character.\n\nThis inspection reports only if the language level of the project or module is 15 or higher.\n\nNew in 2022.3"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EscapedSpace",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MisorderedAssertEqualsArguments",
"shortDescription": {
"text": "Misordered 'assertEquals()' arguments"
},
"fullDescription": {
"text": "Reports calls to 'assertEquals()' that have the expected argument and the actual argument in the wrong order. For JUnit 3, 4, and 5 the correct order is '(expected, actual)'. For TestNG the correct order is '(actual, expected)'. Such calls will behave fine for assertions that pass, but may give confusing error reports on failure. Use the quick-fix to flip the order of the arguments. Example (JUnit): 'assertEquals(actual, expected)' After the quick-fix is applied: 'assertEquals(expected, actual)'",
"markdown": "Reports calls to `assertEquals()` that have the expected argument and the actual argument in the wrong order.\n\n\nFor JUnit 3, 4, and 5 the correct order is `(expected, actual)`.\nFor TestNG the correct order is `(actual, expected)`.\n\n\nSuch calls will behave fine for assertions that pass, but may give confusing error reports on failure.\nUse the quick-fix to flip the order of the arguments.\n\n**Example (JUnit):**\n\n\n assertEquals(actual, expected)\n\nAfter the quick-fix is applied:\n\n\n assertEquals(expected, actual)\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MisorderedAssertEqualsArguments",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Test frameworks",
"index": 182,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StaticVariableInitialization",
"shortDescription": {
"text": "Static field may not be initialized"
},
"fullDescription": {
"text": "Reports 'static' variables that may be uninitialized upon class initialization. Example: 'class Foo {\n public static int bar;\n\n static { }\n }' Note that this inspection uses a very conservative dataflow algorithm and may incorrectly report 'static' variables as uninitialized. Variables reported as initialized will always be initialized. Use the Ignore primitive fields option to ignore uninitialized primitive fields.",
"markdown": "Reports `static` variables that may be uninitialized upon class initialization.\n\n**Example:**\n\n\n class Foo {\n public static int bar;\n\n static { }\n }\n\nNote that this inspection uses a very conservative dataflow algorithm and may incorrectly report `static` variables as uninitialized. Variables\nreported as initialized will always be initialized.\n\nUse the **Ignore primitive fields** option to ignore uninitialized primitive fields."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "StaticVariableMayNotBeInitialized",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Initialization",
"index": 26,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ArrayHashCode",
"shortDescription": {
"text": "'hashCode()' called on array"
},
"fullDescription": {
"text": "Reports incorrect hash code calculation for arrays. In order to correctly calculate the hash code for an array, use: 'Arrays.hashcode()' for linear arrays 'Arrays.deepHashcode()' for multidimensional arrays These methods should also be used with 'Objects.hash()' when the sequence of input values includes arrays, for example: 'Objects.hash(string, Arrays.hashcode(array))'",
"markdown": "Reports incorrect hash code calculation for arrays.\n\nIn order to\ncorrectly calculate the hash code for an array, use:\n\n* `Arrays.hashcode()` for linear arrays\n* `Arrays.deepHashcode()` for multidimensional arrays\n\nThese methods should also be used with `Objects.hash()` when the sequence of input values includes arrays, for example: `Objects.hash(string, Arrays.hashcode(array))`"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ArrayHashCode",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ExternalizableWithSerializationMethods",
"shortDescription": {
"text": "Externalizable class with 'readObject()' or 'writeObject()'"
},
"fullDescription": {
"text": "Reports 'Externalizable' classes that define 'readObject()' or 'writeObject()' methods. These methods are not called for serialization of 'Externalizable' objects. Example: 'abstract class Crucial implements Externalizable {\n int value;\n private void readObject(ObjectInputStream in) {\n value = in.readInt();\n }\n }'",
"markdown": "Reports `Externalizable` classes that define `readObject()` or `writeObject()` methods. These methods are not called for serialization of `Externalizable` objects.\n\n**Example:**\n\n\n abstract class Crucial implements Externalizable {\n int value;\n private void readObject(ObjectInputStream in) {\n value = in.readInt();\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ExternalizableClassWithSerializationMethods",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Serialization issues",
"index": 54,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaLangInvokeHandleSignature",
"shortDescription": {
"text": "MethodHandle/VarHandle type mismatch"
},
"fullDescription": {
"text": "Reports 'MethodHandle' and 'VarHandle' factory method calls that don't match any method or field. Also reports arguments to 'MethodHandle.invoke()' and similar methods, that don't match the 'MethodHandle' signature and arguments to 'VarHandle.set()' that don't match the 'VarHandle' type. Examples: MethodHandle mh = MethodHandles.lookup().findVirtual(\n MyClass.class, \"foo\", MethodType.methodType(void.class, int.class));\n // the argument should be an int value\n mh.invoke(myObj, \"abc\");\n // the argument should be String.class\n VarHandle vh = MethodHandles.lookup().findVarHandle(\n MyClass.class, \"text\", int.class);\n VarHandle vh = MethodHandles.lookup().findVarHandle(\n MyClass.class, \"text\", String.class);\n // the argument should be a String value\n vh.set(myObj, 42);\n New in 2017.2",
"markdown": "Reports `MethodHandle` and `VarHandle` factory method calls that don't match any method or field.\n\nAlso reports arguments to `MethodHandle.invoke()` and similar methods, that don't match the `MethodHandle` signature\nand arguments to `VarHandle.set()` that don't match the `VarHandle` type.\n\n\nExamples:\n\n```\n MethodHandle mh = MethodHandles.lookup().findVirtual(\n MyClass.class, \"foo\", MethodType.methodType(void.class, int.class));\n // the argument should be an int value\n mh.invoke(myObj, \"abc\");\n```\n\n<br />\n\n```\n // the argument should be String.class\n VarHandle vh = MethodHandles.lookup().findVarHandle(\n MyClass.class, \"text\", int.class);\n```\n\n<br />\n\n```\n VarHandle vh = MethodHandles.lookup().findVarHandle(\n MyClass.class, \"text\", String.class);\n // the argument should be a String value\n vh.set(myObj, 42);\n```\n\n\nNew in 2017.2"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "JavaLangInvokeHandleSignature",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Reflective access",
"index": 130,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CanBeFinal",
"shortDescription": {
"text": "Declaration can have 'final' modifier"
},
"fullDescription": {
"text": "Reports fields, methods, or classes that may have the 'final' modifier added to their declarations. Final classes can't be extended, final methods can't be overridden, and final fields can't be reassigned. Example: 'public class Person {\n private String name;\n\n Person(String name) {\n this.name = name;\n }\n\n public String getName() {\n return name;\n }\n\n public String toString() {\n return getName();\n }\n }' After the quick-fix is applied: 'public final class Person {\n private final String name;\n\n Person(String name) {\n this.name = name;\n }\n\n public final String getName() {\n return name;\n }\n\n public final String toString() {\n return getName();\n }\n }' Use the Report classes and Report methods options to define which declarations are to be reported.",
"markdown": "Reports fields, methods, or classes that may have the `final` modifier added to their declarations.\n\nFinal classes can't be extended, final methods can't be overridden, and final fields can't be reassigned.\n\n**Example:**\n\n\n public class Person {\n private String name;\n\n Person(String name) {\n this.name = name;\n }\n\n public String getName() {\n return name;\n }\n\n public String toString() {\n return getName();\n }\n }\n\nAfter the quick-fix is applied:\n\n\n public final class Person {\n private final String name;\n\n Person(String name) {\n this.name = name;\n }\n\n public final String getName() {\n return name;\n }\n\n public final String toString() {\n return getName();\n }\n }\n\nUse the **Report classes** and **Report methods** options to define which declarations are to be reported."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CanBeFinal",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Declaration redundancy",
"index": 10,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryLabelOnBreakStatement",
"shortDescription": {
"text": "Unnecessary label on 'break' statement"
},
"fullDescription": {
"text": "Reports 'break' statements with unnecessary labels. Such labels do not change the control flow but make the code difficult to follow. Example: 'label:\n for(int i = 0; i < 10; i++) {\n if (shouldBreak()) break label;\n //doSmth\n }' After the quick-fix is applied: 'label:\n for(int i = 0; i < 10; i++) {\n if (shouldBreak()) break;\n //doSmth\n }'",
"markdown": "Reports `break` statements with unnecessary labels. Such labels do not change the control flow but make the code difficult to follow.\n\n**Example:**\n\n\n label:\n for(int i = 0; i < 10; i++) {\n if (shouldBreak()) break label;\n //doSmth\n }\n\nAfter the quick-fix is applied:\n\n\n label:\n for(int i = 0; i < 10; i++) {\n if (shouldBreak()) break;\n //doSmth\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryLabelOnBreakStatement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassCoupling",
"shortDescription": {
"text": "Overly coupled class"
},
"fullDescription": {
"text": "Reports classes that reference too many other classes. Classes with too high coupling can be very fragile, and should probably be split into smaller classes. Configure the inspection: Use the Class coupling limit field to specify the maximum allowed coupling for a class. Use the Include couplings to java system classes option to specify whether references to system classes (those in the 'java.'or 'javax.' packages) should be counted. Use the Include couplings to library classes option to specify whether references to any library classes should be counted.",
"markdown": "Reports classes that reference too many other classes.\n\nClasses with too high coupling can be very fragile, and should probably be split into smaller classes.\n\nConfigure the inspection:\n\n* Use the **Class coupling limit** field to specify the maximum allowed coupling for a class.\n* Use the **Include couplings to java system classes** option to specify whether references to system classes (those in the `java.`or `javax.` packages) should be counted.\n* Use the **Include couplings to library classes** option to specify whether references to any library classes should be counted."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OverlyCoupledClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class metrics",
"index": 125,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EmptySynchronizedStatement",
"shortDescription": {
"text": "Empty 'synchronized' statement"
},
"fullDescription": {
"text": "Reports 'synchronized' statements with empty bodies. Empty 'synchronized' statements are sometimes used to wait for other threads to release a particular resource. However, there is no guarantee that the same resource won't be acquired again right after the empty 'synchronized' statement finishes. For proper synchronization, the resource should be utilized inside the 'synchronized' block. Also, an empty 'synchronized' block may appear after a refactoring when redundant code was removed. In this case, the 'synchronized' block itself will be redundant and should be removed as well. Example: 'synchronized(lock) {}' A quick-fix is suggested to remove the empty synchronized statement. This inspection is disabled in JSP files.",
"markdown": "Reports `synchronized` statements with empty bodies.\n\n\nEmpty `synchronized` statements are sometimes used to wait for other threads to\nrelease a particular resource. However, there is no guarantee that the same resource\nwon't be acquired again right after the empty `synchronized` statement finishes.\nFor proper synchronization, the resource should be utilized inside the `synchronized` block.\n\n\nAlso, an empty `synchronized` block may appear after a refactoring\nwhen redundant code was removed. In this case, the `synchronized` block\nitself will be redundant and should be removed as well.\n\nExample:\n\n\n synchronized(lock) {}\n\n\nA quick-fix is suggested to remove the empty synchronized statement.\n\n\nThis inspection is disabled in JSP files."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "EmptySynchronizedStatement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TextBlockMigration",
"shortDescription": {
"text": "Text block can be used"
},
"fullDescription": {
"text": "Reports 'String' concatenations that can be simplified by replacing them with text blocks. Requirements: '\\n' occurs two or more times. Text blocks are not concatenated. Use the Apply to single string literals option to suggest the fix for single literals containing line breaks. Example: 'String html = \"<html>\\n\" +\n \" <body>\\n\" +\n \" <p>Hello, world</p>\\n\" +\n \" </body>\\n\" +\n \"</html>\\n\";' After the quick-fix is applied: 'String html = \"\"\"\n <html>\n <body>\n <p>Hello, world</p>\n </body>\n </html>\n \"\"\";' This inspection only reports if the language level of the project or module is 15 or higher. New in 2019.3",
"markdown": "Reports `String` concatenations that can be simplified by replacing them with text blocks.\n\nRequirements:\n\n* `\\n` occurs two or more times.\n* Text blocks are not concatenated.\n\n\nUse the **Apply to single string literals** option to suggest the fix for single literals containing line breaks.\n\n\n**Example:**\n\n\n String html = \"<html>\\n\" +\n \" <body>\\n\" +\n \" <p>Hello, world</p>\\n\" +\n \" </body>\\n\" +\n \"</html>\\n\";\n\nAfter the quick-fix is applied:\n\n\n String html = \"\"\"\n <html>\n <body>\n <p>Hello, world</p>\n </body>\n </html>\n \"\"\";\n\nThis inspection only reports if the language level of the project or module is 15 or higher.\n\nNew in 2019.3"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "TextBlockMigration",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 15",
"index": 235,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ObjectAllocationInLoop",
"shortDescription": {
"text": "Object allocation in loop"
},
"fullDescription": {
"text": "Reports object or array allocations inside loops. While not necessarily a problem, an object allocation inside a loop is a great place to look for memory leaks and performance issues. The inspection reports the following constructs: Explicit allocations via 'new' operator Methods known to return new object Instance-bound method references Lambdas that capture variables or 'this' reference Example: '// Explicit allocation\n for (Status status : Status.values()) {\n declarationsMap.put(status, new ArrayList<>());\n }\n\n // Lambda captures variable\n String message = \"Engine running.\";\n for (Engine engine : engines) {\n if (!isRunning(engine)) {\n logger.warn(() -> {\n return String.format(message);\n });\n }\n }\n\n // Instance-bound method reference\n for(Node node : nodes) {\n descriptor = node.getDescription();\n descriptor.ifPresent(dynamicTestExecutor::execute);\n }'",
"markdown": "Reports object or array allocations inside loops. While not necessarily a problem, an object allocation inside a loop is a great place to look for memory leaks and performance issues.\n\n\nThe inspection reports the following constructs:\n\n* Explicit allocations via `new` operator\n* Methods known to return new object\n* Instance-bound method references\n* Lambdas that capture variables or `this` reference\n\n**Example:**\n\n\n // Explicit allocation\n for (Status status : Status.values()) {\n declarationsMap.put(status, new ArrayList<>());\n }\n\n // Lambda captures variable\n String message = \"Engine running.\";\n for (Engine engine : engines) {\n if (!isRunning(engine)) {\n logger.warn(() -> {\n return String.format(message);\n });\n }\n }\n\n // Instance-bound method reference\n for(Node node : nodes) {\n descriptor = node.getDescription();\n descriptor.ifPresent(dynamicTestExecutor::execute);\n }\n\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ObjectAllocationInLoop",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ChainedEquality",
"shortDescription": {
"text": "Chained equality comparisons"
},
"fullDescription": {
"text": "Reports chained equality comparisons. Such comparisons may be confusing: 'a == b == c' means '(a == b) == c', but possibly 'a == b && a == c' is intended. Example: 'boolean chainedEquality(boolean a, boolean b, boolean c) {\n return a == b == c;\n }' You can use parentheses to make the comparison less confusing: 'boolean chainedEquality(boolean a, boolean b, boolean c) {\n return (a == b) == c;\n }'",
"markdown": "Reports chained equality comparisons.\n\nSuch comparisons may be confusing: `a == b == c` means `(a == b) == c`,\nbut possibly `a == b && a == c` is intended.\n\n**Example:**\n\n\n boolean chainedEquality(boolean a, boolean b, boolean c) {\n return a == b == c;\n }\n\nYou can use parentheses to make the comparison less confusing:\n\n\n boolean chainedEquality(boolean a, boolean b, boolean c) {\n return (a == b) == c;\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ChainedEqualityComparisons",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ThrowFromFinallyBlock",
"shortDescription": {
"text": "'throw' inside 'finally' block"
},
"fullDescription": {
"text": "Reports 'throw' statements inside 'finally' blocks. While occasionally intended, such 'throw' statements may conceal exceptions thrown from 'try'-'catch' and thus tremendously complicate the debugging process.",
"markdown": "Reports `throw` statements inside `finally` blocks.\n\nWhile occasionally intended, such `throw` statements may conceal exceptions thrown from `try`-`catch` and thus\ntremendously complicate the debugging process."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ThrowFromFinallyBlock",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Error handling",
"index": 9,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonCommentSourceStatements",
"shortDescription": {
"text": "Overly long method"
},
"fullDescription": {
"text": "Reports methods whose number of statements exceeds the specified maximum. Methods with too many statements may be confusing and are a good sign that refactoring is necessary. The following statements are not counted: empty statements (semicolons) block statements 'for' loop initialization statements, that is, 'int i = ...' within a 'for(int i = ...;...)' statement 'for' loop update statements, that is, 'i += 2' within a 'for(int i = ...;...; i += 2)' statement Use the Maximum statements per method field to specify the maximum allowed number of statements in a method.",
"markdown": "Reports methods whose number of statements exceeds the specified maximum.\n\nMethods with too many statements may be confusing and are a good sign that refactoring is necessary.\n\nThe following statements are not counted:\n\n* empty statements (semicolons)\n* block statements\n* `for` loop initialization statements, that is, `int i = ...` within a `for(int i = ...;...)` statement\n* `for` loop update statements, that is, `i += 2` within a `for(int i = ...;...; i += 2)` statement\n\nUse the **Maximum statements per method** field to specify the maximum allowed number of statements in a method."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OverlyLongMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Method metrics",
"index": 139,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConfusingMainMethod",
"shortDescription": {
"text": "Confusing 'main()' method"
},
"fullDescription": {
"text": "Reports methods that are named \"main\", but do not have the 'public static void main(String[])' signature. Additionally main methods located in anonymous or local classes are reported. Anonymous and local classes do not have a fully qualified name and thus can't be run. Such methods may be confusing, as methods named \"main\" are expected to be application entry points. Example: 'class Main {\n void main(String[] args) {} // warning here because there are no \"public static\" modifiers\n }' A quick-fix that renames such methods is available only in the editor.",
"markdown": "Reports methods that are named \"main\", but do not have the `public static void main(String[])` signature. Additionally main methods located in anonymous or local classes are reported. Anonymous and local classes do not have a fully qualified name and thus can't be run.\n\nSuch methods may be confusing, as methods named \"main\"\nare expected to be application entry points.\n\n**Example:**\n\n\n class Main {\n void main(String[] args) {} // warning here because there are no \"public static\" modifiers\n }\n\nA quick-fix that renames such methods is available only in the editor."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ConfusingMainMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IOResource",
"shortDescription": {
"text": "I/O resource opened but not safely closed"
},
"fullDescription": {
"text": "Reports I/O resources that are not safely closed. I/O resources checked by this inspection include 'java.io.InputStream', 'java.io.OutputStream', 'java.io.Reader', 'java.io.Writer', 'java.util.zip.ZipFile', 'java.io.Closeable' and 'java.io.RandomAccessFile'. I/O resources wrapped by other I/O resources are not reported, as the wrapped resource will be closed by the wrapping resource. By default, the inspection assumes that the resources can be closed by any method with 'close' or 'cleanup' in its name. Example: 'void save() throws IOException {\n FileWriter writer = new FileWriter(\"filename.txt\"); //warning\n writer.write(\"sample\");\n }' Use the following options to configure the inspection: List I/O resource classes that do not need to be closed and should be ignored by this inspection. Whether an I/O resource is allowed to be opened inside a 'try'block. This style is less desirable because it is more verbose than opening a resource in front of a 'try' block. Whether the resource can be closed by any method call with the resource passed as argument.",
"markdown": "Reports I/O resources that are not safely closed. I/O resources checked by this inspection include `java.io.InputStream`, `java.io.OutputStream`, `java.io.Reader`, `java.io.Writer`, `java.util.zip.ZipFile`, `java.io.Closeable` and `java.io.RandomAccessFile`.\n\n\nI/O resources wrapped by other I/O resources are not reported, as the wrapped resource will be closed by the wrapping resource.\n\n\nBy default, the inspection assumes that the resources can be closed by any method with\n'close' or 'cleanup' in its name.\n\n**Example:**\n\n\n void save() throws IOException {\n FileWriter writer = new FileWriter(\"filename.txt\"); //warning\n writer.write(\"sample\");\n }\n\n\nUse the following options to configure the inspection:\n\n* List I/O resource classes that do not need to be closed and should be ignored by this inspection.\n* Whether an I/O resource is allowed to be opened inside a `try`block. This style is less desirable because it is more verbose than opening a resource in front of a `try` block.\n* Whether the resource can be closed by any method call with the resource passed as argument."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "IOResourceOpenedButNotSafelyClosed",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Resource management",
"index": 155,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EnhancedSwitchMigration",
"shortDescription": {
"text": "Statement can be replaced with enhanced 'switch'"
},
"fullDescription": {
"text": "Reports 'switch' statements that can be automatically replaced with enhanced 'switch' statements or expressions. Example: 'double getPrice(String fruit) {\n // Switch statement can be replaced with enhanced 'switch'\n switch (fruit) {\n case \"Apple\":\n return 1.0;\n case \"Orange\":\n return 1.5;\n case \"Mango\":\n return 2.0;\n default:\n throw new IllegalArgumentException();\n }\n }' After the quick-fix is applied: 'double getPrice(String fruit) {\n return switch (fruit) {\n case \"Apple\" -> 1.0;\n case \"Orange\" -> 1.5;\n case \"Mango\" -> 2.0;\n default -> throw new IllegalArgumentException();\n };\n }' Use the Show warning only if conversion to expression is possible option not to warn about conversion to 'switch' statement. Use the Maximum number of statements in one branch to convert to switch expression option warn about conversion to expression only if each branch has less than the given number of statements. This inspection only reports if the language level of the project or module is 14 or higher New in 2019.1",
"markdown": "Reports `switch` statements that can be automatically replaced with enhanced `switch` statements or expressions.\n\n**Example:**\n\n\n double getPrice(String fruit) {\n // Switch statement can be replaced with enhanced 'switch'\n switch (fruit) {\n case \"Apple\":\n return 1.0;\n case \"Orange\":\n return 1.5;\n case \"Mango\":\n return 2.0;\n default:\n throw new IllegalArgumentException();\n }\n }\n\nAfter the quick-fix is applied:\n\n\n double getPrice(String fruit) {\n return switch (fruit) {\n case \"Apple\" -> 1.0;\n case \"Orange\" -> 1.5;\n case \"Mango\" -> 2.0;\n default -> throw new IllegalArgumentException();\n };\n }\n \n\n* Use the **Show warning only if conversion to expression is possible** option not to warn about conversion to `switch` statement.\n* Use the **Maximum number of statements in one branch to convert to switch expression** option warn about conversion to expression only if each branch has less than the given number of statements.\n\nThis inspection only reports if the language level of the project or module is 14 or higher\n\nNew in 2019.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EnhancedSwitchMigration",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 14",
"index": 245,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OverloadedMethodsWithSameNumberOfParameters",
"shortDescription": {
"text": "Overloaded methods with same number of parameters"
},
"fullDescription": {
"text": "Reports methods that are declared in the same class, have the same name, and the same number of parameters. Such overloads cam be very confusing because it can be unclear which overload gets called. Example: 'class Main {\n public static void execute(Runnable r) {}\n public static <T> void execute(RunnableFuture<T> c) {}\n }' Use the option to ignore overloaded methods whose parameter types are definitely incompatible.",
"markdown": "Reports methods that are declared in the same class, have the same name, and the same number of parameters. Such overloads cam be very confusing because it can be unclear which overload gets called.\n\n**Example:**\n\n\n class Main {\n public static void execute(Runnable r) {}\n public static <T> void execute(RunnableFuture<T> c) {}\n }\n\n\nUse the option to ignore overloaded methods whose parameter types are definitely incompatible."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OverloadedMethodsWithSameNumberOfParameters",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Naming conventions/Method",
"index": 107,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TransientFieldNotInitialized",
"shortDescription": {
"text": "Transient field is not initialized on deserialization"
},
"fullDescription": {
"text": "Reports 'transient' fields that are initialized during normal object construction, but whose class does not have a 'readObject' method. As 'transient' fields are not serialized they need to be initialized separately in a 'readObject()' method during deserialization. Any 'transient' fields that are not initialized during normal object construction are considered to use the default initialization and are not reported by this inspection. Example: 'class Person implements Serializable {\n transient String name = \"Default\"; //warning, can actually be a null after deserialization\n transient String surname; //null is considered the default value and not reported\n }'",
"markdown": "Reports `transient` fields that are initialized during normal object construction, but whose class does not have a `readObject` method.\n\n\nAs `transient` fields are not serialized they need\nto be initialized separately in a `readObject()` method\nduring deserialization.\n\n\nAny `transient` fields that\nare not initialized during normal object construction are considered to use the default\ninitialization and are not reported by this inspection.\n\n**Example:**\n\n\n class Person implements Serializable {\n transient String name = \"Default\"; //warning, can actually be a null after deserialization\n transient String surname; //null is considered the default value and not reported\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "TransientFieldNotInitialized",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Serialization issues",
"index": 54,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ContinueOrBreakFromFinallyBlock",
"shortDescription": {
"text": "'continue' or 'break' inside 'finally' block"
},
"fullDescription": {
"text": "Reports 'break' or 'continue' statements inside of 'finally' blocks. While occasionally intended, such statements are very confusing, may mask thrown exceptions, and complicate debugging. Example: 'while (true) {\n try {\n throwingMethod();\n } finally {\n continue;\n }\n }'",
"markdown": "Reports `break` or `continue` statements inside of `finally` blocks.\n\nWhile occasionally intended, such statements are very confusing, may mask thrown exceptions, and complicate debugging.\n\n**Example:**\n\n\n while (true) {\n try {\n throwingMethod();\n } finally {\n continue;\n }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ContinueOrBreakFromFinallyBlock",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Error handling",
"index": 9,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LengthOneStringsInConcatenation",
"shortDescription": {
"text": "Single character string concatenation"
},
"fullDescription": {
"text": "Reports concatenation with string literals that consist of one character. These literals may be replaced with equivalent character literals, gaining some performance enhancement. Example: 'String hello = hell + \"o\";' After the quick-fix is applied: 'String hello = hell + 'o';'",
"markdown": "Reports concatenation with string literals that consist of one character.\n\nThese literals may be replaced with equivalent character literals, gaining some performance enhancement.\n\n**Example:**\n\n\n String hello = hell + \"o\";\n\nAfter the quick-fix is applied:\n\n\n String hello = hell + 'o';\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "SingleCharacterStringConcatenation",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryThis",
"shortDescription": {
"text": "Unnecessary 'this' qualifier"
},
"fullDescription": {
"text": "Reports unnecessary 'this' qualifier. Using 'this' to disambiguate a code reference is discouraged by many coding styles and may easily become unnecessary via automatic refactorings. Example: 'class Foo {\n int x;\n void foo() {\n this.x = 2;\n }\n }' After the quick-fix is applied: 'class Foo {\n int x;\n void foo() {\n x = 2;\n }\n }' Use the inspection settings to ignore assignments to fields. For instance, 'this.x = 2;' won't be reported, but 'int y = this.x;' will be.",
"markdown": "Reports unnecessary `this` qualifier.\n\n\nUsing `this` to disambiguate a code reference is discouraged by many coding styles\nand may easily become unnecessary\nvia automatic refactorings.\n\n**Example:**\n\n\n class Foo {\n int x;\n void foo() {\n this.x = 2;\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class Foo {\n int x;\n void foo() {\n x = 2;\n }\n }\n\n\nUse the inspection settings to ignore assignments to fields.\nFor instance, `this.x = 2;` won't be reported, but `int y = this.x;` will be."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryThis",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassWithTooManyTransitiveDependencies",
"shortDescription": {
"text": "Class with too many transitive dependencies"
},
"fullDescription": {
"text": "Reports classes that are directly or indirectly dependent on too many other classes. Modifications to any dependency of such a class may require changing the class thus making it prone to instability. Only top-level classes are reported. Use the Maximum number of transitive dependencies field to specify the maximum allowed number of direct or indirect dependencies for a class. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor.",
"markdown": "Reports classes that are directly or indirectly dependent on too many other classes.\n\nModifications to any dependency of such a class may require changing the class thus making it prone to instability.\n\nOnly top-level classes are reported.\n\nUse the **Maximum number of transitive dependencies** field to specify the maximum allowed number of direct or indirect dependencies\nfor a class.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ClassWithTooManyTransitiveDependencies",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Dependency issues",
"index": 200,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ExplicitArrayFilling",
"shortDescription": {
"text": "Explicit array filling"
},
"fullDescription": {
"text": "Reports loops that can be replaced with 'Arrays.setAll()' or 'Arrays.fill()' calls. This inspection suggests replacing loops with 'Arrays.setAll()' if the language level of the project or module is 8 or higher. Replacing loops with 'Arrays.fill()' is possible with any language level. Example: 'for (int i=0; i<array.length; i++) {\n array[i] = calc(i);\n }' After the quick-fix is applied: 'Arrays.setAll(array, this::calc);' New in 2017.1",
"markdown": "Reports loops that can be replaced with `Arrays.setAll()` or `Arrays.fill()` calls.\n\nThis inspection suggests replacing loops with `Arrays.setAll()` if the language level of the project or module is 8 or higher.\nReplacing loops with `Arrays.fill()` is possible with any language level.\n\nExample:\n\n\n for (int i=0; i<array.length; i++) {\n array[i] = calc(i);\n }\n\nAfter the quick-fix is applied:\n\n\n Arrays.setAll(array, this::calc);\n\nNew in 2017.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ExplicitArrayFilling",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BadExceptionDeclared",
"shortDescription": {
"text": "Prohibited exception declared"
},
"fullDescription": {
"text": "Reports methods that declare an inappropriate exception in their 'throws' clause. For example an exception can be inappropriate because it is overly generic, such as 'java.lang.Exception' or 'java.lang.Throwable'. Example: 'void describeModule(String module) throws Exception {} // warning: Prohibited exception 'Exception' declared' Configure the inspection: Use the Prohibited exceptions list to specify which exceptions should be reported. Use the Ignore exceptions declared on methods overriding a library method option to ignore exceptions declared by methods that override a library method.",
"markdown": "Reports methods that declare an inappropriate exception in their `throws` clause. For example an exception can be inappropriate because it is overly generic, such as `java.lang.Exception` or `java.lang.Throwable`.\n\n**Example:**\n\n\n void describeModule(String module) throws Exception {} // warning: Prohibited exception 'Exception' declared\n\nConfigure the inspection:\n\n* Use the **Prohibited exceptions** list to specify which exceptions should be reported.\n* Use the **Ignore exceptions declared on methods overriding a library method** option to ignore exceptions declared by methods that override a library method."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ProhibitedExceptionDeclared",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Error handling",
"index": 9,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IntegerMultiplicationImplicitCastToLong",
"shortDescription": {
"text": "Integer multiplication or shift implicitly cast to 'long'"
},
"fullDescription": {
"text": "Reports integer multiplications and left shifts that are implicitly cast to long. Example: 'void f(int i) {\n long val = 65536 * i;\n }' After the quick-fix is applied, the code changes to: 'void x(int i) {\n long val = 65536L * i;\n }' Example: 'void f(int i) {\n long value = i << 24;\n }' After the quick-fix is applied, the code changes to: 'void f(int i) {\n long value = (long) i << 24;\n }' Such multiplications are often a mistake, as overflow truncation may occur unexpectedly. Converting an 'int' literal to a 'long' literal ('65536L') fixes the problem.",
"markdown": "Reports integer multiplications and left shifts that are implicitly cast to long.\n\n**Example:**\n\n\n void f(int i) {\n long val = 65536 * i;\n }\n\nAfter the quick-fix is applied, the code changes to:\n\n\n void x(int i) {\n long val = 65536L * i;\n }\n\n**Example:**\n\n\n void f(int i) {\n long value = i << 24;\n }\n\nAfter the quick-fix is applied, the code changes to:\n\n\n void f(int i) {\n long value = (long) i << 24;\n }\n\n\nSuch multiplications are often a mistake, as overflow truncation may occur unexpectedly.\nConverting an `int` literal to a `long` literal (`65536`**L**) fixes the problem."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "IntegerMultiplicationImplicitCastToLong",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues/Cast",
"index": 138,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AssertStatement",
"shortDescription": {
"text": "'assert' statement"
},
"fullDescription": {
"text": "Reports 'assert' statements. By default, 'assert' statements are disabled during execution in the production environment. Consider using logger or exceptions instead. The 'assert' statements are not supported in Java 1.3 and earlier JVM.",
"markdown": "Reports `assert` statements. By default, `assert` statements are disabled during execution in the production environment. Consider using logger or exceptions instead.\n\nThe `assert` statements are not supported in Java 1.3 and earlier JVM."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AssertStatement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level issues",
"index": 246,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AssertEqualsMayBeAssertSame",
"shortDescription": {
"text": "'assertEquals()' may be 'assertSame()'"
},
"fullDescription": {
"text": "Reports JUnit 'assertEquals()' calls that can be replaced with an equivalent 'assertSame()' call. This is possible when the arguments are instances of a 'final' class that does not override the 'Object.equals()' method and makes it explicit that the object identity is compared. Suggests replacing 'assertEquals()' with 'assertSame()'. Example: '@Test\n public void testObjectType() {\n Object o = getObject();\n Assert.assertEquals(String.class, o.getClass());\n }' After the quick fix is applied: '@Test\n public void testSort() {\n Object o = getObject();\n Assert.assertSame(String.class, o.getClass());\n }'",
"markdown": "Reports JUnit `assertEquals()` calls that can be replaced with an equivalent `assertSame()` call. This is possible when the arguments are instances of a `final` class that does not override the `Object.equals()` method and makes it explicit that the object identity is compared.\n\nSuggests replacing `assertEquals()` with `assertSame()`.\n\n**Example:**\n\n\n @Test\n public void testObjectType() {\n Object o = getObject();\n Assert.assertEquals(String.class, o.getClass());\n }\n\nAfter the quick fix is applied:\n\n\n @Test\n public void testSort() {\n Object o = getObject();\n Assert.assertSame(String.class, o.getClass());\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AssertEqualsMayBeAssertSame",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JVM languages/Test frameworks",
"index": 128,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UtilityClassWithPublicConstructor",
"shortDescription": {
"text": "Utility class with 'public' constructor"
},
"fullDescription": {
"text": "Reports utility classes with 'public' constructors. Utility classes have all fields and methods declared as 'static'. Creating a 'public' constructor in such classes is confusing and may cause accidental class instantiation. Example: 'public final class UtilityClass {\n public UtilityClass(){\n }\n public static void foo() {}\n }' After the quick-fix is applied: 'public final class UtilityClass {\n private UtilityClass(){\n }\n public static void foo() {}\n }'",
"markdown": "Reports utility classes with `public` constructors.\n\nUtility classes have all fields and methods declared as `static`. Creating a `public`\nconstructor in such classes is confusing and may cause accidental class instantiation.\n\n**Example:**\n\n\n public final class UtilityClass {\n public UtilityClass(){\n }\n public static void foo() {}\n }\n\nAfter the quick-fix is applied:\n\n\n public final class UtilityClass {\n private UtilityClass(){\n }\n public static void foo() {}\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UtilityClassWithPublicConstructor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TypeParameterExtendsFinalClass",
"shortDescription": {
"text": "Type parameter extends 'final' class"
},
"fullDescription": {
"text": "Reports type parameters declared to extend a 'final' class. Suggests replacing the type parameter with the type of the specified 'final' class since 'final' classes cannot be extended. Example: 'void foo() {\n List<? extends Integer> list; // Warning: the Integer class is a final class\n }' After the quick-fix is applied: 'void foo() {\n List<Integer> list;\n }'",
"markdown": "Reports type parameters declared to extend a `final` class.\n\nSuggests replacing the type parameter with the type of the specified `final` class since\n`final` classes cannot be extended.\n\n**Example:**\n\n\n void foo() {\n List<? extends Integer> list; // Warning: the Integer class is a final class\n }\n\nAfter the quick-fix is applied:\n\n\n void foo() {\n List<Integer> list;\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "TypeParameterExtendsFinalClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Inheritance issues",
"index": 159,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BooleanMethodIsAlwaysInverted",
"shortDescription": {
"text": "Boolean method is always inverted"
},
"fullDescription": {
"text": "Reports methods with a 'boolean' return type that are always negated when called. A quick-fix is provided to invert and optionally rename the method. For performance reasons, not all problematic methods may be highlighted in the editor. Example: 'class C {\n boolean alwaysTrue() {\n return true;\n }\n\n void f() {\n if (!alwaysTrue()) {\n return;\n }\n }\n boolean member = !alwaysTrue();\n }' After the quick-fix is applied: 'class C {\n boolean alwaysFalse() {\n return false;\n }\n\n void f() {\n if (alwaysFalse()) {\n return;\n }\n }\n boolean member = alwaysFalse();\n }'",
"markdown": "Reports methods with a `boolean` return type that are always negated when called.\n\nA quick-fix is provided to invert and optionally rename the method.\nFor performance reasons, not all problematic methods may be highlighted in the editor.\n\nExample:\n\n\n class C {\n boolean alwaysTrue() {\n return true;\n }\n\n void f() {\n if (!alwaysTrue()) {\n return;\n }\n }\n boolean member = !alwaysTrue();\n }\n\nAfter the quick-fix is applied:\n\n\n class C {\n boolean alwaysFalse() {\n return false;\n }\n\n void f() {\n if (alwaysFalse()) {\n return;\n }\n }\n boolean member = alwaysFalse();\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "BooleanMethodIsAlwaysInverted",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Data flow",
"index": 61,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InstanceGuardedByStatic",
"shortDescription": {
"text": "Instance member guarded by static field"
},
"fullDescription": {
"text": "Reports '@GuardedBy' annotations on instance fields or methods in which the guard is a 'static' field. Guarding a non-static by a static may result in excessive lock contention, as access to each locked field in any object instance will prevent simultaneous access to that field in every object instance. Example: 'private static ReadWriteLock lock = new ReentrantReadWriteLock(); //static guarding field\n private Object state;\n\n @GuardedBy(\"lock\")\n public void bar() {\n state = new Object();\n }' Supported '@GuardedBy' annotations are: 'net.jcip.annotations.GuardedBy' 'javax.annotation.concurrent.GuardedBy' 'org.apache.http.annotation.GuardedBy' 'com.android.annotations.concurrency.GuardedBy' 'androidx.annotation.GuardedBy' 'com.google.errorprone.annotations.concurrent.GuardedBy'",
"markdown": "Reports `@GuardedBy` annotations on instance fields or methods in which the guard is a `static` field. Guarding a non-static by a static may result in excessive lock contention, as access to each locked field in any object instance will prevent simultaneous access to that field in every object instance.\n\nExample:\n\n\n private static ReadWriteLock lock = new ReentrantReadWriteLock(); //static guarding field\n private Object state;\n\n @GuardedBy(\"lock\")\n public void bar() {\n state = new Object();\n }\n\nSupported `@GuardedBy` annotations are:\n\n* `net.jcip.annotations.GuardedBy`\n* `javax.annotation.concurrent.GuardedBy`\n* `org.apache.http.annotation.GuardedBy`\n* `com.android.annotations.concurrency.GuardedBy`\n* `androidx.annotation.GuardedBy`\n* `com.google.errorprone.annotations.concurrent.GuardedBy`"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "InstanceGuardedByStatic",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Concurrency annotation issues",
"index": 99,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TestCaseWithConstructor",
"shortDescription": {
"text": "TestCase with non-trivial constructors"
},
"fullDescription": {
"text": "Reports test cases with initialization logic in their constructors. If a constructor fails, the '@After' annotated or 'tearDown()' method won't be called. This can leave the test environment partially initialized, which can adversely affect other tests. Instead, initialization of test cases should be done in a 'setUp()' or '@Before' annotated method. Bad example: 'public class ImportantTest {\n private File file;\n\n public ImportantTest() throws IOException {\n file = File.createTempFile(\"xyz\", \".tmp\");\n }\n\n // ... tests go here\n }'",
"markdown": "Reports test cases with initialization logic in their constructors. If a constructor fails, the `@After` annotated or `tearDown()` method won't be called. This can leave the test environment partially initialized, which can adversely affect other tests. Instead, initialization of test cases should be done in a `setUp()` or `@Before` annotated method.\n\nBad example:\n\n\n public class ImportantTest {\n private File file;\n\n public ImportantTest() throws IOException {\n file = File.createTempFile(\"xyz\", \".tmp\");\n }\n\n // ... tests go here\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JUnitTestCaseWithNonTrivialConstructors",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JVM languages/Test frameworks",
"index": 128,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReadObjectAndWriteObjectPrivate",
"shortDescription": {
"text": "'readObject()' or 'writeObject()' not declared 'private'"
},
"fullDescription": {
"text": "Reports 'Serializable' classes where the 'readObject' or 'writeObject' methods are not declared private. There is no reason these methods should ever have a higher visibility than 'private'. A quick-fix is suggested to make the corresponding method 'private'. Example: 'public class Test implements Serializable {\n public void readObject(ObjectInputStream stream) {\n /* ... */\n }\n }' After the quick-fix is applied: 'public class Test implements Serializable {\n private void readObject(ObjectInputStream stream) {\n /* ... */\n }\n }'",
"markdown": "Reports `Serializable` classes where the `readObject` or `writeObject` methods are not declared private. There is no reason these methods should ever have a higher visibility than `private`.\n\n\nA quick-fix is suggested to make the corresponding method `private`.\n\n**Example:**\n\n\n public class Test implements Serializable {\n public void readObject(ObjectInputStream stream) {\n /* ... */\n }\n }\n\nAfter the quick-fix is applied:\n\n\n public class Test implements Serializable {\n private void readObject(ObjectInputStream stream) {\n /* ... */\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonPrivateSerializationMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Serialization issues",
"index": 54,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantFileCreation",
"shortDescription": {
"text": "Redundant 'File' instance creation"
},
"fullDescription": {
"text": "Reports redundant 'File' creation in one of the following constructors when only 'String' path can be used: 'FileInputStream', 'FileOutputStream', 'FileReader', 'FileWriter', 'PrintStream', 'PrintWriter', 'Formatter'. Example: 'InputStream is = new FileInputStream(new File(\"in.txt\"));' After quick-fix is applied: 'InputStream is = new FileInputStream(\"in.txt\");' New in 2020.3",
"markdown": "Reports redundant `File` creation in one of the following constructors when only `String` path can be used: `FileInputStream`, `FileOutputStream`, `FileReader`, `FileWriter`, `PrintStream`, `PrintWriter`, `Formatter`.\n\nExample:\n\n\n InputStream is = new FileInputStream(new File(\"in.txt\"));\n\nAfter quick-fix is applied:\n\n\n InputStream is = new FileInputStream(\"in.txt\");\n\nNew in 2020.3"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantFileCreation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PointlessBooleanExpression",
"shortDescription": {
"text": "Pointless boolean expression"
},
"fullDescription": {
"text": "Reports unnecessary or overly complicated boolean expressions. Such expressions include '&&'-ing with 'true', '||'-ing with 'false', equality comparison with a boolean literal, or negation of a boolean literal. Such expressions can be simplified. Example: 'boolean a = !(x && false);\n boolean b = false || x;\n boolean c = x != true;' After the quick-fix is applied: 'boolean a = true;\n boolean b = x;\n boolean c = !x;' Configure the inspection: Use the Ignore named constants in determining pointless expressions option to ignore named constants when determining if an expression is pointless.",
"markdown": "Reports unnecessary or overly complicated boolean expressions.\n\nSuch expressions include `&&`-ing with `true`,\n`||`-ing with `false`,\nequality comparison with a boolean literal, or negation of a boolean literal. Such expressions can be simplified.\n\nExample:\n\n\n boolean a = !(x && false);\n boolean b = false || x;\n boolean c = x != true;\n\nAfter the quick-fix is applied:\n\n\n boolean a = true;\n boolean b = x;\n boolean c = !x;\n\n\nConfigure the inspection:\nUse the **Ignore named constants in determining pointless expressions** option to ignore named constants when determining if an expression is pointless."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PointlessBooleanExpression",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SuperTearDownInFinally",
"shortDescription": {
"text": "JUnit 3 'super.tearDown()' is not called from 'finally' block"
},
"fullDescription": {
"text": "Reports calls of the JUnit 3's 'super.tearDown()' method that are not performed inside a 'finally' block. If an exception is thrown before 'super.tearDown()' is called it could lead to inconsistencies and leaks. Example: 'public class AnotherTest extends CompanyTestCase {\n private Path path;\n\n @Override\n protected void setUp() throws Exception {\n super.setUp();\n path = Files.createTempFile(\"File\", \".tmp\");\n }\n\n @Override\n protected void tearDown() throws Exception {\n Files.delete(path);\n super.tearDown();\n }\n }' Improved code: 'public class AnotherTest extends CompanyTestCase {\n private Path path;\n\n @Override\n protected void setUp() throws Exception {\n super.setUp();\n path = Files.createTempFile(\"File\", \".tmp\");\n }\n\n @Override\n protected void tearDown() throws Exception {\n try {\n Files.delete(path);\n } finally {\n super.tearDown();\n }\n }\n }'",
"markdown": "Reports calls of the JUnit 3's `super.tearDown()` method that are not performed inside a `finally` block. If an exception is thrown before `super.tearDown()` is called it could lead to inconsistencies and leaks.\n\n**Example:**\n\n\n public class AnotherTest extends CompanyTestCase {\n private Path path;\n\n @Override\n protected void setUp() throws Exception {\n super.setUp();\n path = Files.createTempFile(\"File\", \".tmp\");\n }\n\n @Override\n protected void tearDown() throws Exception {\n Files.delete(path);\n super.tearDown();\n }\n }\n\nImproved code:\n\n\n public class AnotherTest extends CompanyTestCase {\n private Path path;\n\n @Override\n protected void setUp() throws Exception {\n super.setUp();\n path = Files.createTempFile(\"File\", \".tmp\");\n }\n\n @Override\n protected void tearDown() throws Exception {\n try {\n Files.delete(path);\n } finally {\n super.tearDown();\n }\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SuperTearDownInFinally",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JVM languages/Test frameworks",
"index": 128,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ListenerMayUseAdapter",
"shortDescription": {
"text": "Class may extend adapter instead of implementing listener"
},
"fullDescription": {
"text": "Reports classes implementing listeners instead of extending corresponding adapters. A quick-fix is available to remove any redundant empty methods left after replacing a listener implementation with an adapter extension. Use the Only warn when empty implementing methods are found option to configure the inspection to warn even if no empty methods are found.",
"markdown": "Reports classes implementing listeners instead of extending corresponding adapters.\n\nA quick-fix is available to\nremove any redundant empty methods left after replacing a listener implementation with an adapter extension.\n\n\nUse the **Only warn when empty implementing methods are found** option to configure the inspection to warn even if no empty methods are found."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ListenerMayUseAdapter",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PublicInnerClass",
"shortDescription": {
"text": "'public' nested class"
},
"fullDescription": {
"text": "Reports 'public' nested classes. Example: 'public class Outer {\n public static class Nested {} // warning\n public class Inner {} // warning\n public enum Mode {} // warning depends on the setting\n public interface I {} // warning depends on the setting\n }' Configure the inspection: Use the Ignore 'public' inner enums option to ignore 'public' inner enums. Use the Ignore 'public' inner interfaces option to ignore 'public' inner interfaces.",
"markdown": "Reports `public` nested classes.\n\n**Example:**\n\n\n public class Outer {\n public static class Nested {} // warning\n public class Inner {} // warning\n public enum Mode {} // warning depends on the setting\n public interface I {} // warning depends on the setting\n }\n\nConfigure the inspection:\n\n* Use the **Ignore 'public' inner enums** option to ignore `public` inner enums.\n* Use the **Ignore 'public' inner interfaces** option to ignore `public` inner interfaces."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PublicInnerClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Encapsulation",
"index": 211,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CollectionAddedToSelf",
"shortDescription": {
"text": "Collection added to itself"
},
"fullDescription": {
"text": "Reports cases where the argument of a method call on a 'java.util.Collection' or 'java.util.Map' is the collection or map itself. Such situations may occur as a result of copy-paste in code with raw types. Example: 'ArrayList list = new ArrayList<>();\n list.add(list); // warning here\n return list.hashCode(); // throws StackOverflowError'",
"markdown": "Reports cases where the argument of a method call on a `java.util.Collection` or `java.util.Map` is the collection or map itself. Such situations may occur as a result of copy-paste in code with raw types.\n\n**Example:**\n\n\n ArrayList list = new ArrayList<>();\n list.add(list); // warning here\n return list.hashCode(); // throws StackOverflowError\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "CollectionAddedToSelf",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EqualsOnSuspiciousObject",
"shortDescription": {
"text": "'equals()' called on classes which don't override it"
},
"fullDescription": {
"text": "Reports 'equals()' calls on 'StringBuilder', 'StringBuffer' and instances of 'java.util.concurrent.atomic' package. The 'equals()' method is not overridden in these classes, so it may return 'false' even when the contents of the two objects are the same. If the reference equality is intended, it's better to use '==' to avoid confusion. A quick-fix for 'StringBuilder', 'StringBuffer', 'AtomicBoolean', 'AtomicInteger', 'AtomicBoolean' and 'AtomicLong' is available to transform into a comparison of contents. The quick-fix may change the semantics when one of the instances is null. Example: 'public void test(StringBuilder sb1, StringBuilder sb2) {\n boolean result = sb1.equals(sb2); // Suspicious\n }' After the quick-fix is applied: 'public void test(StringBuilder sb1, StringBuilder sb2) {\n boolean result = sb1.toString().equals(sb2.toString());\n }' New in 2017.2",
"markdown": "Reports `equals()` calls on `StringBuilder`, `StringBuffer` and instances of `java.util.concurrent.atomic` package.\n\nThe `equals()` method is not overridden in these classes, so it may return `false` even when the contents of the\ntwo objects are the same.\nIf the reference equality is intended, it's better to use `==` to avoid confusion.\nA quick-fix for `StringBuilder`, `StringBuffer`, `AtomicBoolean`, `AtomicInteger`, `AtomicBoolean` and `AtomicLong` is available to transform into a comparison of contents. The quick-fix may change the semantics when one of the instances is null.\n\nExample:\n\n\n public void test(StringBuilder sb1, StringBuilder sb2) {\n boolean result = sb1.equals(sb2); // Suspicious\n }\n\nAfter the quick-fix is applied:\n\n\n public void test(StringBuilder sb1, StringBuilder sb2) {\n boolean result = sb1.toString().equals(sb2.toString());\n }\n\nNew in 2017.2"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "EqualsOnSuspiciousObject",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MethodCoupling",
"shortDescription": {
"text": "Overly coupled method"
},
"fullDescription": {
"text": "Reports methods that reference too many other classes. Methods with too high coupling can be very fragile and should be probably split into smaller methods. Each referenced class is counted only once no matter how many times it is referenced. Configure the inspection: Use the Method coupling limit field to specify the maximum allowed coupling for a method. Use the Include couplings to java system classes option to count references to classes from 'java'or 'javax' packages. Use the Include couplings to library classes option to count references to third-party library classes.",
"markdown": "Reports methods that reference too many other classes. Methods with too high coupling can be very fragile and should be probably split into smaller methods.\n\nEach referenced class is counted only once no matter how many times it is referenced.\n\nConfigure the inspection:\n\n* Use the **Method coupling limit** field to specify the maximum allowed coupling for a method.\n* Use the **Include couplings to java system classes** option to count references to classes from `java`or `javax` packages.\n* Use the **Include couplings to library classes** option to count references to third-party library classes."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OverlyCoupledMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Method metrics",
"index": 139,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AccessToStaticFieldLockedOnInstance",
"shortDescription": {
"text": "Access to 'static' field locked on instance data"
},
"fullDescription": {
"text": "Reports access to non-constant static fields that are locked on either 'this' or an instance field of 'this'. Locking a static field on instance data does not prevent the field from being modified by other instances, and thus may result in unexpected race conditions. Example: 'static String test;\n public void foo() {\n synchronized (this) {\n System.out.println(test); // warning\n }\n }' There is a quick-fix that allows ignoring static fields of specific types. You can manage those ignored types in the inspection options. Use the inspection options to specify which classes used for static fields should be ignored.",
"markdown": "Reports access to non-constant static fields that are locked on either `this` or an instance field of `this`.\n\n\nLocking a static field on instance data does not prevent the field from being\nmodified by other instances, and thus may result in unexpected race conditions.\n\n**Example:**\n\n\n static String test;\n public void foo() {\n synchronized (this) {\n System.out.println(test); // warning\n }\n }\n\n\nThere is a quick-fix that allows ignoring static fields of specific types.\nYou can manage those ignored types in the inspection options.\n\n\nUse the inspection options to specify which classes used for static fields should be ignored."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AccessToStaticFieldLockedOnInstance",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AssertEqualsCalledOnArray",
"shortDescription": {
"text": "'assertEquals()' called on array"
},
"fullDescription": {
"text": "Reports JUnit 'assertEquals()' calls with arguments of an array type. Such methods compare the arrays' identities instead of the arrays' contents. Array contents should be checked with the 'assertArrayEquals()' method. Example: '@Test\n public void testSort() {\n int[] actual = {248, 496, 0, 56};\n Arrays.sort(actual);\n Assert.assertEquals(new int[] {0, 56, 248, 496}, actual);\n }' After the quick-fix is applied: '@Test\n public void testSort() {\n int[] actual = {248, 496, 0, 56};\n Arrays.sort(actual);\n Assert.assertArrayEquals(new int[] {0, 56, 248, 496}, actual);\n }'",
"markdown": "Reports JUnit `assertEquals()` calls with arguments of an array type. Such methods compare the arrays' identities instead of the arrays' contents. Array contents should be checked with the `assertArrayEquals()` method.\n\n**Example:**\n\n\n @Test\n public void testSort() {\n int[] actual = {248, 496, 0, 56};\n Arrays.sort(actual);\n Assert.assertEquals(new int[] {0, 56, 248, 496}, actual);\n }\n\nAfter the quick-fix is applied:\n\n\n @Test\n public void testSort() {\n int[] actual = {248, 496, 0, 56};\n Arrays.sort(actual);\n Assert.assertArrayEquals(new int[] {0, 56, 248, 496}, actual);\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AssertEqualsCalledOnArray",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JVM languages/Test frameworks",
"index": 128,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ComparatorCombinators",
"shortDescription": {
"text": "'Comparator' combinator can be used"
},
"fullDescription": {
"text": "Reports 'Comparator' instances defined as lambda expressions that could be expressed using 'Comparator.comparing()' calls. Chained comparisons which can be replaced by 'Comparator.thenComparing()' expression are also reported. Example: 'myList.sort((person1, person2) -> person1.getName().compareTo(person2.getName()));\n\n myList2.sort((person1, person2) -> {\n int res = person1.first().compareTo(person2.first());\n if(res == 0) res = person1.second().compareTo(person2.second());\n if(res == 0) res = person1.third() - person2.third();\n return res;\n });' After the quick-fixes are applied: 'myList.sort(Comparator.comparing(Person::getName));\n\n myList2.sort(Comparator.comparing(Person::first)\n .thenComparing(Person::second)\n .thenComparingInt(Person::third));'",
"markdown": "Reports `Comparator` instances defined as lambda expressions that could be expressed using `Comparator.comparing()` calls. Chained comparisons which can be replaced by `Comparator.thenComparing()` expression are also reported.\n\nExample:\n\n\n myList.sort((person1, person2) -> person1.getName().compareTo(person2.getName()));\n\n myList2.sort((person1, person2) -> {\n int res = person1.first().compareTo(person2.first());\n if(res == 0) res = person1.second().compareTo(person2.second());\n if(res == 0) res = person1.third() - person2.third();\n return res;\n });\n\nAfter the quick-fixes are applied:\n\n\n myList.sort(Comparator.comparing(Person::getName));\n\n myList2.sort(Comparator.comparing(Person::first)\n .thenComparing(Person::second)\n .thenComparingInt(Person::third));\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ComparatorCombinators",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 8",
"index": 119,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AbstractMethodCallInConstructor",
"shortDescription": {
"text": "Abstract method called during object construction"
},
"fullDescription": {
"text": "Reports calls to 'abstract' methods of the current class during object construction. A method is called during object construction if it is inside a: Constructor Non-static instance initializer Non-static field initializer 'clone()' method 'readObject()' method 'readObjectNoData()' method Such calls may result in subtle bugs, as object initialization may happen before the method call. Example: 'abstract class Parent {\n abstract void abstractMethod();\n }\n\n class Child extends Parent {\n Child() {\n abstractMethod();\n }\n }' This inspection shares the functionality with the following inspections: Overridable method called during object construction Overridden method called during object construction Only one inspection should be enabled at once to prevent warning duplication.",
"markdown": "Reports calls to `abstract` methods of the current class during object construction.\n\nA method is called during object construction if it is inside a:\n\n* Constructor\n* Non-static instance initializer\n* Non-static field initializer\n* `clone()` method\n* `readObject()` method\n* `readObjectNoData()` method\n\nSuch calls may result in subtle bugs, as object initialization may happen before the method call.\n\n**Example:**\n\n\n abstract class Parent {\n abstract void abstractMethod();\n }\n\n class Child extends Parent {\n Child() {\n abstractMethod();\n }\n }\n\nThis inspection shares the functionality with the following inspections:\n\n* Overridable method called during object construction\n* Overridden method called during object construction\n\nOnly one inspection should be enabled at once to prevent warning duplication."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AbstractMethodCallInConstructor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Initialization",
"index": 26,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TailRecursion",
"shortDescription": {
"text": "Tail recursion"
},
"fullDescription": {
"text": "Reports tail recursion, that is, when a method calls itself as its last action before returning. Tail recursion can always be replaced by looping, which will be considerably faster. Some JVMs perform tail-call optimization, while others do not. Thus, tail-recursive solutions may have considerably different performance characteristics on different virtual machines. Example: 'int factorial(int val, int runningVal) {\n if (val == 1) {\n return runningVal;\n } else {\n return factorial(val - 1, runningVal * val);\n }\n }' After the quick-fix is applied: 'int factorial(int val, int runningVal) {\n while (true) {\n if (val == 1) {\n return runningVal;\n } else {\n runningVal = runningVal * val;\n val = val - 1;\n }\n }\n }'",
"markdown": "Reports tail recursion, that is, when a method calls itself as its last action before returning.\n\n\nTail recursion can always be replaced by looping, which will be considerably faster.\nSome JVMs perform tail-call optimization, while others do not. Thus, tail-recursive solutions may have considerably different\nperformance characteristics on different virtual machines.\n\nExample:\n\n\n int factorial(int val, int runningVal) {\n if (val == 1) {\n return runningVal;\n } else {\n return factorial(val - 1, runningVal * val);\n }\n }\n\nAfter the quick-fix is applied:\n\n\n int factorial(int val, int runningVal) {\n while (true) {\n if (val == 1) {\n return runningVal;\n } else {\n runningVal = runningVal * val;\n val = val - 1;\n }\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "TailRecursion",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PreviewFeature",
"shortDescription": {
"text": "Preview Feature warning"
},
"fullDescription": {
"text": "Reports usages of Preview Feature APIs, i.e. of a module, package, class, interface, method, constructor, field, or enum constant in the 'java.*' or 'javax.*' namespace annotated with '@PreviewFeature'. A preview feature is a new feature of the Java language, Java Virtual Machine, or Java SE API that is fully specified, fully implemented, and is yet impermanent. The notion of a preview feature is defined in JEP 12. If some piece of code depends on a preview API, it may stop compiling in future JDK versions if the feature is changed or removed. The inspection only reports if the language level of the project or module is Preview. New in 2021.1",
"markdown": "Reports usages of Preview Feature APIs, i.e. of a module, package, class, interface, method, constructor, field, or enum constant in the `java.*` or `javax.*` namespace annotated with `@PreviewFeature`.\n\n\nA preview feature is a new feature of the Java language, Java Virtual Machine, or Java SE API that is fully specified, fully implemented,\nand is yet impermanent. The notion of a preview feature is defined in [JEP 12](https://openjdk.org/jeps/12).\n\n\nIf some piece of code depends on a preview API, it may stop compiling in future JDK versions if the feature is changed or removed.\n\nThe inspection only reports if the language level of the project or module is **Preview**.\n\nNew in 2021.1"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "preview",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Compiler issues",
"index": 217,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ObjectEqualsCanBeEquality",
"shortDescription": {
"text": "'equals()' call can be replaced with '=='"
},
"fullDescription": {
"text": "Reports calls to 'equals()' that can be replaced by '==' or '!=' expressions without a change in semantics. These calls can be replaced when they are used to compare 'final' classes that don't have their own 'equals()' implementation but use the default 'Object.equals()'. This replacement may result in better performance. There is a separate inspection for 'equals()' calls on 'enum' values: 'equals()' called on Enum value.",
"markdown": "Reports calls to `equals()` that can be replaced by `==` or `!=` expressions without a change in semantics.\n\nThese calls can be replaced when they are used to compare `final` classes that don't have their own `equals()` implementation but use the default `Object.equals()`.\nThis replacement may result in better performance.\n\nThere is a separate inspection for `equals()` calls on `enum` values: 'equals()' called on Enum value."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ObjectEqualsCanBeEquality",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JDBCPrepareStatementWithNonConstantString",
"shortDescription": {
"text": "Call to 'Connection.prepare*()' with non-constant string"
},
"fullDescription": {
"text": "Reports calls to 'java.sql.Connection.prepareStatement()', 'java.sql.Connection.prepareCall()', or any of their variants which take a dynamically-constructed string as the statement to prepare. Constructed SQL statements are a common source of security breaches. By default, this inspection ignores compile-time constants. Example: 'String bar() { return \"bar\"; }\n\n Connection connection = DriverManager.getConnection(\"\", \"\", \"\");\n connection.(\"SELECT * FROM user WHERE name='\" + bar() + \"'\");' Use the inspection settings to consider any 'static' 'final' fields as constants. Be careful, because strings like the following will be ignored when the option is enabled: 'static final String SQL = \"SELECT * FROM user WHERE name='\" + getUserInput() + \"'\";'",
"markdown": "Reports calls to `java.sql.Connection.prepareStatement()`, `java.sql.Connection.prepareCall()`, or any of their variants which take a dynamically-constructed string as the statement to prepare.\n\n\nConstructed SQL statements are a common source of\nsecurity breaches. By default, this inspection ignores compile-time constants.\n\n**Example:**\n\n\n String bar() { return \"bar\"; }\n\n Connection connection = DriverManager.getConnection(\"\", \"\", \"\");\n connection.(\"SELECT * FROM user WHERE name='\" + bar() + \"'\");\n\nUse the inspection settings to consider any `static` `final` fields as constants. Be careful, because strings like the following will be ignored when the option is enabled:\n\n\n static final String SQL = \"SELECT * FROM user WHERE name='\" + getUserInput() + \"'\";\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JDBCPrepareStatementWithNonConstantString",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Security",
"index": 32,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InvalidComparatorMethodReference",
"shortDescription": {
"text": "Invalid method reference used for 'Comparator'"
},
"fullDescription": {
"text": "Reports method references mapped to the 'Comparator' interface that don't fulfill its contract. Some method references, like 'Integer::max', can be mapped to the 'Comparator' interface. However, using them as 'Comparator' is meaningless and the result might be unpredictable. Example: 'ArrayList<Integer> ints = foo();\n ints.sort(Math::min);' After the quick-fix is applied: 'ArrayList<Integer> ints = foo();\n ints.sort(Comparator.reverseOrder());'",
"markdown": "Reports method references mapped to the `Comparator` interface that don't fulfill its contract.\n\n\nSome method references, like `Integer::max`, can be mapped to the `Comparator` interface.\nHowever, using them as `Comparator` is meaningless and the result might be unpredictable.\n\nExample:\n\n\n ArrayList<Integer> ints = foo();\n ints.sort(Math::min);\n\nAfter the quick-fix is applied:\n\n\n ArrayList<Integer> ints = foo();\n ints.sort(Comparator.reverseOrder());\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "InvalidComparatorMethodReference",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java9ModuleExportsPackageToItself",
"shortDescription": {
"text": "Module exports/opens package to itself"
},
"fullDescription": {
"text": "Reports packages that are exported to, or opened in the same Java 9 module in which they are defined. The quick-fix removes such directives from 'module-info.java'. Example: 'module com.mycomp {\n exports com.mycomp.main to com.mycomp;\n }' After the quick-fix is applied: 'module main {\n }' This inspection only reports if the language level of the project or module is 9 or higher.",
"markdown": "Reports packages that are exported to, or opened in the same Java 9 module in which they are defined. The quick-fix removes such directives from `module-info.java`.\n\nExample:\n\n\n module com.mycomp {\n exports com.mycomp.main to com.mycomp;\n }\n\nAfter the quick-fix is applied:\n\n\n module main {\n }\n\nThis inspection only reports if the language level of the project or module is 9 or higher."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "Java9ModuleExportsPackageToItself",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Visibility",
"index": 97,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LoggerInitializedWithForeignClass",
"shortDescription": {
"text": "Logger initialized with foreign class"
},
"fullDescription": {
"text": "Reports 'Logger' instances that are initialized with a 'class' literal from a different class than the 'Logger' is contained in. This can easily happen when copy-pasting some code from another class and may result in logging events under an unexpected category and cause filters to be applied incorrectly. A quick-fix is provided to replace the foreign class literal with one from the surrounding class. Example: 'public class Paramount {\n protected static final Logger LOG = Logger.getLogger(Critical.class);\n\n // ... other fields and methods\n }' After the quick-fix is applied: 'public class Paramount {\n protected static final Logger LOG = Logger.getLogger(Paramount.class);\n\n // ... other fields and methods\n }' Configure the inspection: Use the table to specify the logger factory classes and logger factory methods recognized by this inspection. Use the Ignore loggers initialized with a superclass option to ignore loggers that are initialized with a superclass of the class containing the logger. Use the Ignore loggers in non-public classes to only warn on loggers in 'public' classes.",
"markdown": "Reports `Logger` instances that are initialized with a `class` literal from a different class than the `Logger` is contained in. This can easily happen when copy-pasting some code from another class and may result in logging events under an unexpected category and cause filters to be applied incorrectly.\n\nA quick-fix is provided to replace the foreign class literal with one from the surrounding class.\n\n**Example:**\n\n\n public class Paramount {\n protected static final Logger LOG = Logger.getLogger(Critical.class);\n\n // ... other fields and methods\n }\n\nAfter the quick-fix is applied:\n\n\n public class Paramount {\n protected static final Logger LOG = Logger.getLogger(Paramount.class);\n\n // ... other fields and methods\n }\n\n\nConfigure the inspection:\n\n* Use the table to specify the logger factory classes and logger factory methods recognized by this inspection.\n* Use the **Ignore loggers initialized with a superclass** option to ignore loggers that are initialized with a superclass of the class containing the logger.\n* Use the **Ignore loggers in non-public classes** to only warn on loggers in `public` classes."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LoggerInitializedWithForeignClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Logging",
"index": 79,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MarkerInterface",
"shortDescription": {
"text": "Marker interface"
},
"fullDescription": {
"text": "Reports marker interfaces without any methods or fields. Such interfaces may be confusing and typically indicate a design failure. The inspection ignores interfaces that extend two or more interfaces and interfaces that specify the generic type of their superinterface.",
"markdown": "Reports marker interfaces without any methods or fields.\n\nSuch interfaces may be confusing and typically indicate a design failure.\n\nThe inspection ignores interfaces that extend two or more interfaces and interfaces\nthat specify the generic type of their superinterface."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MarkerInterface",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SortedCollectionWithNonComparableKeys",
"shortDescription": {
"text": "Sorted collection with non-comparable elements"
},
"fullDescription": {
"text": "Reports construction of sorted collections, for example 'TreeSet', that rely on natural ordering, whose element type doesn't implement the 'Comparable' interface. It's unlikely that such a collection will work properly. A false positive is possible if the collection element type is a non-comparable super-type, but the collection is intended to only hold comparable sub-types. Even if this is the case, it's better to narrow the collection element type or declare the super-type as 'Comparable' because the mentioned approach is error-prone. The inspection also reports cases when the collection element is a type parameter which is not declared as 'extends Comparable'. You can suppress the warnings on type parameters using the provided option (for example, to keep the API compatibility). New in 2018.3",
"markdown": "Reports construction of sorted collections, for example `TreeSet`, that rely on natural ordering, whose element type doesn't implement the `Comparable` interface.\n\nIt's unlikely that such a collection will work properly.\n\n\nA false positive is possible if the collection element type is a non-comparable super-type,\nbut the collection is intended to only hold comparable sub-types. Even if this is the case,\nit's better to narrow the collection element type or declare the super-type as `Comparable` because the mentioned approach is error-prone.\n\n\nThe inspection also reports cases when the collection element is a type parameter which is not declared as `extends Comparable`.\nYou can suppress the warnings on type parameters using the provided option (for example, to keep the API compatibility).\n\n\nNew in 2018.3"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SortedCollectionWithNonComparableKeys",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CommentedOutCode",
"shortDescription": {
"text": "Commented out code"
},
"fullDescription": {
"text": "Reports comments that contain Java code. Usually, code that is commented out gets outdated very quickly and becomes misleading. As most projects use some kind of version control system, it is better to delete commented out code completely and use the VCS history instead. New in 2020.3",
"markdown": "Reports comments that contain Java code.\n\nUsually, code that is commented out gets outdated very quickly and becomes misleading.\nAs most projects use some kind of version control system,\nit is better to delete commented out code completely and use the VCS history instead.\n\nNew in 2020.3"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "CommentedOutCode",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Java/Code maturity",
"index": 67,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AnonymousClassComplexity",
"shortDescription": {
"text": "Overly complex anonymous class"
},
"fullDescription": {
"text": "Reports anonymous inner classes whose total complexity exceeds the specified maximum. The total complexity of a class is the sum of cyclomatic complexities of all the methods and initializers the class declares. Inherited methods and initializers are not counted toward the total complexity. Anonymous classes should have very low complexity otherwise they are hard to understand and should be promoted to become named inner classes. Use the Cyclomatic complexity limit field to specify the maximum allowed complexity for a class.",
"markdown": "Reports anonymous inner classes whose total complexity exceeds the specified maximum.\n\nThe total complexity of a class is the sum of cyclomatic complexities of all the methods\nand initializers the class declares. Inherited methods and initializers are not counted\ntoward the total complexity.\n\nAnonymous classes should have very low complexity otherwise they are hard to understand and should be promoted to become named inner classes.\n\nUse the **Cyclomatic complexity limit** field to specify the maximum allowed complexity for a class."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OverlyComplexAnonymousInnerClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class metrics",
"index": 125,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "WaitWithoutCorrespondingNotify",
"shortDescription": {
"text": "'wait()' without corresponding 'notify()'"
},
"fullDescription": {
"text": "Reports calls to 'Object.wait()', for which no call to the corresponding 'Object.notify()' or 'Object.notifyAll()' can be found. This inspection only reports calls with qualifiers referencing fields of the current class. Example: 'public class Foo {\n public Object foo = new Object();\n\n void bar() throws InterruptedException {\n this.foo.wait();\n }\n }'",
"markdown": "Reports calls to `Object.wait()`, for which no call to the corresponding `Object.notify()` or `Object.notifyAll()` can be found.\n\nThis inspection only reports calls with qualifiers referencing fields of the current class.\n\n**Example:**\n\n\n public class Foo {\n public Object foo = new Object();\n\n void bar() throws InterruptedException {\n this.foo.wait();\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "WaitWithoutCorrespondingNotify",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UseOfAWTPeerClass",
"shortDescription": {
"text": "Use of AWT peer class"
},
"fullDescription": {
"text": "Reports uses of AWT peer classes. Such classes represent native windowing system widgets, and will be non-portable between different windowing systems. Example: 'import java.awt.peer.ButtonPeer;\n\n abstract class Sample implements ButtonPeer {\n public void foo() {\n Sample sample;\n }\n }'",
"markdown": "Reports uses of AWT peer classes. Such classes represent native windowing system widgets, and will be non-portable between different windowing systems.\n\n**Example:**\n\n\n import java.awt.peer.ButtonPeer;\n\n abstract class Sample implements ButtonPeer {\n public void foo() {\n Sample sample;\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UseOfAWTPeerClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Portability",
"index": 179,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SerializableWithUnconstructableAncestor",
"shortDescription": {
"text": "Serializable class with unconstructable ancestor"
},
"fullDescription": {
"text": "Reports 'Serializable' classes whose closest non-serializable ancestor doesn't have a no-argument constructor. Such classes cannot be deserialized and will fail with an 'InvalidClassException'. Example: 'class Ancestor {\n private String name;\n Ancestor(String name) {\n this.name = name;\n }\n }\n\n // warning on this class because the superclass is not\n // serializable, and its constructor takes arguments\n class Descendant extends Ancestor implements Serializable {\n Descendant() {\n super(\"Bob\");\n }\n }'",
"markdown": "Reports `Serializable` classes whose closest non-serializable ancestor doesn't have a no-argument constructor. Such classes cannot be deserialized and will fail with an `InvalidClassException`.\n\n**Example:**\n\n\n class Ancestor {\n private String name;\n Ancestor(String name) {\n this.name = name;\n }\n }\n\n // warning on this class because the superclass is not\n // serializable, and its constructor takes arguments\n class Descendant extends Ancestor implements Serializable {\n Descendant() {\n super(\"Bob\");\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SerializableClassWithUnconstructableAncestor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Serialization issues",
"index": 54,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LambdaBodyCanBeCodeBlock",
"shortDescription": {
"text": "Lambda body can be code block"
},
"fullDescription": {
"text": "Reports lambdas whose body is an expression and suggests converting expression bodies to code blocks. Example: 'n -> n + 1' After the quick-fix is applied: 'n -> {\n return n + 1;\n}'",
"markdown": "Reports lambdas whose body is an expression and suggests converting expression bodies to code blocks.\n\nExample:\n\n\n n -> n + 1\n\nAfter the quick-fix is applied:\n\n n -> {\n return n + 1;\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "LambdaBodyCanBeCodeBlock",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CustomSecurityManager",
"shortDescription": {
"text": "Custom 'SecurityManager'"
},
"fullDescription": {
"text": "Reports user-defined subclasses of 'java.lang.SecurityManager'. While not necessarily representing a security hole, such classes should be thoroughly and professionally inspected for possible security issues. Example: 'class CustomSecurityManager extends SecurityManager {\n }'",
"markdown": "Reports user-defined subclasses of `java.lang.SecurityManager`.\n\n\nWhile not necessarily representing a security hole, such classes should be thoroughly\nand professionally inspected for possible security issues.\n\n**Example:**\n\n\n class CustomSecurityManager extends SecurityManager {\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CustomSecurityManager",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Security",
"index": 32,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TimeToString",
"shortDescription": {
"text": "Call to 'Time.toString()'"
},
"fullDescription": {
"text": "Reports 'toString()' calls on 'java.sql.Time' objects. Such calls are usually incorrect in an internationalized environment.",
"markdown": "Reports `toString()` calls on `java.sql.Time` objects. Such calls are usually incorrect in an internationalized environment."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CallToTimeToString",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Internationalization",
"index": 110,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PatternVariablesCanBeReplacedWithCast",
"shortDescription": {
"text": "Using 'instanceof' with patterns"
},
"fullDescription": {
"text": "Reports 'instanceof' with patterns and suggests converting them to ordinary 'instanceof' with casts. This inspection makes it possible to move 'instanceof' with patterns to a codebase using an earlier Java version by applying the quick-fix. Note that the result can be not completely equivalent to the original 'instanceof' with patterns when a complex expression before 'instanceof' is used. In this case this expression will be reevaluated. Example: 'if (object instanceof String txt && txt.length() == 1) {\n System.out.println(txt);\n } else {\n return;\n }\n System.out.println(txt);' After the quick-fix is applied: 'if (object instanceof String && ((String) object).length() ==1) {\n String txt = (String) object;\n System.out.println(txt);\n } else {\n return;\n }\n String txt = (String) object;\n System.out.println(txt);' New in 2023.1",
"markdown": "Reports `instanceof` with patterns and suggests converting them to ordinary `instanceof` with casts.\n\nThis inspection makes it possible to move `instanceof` with patterns to a codebase using an earlier Java version\nby applying the quick-fix.\n\n\nNote that the result can be not completely equivalent to the original `instanceof` with patterns when\na complex expression before `instanceof` is used. In this case this expression will be reevaluated.\n\nExample:\n\n\n if (object instanceof String txt && txt.length() == 1) {\n System.out.println(txt);\n } else {\n return;\n }\n System.out.println(txt);\n\nAfter the quick-fix is applied:\n\n\n if (object instanceof String && ((String) object).length() ==1) {\n String txt = (String) object;\n System.out.println(txt);\n } else {\n return;\n }\n String txt = (String) object;\n System.out.println(txt);\n\nNew in 2023.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PatternVariablesCanBeReplacedWithCast",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InnerClassOnInterface",
"shortDescription": {
"text": "Inner class of interface"
},
"fullDescription": {
"text": "Reports inner classes in 'interface' classes. Some coding standards discourage the use of such classes. The inspection doesn't report enum classes and annotation interfaces. Use the Ignore inner interfaces of interfaces option to ignore inner interfaces. For example: 'interface I {\n interface Inner {\n }\n }'",
"markdown": "Reports inner classes in `interface` classes.\n\nSome coding standards\ndiscourage the use of such classes. The inspection doesn't report enum classes and annotation interfaces.\n\n\nUse the **Ignore inner interfaces of interfaces** option to ignore inner interfaces. For example:\n\n\n interface I {\n interface Inner {\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "InnerClassOfInterface",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PublicFieldAccessedInSynchronizedContext",
"shortDescription": {
"text": "Non-private field accessed in 'synchronized' context"
},
"fullDescription": {
"text": "Reports non-'final', non-'private' fields that are accessed in a synchronized context. A non-'private' field cannot be guaranteed to always be accessed in a synchronized manner, and such \"partially synchronized\" access may result in unexpectedly inconsistent data structures. Example: 'class Bar {\n public String field1;\n }\n public Bar myBar;\n\n synchronized public void sample() {\n myBar.field1 = \"bar\";\n }'",
"markdown": "Reports non-`final`, non-`private` fields that are accessed in a synchronized context.\n\n\nA non-`private` field cannot be guaranteed to always be accessed in a synchronized manner, and such \"partially synchronized\"\naccess may result in unexpectedly inconsistent data structures.\n\n**Example:**\n\n\n class Bar {\n public String field1;\n }\n public Bar myBar;\n\n synchronized public void sample() {\n myBar.field1 = \"bar\";\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonPrivateFieldAccessedInSynchronizedContext",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ForeachStatement",
"shortDescription": {
"text": "Enhanced 'for' statement"
},
"fullDescription": {
"text": "Reports enhanced 'for' statements. Example: 'for (int x: Arrays.asList(1, 2, 3)) {\n System.out.println(x);\n }' After the quick-fix is applied: 'for (Iterator<Integer> iterator = Arrays.asList(1, 2, 3).iterator(); iterator.hasNext(); ) {\n final int x = iterator.next();\n System.out.println(x);\n }' Enhanced 'for' statement appeared in Java 5. This inspection can help to downgrade for backward compatibility with earlier Java versions.",
"markdown": "Reports enhanced `for` statements.\n\nExample:\n\n\n for (int x: Arrays.asList(1, 2, 3)) {\n System.out.println(x);\n }\n\nAfter the quick-fix is applied:\n\n\n for (Iterator<Integer> iterator = Arrays.asList(1, 2, 3).iterator(); iterator.hasNext(); ) {\n final int x = iterator.next();\n System.out.println(x);\n }\n\n\n*Enhanced* `for` *statement* appeared in Java 5.\nThis inspection can help to downgrade for backward compatibility with earlier Java versions."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ForeachStatement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level issues",
"index": 246,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OptionalUsedAsFieldOrParameterType",
"shortDescription": {
"text": "'Optional' used as field or parameter type"
},
"fullDescription": {
"text": "Reports any cases in which 'java.util.Optional<T>', 'java.util.OptionalDouble', 'java.util.OptionalInt', 'java.util.OptionalLong', or 'com.google.common.base.Optional' are used as types for fields or parameters. 'Optional' was designed to provide a limited mechanism for library method return types in which a clear way to represent \"no result\" was needed. Using a field with the 'java.util.Optional' type is also problematic if the class needs to be 'Serializable', as 'java.util.Optional' is not serializable. Example: 'class MyClass {\n Optional<String> name; // Optional field\n\n // Optional parameter\n void setName(Optional<String> name) {\n this.name = name;\n }\n }'",
"markdown": "Reports any cases in which `java.util.Optional<T>`, `java.util.OptionalDouble`, `java.util.OptionalInt`, `java.util.OptionalLong`, or `com.google.common.base.Optional` are used as types for fields or parameters.\n\n`Optional` was designed to provide a limited mechanism for library method return types in which a clear way to represent \"no result\"\nwas needed.\n\nUsing a field with the `java.util.Optional` type is also problematic if the class needs to be\n`Serializable`, as `java.util.Optional` is not serializable.\n\nExample:\n\n\n class MyClass {\n Optional<String> name; // Optional field\n\n // Optional parameter\n void setName(Optional<String> name) {\n this.name = name;\n }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "OptionalUsedAsFieldOrParameterType",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Abstraction issues",
"index": 83,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceAllDot",
"shortDescription": {
"text": "Suspicious regex expression argument"
},
"fullDescription": {
"text": "Reports calls to 'String.replaceAll()' or 'String.split()' where the first argument is a single regex meta character argument. The regex meta characters are one of '.$|()[{^?*+\\'. They have a special meaning in regular expressions. For example, calling '\"ab.cd\".replaceAll(\".\", \"-\")' produces '\"-----\"', because the dot matches any character. Most likely the escaped variant '\"\\\\.\"' was intended instead. Using 'File.separator' as a regex is also reported. The 'File.separator' has a platform specific value. It equals to '/' on Linux and Mac but equals to '\\' on Windows, which is not a valid regular expression, so such code is not portable. Example: 's.replaceAll(\".\", \"-\");' After the quick-fix is applied: 's.replaceAll(\"\\\\.\", \"-\");'",
"markdown": "Reports calls to `String.replaceAll()` or `String.split()` where the first argument is a single regex meta character argument.\n\n\nThe regex meta characters are one of `.$|()[{^?*+\\`. They have a special meaning in regular expressions.\nFor example, calling `\"ab.cd\".replaceAll(\".\", \"-\")` produces `\"-----\"`, because the dot matches any character.\nMost likely the escaped variant `\"\\\\.\"` was intended instead.\n\n\nUsing `File.separator` as a regex is also reported. The `File.separator` has a platform specific value. It\nequals to `/` on Linux and Mac but equals to `\\` on Windows, which is not a valid regular expression, so\nsuch code is not portable.\n\n**Example:**\n\n\n s.replaceAll(\".\", \"-\");\n\nAfter the quick-fix is applied:\n\n\n s.replaceAll(\"\\\\.\", \"-\");\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SuspiciousRegexArgument",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PackageVisibleField",
"shortDescription": {
"text": "Package-visible field"
},
"fullDescription": {
"text": "Reports fields that are declared without any access modifier (also known as package-private). Constants (that is, fields marked 'static' and 'final') are not reported. Example: 'public class A {\n Object object; // warning\n final static int MODE = 0; // constant, no warning\n }'",
"markdown": "Reports fields that are declared without any access modifier (also known as package-private).\n\nConstants (that is, fields marked `static` and `final`) are not reported.\n\n**Example:**\n\n\n public class A {\n Object object; // warning\n final static int MODE = 0; // constant, no warning\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PackageVisibleField",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Encapsulation",
"index": 211,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MoveFieldAssignmentToInitializer",
"shortDescription": {
"text": "Field assignment can be moved to initializer"
},
"fullDescription": {
"text": "Suggests replacing initialization of fields using assignment with initialization in the field declaration. Only reports if the field assignment is located in an instance or static initializer, and joining it with the field declaration is likely to be safe. In other cases, like assignment inside a constructor, the quick-fix is provided without highlighting, as the fix may change the semantics. Example: 'class MyClass {\n static final int intConstant;\n \n static {\n intConstant = 10;\n }\n }' The quick fix moves the assigned value to the field initializer removing the class initializer if possible: 'class MyClass {\n static final int intConstant = 10;\n }' Since 2017.2",
"markdown": "Suggests replacing initialization of fields using assignment with initialization in the field declaration.\n\nOnly reports if the field assignment is located in an instance or static initializer, and\njoining it with the field declaration is likely to be safe.\nIn other cases, like assignment inside a constructor, the quick-fix is provided without highlighting,\nas the fix may change the semantics.\n\nExample:\n\n\n class MyClass {\n static final int intConstant;\n \n static {\n intConstant = 10;\n }\n }\n\nThe quick fix moves the assigned value to the field initializer removing the class initializer if possible:\n\n\n class MyClass {\n static final int intConstant = 10;\n }\n\nSince 2017.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "MoveFieldAssignmentToInitializer",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SuspiciousListRemoveInLoop",
"shortDescription": {
"text": "Suspicious 'List.remove()' in loop"
},
"fullDescription": {
"text": "Reports 'list.remove(index)' calls inside an ascending counted loop. This is suspicious as the list becomes shorter after the removal, and the next element gets skipped. A simple fix is to decrease the index variable after the removal, but probably removing via an iterator or using the 'removeIf()' method (Java 8 and later) is a more robust alternative. If you don't expect that 'remove()' will be called more than once in a loop, consider adding a 'break' after it. Example: 'public static void main(String[] args) {\n process(new ArrayList<>(\n Arrays.asList(\"1\", \"2\", \"|\", \"3\", \"4\")));\n }\n\n static void process(List<String> list) {\n for (int i = 0; i < list.size(); i++) {\n if (list.get(i).equals(\"|\")) {\n list.remove(i);\n continue;\n }\n System.out.println(list.get(i));\n }\n }' The code looks like '1 2 3 4' is going to be printed, but in reality, '3' will be skipped in the output. New in 2018.2",
"markdown": "Reports `list.remove(index)` calls inside an ascending counted loop.\n\n\nThis is suspicious as the list becomes\nshorter after the removal, and the next element gets skipped. A simple fix is to decrease the index variable\nafter the removal,\nbut probably removing via an iterator or using the `removeIf()` method (Java 8 and later) is a more robust alternative.\nIf you don't expect that `remove()` will be called more than once in a loop, consider adding a `break` after it.\n\n**Example:**\n\n public static void main(String[] args) {\n process(new ArrayList<>(\n Arrays.asList(\"1\", \"2\", \"|\", \"3\", \"4\")));\n }\n\n static void process(List<String> list) {\n for (int i = 0; i < list.size(); i++) {\n if (list.get(i).equals(\"|\")) {\n list.remove(i);\n continue;\n }\n System.out.println(list.get(i));\n }\n }\n\nThe code looks like `1 2 3 4` is going to be printed, but in reality, `3` will be skipped in the output.\n\nNew in 2018.2"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SuspiciousListRemoveInLoop",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "WhileLoopSpinsOnField",
"shortDescription": {
"text": "'while' loop spins on field"
},
"fullDescription": {
"text": "Reports 'while' loops that spin on the value of a non-'volatile' field, waiting for it to be changed by another thread. In addition to being potentially extremely CPU intensive when little work is done inside the loop, such loops are likely to have different semantics from what was intended. The Java Memory Model allows such loops to never complete even if another thread changes the field's value. Additionally, since Java 9 it's recommended to call 'Thread.onSpinWait()' inside a spin loop on a 'volatile' field, which may significantly improve performance on some hardware. Example: 'class SpinsOnField {\n boolean ready = false;\n\n void run() {\n while (!ready) {\n }\n // do some work\n }\n\n void markAsReady() {\n ready = true;\n }\n }' After the quick-fix is applied: 'class SpinsOnField {\n volatile boolean ready = false;\n\n void run() {\n while (!ready) {\n Thread.onSpinWait();\n }\n // do some work\n }\n\n void markAsReady() {\n ready = true;\n }\n }' Use the inspection options to only report empty 'while' loops.",
"markdown": "Reports `while` loops that spin on the value of a non-`volatile` field, waiting for it to be changed by another thread.\n\n\nIn addition to being potentially extremely CPU intensive when little work is done inside the loop, such\nloops are likely to have different semantics from what was intended.\nThe Java Memory Model allows such loops to never complete even if another thread changes the field's value.\n\n\nAdditionally, since Java 9 it's recommended to call `Thread.onSpinWait()` inside a spin loop\non a `volatile` field, which may significantly improve performance on some hardware.\n\n**Example:**\n\n\n class SpinsOnField {\n boolean ready = false;\n\n void run() {\n while (!ready) {\n }\n // do some work\n }\n\n void markAsReady() {\n ready = true;\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class SpinsOnField {\n volatile boolean ready = false;\n\n void run() {\n while (!ready) {\n Thread.onSpinWait();\n }\n // do some work\n }\n\n void markAsReady() {\n ready = true;\n }\n }\n\n\nUse the inspection options to only report empty `while` loops."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "WhileLoopSpinsOnField",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DefaultAnnotationParam",
"shortDescription": {
"text": "Default annotation parameter value"
},
"fullDescription": {
"text": "Reports annotation parameters that are assigned to their 'default' value. Example: '@interface Test {\n Class<?> expected() default Throwable.class;\n }\n\n @Test(expected = Throwable.class)\n void testSmth() {}' After the quick-fix is applied: '@Test()\n void testSmth() {}'",
"markdown": "Reports annotation parameters that are assigned to their `default` value.\n\nExample:\n\n\n @interface Test {\n Class<?> expected() default Throwable.class;\n }\n\n @Test(expected = Throwable.class)\n void testSmth() {}\n\nAfter the quick-fix is applied:\n\n\n @Test()\n void testSmth() {}\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DefaultAnnotationParam",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Declaration redundancy",
"index": 10,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantScheduledForRemovalAnnotation",
"shortDescription": {
"text": "Redundant @ScheduledForRemoval annotation"
},
"fullDescription": {
"text": "Reports usages of '@ApiStatus.ScheduledForRemoval' annotation without 'inVersion' attribute in code which targets Java 9 or newer version. Such usages can be replaced by 'forRemoval' attribute in '@Deprecated' annotation to simplify code. New in 2022.1",
"markdown": "Reports usages of `@ApiStatus.ScheduledForRemoval` annotation without `inVersion` attribute in code which targets Java 9 or newer version.\n\n\nSuch usages can be replaced by `forRemoval` attribute in `@Deprecated` annotation to simplify code.\n\nNew in 2022.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantScheduledForRemovalAnnotation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code maturity",
"index": 67,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java8MapForEach",
"shortDescription": {
"text": "Map.forEach() can be used"
},
"fullDescription": {
"text": "Suggests replacing 'for(Entry<?,?> entry : map.entrySet()) {...}' or 'map.entrySet().forEach(entry -> ...)' with 'map.forEach((key, value) -> ...)'. Example 'void print(Map<String, Integer> map) {\n map.entrySet().forEach(entry -> {\n String str = entry.getKey();\n System.out.println(str + \":\" + entry.getValue());\n });\n }' After the quick-fix is applied: 'void print(Map<String, Integer> map) {\n map.forEach((str, value) -> System.out.println(str + \":\" + value));\n }' When the Do not report loops option is enabled, only 'entrySet().forEach()' cases will be reported. However, the quick-fix action will be available for 'for'-loops as well. This inspection only reports if the language level of the project or module is 8 or higher. New in 2017.1",
"markdown": "Suggests replacing `for(Entry<?,?> entry : map.entrySet()) {...}` or `map.entrySet().forEach(entry -> ...)` with `map.forEach((key, value) -> ...)`.\n\nExample\n\n\n void print(Map<String, Integer> map) {\n map.entrySet().forEach(entry -> {\n String str = entry.getKey();\n System.out.println(str + \":\" + entry.getValue());\n });\n }\n\nAfter the quick-fix is applied:\n\n\n void print(Map<String, Integer> map) {\n map.forEach((str, value) -> System.out.println(str + \":\" + value));\n }\n\n\nWhen the **Do not report loops** option is enabled, only `entrySet().forEach()` cases will be reported.\nHowever, the quick-fix action will be available for `for`-loops as well.\n\nThis inspection only reports if the language level of the project or module is 8 or higher.\n\nNew in 2017.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "Java8MapForEach",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 8",
"index": 119,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassLoaderInstantiation",
"shortDescription": {
"text": "'ClassLoader' instantiation"
},
"fullDescription": {
"text": "Reports instantiations of the 'java.lang.ClassLoader' class. While often benign, any instantiations of 'ClassLoader' should be closely examined in any security audit. Example: 'Class<?> loadExtraClass(String name) throws Exception {\n try(URLClassLoader loader =\n new URLClassLoader(new URL[]{new URL(\"extraClasses/\")})) {\n return loader.loadClass(name);\n }\n }'",
"markdown": "Reports instantiations of the `java.lang.ClassLoader` class.\n\nWhile often benign, any instantiations of `ClassLoader` should be closely examined in any security audit.\n\n**Example:**\n\n Class<?> loadExtraClass(String name) throws Exception {\n try(URLClassLoader loader =\n new URLClassLoader(new URL[]{new URL(\"extraClasses/\")})) {\n return loader.loadClass(name);\n }\n }\n \n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ClassLoaderInstantiation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Security",
"index": 32,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassInheritanceDepth",
"shortDescription": {
"text": "Class too deep in inheritance tree"
},
"fullDescription": {
"text": "Reports classes that are too deep in the inheritance hierarchy. Classes that are too deeply inherited may be confusing and indicate that a refactoring is necessary. All superclasses from a library are treated as a single superclass, libraries are considered unmodifiable. Use the Inheritance depth limit field to specify the maximum inheritance depth for a class.",
"markdown": "Reports classes that are too deep in the inheritance hierarchy.\n\nClasses that are too deeply inherited may be confusing and indicate that a refactoring is necessary.\n\nAll superclasses from a library are treated as a single superclass, libraries are considered unmodifiable.\n\nUse the **Inheritance depth limit** field to specify the maximum inheritance depth for a class."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ClassTooDeepInInheritanceTree",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class metrics",
"index": 125,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MarkedForRemoval",
"shortDescription": {
"text": "Usage of API marked for removal"
},
"fullDescription": {
"text": "Reports usages of deprecated APIs (classes, fields, and methods) that are marked for removal with '@Deprecated(forRemoval=true)'. The code that uses an API marked for removal may cause a runtime error with a future version of the API. That is why the recommended severity for this inspection is Error. You can change the severity to Warning if you want to use the same code highlighting as in ordinary deprecation. New in 2017.3",
"markdown": "Reports usages of deprecated APIs (classes, fields, and methods) that are marked for removal with `@Deprecated(`**forRemoval**`=true)`.\n\n\nThe code that uses an API marked for removal may cause a runtime error with a future version of the API. That is why\nthe recommended severity for this inspection is *Error*.\n\n\nYou can change the severity to *Warning* if you want to use the same code highlighting as in ordinary deprecation.\n\nNew in 2017.3"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "removal",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Java/Code maturity",
"index": 67,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NestedConditionalExpression",
"shortDescription": {
"text": "Nested conditional expression"
},
"fullDescription": {
"text": "Reports nested conditional expressions as they may result in extremely confusing code. Example: 'int y = a == 10 ? b == 20 ? 10 : a : b;'",
"markdown": "Reports nested conditional expressions as they may result in extremely confusing code.\n\nExample:\n\n\n int y = a == 10 ? b == 20 ? 10 : a : b;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NestedConditionalExpression",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "WhileCanBeForeach",
"shortDescription": {
"text": "'while' loop can be replaced with enhanced 'for' loop"
},
"fullDescription": {
"text": "Reports 'while' loops that iterate over collections and can be replaced with enhanced 'for' loops (foreach iteration syntax). Example: 'Iterator it = c.iterator();\n while(it.hasNext()) {\n Object obj = it.next();\n System.out.println(obj);\n }' Can be replaced with: 'for (Object obj : c) {\n System.out.println(obj);\n }' This inspection only reports if the language level of the project or module is 5 or higher.",
"markdown": "Reports `while` loops that iterate over collections and can be replaced with enhanced `for` loops (foreach iteration syntax).\n\n**Example:**\n\n\n Iterator it = c.iterator();\n while(it.hasNext()) {\n Object obj = it.next();\n System.out.println(obj);\n }\n\nCan be replaced with:\n\n\n for (Object obj : c) {\n System.out.println(obj);\n }\n\nThis inspection only reports if the language level of the project or module is 5 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "WhileLoopReplaceableByForEach",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 5",
"index": 117,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NotNullFieldNotInitialized",
"shortDescription": {
"text": "@NotNull field is not initialized"
},
"fullDescription": {
"text": "Reports fields annotated as not-null that are not initialized in the constructor. Example: 'public class MyClass {\n private @NotNull String value;\n\n public void setValue(@NotNull String value) {\n this.value = value;\n }\n\n public @NotNull String getValue() {\n return value;\n }\n }' Such fields may violate the not-null constraint. In the example above, the 'setValue' parameter is annotated as not-null, but 'getValue' may return null if the setter was not called. Configure the inspection: Use the Ignore fields which could be initialized implicitly option to control whether a warning should be issued if the field could be initialized implicitly (e.g. via a dependency injection). Use the Ignore fields initialized in setUp() method option to control whether a warning should be issued if the field is written in the test case 'setUp()' method.",
"markdown": "Reports fields annotated as not-null that are not initialized in the constructor.\n\nExample:\n\n public class MyClass {\n private @NotNull String value;\n\n public void setValue(@NotNull String value) {\n this.value = value;\n }\n\n public @NotNull String getValue() {\n return value;\n }\n }\n\n\nSuch fields may violate the not-null constraint. In the example above, the `setValue` parameter is annotated as not-null, but\n`getValue` may return null if the setter was not called.\n\nConfigure the inspection:\n\n* Use the **Ignore fields which could be initialized implicitly** option to control whether a warning should be issued if the field could be initialized implicitly (e.g. via a dependency injection).\n* Use the **Ignore fields initialized in setUp() method** option to control whether a warning should be issued if the field is written in the test case `setUp()` method."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NotNullFieldNotInitialized",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs/Nullability problems",
"index": 249,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NotifyCalledOnCondition",
"shortDescription": {
"text": "'notify()' or 'notifyAll()' called on 'java.util.concurrent.locks.Condition' object"
},
"fullDescription": {
"text": "Reports calls to 'notify()' or 'notifyAll()' made on 'java.util.concurrent.locks.Condition' object. This is probably a programming error, and some variant of the 'signal()' or 'signalAll()' method was intended instead, otherwise 'IllegalMonitorStateException' may occur. Example: 'class C {\n final Lock l = new ReentrantLock();\n final Condition c = l.newCondition();\n\n void release() {\n l.lock();\n try {\n c.notifyAll(); // probably 'signalAll()' was intended here\n } finally {\n l.unlock();\n }\n }\n }'",
"markdown": "Reports calls to `notify()` or `notifyAll()` made on `java.util.concurrent.locks.Condition` object.\n\n\nThis is probably a programming error, and some variant of the `signal()` or\n`signalAll()` method was intended instead, otherwise `IllegalMonitorStateException` may occur.\n\n**Example:**\n\n\n class C {\n final Lock l = new ReentrantLock();\n final Condition c = l.newCondition();\n\n void release() {\n l.lock();\n try {\n c.notifyAll(); // probably 'signalAll()' was intended here\n } finally {\n l.unlock();\n }\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NotifyCalledOnCondition",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NewMethodNamingConvention",
"shortDescription": {
"text": "Method naming convention"
},
"fullDescription": {
"text": "Reports methods whose names are too short, too long, or do not follow the specified regular expression pattern. Instance methods that override library methods and constructors are ignored by this inspection. Example: if the inspection is enabled for static methods, and the minimum specified method name length is 4 (the default), the following static method produces a warning, because the length of its name is 3, which is less than 4: 'public static int max(int a, int b)'. A quick-fix that renames such methods is available only in the editor. Configure the inspection: Use the list in the Options section to specify which methods should be checked. Deselect the checkboxes for the method types for which you want to skip the check. Specify 0 in the length fields to skip the corresponding checks. Regular expressions should be specified in the standard 'java.util.regex' format.",
"markdown": "Reports methods whose names are too short, too long, or do not follow the specified regular expression pattern.\n\nInstance methods that override library\nmethods and constructors are ignored by this inspection.\n\n**Example:** if the inspection is enabled for static methods, and the minimum specified method name length is 4 (the default),\nthe following static method produces a warning, because the length of its name is 3, which is less\nthan 4: `public static int max(int a, int b)`.\n\nA quick-fix that renames such methods is available only in the editor.\n\nConfigure the inspection:\n\nUse the list in the **Options** section to specify which methods should be checked. Deselect the checkboxes for the method types for which\nyou want to skip the check. Specify **0** in the length fields to skip the corresponding checks.\n\nRegular expressions should be specified in the standard `java.util.regex` format."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NewMethodNamingConvention",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Naming conventions/Method",
"index": 107,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaLangImport",
"shortDescription": {
"text": "Unnecessary import from the 'java.lang' package"
},
"fullDescription": {
"text": "Reports 'import' statements that refer to the 'java.lang' package. 'java.lang' classes are always implicitly imported, so such import statements are redundant and confusing. Since IntelliJ IDEA can automatically detect and fix such statements with its Optimize Imports command, this inspection is mostly useful for offline reporting on code bases that you don't intend to change.",
"markdown": "Reports `import` statements that refer to the `java.lang` package.\n\n\n`java.lang` classes are always implicitly imported, so such import statements are\nredundant and confusing.\n\n\nSince IntelliJ IDEA can automatically detect and fix such statements with its **Optimize Imports** command, this inspection is mostly useful for offline reporting on code bases that you don't intend to change."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JavaLangImport",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Imports",
"index": 43,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UtilityClass",
"shortDescription": {
"text": "Utility class"
},
"fullDescription": {
"text": "Reports utility classes. Utility classes have all fields and methods declared as 'static' and their presence may indicate a lack of object-oriented design. Use the Ignore if annotated by option to specify special annotations. The inspection ignores classes annotated with one of these annotations.",
"markdown": "Reports utility classes.\n\nUtility classes have all fields and methods declared as `static` and their\npresence may indicate a lack of object-oriented design.\n\n\nUse the **Ignore if annotated by** option to specify special annotations. The inspection ignores classes annotated with one of\nthese annotations."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UtilityClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassNameDiffersFromFileName",
"shortDescription": {
"text": "Class name differs from file name"
},
"fullDescription": {
"text": "Reports top-level class names that don't match the name of a file containing them. While the Java specification allows for naming non-'public' classes this way, files with unmatched names may be confusing and decrease usefulness of various software tools.",
"markdown": "Reports top-level class names that don't match the name of a file containing them.\n\nWhile the Java specification allows for naming non-`public` classes this way,\nfiles with unmatched names may be confusing and decrease usefulness of various software tools."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ClassNameDiffersFromFileName",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IndexOfReplaceableByContains",
"shortDescription": {
"text": "'String.indexOf()' expression can be replaced with 'contains()'"
},
"fullDescription": {
"text": "Reports comparisons with 'String.indexOf()' calls that can be replaced with a call to the 'String.contains()' method. Example: 'boolean b = \"abcd\".indexOf('e') >= 0;' After the quick-fix is applied: 'boolean b = \"abcd\".contains('e');' This inspection only reports if the language level of the project or module is 5 or higher.",
"markdown": "Reports comparisons with `String.indexOf()` calls that can be replaced with a call to the `String.contains()` method.\n\n**Example:**\n\n\n boolean b = \"abcd\".indexOf('e') >= 0;\n\nAfter the quick-fix is applied:\n\n\n boolean b = \"abcd\".contains('e');\n\nThis inspection only reports if the language level of the project or module is 5 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "IndexOfReplaceableByContains",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 5",
"index": 117,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OptionalContainsCollection",
"shortDescription": {
"text": "'Optional' contains array or collection"
},
"fullDescription": {
"text": "Reports 'java.util.Optional' or 'com.google.common.base.Optional' types with an array or collection type parameter. In such cases, it is more clear to just use an empty array or collection to indicate the absence of result. Example: 'Optional<List<Integer>> foo() {\n return Optional.empty();\n }' This code could look like: 'List<Integer> foo() {\n return new List<>();\n }'",
"markdown": "Reports `java.util.Optional` or `com.google.common.base.Optional` types with an array or collection type parameter.\n\nIn such cases, it is more clear to just use an empty array or collection to indicate the absence of result.\n\n**Example:**\n\n\n Optional<List<Integer>> foo() {\n return Optional.empty();\n }\n\nThis code could look like:\n\n\n List<Integer> foo() {\n return new List<>();\n }\n \n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OptionalContainsCollection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SynchronizedOnLiteralObject",
"shortDescription": {
"text": "Synchronization on an object initialized with a literal"
},
"fullDescription": {
"text": "Reports 'synchronized' blocks that lock on an object initialized with a literal. String literals are interned and 'Character', 'Boolean' and 'Number' literals can be allocated from a cache. Because of this, it is possible that some other part of the system, which uses an object initialized with the same literal, is actually holding a reference to the exact same object. This can create unexpected dead-lock situations, if the lock object was thought to be private. Example: 'class Main {\n final String mutex = \"Mutex\";\n void method() {\n synchronized (mutex) {\n }\n }\n }' Use the Warn on all possible literals option to report any synchronization on 'String', 'Character', 'Boolean' and 'Number' objects.",
"markdown": "Reports `synchronized` blocks that lock on an object initialized with a literal.\n\n\nString literals are interned and `Character`, `Boolean` and `Number` literals can be allocated from a cache.\nBecause of this, it is possible that some other part of the system, which uses an object initialized with the same literal, is actually\nholding a reference to the exact same object. This can create unexpected dead-lock situations, if the lock object was thought to be private.\n\n**Example:**\n\n\n class Main {\n final String mutex = \"Mutex\";\n void method() {\n synchronized (mutex) {\n }\n }\n }\n\n\nUse the **Warn on all possible literals** option to report any synchronization on\n`String`, `Character`, `Boolean` and `Number` objects."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SynchronizedOnLiteralObject",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java9ReflectionClassVisibility",
"shortDescription": {
"text": "Reflective access across modules issues"
},
"fullDescription": {
"text": "Reports 'Class.forName()' and 'ClassLoader.loadClass()' calls which try to access classes that aren't visible in the current scope due to Java 9 module accessibility rules. This inspection only reports if the language level of the project or module is 9 or higher.",
"markdown": "Reports `Class.forName()` and `ClassLoader.loadClass()` calls which try to access classes that aren't visible in the current scope due to Java 9 module accessibility rules.\n\nThis inspection only reports if the language level of the project or module is 9 or higher."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "Java9ReflectionClassVisibility",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Reflective access",
"index": 130,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CharsetObjectCanBeUsed",
"shortDescription": {
"text": "Standard 'Charset' object can be used"
},
"fullDescription": {
"text": "Reports methods and constructors in which constant charset 'String' literal (for example, '\"UTF-8\"') can be replaced with the predefined 'StandardCharsets.UTF_8' code. The code after the fix may work faster, because the charset lookup becomes unnecessary. Also, catching 'UnsupportedEncodingException' may become unnecessary as well. In this case, the catch block will be removed automatically. Example: 'try {\n byte[] bytes = \"str\".getBytes(\"UTF-8\");\n } catch (UnsupportedEncodingException e) {\n }' After quick-fix is applied: 'byte[] bytes = \"str\".getBytes(StandardCharsets.UTF_8);' The inspection is available in Java 7 and later. New in 2018.2",
"markdown": "Reports methods and constructors in which constant charset `String` literal (for example, `\"UTF-8\"`) can be replaced with the predefined `StandardCharsets.UTF_8` code.\n\nThe code after the fix may work faster, because the charset lookup becomes unnecessary.\nAlso, catching `UnsupportedEncodingException` may become unnecessary as well. In this case,\nthe catch block will be removed automatically.\n\nExample:\n\n\n try {\n byte[] bytes = \"str\".getBytes(\"UTF-8\");\n } catch (UnsupportedEncodingException e) {\n }\n\nAfter quick-fix is applied:\n\n\n byte[] bytes = \"str\".getBytes(StandardCharsets.UTF_8);\n\nThe inspection is available in Java 7 and later.\n\nNew in 2018.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CharsetObjectCanBeUsed",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AnonymousInnerClass",
"shortDescription": {
"text": "Anonymous inner class can be replaced with inner class"
},
"fullDescription": {
"text": "Reports anonymous inner classes. In some cases, replacing anonymous inner classes with inner classes can lead to more readable and maintainable code. Also, some code standards discourage anonymous inner classes.",
"markdown": "Reports anonymous inner classes.\n\nIn some cases, replacing anonymous inner classes with inner classes can lead to more readable and maintainable code.\nAlso, some code standards discourage anonymous inner classes."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AnonymousInnerClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MultipleTopLevelClassesInFile",
"shortDescription": {
"text": "Multiple top level classes in single file"
},
"fullDescription": {
"text": "Reports multiple top-level classes in a single Java file. Putting multiple top-level classes in one file may be confusing and degrade the usefulness of various software tools.",
"markdown": "Reports multiple top-level classes in a single Java file.\n\nPutting multiple\ntop-level classes in one file may be confusing and degrade the usefulness of various\nsoftware tools."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MultipleTopLevelClassesInFile",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IncorrectMessageFormat",
"shortDescription": {
"text": "Incorrect 'MessageFormat' pattern"
},
"fullDescription": {
"text": "Reports incorrect message format patterns or incorrect indexes of placeholders The following errors are reported: Unparsed or negative index Unclosed brace Unpaired quote. In this case, a part of a pattern may not be used Probably incorrect number of quotes Incorrect lower bound of nested choice patterns Incorrect indexes of placeholders. In this case, a placeholder may not be substituted or an argument may not be used Examples: 'MessageFormat.format(\"{wrong}\", 1); // incorrect index\n MessageFormat.format(\"{0\", 1); // Unmatched brace\n MessageFormat.format(\"'{0}\", 1); // Unpaired quote\n MessageFormat.format(\"It''''s {0}\", 1); // \"It''s\" will be printed, instead of \"It's\"\n MessageFormat.format(\"{0}\", 1, 2); // The argument with index '1' is not used in the pattern' New in 2023.2",
"markdown": "Reports incorrect message format patterns or incorrect indexes of placeholders\n\nThe following errors are reported:\n\n* Unparsed or negative index\n* Unclosed brace\n* Unpaired quote. In this case, a part of a pattern may not be used\n* Probably incorrect number of quotes\n* Incorrect lower bound of nested choice patterns\n* Incorrect indexes of placeholders. In this case, a placeholder may not be substituted or an argument may not be used\n\nExamples:\n\n\n MessageFormat.format(\"{wrong}\", 1); // incorrect index\n MessageFormat.format(\"{0\", 1); // Unmatched brace\n MessageFormat.format(\"'{0}\", 1); // Unpaired quote\n MessageFormat.format(\"It''''s {0}\", 1); // \"It''s\" will be printed, instead of \"It's\"\n MessageFormat.format(\"{0}\", 1, 2); // The argument with index '1' is not used in the pattern\n\nNew in 2023.2"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "IncorrectMessageFormat",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SuspiciousTernaryOperatorInVarargsCall",
"shortDescription": {
"text": "Suspicious ternary operator in varargs method call"
},
"fullDescription": {
"text": "Reports vararg method calls that use a ternary operator with mixed array and non-array branches. When compiled, both branches are wrapped in arrays. As a result, the array branch is turned into a two-dimensional array, which may indicate a problem. The quick-fix wraps the non-array branch in an array to prevent the compiler from doing the conversion. Example: 'static void bar(boolean flag) {\n Object[] a = {1, 2};\n Object b = \"hello\";\n foo(flag ? a : b);\n }\n static void foo(Object... obj) {\n }' After the quick-fix: 'static void bar(boolean flag) {\n Object[] a = {1, 2};\n Object b = \"hello\";\n foo(flag ? a : new Object[]{b});\n }\n static void foo(Object... obj) {\n }' New in 2020.3",
"markdown": "Reports vararg method calls that use a ternary operator with mixed array and non-array branches.\n\n\nWhen compiled, both branches are wrapped in arrays. As a result, the array branch is turned into\na two-dimensional array, which may indicate a problem.\n\n\nThe quick-fix wraps the non-array branch in an array to prevent the compiler from doing the conversion.\n\n**Example:**\n\n\n static void bar(boolean flag) {\n Object[] a = {1, 2};\n Object b = \"hello\";\n foo(flag ? a : b);\n }\n static void foo(Object... obj) {\n }\n\nAfter the quick-fix:\n\n\n static void bar(boolean flag) {\n Object[] a = {1, 2};\n Object b = \"hello\";\n foo(flag ? a : new Object[]{b});\n }\n static void foo(Object... obj) {\n }\n\nNew in 2020.3"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SuspiciousTernaryOperatorInVarargsCall",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OctalLiteral",
"shortDescription": {
"text": "Octal integer"
},
"fullDescription": {
"text": "Reports octal integer literals. Some coding standards prohibit the use of octal literals, as they may be easily confused with decimal literals. Example: 'int i = 015;\n int j = 0_777;' This inspection has two different quick-fixes. After the Convert octal literal to decimal literal quick-fix is applied, the code changes to: 'int i = 13;\n int j = 511;' After the Remove leading zero to make decimal quick-fix is applied, the code changes to: 'int i = 15;\n int j = 777;'",
"markdown": "Reports octal integer literals. Some coding standards prohibit the use of octal literals, as they may be easily confused with decimal literals.\n\nExample:\n\n\n int i = 015;\n int j = 0_777;\n\nThis inspection has two different quick-fixes.\nAfter the **Convert octal literal to decimal literal** quick-fix is applied, the code changes to:\n\n\n int i = 13;\n int j = 511;\n\nAfter the **Remove leading zero to make decimal** quick-fix is applied, the code changes to:\n\n\n int i = 15;\n int j = 777;\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "OctalInteger",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues",
"index": 49,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CyclomaticComplexity",
"shortDescription": {
"text": "Overly complex method"
},
"fullDescription": {
"text": "Reports methods that have too many branch points. A branch point is one of the following: loop statement 'if' statement ternary expression 'catch' section expression with one or more '&&' or '||' operators inside 'switch' block with non-default branches Methods with too high cyclomatic complexity may be confusing and hard to test. Use the Method complexity limit field to specify the maximum allowed cyclomatic complexity for a method.",
"markdown": "Reports methods that have too many branch points.\n\nA branch point is one of the following:\n\n* loop statement\n* `if` statement\n* ternary expression\n* `catch` section\n* expression with one or more `&&` or `||` operators inside\n* `switch` block with non-default branches\n\nMethods with too high cyclomatic complexity may be confusing and hard to test.\n\nUse the **Method complexity limit** field to specify the maximum allowed cyclomatic complexity for a method."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OverlyComplexMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Method metrics",
"index": 139,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AwaitNotInLoop",
"shortDescription": {
"text": "'await()' not called in loop"
},
"fullDescription": {
"text": "Reports 'java.util.concurrent.locks.Condition.await()' not being called inside a loop. 'await()' and related methods are normally used to suspend a thread until some condition becomes true. As the thread could have been woken up for a different reason, the condition should be checked after the 'await()' call returns. A loop is a simple way to achieve this. Example: 'void acquire(Condition released) throws InterruptedException {\n released.await();\n }' Good code should look like this: 'void acquire(Condition released) throws InterruptedException {\n while (acquired) {\n released.await();\n }\n }'",
"markdown": "Reports `java.util.concurrent.locks.Condition.await()` not being called inside a loop.\n\n\n`await()` and related methods are normally used to suspend a thread until some condition becomes true.\nAs the thread could have been woken up for a different reason,\nthe condition should be checked after the `await()` call returns.\nA loop is a simple way to achieve this.\n\n**Example:**\n\n\n void acquire(Condition released) throws InterruptedException {\n released.await();\n }\n\nGood code should look like this:\n\n\n void acquire(Condition released) throws InterruptedException {\n while (acquired) {\n released.await();\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AwaitNotInLoop",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StaticVariableUninitializedUse",
"shortDescription": {
"text": "Static field used before initialization"
},
"fullDescription": {
"text": "Reports 'static' variables that are read before initialization. The inspection ignores equality checks with 'null'. Example: 'class Foo {\n public static int bar;\n\n public static void main(String[] args) {\n System.out.println(bar);\n }\n }' Note that this inspection uses a very conservative dataflow algorithm and may incorrectly report 'static' variables as uninitialized. Variables reported as initialized will always be initialized. Use the Ignore primitive fields option to ignore uninitialized primitive fields.",
"markdown": "Reports `static` variables that are read before initialization.\n\nThe inspection ignores equality checks with `null`.\n\n**Example:**\n\n\n class Foo {\n public static int bar;\n\n public static void main(String[] args) {\n System.out.println(bar);\n }\n }\n\nNote that this inspection uses a very conservative dataflow algorithm and may incorrectly report `static` variables as uninitialized. Variables\nreported as initialized will always be initialized.\n\nUse the **Ignore primitive fields** option to ignore uninitialized primitive fields."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "StaticVariableUsedBeforeInitialization",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Initialization",
"index": 26,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CyclicClassDependency",
"shortDescription": {
"text": "Cyclic class dependency"
},
"fullDescription": {
"text": "Reports classes that are mutually or cyclically dependent on other classes. Such cyclic dependencies make code fragile and hard to maintain. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor.",
"markdown": "Reports classes that are mutually or cyclically dependent on other classes.\n\nSuch cyclic dependencies make code fragile and hard to maintain.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CyclicClassDependency",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Dependency issues",
"index": 200,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Convert2MethodRef",
"shortDescription": {
"text": "Lambda can be replaced with method reference"
},
"fullDescription": {
"text": "Reports lambdas that can be replaced with method references. While often it could be a matter of taste, method references are more clear and readable compared to lambdas. Example: 'Runnable r = () -> System.out.println();' After the quick-fix is applied: 'Runnable r = System.out::println;' The inspection may suggest method references even if a lambda doesn't call any method, like replacing 'obj -> obj != null' with 'Objects::nonNull'. Use the Settings | Editor | Code Style | Java | Code Generation settings to configure special method references. This inspection only reports if the language level of the project or module is 8 or higher.",
"markdown": "Reports lambdas that can be replaced with method references. While often it could be a matter of taste, method references are more clear and readable compared to lambdas.\n\nExample:\n\n\n Runnable r = () -> System.out.println();\n\nAfter the quick-fix is applied:\n\n\n Runnable r = System.out::println;\n\n\nThe inspection may suggest method references even if a lambda doesn't call any method, like replacing `obj -> obj != null`\nwith `Objects::nonNull`.\nUse the [Settings \\| Editor \\| Code Style \\| Java \\| Code Generation](settings://preferences.sourceCode.Java?Lambda%20Body)\nsettings to configure special method references.\n\nThis inspection only reports if the language level of the project or module is 8 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "Convert2MethodRef",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 8",
"index": 119,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ArrayObjectsEquals",
"shortDescription": {
"text": "Use of shallow or 'Objects' methods with arrays"
},
"fullDescription": {
"text": "Reports expressions that seem to use an inappropriate method for determining array equality or calculating their hashcode. The following method calls are reported: 'Object.equals()' for any arrays 'Arrays.equals()' for multidimensional arrays 'Arrays.hashCode()' for multidimensional arrays",
"markdown": "Reports expressions that seem to use an inappropriate method for determining array equality or calculating their hashcode.\n\nThe following method calls are reported:\n\n* `Object.equals()` for any arrays\n* `Arrays.equals()` for multidimensional arrays\n* `Arrays.hashCode()` for multidimensional arrays"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ArrayObjectsEquals",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JUnit5Converter",
"shortDescription": {
"text": "JUnit 4 test can be JUnit 5"
},
"fullDescription": {
"text": "Reports JUnit 4 tests that can be automatically migrated to JUnit 5. While default runners are automatically convertible, custom runners, method- and field- rules are not and require manual changes. Example: 'import org.junit.Assert;\n import org.junit.Test;\n\n public class RelevantTest {\n @Test\n public void testIt() {\n Assert.assertEquals(\"expected\", \"actual\");\n }\n }' After the quick-fix is applied: 'import org.junit.jupiter.api.Assertions;\n import org.junit.jupiter.api.Test;\n\n public class RelevantTest {\n @Test\n public void testIt() {\n Assertions.assertEquals(\"expected\", \"actual\");\n }\n }' This inspection requires that the JUnit 5 library is available in the classpath, and JDK 1.8 or later is configured for the project.",
"markdown": "Reports JUnit 4 tests that can be automatically migrated to JUnit 5. While default runners are automatically convertible, custom runners, method- and field- rules are not and require manual changes.\n\n**Example:**\n\n\n import org.junit.Assert;\n import org.junit.Test;\n\n public class RelevantTest {\n @Test\n public void testIt() {\n Assert.assertEquals(\"expected\", \"actual\");\n }\n }\n\nAfter the quick-fix is applied:\n\n\n import org.junit.jupiter.api.Assertions;\n import org.junit.jupiter.api.Test;\n\n public class RelevantTest {\n @Test\n public void testIt() {\n Assertions.assertEquals(\"expected\", \"actual\");\n }\n }\n\nThis inspection requires that the JUnit 5 library is available in the classpath, and JDK 1.8 or later is configured for the project."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JUnit5Converter",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JVM languages/Test frameworks",
"index": 128,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MultiplyOrDivideByPowerOfTwo",
"shortDescription": {
"text": "Multiplication or division by power of two"
},
"fullDescription": {
"text": "Reports multiplication of an integer value by a constant integer that can be represented as a power of two. Such expressions can be replaced with right or left shift operations for a possible performance improvement. Note that this inspection is not relevant for modern JVMs (e. g., HotSpot or OpenJ9) because their JIT compilers will perform this optimization. It might only be useful in some embedded systems where no JIT compilation is performed. Example: 'int y = x * 4;' A quick-fix is suggested to replace the multiplication or division operation with the shift operation: 'int y = x << 2;' Use the option to make the inspection also report division by a power of two. Note that replacing a power of two division with a shift does not work for negative numbers.",
"markdown": "Reports multiplication of an integer value by a constant integer that can be represented as a power of two. Such expressions can be replaced with right or left shift operations for a possible performance improvement.\n\n\nNote that this inspection is not relevant for modern JVMs (e. g.,\nHotSpot or OpenJ9) because their JIT compilers will perform this optimization.\nIt might only be useful in some embedded systems where no JIT compilation is performed.\n\n**Example:**\n\n\n int y = x * 4;\n\nA quick-fix is suggested to replace the multiplication or division operation with the shift operation:\n\n\n int y = x << 2;\n\n\nUse the option to make the inspection also report division by a power of two.\nNote that replacing a power of two division with a shift does not work for negative numbers."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MultiplyOrDivideByPowerOfTwo",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance/Embedded",
"index": 178,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MethodCallInLoopCondition",
"shortDescription": {
"text": "Method call in loop condition"
},
"fullDescription": {
"text": "Reports method calls in the condition part of a loop statement. In highly resource constrained environments, such calls may have adverse performance implications. Applying the results of this inspection without consideration might have negative effects on code clarity and design. This inspection is intended for Java ME and other highly resource constrained environments. Example: 'String s = \"example\";\n for (int i = 0; i < s.length(); i++) {\n System.out.println(s.charAt(i));\n }' After the quick-fix is applied: 'String s = \"example\";\n int length = s.length();\n for (int i = 0; i < length; i++) {\n System.out.println(s.charAt(i));\n }' Use the option to ignore calls to common Java iteration methods like 'Iterator.hasNext()' and known methods with side-effects like 'Atomic*.compareAndSet'.",
"markdown": "Reports method calls in the condition part of a loop statement. In highly resource constrained environments, such calls may have adverse performance implications.\n\n\nApplying the results of this inspection without consideration might have negative effects on code clarity and design.\nThis inspection is intended for Java ME and other highly resource constrained environments.\n\n**Example:**\n\n\n String s = \"example\";\n for (int i = 0; i < s.length(); i++) {\n System.out.println(s.charAt(i));\n }\n\nAfter the quick-fix is applied:\n\n\n String s = \"example\";\n int length = s.length();\n for (int i = 0; i < length; i++) {\n System.out.println(s.charAt(i));\n }\n\n\nUse the option to ignore calls to common Java iteration methods like `Iterator.hasNext()`\nand known methods with side-effects like `Atomic*.compareAndSet`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MethodCallInLoopCondition",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance/Embedded",
"index": 178,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ForLoopReplaceableByWhile",
"shortDescription": {
"text": "'for' loop may be replaced by 'while' loop"
},
"fullDescription": {
"text": "Reports 'for' loops that contain neither initialization nor update components, and suggests converting them to 'while' loops. This makes the code easier to read. Example: 'for(; exitCondition(); ) {\n process();\n }' After the quick-fix is applied: 'while(exitCondition()) {\n process();\n }' The quick-fix is also available for other 'for' loops, so you can replace any 'for' loop with a 'while' loop. Use the Ignore 'infinite' for loops without conditions option if you want to ignore 'for' loops with trivial or non-existent conditions.",
"markdown": "Reports `for` loops that contain neither initialization nor update components, and suggests converting them to `while` loops. This makes the code easier to read.\n\nExample:\n\n\n for(; exitCondition(); ) {\n process();\n }\n\nAfter the quick-fix is applied:\n\n\n while(exitCondition()) {\n process();\n }\n\nThe quick-fix is also available for other `for` loops, so you can replace any `for` loop with a\n`while` loop.\n\nUse the **Ignore 'infinite' for loops without conditions** option if you want to ignore `for`\nloops with trivial or non-existent conditions."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ForLoopReplaceableByWhile",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MethodCount",
"shortDescription": {
"text": "Class with too many methods"
},
"fullDescription": {
"text": "Reports classes whose number of methods exceeds the specified maximum. Classes with too many methods are often trying to 'do too much'. Consider splitting such a class into multiple smaller classes. Configure the inspection: Use the Method count limit field to specify the maximum allowed number of methods in a class. Use the Ignore simple getter and setter methods option to ignore simple getters and setters in method count. Use the Ignore methods overriding/implementing a super method to ignore methods that override or implement a method from a superclass.",
"markdown": "Reports classes whose number of methods exceeds the specified maximum.\n\nClasses with too many methods are often trying to 'do too much'. Consider splitting such a class into multiple smaller classes.\n\nConfigure the inspection:\n\n* Use the **Method count limit** field to specify the maximum allowed number of methods in a class.\n* Use the **Ignore simple getter and setter methods** option to ignore simple getters and setters in method count.\n* Use the **Ignore methods overriding/implementing a super method** to ignore methods that override or implement a method from a superclass."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ClassWithTooManyMethods",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class metrics",
"index": 125,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BlockingMethodInNonBlockingContext",
"shortDescription": {
"text": "Possibly blocking call in non-blocking context"
},
"fullDescription": {
"text": "Reports thread-blocking method calls in code fragments where threads should not be blocked. Example (Project Reactor): 'Flux.just(\"1\").flatMap(f -> {\n Flux<String> just = loadUsersFromDatabase();\n just.toIterable(); // Error: blocking operator call in non-blocking scope\n return just;\n }\n);' Consider running blocking code with a proper scheduler, for example 'Schedulers.boundedElastic()', or try to find an alternative non-blocking API. Example (Kotlin Coroutines): 'suspend fun exampleFun() {\n Thread.sleep(100); // Error: blocking method call inside suspend function\n}' Consider running blocking code with a special dispatcher, for example 'Dispatchers.IO', or try to find an alternative non-blocking API. Configure the inspection: In the Blocking Annotations list, specify annotations that mark thread-blocking methods. In the Non-Blocking Annotations list, specify annotations that mark non-blocking methods. Specified annotations can be used as External Annotations",
"markdown": "Reports thread-blocking method calls in code fragments where threads should not be blocked.\n\n**Example (Project Reactor):**\n\n\n Flux.just(\"1\").flatMap(f -> {\n Flux<String> just = loadUsersFromDatabase();\n just.toIterable(); // Error: blocking operator call in non-blocking scope\n return just;\n }\n );\n\nConsider running blocking code [with a proper\nscheduler](https://projectreactor.io/docs/core/release/reference/#faq.wrap-blocking), for example `Schedulers.boundedElastic()`, or try to find an alternative non-blocking API.\n\n**Example (Kotlin Coroutines):**\n\n\n suspend fun exampleFun() {\n Thread.sleep(100); // Error: blocking method call inside suspend function\n }\n\nConsider running blocking code [with a special dispatcher](https://kotlinlang.org/docs/coroutine-context-and-dispatchers.html),\nfor example `Dispatchers.IO`, or try to find an alternative non-blocking API.\n\nConfigure the inspection:\n\n* In the **Blocking Annotations** list, specify annotations that mark thread-blocking methods.\n* In the **Non-Blocking Annotations** list, specify annotations that mark non-blocking methods.\n\nSpecified annotations can be used as [External Annotations](https://www.jetbrains.com/help/idea/external-annotations.html)"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "BlockingMethodInNonBlockingContext",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JVM languages",
"index": 47,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AssertBetweenInconvertibleTypes",
"shortDescription": {
"text": "'assertEquals()' between objects of inconvertible types"
},
"fullDescription": {
"text": "Reports calls to assertion methods where the \"expected\" and \"actual\" arguments are of incompatible types. Such calls often indicate that there is a bug in the test. This inspection checks the relevant JUnit, TestNG, and AssertJ methods. Examples: 'assertEquals(\"1\", 1);\n assertNotSame(new int[0], 0);\n\n // weak warning, may just test the equals() contract\n assertThat(foo).as(\"user type\").isNotEqualTo(bar);'",
"markdown": "Reports calls to assertion methods where the \"expected\" and \"actual\" arguments are of incompatible types.\n\nSuch calls often indicate that there is a bug in the test.\nThis inspection checks the relevant JUnit, TestNG, and AssertJ methods.\n\n**Examples:**\n\n\n assertEquals(\"1\", 1);\n assertNotSame(new int[0], 0);\n\n // weak warning, may just test the equals() contract\n assertThat(foo).as(\"user type\").isNotEqualTo(bar);\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "AssertBetweenInconvertibleTypes",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JVM languages/Test frameworks",
"index": 128,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConfusingElse",
"shortDescription": {
"text": "Redundant 'else'"
},
"fullDescription": {
"text": "Reports redundant 'else' keywords in 'if'—'else' statements and statement chains. The 'else' keyword is redundant when all previous branches end with a 'return', 'throw', 'break', or 'continue' statement. In this case, the statements from the 'else' branch can be placed after the 'if' statement, and the 'else' keyword can be removed. Example: 'if (name == null) {\n throw new IllegalArgumentException();\n } else {\n System.out.println(name);\n }' After the quick-fix is applied: 'if (name == null) {\n throw new IllegalArgumentException();\n }\n System.out.println(name);' Disable the Report when there are no more statements after the 'if' statement option to ignore cases where the 'if'—'else' statement is the last statement in a code block.",
"markdown": "Reports redundant `else` keywords in `if`---`else` statements and statement chains.\n\n\nThe `else` keyword is redundant when all previous branches end with a\n`return`, `throw`, `break`, or `continue` statement. In this case,\nthe statements from the `else` branch can be placed after the `if` statement, and the\n`else` keyword can be removed.\n\n**Example:**\n\n\n if (name == null) {\n throw new IllegalArgumentException();\n } else {\n System.out.println(name);\n }\n\nAfter the quick-fix is applied:\n\n\n if (name == null) {\n throw new IllegalArgumentException();\n }\n System.out.println(name);\n\nDisable the **Report when there are no more statements after the 'if' statement** option to ignore cases where the `if`---`else` statement is the last statement in a code block."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ConfusingElseBranch",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StringReplaceableByStringBuffer",
"shortDescription": {
"text": "Non-constant 'String' can be replaced with 'StringBuilder'"
},
"fullDescription": {
"text": "Reports variables declared as 'java.lang.String' that are repeatedly appended to. Such variables could be declared more efficiently as 'java.lang.StringBuffer' or 'java.lang.StringBuilder'. Example: 'String s = \"\";\n for (int i = 0; i < names.length; i++) {\n String name = names[i] + (i == names.length - 1 ? \"\" : \" \");\n s = s + name;\n }' Such a loop can be replaced with: 'StringBuilder s = new StringBuilder();\n for (int i = 0; i < names.length; i++) {\n String name = names[i] + (i == names.length - 1 ? \"\" : \" \");\n s.append(name);\n }' Or even with: 'String s = String.join(\" \", names);' Use the option to make this inspection only report when the variable is appended to in a loop.",
"markdown": "Reports variables declared as `java.lang.String` that are repeatedly appended to. Such variables could be declared more efficiently as `java.lang.StringBuffer` or `java.lang.StringBuilder`.\n\n**Example:**\n\n\n String s = \"\";\n for (int i = 0; i < names.length; i++) {\n String name = names[i] + (i == names.length - 1 ? \"\" : \" \");\n s = s + name;\n }\n\nSuch a loop can be replaced with:\n\n\n StringBuilder s = new StringBuilder();\n for (int i = 0; i < names.length; i++) {\n String name = names[i] + (i == names.length - 1 ? \"\" : \" \");\n s.append(name);\n }\n\nOr even with:\n\n\n String s = String.join(\" \", names);\n\n\nUse the option to make this inspection only report when the variable is appended to in a loop."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonConstantStringShouldBeStringBuffer",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FinallyBlockCannotCompleteNormally",
"shortDescription": {
"text": "'finally' block which can not complete normally"
},
"fullDescription": {
"text": "Reports 'return', 'throw', 'break', 'continue', and 'yield' statements that are used inside 'finally' blocks. These cause the 'finally' block to not complete normally but to complete abruptly. Any exceptions thrown from the 'try' and 'catch' blocks of the same 'try'-'catch' statement will be suppressed. Example: 'void x() {\n try {\n throw new RuntimeException();\n } finally {\n // if bar() returns true, the RuntimeException will be suppressed\n if (bar()) return;\n }\n }'",
"markdown": "Reports `return`, `throw`, `break`, `continue`, and `yield` statements that are used inside `finally` blocks. These cause the `finally` block to not complete normally but to complete abruptly. Any exceptions thrown from the `try` and `catch` blocks of the same `try`-`catch` statement will be suppressed.\n\n**Example:**\n\n\n void x() {\n try {\n throw new RuntimeException();\n } finally {\n // if bar() returns true, the RuntimeException will be suppressed\n if (bar()) return;\n }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "finally",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Error handling",
"index": 9,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UseOfJDBCDriverClass",
"shortDescription": {
"text": "Use of concrete JDBC driver class"
},
"fullDescription": {
"text": "Reports uses of specific JDBC driver classes. Use of such classes will bind your project to a specific database and driver, defeating the purpose of JDBC and resulting in loss of portability. Example: 'import java.sql.Driver;\n\n abstract class Sample implements Driver {\n public void foo() {\n Sample sample;\n }\n }'",
"markdown": "Reports uses of specific JDBC driver classes. Use of such classes will bind your project to a specific database and driver, defeating the purpose of JDBC and resulting in loss of portability.\n\n**Example:**\n\n\n import java.sql.Driver;\n\n abstract class Sample implements Driver {\n public void foo() {\n Sample sample;\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UseOfJDBCDriverClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Portability",
"index": 179,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JDBCResource",
"shortDescription": {
"text": "JDBC resource opened but not safely closed"
},
"fullDescription": {
"text": "Reports JDBC resources that are not safely closed. JDBC resources reported by this inspection include 'java.sql.Connection', 'java.sql.Statement', 'java.sql.PreparedStatement', 'java.sql.CallableStatement', and 'java.sql.ResultSet'. By default, the inspection assumes that the resources can be closed by any method with 'close' or 'cleanup' in its name. Example: 'ResultSet findAllElements(Connection connection) throws SQLException {\n PreparedStatement statement = connection.prepareStatement(\"SELECT * FROM TABLE\");//statement is not closed\n statement.execute();\n return statement.getResultSet();\n }' Use the following options to configure the inspection: Whether a JDBC resource is allowed to be opened inside a 'try' block. This style is less desirable because it is more verbose than opening a resource in front of a 'try' block. Whether the resource can be closed by any method call with the resource passed as argument.",
"markdown": "Reports JDBC resources that are not safely closed. JDBC resources reported by this inspection include `java.sql.Connection`, `java.sql.Statement`, `java.sql.PreparedStatement`, `java.sql.CallableStatement`, and `java.sql.ResultSet`.\n\n\nBy default, the inspection assumes that the resources can be closed by any method with\n'close' or 'cleanup' in its name.\n\n**Example:**\n\n\n ResultSet findAllElements(Connection connection) throws SQLException {\n PreparedStatement statement = connection.prepareStatement(\"SELECT * FROM TABLE\");//statement is not closed\n statement.execute();\n return statement.getResultSet();\n }\n\n\nUse the following options to configure the inspection:\n\n* Whether a JDBC resource is allowed to be opened inside a `try` block. This style is less desirable because it is more verbose than opening a resource in front of a `try` block.\n* Whether the resource can be closed by any method call with the resource passed as argument."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JDBCResourceOpenedButNotSafelyClosed",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Resource management",
"index": 155,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavadocDeclaration",
"shortDescription": {
"text": "Javadoc declaration problems"
},
"fullDescription": {
"text": "Reports Javadoc comments and tags with the following problems: invalid tag names incomplete tag descriptions duplicated tags missing Javadoc descriptions Example: '/**\n * Invalid tag name\n * @poram param description\n */\n public void sample(int param){\n }' Example: '/**\n * Pointing to itself {@link #sample(int)}\n */\n public void sample(int param){\n }' Quick-fix adds the unknown Javadoc tag to the list of user defined additional tags. Use textfield below to define additional Javadoc tags. Use first checkbox to ignore duplicated 'throws' tag. Use second checkbox to ignore problem with missing or incomplete first sentence in the description. Use third checkbox to ignore references pointing to itself.",
"markdown": "Reports Javadoc comments and tags with the following problems:\n\n* invalid tag names\n* incomplete tag descriptions\n* duplicated tags\n* missing Javadoc descriptions\n\nExample:\n\n\n /**\n * Invalid tag name\n * @poram param description\n */\n public void sample(int param){\n }\n\nExample:\n\n\n /**\n * Pointing to itself {@link #sample(int)}\n */\n public void sample(int param){\n }\n\nQuick-fix adds the unknown Javadoc tag to the list of user defined additional tags.\n\nUse textfield below to define additional Javadoc tags.\n\nUse first checkbox to ignore duplicated 'throws' tag.\n\nUse second checkbox to ignore problem with missing or incomplete first sentence in the description.\n\nUse third checkbox to ignore references pointing to itself."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JavadocDeclaration",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Javadoc",
"index": 95,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AssignmentToMethodParameter",
"shortDescription": {
"text": "Assignment to method parameter"
},
"fullDescription": {
"text": "Reports assignment to, or modification of method parameters. Although occasionally intended, this construct may be confusing and is therefore prohibited in some Java projects. The quick-fix adds a declaration of a new variable. Example: 'void printTrimmed(String s) {\n s = s.trim();\n System.out.println(s);\n }' After the quick-fix is applied: 'void printTrimmed(String s) {\n String trimmed = s.trim();\n System.out.println(trimmed);\n }' Use the Ignore if assignment is a transformation of the original parameter option to ignore assignments that modify the parameter value based on its previous value.",
"markdown": "Reports assignment to, or modification of method parameters.\n\nAlthough occasionally intended, this construct may be confusing\nand is therefore prohibited in some Java projects.\n\nThe quick-fix adds a declaration of a new variable.\n\n**Example:**\n\n\n void printTrimmed(String s) {\n s = s.trim();\n System.out.println(s);\n }\n\nAfter the quick-fix is applied:\n\n\n void printTrimmed(String s) {\n String trimmed = s.trim();\n System.out.println(trimmed);\n }\n\n\nUse the **Ignore if assignment is a transformation of the original parameter** option to ignore assignments that modify\nthe parameter value based on its previous value."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AssignmentToMethodParameter",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Assignment issues",
"index": 98,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LocalVariableHidingMemberVariable",
"shortDescription": {
"text": "Local variable hides field"
},
"fullDescription": {
"text": "Reports local variables named identically to a field of a surrounding class. As a result of such naming, you may accidentally use the variable where the identically named field is intended. A quick-fix is suggested to rename the variable. Example: 'public class Foo {\n public Object foo;\n\n void bar() {\n Object o = new Object() {\n void baz() {\n Object foo; // Local variable 'foo' hides field in class 'Foo'\n }\n };\n }\n }' You can configure the following options for this inspection: Ignore non-accessible fields - ignore local variables named identically to superclass fields that are not visible (for example, because they are private). Ignore local variables in a static context hiding non-static fields - for example when the local variable is inside a static method or inside a method which is inside a static inner class.",
"markdown": "Reports local variables named identically to a field of a surrounding class. As a result of such naming, you may accidentally use the variable where the identically named field is intended.\n\nA quick-fix is suggested to rename the variable.\n\n**Example:**\n\n\n public class Foo {\n public Object foo;\n\n void bar() {\n Object o = new Object() {\n void baz() {\n Object foo; // Local variable 'foo' hides field in class 'Foo'\n }\n };\n }\n }\n\n\nYou can configure the following options for this inspection:\n\n1. **Ignore non-accessible fields** - ignore local variables named identically to superclass fields that are not visible (for example, because they are private).\n2. **Ignore local variables in a static context hiding non-static fields** - for example when the local variable is inside a static method or inside a method which is inside a static inner class."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LocalVariableHidesMemberVariable",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Visibility",
"index": 97,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SuspiciousLiteralUnderscore",
"shortDescription": {
"text": "Suspicious underscore in number literal"
},
"fullDescription": {
"text": "Reports decimal number literals that use the underscore numeric separator with groups where the number of digits is not three. Such literals may contain a typo. This inspection will not warn on literals containing two consecutive underscores. It is also allowed to omit underscores in the fractional part of 'double' and 'float' literals. Example: 'int oneMillion = 1_000_0000;'",
"markdown": "Reports decimal number literals that use the underscore numeric separator with groups where the number of digits is not three. Such literals may contain a typo.\n\nThis inspection will not warn on literals containing two consecutive underscores.\nIt is also allowed to omit underscores in the fractional part of `double` and `float` literals.\n\n**Example:** `int oneMillion = 1_000_0000;`"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SuspiciousLiteralUnderscore",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues",
"index": 49,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StringEquality",
"shortDescription": {
"text": "String comparison using '==', instead of 'equals()'"
},
"fullDescription": {
"text": "Reports code that uses of == or != to compare strings. These operators determine referential equality instead of comparing content. In most cases, strings should be compared using 'equals()', which does a character-by-character comparison when the strings are different objects. Example: 'void foo(String s, String t) {\n final boolean b = t == s;\n }' If 't' is known to be non-null, then it's safe to apply the \"unsafe\" quick-fix and get the result similar to the following: 'void foo(String s, String t) {\n final boolean b = t.equals(s);\n }'",
"markdown": "Reports code that uses of **==** or **!=** to compare strings.\n\n\nThese operators determine referential equality instead of comparing content.\nIn most cases, strings should be compared using `equals()`,\nwhich does a character-by-character comparison when the strings are different objects.\n\n**Example:**\n\n\n void foo(String s, String t) {\n final boolean b = t == s;\n }\n\nIf `t` is known to be non-null, then it's safe to apply the \"unsafe\" quick-fix and get the result similar to the following:\n\n\n void foo(String s, String t) {\n final boolean b = t.equals(s);\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "StringEquality",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReadResolveAndWriteReplaceProtected",
"shortDescription": {
"text": "'readResolve()' or 'writeReplace()' not declared 'protected'"
},
"fullDescription": {
"text": "Reports classes that implement 'java.io.Serializable' where the 'readResolve()' or 'writeReplace()' methods are not declared 'protected'. Declaring 'readResolve()' and 'writeReplace()' methods 'private' can force subclasses to silently ignore them, while declaring them 'public' allows them to be invoked by untrusted code. If the containing class is declared 'final', these methods can be declared 'private'. Example: 'class ClassWithSerialization implements Serializable {\n public Object writeReplace() { // warning: 'writeReplace()' not declared protected\n ...\n }\n }'",
"markdown": "Reports classes that implement `java.io.Serializable` where the `readResolve()` or `writeReplace()` methods are not declared `protected`.\n\n\nDeclaring `readResolve()` and `writeReplace()` methods `private`\ncan force subclasses to silently ignore them, while declaring them\n`public` allows them to be invoked by untrusted code.\n\n\nIf the containing class is declared `final`, these methods can be declared `private`.\n\n**Example:**\n\n\n class ClassWithSerialization implements Serializable {\n public Object writeReplace() { // warning: 'writeReplace()' not declared protected\n ...\n }\n }\n \n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ReadResolveAndWriteReplaceProtected",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Serialization issues",
"index": 54,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryLabelOnContinueStatement",
"shortDescription": {
"text": "Unnecessary label on 'continue' statement"
},
"fullDescription": {
"text": "Reports 'continue' statements with unnecessary labels. Example: 'LABEL:\n while (a > b) {\n System.out.println(\"Hello\");\n //the code below is the last statement in a loop,\n //so unnecessary label and continue can be removed\n continue LABEL;\n }'",
"markdown": "Reports `continue` statements with unnecessary labels.\n\nExample:\n\n\n LABEL:\n while (a > b) {\n System.out.println(\"Hello\");\n //the code below is the last statement in a loop,\n //so unnecessary label and continue can be removed\n continue LABEL;\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryLabelOnContinueStatement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ParameterNamingConvention",
"shortDescription": {
"text": "Method parameter naming convention"
},
"fullDescription": {
"text": "Reports method parameters whose names are too short, too long, or do not follow the specified regular expression pattern. Example: 'void fooBar(int X)' should be reported if the inspection is enabled with the default settings in which a parameter name should start with a lowercase letter. Configure the inspection: Use the fields in the Options section to specify the minimum length, maximum length, and a regular expression expected for method parameter names. Specify 0 in order not to check the length of names. Regular expressions should be specified in the standard 'java.util.regex' format.",
"markdown": "Reports method parameters whose names are too short, too long, or do not follow the specified regular expression pattern.\n\n**Example:** `void fooBar(int X)`\nshould be reported if the inspection is enabled with the default settings in which a parameter name should start with a lowercase letter.\n\nConfigure the inspection:\n\n\nUse the fields in the **Options** section to specify the minimum length, maximum length, and a regular expression expected for\nmethod parameter names. Specify **0** in order not to check the length of names.\n\nRegular expressions should be specified in the standard `java.util.regex` format."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MethodParameterNamingConvention",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Naming conventions",
"index": 106,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MethodCanBeVariableArityMethod",
"shortDescription": {
"text": "Method can have varargs parameter"
},
"fullDescription": {
"text": "Reports methods that can be converted to variable arity methods. Example: 'void process(String name, Object[] objects);' After the quick-fix is applied: 'void process(String name, Object... objects);' This inspection only reports if the language level of the project or module is 5 or higher.",
"markdown": "Reports methods that can be converted to variable arity methods.\n\n**Example:**\n\n\n void process(String name, Object[] objects);\n\nAfter the quick-fix is applied:\n\n\n void process(String name, Object... objects);\n\n\nThis inspection only reports if the language level of the project or module is 5 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "MethodCanBeVariableArityMethod",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 5",
"index": 117,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AbstractClassNeverImplemented",
"shortDescription": {
"text": "Abstract class which has no concrete subclass"
},
"fullDescription": {
"text": "Reports 'abstract' classes that have no concrete subclasses.",
"markdown": "Reports `abstract` classes that have no concrete subclasses."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AbstractClassNeverImplemented",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Inheritance issues",
"index": 159,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StreamToLoop",
"shortDescription": {
"text": "Stream API call chain can be replaced with loop"
},
"fullDescription": {
"text": "Reports Stream API chains, 'Iterable.forEach()', and 'Map.forEach()' calls that can be automatically converted into classical loops. Example: 'String joinNonEmpty(List<String> list) {\n return list.stream() // Stream can be converted to loop\n .filter(s -> !s.isEmpty())\n .map(String::trim)\n .collect(Collectors.joining(\", \"));\n }' After the quick-fix is applied: 'String joinNonEmpty(List<String> list) {\n StringJoiner joiner = new StringJoiner(\", \");\n for (String s : list) {\n if (!s.isEmpty()) {\n String trim = s.trim();\n joiner.add(trim);\n }\n }\n return joiner.toString();\n }' Note that sometimes this inspection might cause slight semantic changes. Special care should be taken when it comes to short-circuiting, as it's not specified how many elements will be actually read when the stream short-circuits. Stream API appeared in Java 8. This inspection can help to downgrade for backward compatibility with earlier Java versions. Configure the inspection: Use the Iterate unknown Stream sources via Stream.iterator() option to suggest conversions for streams with unrecognized source. In this case, iterator will be created from the stream. For example, when checkbox is selected, the conversion will be suggested here: 'List<ProcessHandle> handles = ProcessHandle.allProcesses().collect(Collectors.toList());' In this case, the result will be as follows: 'List<ProcessHandle> handles = new ArrayList<>();\n for (Iterator<ProcessHandle> it = ProcessHandle.allProcesses().iterator(); it.hasNext(); ) {\n ProcessHandle allProcess = it.next();\n handles.add(allProcess);\n }' New in 2017.1",
"markdown": "Reports Stream API chains, `Iterable.forEach()`, and `Map.forEach()` calls that can be automatically converted into classical loops.\n\n**Example:**\n\n\n String joinNonEmpty(List<String> list) {\n return list.stream() // Stream can be converted to loop\n .filter(s -> !s.isEmpty())\n .map(String::trim)\n .collect(Collectors.joining(\", \"));\n }\n\nAfter the quick-fix is applied:\n\n\n String joinNonEmpty(List<String> list) {\n StringJoiner joiner = new StringJoiner(\", \");\n for (String s : list) {\n if (!s.isEmpty()) {\n String trim = s.trim();\n joiner.add(trim);\n }\n }\n return joiner.toString();\n }\n\n\nNote that sometimes this inspection might cause slight semantic changes.\nSpecial care should be taken when it comes to short-circuiting, as it's not specified how many elements will be actually read when\nthe stream short-circuits.\n\n\n*Stream API* appeared in Java 8.\nThis inspection can help to downgrade for backward compatibility with earlier Java versions.\n\nConfigure the inspection:\n\nUse the **Iterate unknown Stream sources via Stream.iterator()** option to suggest conversions for streams with unrecognized source.\nIn this case, iterator will be created from the stream.\nFor example, when checkbox is selected, the conversion will be suggested here:\n\n\n List<ProcessHandle> handles = ProcessHandle.allProcesses().collect(Collectors.toList());\n\nIn this case, the result will be as follows:\n\n\n List<ProcessHandle> handles = new ArrayList<>();\n for (Iterator<ProcessHandle> it = ProcessHandle.allProcesses().iterator(); it.hasNext(); ) {\n ProcessHandle allProcess = it.next();\n handles.add(allProcess);\n }\n\nNew in 2017.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "StreamToLoop",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassInitializerMayBeStatic",
"shortDescription": {
"text": "Class initializer may be 'static'"
},
"fullDescription": {
"text": "Reports instance initializers which may be made 'static'. An instance initializer may be static if it does not reference any of its class' non-static members. Static initializers are executed once the class is resolved, while instance initializers are executed on each instantiation of the class. This inspection doesn't report instance empty initializers and initializers in anonymous classes. Example: 'class A {\n public static String CONSTANT;\n {\n CONSTANT = \"Hello\";\n }\n }' After the quick-fix is applied: 'class A {\n public static String CONSTANT;\n static {\n CONSTANT = \"Hello\"; //now initialized only once per class\n }\n }'",
"markdown": "Reports instance initializers which may be made `static`.\n\n\nAn instance initializer may be static if it does not reference any of its class' non-static members.\nStatic initializers are executed once the class is resolved,\nwhile instance initializers are executed on each instantiation of the class.\n\nThis inspection doesn't report instance empty initializers and initializers in anonymous classes.\n\n**Example:**\n\n\n class A {\n public static String CONSTANT;\n {\n CONSTANT = \"Hello\";\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class A {\n public static String CONSTANT;\n static {\n CONSTANT = \"Hello\"; //now initialized only once per class\n }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ClassInitializerMayBeStatic",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MagicCharacter",
"shortDescription": {
"text": "Magic character"
},
"fullDescription": {
"text": "Reports character literals that are used without constant declaration. These characters might result in bad code readability. Also, there might be errors if a character is changed only in one location but not everywhere in code. Example: 'char c = 'c';'",
"markdown": "Reports character literals that are used without constant declaration. These characters might result in bad code readability. Also, there might be errors if a character is changed only in one location but not everywhere in code.\n\n**Example:**\n\n char c = 'c';\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MagicCharacter",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Internationalization",
"index": 110,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SystemGC",
"shortDescription": {
"text": "Call to 'System.gc()' or 'Runtime.gc()'"
},
"fullDescription": {
"text": "Reports 'System.gc()' or 'Runtime.gc()' calls. While occasionally useful in testing, explicitly triggering garbage collection via 'System.gc()' is almost never recommended in production code and can result in serious performance issues.",
"markdown": "Reports `System.gc()` or `Runtime.gc()` calls. While occasionally useful in testing, explicitly triggering garbage collection via `System.gc()` is almost never recommended in production code and can result in serious performance issues."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CallToSystemGC",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Memory",
"index": 166,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OverflowingLoopIndex",
"shortDescription": {
"text": "Loop executes zero or billions of times"
},
"fullDescription": {
"text": "Reports loops that cannot be completed without an index overflow or loops that don't loop at all. It usually happens because of a mistake in the update operation. Example: 'void foo(int s) {\n for (int i = s; i > 12; i++) { // i-- should be here\n System.out.println(i);\n }\n }' New in 2019.1",
"markdown": "Reports loops that cannot be completed without an index overflow or loops that don't loop at all. It usually happens because of a mistake in the update operation.\n\nExample:\n\n\n void foo(int s) {\n for (int i = s; i > 12; i++) { // i-- should be here\n System.out.println(i);\n }\n }\n\nNew in 2019.1"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "OverflowingLoopIndex",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SetReplaceableByEnumSet",
"shortDescription": {
"text": "'Set' can be replaced with 'EnumSet'"
},
"fullDescription": {
"text": "Reports instantiations of 'java.util.Set' objects whose content types are enumerated classes. Such 'Set' objects can be replaced with 'java.util.EnumSet' objects. 'EnumSet' implementations can be much more efficient compared to other sets, as the underlying data structure is a bit vector. Use the quick-fix to replace the initializer with a call to 'EnumSet.noneOf()'. This quick-fix is not available when the type of the variable is a sub-class of 'Set'. Example: 'enum MyEnum { FOO, BAR; }\n\n Set<MyEnum> enums = new HashSet<MyEnum>();' After the quick-fix is applied: 'enum MyEnum { FOO, BAR; }\n\n Set<MyEnum> enums = EnumSet.noneOf(MyEnum.class);'",
"markdown": "Reports instantiations of `java.util.Set` objects whose content types are enumerated classes. Such `Set` objects can be replaced with `java.util.EnumSet` objects.\n\n\n`EnumSet` implementations can be much more efficient compared to\nother sets, as the underlying data structure is a bit vector. Use the quick-fix to replace the initializer with a call to\n`EnumSet.noneOf()`. This quick-fix is not available when the type of the variable is a sub-class of `Set`.\n\n**Example:**\n\n\n enum MyEnum { FOO, BAR; }\n\n Set<MyEnum> enums = new HashSet<MyEnum>();\n\nAfter the quick-fix is applied:\n\n\n enum MyEnum { FOO, BAR; }\n\n Set<MyEnum> enums = EnumSet.noneOf(MyEnum.class);\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SetReplaceableByEnumSet",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InnerClassMayBeStatic",
"shortDescription": {
"text": "Inner class may be 'static'"
},
"fullDescription": {
"text": "Reports inner classes that can be made 'static'. A 'static' inner class does not keep an implicit reference to its enclosing instance. This prevents a common cause of memory leaks and uses less memory per instance of the class. Example: 'public class Outer {\n class Inner { // not static\n public void foo() {\n bar(\"x\");\n }\n\n private void bar(String string) {}\n }\n }' After the quick-fix is applied: 'public class Outer {\n static class Inner {\n public void foo() {\n bar(\"x\");\n }\n\n private void bar(String string) {}\n }\n }'",
"markdown": "Reports inner classes that can be made `static`.\n\nA `static` inner class does not keep an implicit reference to its enclosing instance.\nThis prevents a common cause of memory leaks and uses less memory per instance of the class.\n\n**Example:**\n\n\n public class Outer {\n class Inner { // not static\n public void foo() {\n bar(\"x\");\n }\n\n private void bar(String string) {}\n }\n }\n\nAfter the quick-fix is applied:\n\n\n public class Outer {\n static class Inner {\n public void foo() {\n bar(\"x\");\n }\n\n private void bar(String string) {}\n }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "InnerClassMayBeStatic",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Memory",
"index": 166,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryFinalOnLocalVariableOrParameter",
"shortDescription": {
"text": "Unnecessary 'final' on local variable or parameter"
},
"fullDescription": {
"text": "Reports local variables or parameters unnecessarily declared 'final'. Some coding standards frown upon variables declared 'final' for reasons of terseness. Example: 'class Foo {\n Foo(Object o) {}\n\n void bar(final Object o) {\n new Foo(o);\n }\n }' After the quick-fix is applied: 'class Foo {\n Foo(Object o) {}\n\n void bar(Object o) {\n new Foo(o);\n }\n }' Use the inspection options to toggle the reporting for: local variables parameters (including parameters of 'catch' blocks and enhanced 'for' statements) Also, you can configure the inspection to only report 'final' parameters of 'abstract' or interface methods, which may be considered extra unnecessary as such markings don't affect the implementation of these methods.",
"markdown": "Reports local variables or parameters unnecessarily declared `final`.\n\nSome coding standards frown upon variables declared `final` for reasons of terseness.\n\n**Example:**\n\n\n class Foo {\n Foo(Object o) {}\n\n void bar(final Object o) {\n new Foo(o);\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class Foo {\n Foo(Object o) {}\n\n void bar(Object o) {\n new Foo(o);\n }\n }\n\n\nUse the inspection options to toggle the reporting for:\n\n* local variables\n* parameters (including parameters of `catch` blocks and enhanced `for` statements)\n\n\nAlso, you can configure the inspection to only report `final` parameters of `abstract` or interface\nmethods, which may be considered extra unnecessary as such markings don't\naffect the implementation of these methods."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryFinalOnLocalVariableOrParameter",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonBooleanMethodNameMayNotStartWithQuestion",
"shortDescription": {
"text": "Non-boolean method name must not start with question word"
},
"fullDescription": {
"text": "Reports non-boolean methods whose names start with a question word. Such method names may be confusing. Non-boolean methods that override library methods are ignored by this inspection. Example: 'public void hasName(String name) {\n assert names.contains(name);\n }' A quick-fix that renames such methods is available only in the editor. Configure the inspection: Use the Boolean method name prefixes list to specify the question words that should be used only for boolean methods. Use the Ignore methods with 'java.lang.Boolean' return type option to ignore methods with 'java.lang.Boolean' return type. Use the Ignore methods overriding/implementing a super method option to ignore methods which have supers.",
"markdown": "Reports non-boolean methods whose names start with a question word. Such method names may be confusing.\n\nNon-boolean methods that override library methods are ignored by this inspection.\n\n**Example:**\n\n\n public void hasName(String name) {\n assert names.contains(name);\n }\n\nA quick-fix that renames such methods is available only in the editor.\n\nConfigure the inspection:\n\n* Use the **Boolean method name prefixes** list to specify the question words that should be used only for boolean methods.\n* Use the **Ignore methods with 'java.lang.Boolean' return type** option to ignore methods with `java.lang.Boolean` return type.\n* Use the **Ignore methods overriding/implementing a super method** option to ignore methods which have supers."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonBooleanMethodNameMayNotStartWithQuestion",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Naming conventions/Method",
"index": 107,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "WeakerAccess",
"shortDescription": {
"text": "Declaration access can be weaker"
},
"fullDescription": {
"text": "Reports fields, methods or classes that may have their access modifier narrowed down. Example: 'class Sample {\n void foo() {\n bar(\"foo\", \"foo\");\n }\n void bar(String x, String y) { } // can be private\n }' After the quick-fix is applied: 'class Sample {\n void foo() {\n bar(\"foo\", \"foo\");\n }\n private void bar(String x, String y) { }\n }' Use the inspection's options to define the rules for the modifier change suggestions.",
"markdown": "Reports fields, methods or classes that may have their access modifier narrowed down.\n\nExample:\n\n\n class Sample {\n void foo() {\n bar(\"foo\", \"foo\");\n }\n void bar(String x, String y) { } // can be private\n }\n\nAfter the quick-fix is applied:\n\n\n class Sample {\n void foo() {\n bar(\"foo\", \"foo\");\n }\n private void bar(String x, String y) { }\n }\n\nUse the inspection's options to define the rules for the modifier change suggestions."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "WeakerAccess",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Declaration redundancy",
"index": 10,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "WrapperTypeMayBePrimitive",
"shortDescription": {
"text": "Wrapper type may be primitive"
},
"fullDescription": {
"text": "Reports local variables of wrapper type that are mostly used as primitive types. In some cases, boxing can be source of significant performance penalty, especially in loops. Heuristics are applied to estimate the number of boxing operations. For example, conversions inside loops are considered as much more numerous. Example: 'public void example() {\n Integer value = 12;\n needBox(value);\n for (int i = 0; i < 10; i++) {\n // Loop usages considered as happening more often\n needPrimitive(value);\n }\n }\n\n void needPrimitive(int value) {}\n void needBox(Integer value) {}' After the quick-fix is applied: 'public void example() {\n int value = 12;\n needBox(value);\n for (int i = 0; i < 10; i++) {\n // Loop usages considered as happening more often\n needPrimitive(value);\n }\n }\n\n void needPrimitive(int value) {}\n void needBox(Integer value) {}' New in 2018.2",
"markdown": "Reports local variables of wrapper type that are mostly used as primitive types.\n\nIn some cases, boxing can be source of significant performance penalty, especially in loops.\n\nHeuristics are applied to estimate the number of boxing operations. For example, conversions inside loops are considered\nas much more numerous.\n\n**Example:**\n\n public void example() {\n Integer value = 12;\n needBox(value);\n for (int i = 0; i < 10; i++) {\n // Loop usages considered as happening more often\n needPrimitive(value);\n }\n }\n\n void needPrimitive(int value) {}\n void needBox(Integer value) {}\n\nAfter the quick-fix is applied:\n\n public void example() {\n int value = 12;\n needBox(value);\n for (int i = 0; i < 10; i++) {\n // Loop usages considered as happening more often\n needPrimitive(value);\n }\n }\n\n void needPrimitive(int value) {}\n void needBox(Integer value) {}\n\n\nNew in 2018.2"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "WrapperTypeMayBePrimitive",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EmptyStatementBody",
"shortDescription": {
"text": "Statement with empty body"
},
"fullDescription": {
"text": "Reports 'if', 'while', 'do', 'for', and 'switch' statements with empty bodies. While occasionally intended, such code is confusing and is often the result of a typo. This inspection is disabled in JSP files.",
"markdown": "Reports `if`, `while`, `do`, `for`, and `switch` statements with empty bodies.\n\nWhile occasionally intended, such code is confusing and is often the result of a typo.\n\nThis inspection is disabled in JSP files."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "StatementWithEmptyBody",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InconsistentLanguageLevel",
"shortDescription": {
"text": "Inconsistent language level settings"
},
"fullDescription": {
"text": "Reports modules which depend on other modules with a higher language level. Such dependencies should be removed or the language level of the module be increased. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor.",
"markdown": "Reports modules which depend on other modules with a higher language level.\n\nSuch dependencies should be removed or the language level of the module be increased.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "InconsistentLanguageLevel",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Modularization issues",
"index": 121,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EnumerationCanBeIteration",
"shortDescription": {
"text": "Enumeration can be iteration"
},
"fullDescription": {
"text": "Reports calls to 'Enumeration' methods that are used on collections and may be replaced with equivalent 'Iterator' constructs. Example: 'Enumeration<String> keys = map.keys();\n while (keys.hasMoreElements()) {\n String name = keys.nextElement();\n }' After the quick-fix is applied: 'Iterator<String> iterator = map.keySet().iterator();\n while (iterator.hasNext()) {\n String name = iterator.next();\n }'",
"markdown": "Reports calls to `Enumeration` methods that are used on collections and may be replaced with equivalent `Iterator` constructs.\n\n**Example:**\n\n\n Enumeration<String> keys = map.keys();\n while (keys.hasMoreElements()) {\n String name = keys.nextElement();\n }\n\nAfter the quick-fix is applied:\n\n\n Iterator<String> iterator = map.keySet().iterator();\n while (iterator.hasNext()) {\n String name = iterator.next();\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EnumerationCanBeIteration",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids",
"index": 69,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FieldHasSetterButNoGetter",
"shortDescription": {
"text": "Field has setter but no getter"
},
"fullDescription": {
"text": "Reports fields that have setter methods but no getter methods. In certain bean containers, when used within the Java beans specification, such fields might be difficult to work with.",
"markdown": "Reports fields that have setter methods but no getter methods.\n\n\nIn certain bean containers, when used within the Java beans specification, such fields might be difficult\nto work with."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FieldHasSetterButNoGetter",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/JavaBeans issues",
"index": 142,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ErrorRethrown",
"shortDescription": {
"text": "'Error' not rethrown"
},
"fullDescription": {
"text": "Reports 'try' statements that catch 'java.lang.Error' or any of its subclasses and do not rethrow the error. Statements that catch 'java.lang.ThreadDeath' are not reported. Example: 'try {\n executeTests(request);\n }\n catch (OutOfMemoryError ex) { // warning: Error 'ex' not rethrown\n return false;\n }'",
"markdown": "Reports `try` statements that catch `java.lang.Error` or any of its subclasses and do not rethrow the error.\n\nStatements that catch `java.lang.ThreadDeath` are not\nreported.\n\n**Example:**\n\n\n try {\n executeTests(request);\n }\n catch (OutOfMemoryError ex) { // warning: Error 'ex' not rethrown\n return false;\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ErrorNotRethrown",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Error handling",
"index": 9,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CyclicPackageDependency",
"shortDescription": {
"text": "Cyclic package dependency"
},
"fullDescription": {
"text": "Reports packages that are mutually or cyclically dependent on other packages. Such cyclic dependencies make code fragile and hard to maintain. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor.",
"markdown": "Reports packages that are mutually or cyclically dependent on other packages.\n\nSuch cyclic dependencies make code fragile and hard to maintain.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CyclicPackageDependency",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Dependency issues",
"index": 200,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnsatisfiedRange",
"shortDescription": {
"text": "Return value is outside of declared range"
},
"fullDescription": {
"text": "Reports numeric values returned from methods that don't conform to the declared method return range. You can declare method return range using a number of annotations: 'org.jetbrains.annotations.Range' from JetBrains annotations package (specify 'from' and 'to') 'org.checkerframework.common.value.qual.IntRange' from Checker Framework annotations package (specify 'from' and 'to') 'org.checkerframework.checker.index.qual.GTENegativeOne' from Checker Framework annotations package (range is '>= -1') 'org.checkerframework.checker.index.qual.NonNegative' from Checker Framework annotations package (range is '>= 0') 'org.checkerframework.checker.index.qual.Positive' from Checker Framework annotations package (range is '> 0') 'javax.annotation.Nonnegative' from JSR 305 annotations package (range is '>= 0') 'javax.validation.constraints.Min' (specify minimum value) 'javax.validation.constraints.Max' (specify maximum value) Example: '@Range(from = 0, to = Integer.MAX_VALUE) int getValue() {\n // Warning: -1 is outside of declared range\n return -1;\n }' New in 2021.2",
"markdown": "Reports numeric values returned from methods that don't conform to the declared method return range. You can declare method return range using a number of annotations:\n\n* `org.jetbrains.annotations.Range` from JetBrains annotations package (specify 'from' and 'to')\n* `org.checkerframework.common.value.qual.IntRange` from Checker Framework annotations package (specify 'from' and 'to')\n* `org.checkerframework.checker.index.qual.GTENegativeOne` from Checker Framework annotations package (range is '\\>= -1')\n* `org.checkerframework.checker.index.qual.NonNegative` from Checker Framework annotations package (range is '\\>= 0')\n* `org.checkerframework.checker.index.qual.Positive` from Checker Framework annotations package (range is '\\> 0')\n* `javax.annotation.Nonnegative` from JSR 305 annotations package (range is '\\>= 0')\n* `javax.validation.constraints.Min` (specify minimum value)\n* `javax.validation.constraints.Max` (specify maximum value)\n\nExample:\n\n\n @Range(from = 0, to = Integer.MAX_VALUE) int getValue() {\n // Warning: -1 is outside of declared range\n return -1;\n }\n\nNew in 2021.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnsatisfiedRange",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs/Nullability problems",
"index": 249,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CastConflictsWithInstanceof",
"shortDescription": {
"text": "Cast conflicts with 'instanceof'"
},
"fullDescription": {
"text": "Reports type cast expressions that are preceded by an 'instanceof' check for a different type. Although this might be intended, such a construct is most likely an error, and will result in a 'java.lang.ClassCastException' at runtime. Example: 'class Main {\n int whenCharSequenceCastToNumber(Object o){\n if (o instanceof CharSequence) {\n return ((Number) o).intValue();\n }\n return 0;\n }\n\n int earlyReturnWhenNotCharSequence(Object o){\n if (!(o instanceof CharSequence)) return 0;\n return ((Number)o).intValue();\n }\n }'",
"markdown": "Reports type cast expressions that are preceded by an `instanceof` check for a different type.\n\n\nAlthough this might be intended, such a construct is most likely an error, and will\nresult in a `java.lang.ClassCastException` at runtime.\n\n**Example:**\n\n\n class Main {\n int whenCharSequenceCastToNumber(Object o){\n if (o instanceof CharSequence) {\n return ((Number) o).intValue();\n }\n return 0;\n }\n\n int earlyReturnWhenNotCharSequence(Object o){\n if (!(o instanceof CharSequence)) return 0;\n return ((Number)o).intValue();\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CastConflictsWithInstanceof",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Contract",
"shortDescription": {
"text": "Contract issues"
},
"fullDescription": {
"text": "Reports issues in method '@Contract' annotations. The types of issues that can be reported are: Errors in contract syntax Contracts that do not conform to the method signature (wrong parameter count) Method implementations that contradict the contract (e.g. return 'true' when the contract says 'false') Example: '// method has no parameters, but contract expects 1\n @Contract(\"_ -> fail\")\n void x() {\n throw new AssertionError();\n }'",
"markdown": "Reports issues in method `@Contract` annotations. The types of issues that can be reported are:\n\n* Errors in contract syntax\n* Contracts that do not conform to the method signature (wrong parameter count)\n* Method implementations that contradict the contract (e.g. return `true` when the contract says `false`)\n\nExample:\n\n\n // method has no parameters, but contract expects 1\n @Contract(\"_ -> fail\")\n void x() {\n throw new AssertionError();\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "Contract",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EnhancedSwitchBackwardMigration",
"shortDescription": {
"text": "Enhanced 'switch'"
},
"fullDescription": {
"text": "Reports enhanced 'switch' statements and expressions. Suggests replacing them with regular 'switch' statements. Example: 'boolean even = switch (condition) {\n case 1, 3, 5, 7, 9 -> false;\n default -> true;\n };' After the quick-fix is applied: 'boolean even;\n switch (condition) {\n case 1:\n case 3:\n case 5:\n case 7:\n case 9:\n even = false;\n break;\n default:\n even = true;\n break;\n}' Enhanced 'switch' appeared in Java 14. This inspection can help to downgrade for backward compatibility with earlier Java versions. New in 2019.1",
"markdown": "Reports enhanced `switch` statements and expressions. Suggests replacing them with regular `switch` statements.\n\n**Example:**\n\n\n boolean even = switch (condition) {\n case 1, 3, 5, 7, 9 -> false;\n default -> true;\n };\n\nAfter the quick-fix is applied:\n\n\n boolean even;\n switch (condition) {\n case 1:\n case 3:\n case 5:\n case 7:\n case 9:\n even = false;\n break;\n default:\n even = true;\n break;\n }\n\n\n*Enhanced* `switch` appeared in Java 14.\nThis inspection can help to downgrade for backward compatibility with earlier Java versions.\n\nNew in 2019.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "EnhancedSwitchBackwardMigration",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 14",
"index": 245,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TryFinallyCanBeTryWithResources",
"shortDescription": {
"text": "'try finally' can be replaced with 'try' with resources"
},
"fullDescription": {
"text": "Reports 'try'-'finally' statements that can use Java 7 Automatic Resource Management, which is less error-prone. A quick-fix is available to convert a 'try'-'finally' statement into a 'try'-with-resources statement. Example: 'PrintStream printStream = new PrintStream(fileName);\n try {\n printStream.print(true);\n } finally {\n printStream.close();\n }' A quick-fix is provided to pass the cause to a constructor: 'try (PrintStream printStream = new PrintStream(fileName)) {\n printStream.print(true);\n }' This inspection only reports if the language level of the project or module is 7 or higher.",
"markdown": "Reports `try`-`finally` statements that can use Java 7 Automatic Resource Management, which is less error-prone.\n\nA quick-fix is available to convert a `try`-`finally`\nstatement into a `try`-with-resources statement.\n\n**Example:**\n\n\n PrintStream printStream = new PrintStream(fileName);\n try {\n printStream.print(true);\n } finally {\n printStream.close();\n }\n\nA quick-fix is provided to pass the cause to a constructor:\n\n\n try (PrintStream printStream = new PrintStream(fileName)) {\n printStream.print(true);\n }\n\nThis inspection only reports if the language level of the project or module is 7 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "TryFinallyCanBeTryWithResources",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 7",
"index": 163,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SamePackageImport",
"shortDescription": {
"text": "Unnecessary import from the same package"
},
"fullDescription": {
"text": "Reports 'import' statements that refer to the same package as the containing file. Same-package files are always implicitly imported, so such 'import' statements are redundant and confusing. Since IntelliJ IDEA can automatically detect and fix such statements with its Optimize Imports command, this inspection is mostly useful for offline reporting on code bases that you don't intend to change.",
"markdown": "Reports `import` statements that refer to the same package as the containing file.\n\n\nSame-package files are always implicitly imported, so such `import`\nstatements are redundant and confusing.\n\n\nSince IntelliJ IDEA can automatically detect and fix such statements with its **Optimize Imports**\ncommand, this inspection is mostly useful for offline reporting on code bases that you\ndon't intend to change."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SamePackageImport",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Imports",
"index": 43,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ThreadLocalSetWithNull",
"shortDescription": {
"text": "'ThreadLocal.set()' with null as an argument"
},
"fullDescription": {
"text": "Reports 'java.lang.ThreadLocal.set()' with null as an argument. This call does not free the resources, and it may cause a memory leak. It may happen because: Firstly, 'ThreadLocal.set(null)' finds a map associated with the current Thread. If there is no such a map, it will be created It sets key and value: 'map.set(this, value)', where 'this' refers to instance of 'ThreadLocal' 'java.lang.ThreadLocal.remove()' should be used to free the resources. Example: 'ThreadLocal<Integer> threadLocal = new ThreadLocal<>();\n threadLocal.set(null);' After the quick-fix is applied: 'threadLocal.remove();' New in 2023.2",
"markdown": "Reports `java.lang.ThreadLocal.set()` with null as an argument.\n\nThis call does not free the resources, and it may cause a memory leak.\nIt may happen because:\n\n* Firstly, `ThreadLocal.set(null)` finds a map associated with the current Thread. If there is no such a map, it will be created\n* It sets key and value: `map.set(this, value)`, where `this` refers to instance of `ThreadLocal`\n\n`java.lang.ThreadLocal.remove()` should be used to free the resources.\n\nExample:\n\n\n ThreadLocal<Integer> threadLocal = new ThreadLocal<>();\n threadLocal.set(null);\n\nAfter the quick-fix is applied:\n\n\n threadLocal.remove();\n\nNew in 2023.2"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "ThreadLocalSetWithNull",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MissingJavadoc",
"shortDescription": {
"text": "Missing Javadoc"
},
"fullDescription": {
"text": "Reports missing Javadoc comments and tags. Example: '/**\n * Missing \"@param\" is reported (if configured).\n */\n public void sample(int param){\n }' The quick-fixes add missing tag or missing Javadoc comment: '/**\n * Missing \"@param\" is reported (if configured).\n * @param param\n */\n public void sample(int param){\n }' Inspection can be configured to ignore deprecated elements or simple accessor methods like 'getField()' or 'setField()'. You can also use options below to configure required tags and minimal required visibility for the specific code elements like method, field, class, package, module.",
"markdown": "Reports missing Javadoc comments and tags.\n\nExample:\n\n\n /**\n * Missing \"@param\" is reported (if configured).\n */\n public void sample(int param){\n }\n\nThe quick-fixes add missing tag or missing Javadoc comment:\n\n\n /**\n * Missing \"@param\" is reported (if configured).\n * @param param\n */\n public void sample(int param){\n }\n\n\nInspection can be configured to ignore deprecated elements or simple accessor methods like `getField()` or `setField()`.\nYou can also use options below to configure required tags and minimal required visibility for the specific code elements like method, field, class, package, module."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MissingJavadoc",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Javadoc",
"index": 95,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryLocalVariable",
"shortDescription": {
"text": "Redundant local variable"
},
"fullDescription": {
"text": "Reports unnecessary local variables that add nothing to the comprehensibility of a method, including: Local variables that are immediately returned. Local variables that are immediately assigned to another variable and then not used. Local variables that always have the same value as another local variable or parameter. Example: 'boolean yes() {\n boolean b = true;\n return b;\n }' After the quick-fix is applied: 'boolean yes() {\n return true;\n }' Configure the inspection: Use the Ignore immediately returned or thrown variables option to ignore immediately returned or thrown variables. Some coding styles suggest using such variables for clarity and ease of debugging. Use the Ignore variables which have an annotation option to ignore annotated variables.",
"markdown": "Reports unnecessary local variables that add nothing to the comprehensibility of a method, including:\n\n* Local variables that are immediately returned.\n* Local variables that are immediately assigned to another variable and then not used.\n* Local variables that always have the same value as another local variable or parameter.\n\n**Example:**\n\n\n boolean yes() {\n boolean b = true;\n return b;\n }\n\nAfter the quick-fix is applied:\n\n\n boolean yes() {\n return true;\n }\n \nConfigure the inspection:\n\n* Use the **Ignore immediately returned or thrown variables** option to ignore immediately returned or thrown variables. Some coding styles suggest using such variables for clarity and ease of debugging.\n* Use the **Ignore variables which have an annotation** option to ignore annotated variables."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryLocalVariable",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Data flow",
"index": 61,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java9RedundantRequiresStatement",
"shortDescription": {
"text": "Redundant 'requires' directive in module-info"
},
"fullDescription": {
"text": "Reports redundant 'requires' directives in Java Platform Module System 'module-info.java' files. A 'requires' directive is redundant when a module 'A' requires a module 'B', but the code in module 'A' doesn't import any packages or classes from 'B'. Furthermore, all modules have an implicitly declared dependence on the 'java.base' module, therefore a 'requires java.base;' directive is always redundant. The quick-fix deletes the redundant 'requires' directive. If the deleted dependency re-exported modules that are actually used, the fix adds a 'requires' directives for these modules. This inspection only reports if the language level of the project or module is 9 or higher. New in 2017.1",
"markdown": "Reports redundant `requires` directives in Java Platform Module System `module-info.java` files. A `requires` directive is redundant when a module `A` requires a module `B`, but the code in module `A` doesn't import any packages or classes from `B`. Furthermore, all modules have an implicitly declared dependence on the `java.base` module, therefore a `requires java.base;` directive is always redundant.\n\n\nThe quick-fix deletes the redundant `requires` directive.\nIf the deleted dependency re-exported modules that are actually used, the fix adds a `requires` directives for these modules.\n\nThis inspection only reports if the language level of the project or module is 9 or higher.\n\nNew in 2017.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "Java9RedundantRequiresStatement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Declaration redundancy",
"index": 10,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BusyWait",
"shortDescription": {
"text": "Busy wait"
},
"fullDescription": {
"text": "Reports calls to 'java.lang.Thread.sleep()' that occur inside loops. Such calls are indicative of \"busy-waiting\". Busy-waiting is often inefficient, and may result in unexpected deadlocks as busy-waiting threads do not release locked resources. Example: 'class X {\n volatile int x;\n public void waitX() throws Exception {\n while (x > 0) {\n Thread.sleep(10);//warning: Call to 'Thread.sleep()' in a loop, probably busy-waiting\n }\n }\n }'",
"markdown": "Reports calls to `java.lang.Thread.sleep()` that occur inside loops.\n\nSuch calls\nare indicative of \"busy-waiting\". Busy-waiting is often inefficient, and may result in unexpected deadlocks\nas busy-waiting threads do not release locked resources.\n\n**Example:**\n\n\n class X {\n volatile int x;\n public void waitX() throws Exception {\n while (x > 0) {\n Thread.sleep(10);//warning: Call to 'Thread.sleep()' in a loop, probably busy-waiting\n }\n }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "BusyWait",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ForLoopWithMissingComponent",
"shortDescription": {
"text": "'for' loop with missing components"
},
"fullDescription": {
"text": "Reports 'for' loops that lack initialization, condition, or update clauses. Some coding styles prohibit such loops. Example: 'for (int i = 0;;i++) {\n // body\n }' Use the Ignore collection iterations option to ignore loops which use an iterator. This is a standard way to iterate over a collection in which the 'for' loop does not have an update clause.",
"markdown": "Reports `for` loops that lack initialization, condition, or update clauses. Some coding styles prohibit such loops.\n\nExample:\n\n\n for (int i = 0;;i++) {\n // body\n }\n\n\nUse the **Ignore collection iterations** option to ignore loops which use an iterator.\nThis is a standard way to iterate over a collection in which the `for` loop does not have an update clause."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ForLoopWithMissingComponent",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OptionalOfNullableMisuse",
"shortDescription": {
"text": "Use of Optional.ofNullable with null or not-null argument"
},
"fullDescription": {
"text": "Reports uses of 'Optional.ofNullable()' where always null or always not-null argument is passed. There's no point in using 'Optional.ofNullable()' in this case: either 'Optional.empty()' or 'Optional.of()' should be used to explicitly state the intent of creating an always-empty or always non-empty optional respectively. It's also possible that there's a mistake in 'Optional.ofNullable()' argument, so it should be examined. Example: 'Optional<String> empty = Optional.ofNullable(null); // should be Optional.empty();\nOptional<String> present = Optional.ofNullable(\"value\"); // should be Optional.of(\"value\");'",
"markdown": "Reports uses of `Optional.ofNullable()` where always null or always not-null argument is passed. There's no point in using `Optional.ofNullable()` in this case: either `Optional.empty()` or `Optional.of()` should be used to explicitly state the intent of creating an always-empty or always non-empty optional respectively. It's also possible that there's a mistake in `Optional.ofNullable()` argument, so it should be examined.\n\n\nExample:\n\n\n Optional<String> empty = Optional.ofNullable(null); // should be Optional.empty();\n Optional<String> present = Optional.ofNullable(\"value\"); // should be Optional.of(\"value\"); \n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "OptionalOfNullableMisuse",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SimplifiableConditionalExpression",
"shortDescription": {
"text": "Simplifiable conditional expression"
},
"fullDescription": {
"text": "Reports conditional expressions and suggests simplifying them. Examples: 'condition ? true : foo → condition || foo' 'condition ? false : foo → !condition && foo' 'condition ? foo : !foo → condition == foo' 'condition ? true : false → condition' 'a == b ? b : a → a' 'result != null ? result : null → result'",
"markdown": "Reports conditional expressions and suggests simplifying them.\n\nExamples:\n\n condition ? true : foo → condition || foo\n\n condition ? false : foo → !condition && foo\n\n condition ? foo : !foo → condition == foo\n\n condition ? true : false → condition\n\n a == b ? b : a → a\n\n result != null ? result : null → result\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SimplifiableConditionalExpression",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InfiniteRecursion",
"shortDescription": {
"text": "Infinite recursion"
},
"fullDescription": {
"text": "Reports methods that call themselves infinitely unless an exception is thrown. Methods reported by this inspection cannot return normally. While such behavior may be intended, in many cases this is just an oversight. Example: 'int baz() {\n return baz();\n }'",
"markdown": "Reports methods that call themselves infinitely unless an exception is thrown.\n\n\nMethods reported by this inspection cannot return normally.\nWhile such behavior may be intended, in many cases this is just an oversight.\n\n**Example:**\n\n int baz() {\n return baz();\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "InfiniteRecursion",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DeprecatedIsStillUsed",
"shortDescription": {
"text": "Deprecated member is still used"
},
"fullDescription": {
"text": "Reports deprecated classes, methods, and fields that are used in your code nonetheless. Example: 'class MyCode {\n @Deprecated\n void oldMethod() {}// warning: \"Deprecated member is still used\"\n\n void newMethod() {\n oldMethod(); // forgotten usage\n }\n }' Usages within deprecated elements are ignored. NOTE: Due to performance reasons, a non-private member is checked only when its name rarely occurs in the project.",
"markdown": "Reports deprecated classes, methods, and fields that are used in your code nonetheless.\n\nExample:\n\n\n class MyCode {\n @Deprecated\n void oldMethod() {}// warning: \"Deprecated member is still used\"\n\n void newMethod() {\n oldMethod(); // forgotten usage\n }\n }\n\nUsages within deprecated elements are ignored.\n\n**NOTE:** Due to performance reasons, a non-private member is checked only when its name rarely occurs in the project."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DeprecatedIsStillUsed",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code maturity",
"index": 67,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantComparatorComparing",
"shortDescription": {
"text": "Comparator method can be simplified"
},
"fullDescription": {
"text": "Reports 'Comparator' combinator constructs that can be simplified. Example: 'c.thenComparing(Comparator.comparing(function));\n\n Comparator.comparing(Map.Entry::getKey);\n\n Collections.max(list, Comparator.reverseOrder());' After the quick-fixes are applied: 'c.thenComparing(function)\n\n Map.Entry.comparingByKey()\n\n Collections.min(list, Comparator.naturalOrder());' New in 2018.1",
"markdown": "Reports `Comparator` combinator constructs that can be simplified.\n\nExample:\n\n\n c.thenComparing(Comparator.comparing(function));\n\n Comparator.comparing(Map.Entry::getKey);\n\n Collections.max(list, Comparator.reverseOrder());\n\nAfter the quick-fixes are applied:\n\n\n c.thenComparing(function)\n\n Map.Entry.comparingByKey()\n\n Collections.min(list, Comparator.naturalOrder());\n\nNew in 2018.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantComparatorComparing",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SuspiciousMethodCalls",
"shortDescription": {
"text": "Suspicious collection method call"
},
"fullDescription": {
"text": "Reports method calls on parameterized collections, where the actual argument type does not correspond to the collection's elements type. Example: 'List<Integer> list = getListOfElements();\n list.remove(\"\"); // remove is highlighted' In the inspection settings, you can disable warnings for potentially correct code like the following: 'public boolean accept(Map<Integer, String> map, Object key) {\n return map.containsKey(key);\n }'",
"markdown": "Reports method calls on parameterized collections, where the actual argument type does not correspond to the collection's elements type.\n\n**Example:**\n\n\n List<Integer> list = getListOfElements();\n list.remove(\"\"); // remove is highlighted\n\n\nIn the inspection settings, you can disable warnings for potentially correct code like the following:\n\n\n public boolean accept(Map<Integer, String> map, Object key) {\n return map.containsKey(key);\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SuspiciousMethodCalls",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ForwardCompatibility",
"shortDescription": {
"text": "Forward compatibility"
},
"fullDescription": {
"text": "Reports Java code constructs that may fail to compile in future Java versions. The following problems are reported: Use of 'assert', 'enum' or '_' as an identifier Use of the 'var', 'yield', or 'record' restricted identifier as a type name Unqualified calls to the 'yield()' method Modifiers on the 'requires java.base' statement inside of 'module-info.java' Example: '// This previously legal class does not compile with Java 14,\n // as 'yield' became a restricted identifier.\n public class yield {}' Fixing these issues timely may simplify migration to future Java versions.",
"markdown": "Reports Java code constructs that may fail to compile in future Java versions.\n\nThe following problems are reported:\n\n* Use of `assert`, `enum` or `_` as an identifier\n* Use of the `var`, `yield`, or `record` restricted identifier as a type name\n* Unqualified calls to the `yield()` method\n* Modifiers on the `requires java.base` statement inside of `module-info.java`\n\n**Example:**\n\n\n // This previously legal class does not compile with Java 14,\n // as 'yield' became a restricted identifier.\n public class yield {} \n\nFixing these issues timely may simplify migration to future Java versions."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ForwardCompatibility",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level issues",
"index": 246,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UseOfProcessBuilder",
"shortDescription": {
"text": "Use of 'java.lang.ProcessBuilder' class"
},
"fullDescription": {
"text": "Reports uses of 'java.lang.ProcessBuilder', which might be unportable between operating systems because paths to executables, environment variables, command-line arguments and their escaping might vary depending on the OS.",
"markdown": "Reports uses of `java.lang.ProcessBuilder`, which might be unportable between operating systems because paths to executables, environment variables, command-line arguments and their escaping might vary depending on the OS."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UseOfProcessBuilder",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Portability",
"index": 179,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ExcessiveRangeCheck",
"shortDescription": {
"text": "Excessive range check"
},
"fullDescription": {
"text": "Reports condition chains in which a value range is checked and these condition chains can be simplified to a single check. The quick-fix replaces a condition chain with a simplified expression: Example: 'x > 2 && x < 4' After the quick-fix is applied: 'x == 3' Example: 'arr.length == 0 || arr.length > 1' After the quick-fix is applied: 'arr.length != 1' New in 2019.1",
"markdown": "Reports condition chains in which a value range is checked and these condition chains can be simplified to a single check.\n\nThe quick-fix replaces a condition chain with a simplified expression:\n\nExample:\n\n\n x > 2 && x < 4\n\nAfter the quick-fix is applied:\n\n\n x == 3\n\nExample:\n\n\n arr.length == 0 || arr.length > 1\n\nAfter the quick-fix is applied:\n\n\n arr.length != 1\n\nNew in 2019.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ExcessiveRangeCheck",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StringConcatenation",
"shortDescription": {
"text": "String concatenation"
},
"fullDescription": {
"text": "Reports 'String' concatenations. Concatenation might be incorrect in an internationalized environment and could be replaced by usages of 'java.text.MessageFormat' or similar classes. Example: 'String getMessage(String string, int number) {\n return string + number;\n }'",
"markdown": "Reports `String` concatenations. Concatenation might be incorrect in an internationalized environment and could be replaced by usages of `java.text.MessageFormat` or similar classes.\n\n**Example:**\n\n\n String getMessage(String string, int number) {\n return string + number;\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "StringConcatenation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Internationalization",
"index": 110,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassCanBeRecord",
"shortDescription": {
"text": "Class can be a record"
},
"fullDescription": {
"text": "Suggests replacing classes with records. The inspection can be useful if you need to focus on modeling immutable data rather than extensible behavior. Automatic implementation of data-driven methods, such as equals and accessors, helps to get rid of boilerplate. Note that not every class can be a record. Here are some of the restrictions: A class must contain no inheritors and must be a top-level class. All the non-static fields in class must be final. Class must contain no instance initializers, generic constructors, nor native methods. To get a full list of the restrictions, refer to the Oracle documentation. Example: 'class Point {\n private final double x;\n private final double y;\n\n Point(double x, double y) {\n this.x = x;\n this.y = y;\n }\n\n double getX() {\n return x;\n }\n\n double getY() {\n return y;\n }\n }' After the quick-fix is applied: 'record Point(int x, int y) {\n }' Enable the Suggest renaming get/is-accessors option to allow renaming 'getX()'/'isX()' accessors to 'x()' automatically. Use the When conversion makes a member more accessible options to specify if the conversion may violate class encapsulation: Choose Do not suggest conversion option to never violate class encapsulation Choose Show affected members in conflicts view option to apply conversion with notification about encapsulation violation issues Choose Convert silently option to apply conversion silently whether encapsulation violation issues exist or not Use the Suppress conversion if class is annotated by list to exclude classes from conversion when annotated by annotations matching the specified patterns. This inspection only reports if the language level of the project or module is 16 or higher. New in 2020.3",
"markdown": "Suggests replacing classes with records.\n\nThe inspection can be useful if you need to focus on modeling immutable data rather than extensible behavior.\nAutomatic implementation of data-driven methods, such as equals and accessors, helps to get rid of boilerplate.\n\n\nNote that not every class can be a record. Here are some of the restrictions:\n\n* A class must contain no inheritors and must be a top-level class.\n* All the non-static fields in class must be final.\n* Class must contain no instance initializers, generic constructors, nor native methods.\n\nTo get a full list of the restrictions, refer to the\n[Oracle documentation](https://docs.oracle.com/javase/specs/jls/se15/preview/specs/records-jls.html).\n\nExample:\n\n\n class Point {\n private final double x;\n private final double y;\n\n Point(double x, double y) {\n this.x = x;\n this.y = y;\n }\n\n double getX() {\n return x;\n }\n\n double getY() {\n return y;\n }\n }\n\nAfter the quick-fix is applied:\n\n\n record Point(int x, int y) {\n }\n\nEnable the **Suggest renaming get/is-accessors** option to allow renaming `getX()`/`isX()` accessors to `x()` automatically.\n\n\nUse the **When conversion makes a member more accessible** options to specify if the conversion may violate class encapsulation:\n\n* Choose **Do not suggest conversion** option to never violate class encapsulation\n* Choose **Show affected members in conflicts view** option to apply conversion with notification about encapsulation violation issues\n* Choose **Convert silently** option to apply conversion silently whether encapsulation violation issues exist or not\n\nUse the **Suppress conversion if class is annotated by** list to exclude classes from conversion when annotated by annotations matching the specified patterns.\n\nThis inspection only reports if the language level of the project or module is 16 or higher.\n\nNew in 2020.3"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ClassCanBeRecord",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 16",
"index": 226,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConstantAssertArgument",
"shortDescription": {
"text": "Constant assert argument"
},
"fullDescription": {
"text": "Reports constant arguments in 'assertTrue()', 'assertFalse()', 'assertNull()', and 'assertNotNull()' calls. Calls to these methods with constant arguments will either always succeed or always fail. Such statements can easily be left over after refactoring and are probably not intended. Example: 'assertNotNull(\"foo\");'",
"markdown": "Reports constant arguments in `assertTrue()`, `assertFalse()`, `assertNull()`, and `assertNotNull()` calls.\n\n\nCalls to these methods with\nconstant arguments will either always succeed or always fail.\nSuch statements can easily be left over after refactoring and are probably not intended.\n\n**Example:**\n\n\n assertNotNull(\"foo\");\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ConstantAssertArgument",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Test frameworks",
"index": 182,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StaticInitializerReferencesSubClass",
"shortDescription": {
"text": "Static initializer references subclass"
},
"fullDescription": {
"text": "Reports classes that refer to their subclasses in static initializers or static fields. Such references can cause JVM-level deadlocks in multithreaded environment, when one thread tries to load the superclass and another thread tries to load the subclass at the same time. Example: 'class Parent {\n static final Child field = new Child();\n }\n class Child extends Parent { }'",
"markdown": "Reports classes that refer to their subclasses in static initializers or static fields.\n\nSuch references can cause JVM-level deadlocks in multithreaded environment, when one thread tries to load the superclass\nand another thread tries to load the subclass at the same time.\n\n**Example:**\n\n\n class Parent {\n static final Child field = new Child();\n }\n class Child extends Parent { }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "StaticInitializerReferencesSubClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MissingDeprecatedAnnotationOnScheduledForRemovalApi",
"shortDescription": {
"text": "Missing '@Deprecated' annotation on scheduled for removal API"
},
"fullDescription": {
"text": "Reports declarations marked with '@ApiStatus.ScheduledForRemoval' without '@Deprecated'. Example: '@ApiStatus.ScheduledForRemoval(inVersion = \"2017.3\")\n public void myLegacyMethod() { }' After the quick-fix is applied the result looks like: '@Deprecated\n @ApiStatus.ScheduledForRemoval(inVersion = \"2017.3\")\n public void myLegacyMethod() { }'",
"markdown": "Reports declarations marked with `@ApiStatus.ScheduledForRemoval` without `@Deprecated`.\n\nExample:\n\n\n @ApiStatus.ScheduledForRemoval(inVersion = \"2017.3\")\n public void myLegacyMethod() { }\n\nAfter the quick-fix is applied the result looks like:\n\n\n @Deprecated\n @ApiStatus.ScheduledForRemoval(inVersion = \"2017.3\")\n public void myLegacyMethod() { }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "MissingDeprecatedAnnotationOnScheduledForRemovalApi",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JVM languages",
"index": 47,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConstantDeclaredInAbstractClass",
"shortDescription": {
"text": "Constant declared in 'abstract' class"
},
"fullDescription": {
"text": "Reports constants ('public static final' fields) declared in abstract classes. Some coding standards require declaring constants in interfaces instead.",
"markdown": "Reports constants (`public static final` fields) declared in abstract classes.\n\nSome coding standards require declaring constants in interfaces instead."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ConstantDeclaredInAbstractClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SuspiciousGetterSetter",
"shortDescription": {
"text": "Suspicious getter/setter"
},
"fullDescription": {
"text": "Reports getter or setter methods that access a field that is not expected by its name. For example, when 'getY()' returns the 'x' field. Usually, it might be a copy-paste error. Example: 'class Point {\n private int x;\n private int y;\n\n public void setX(int x) { // Warning: setter 'setX()' assigns field 'y'\n this.y = x;\n }\n\n public int getY() { // Warning: getter 'getY()' returns field 'x'\n return x;\n }\n }' Use the checkbox below to report situations when a field in the class has a name that matches a name of a getter or a setter.",
"markdown": "Reports getter or setter methods that access a field that is not expected by its name. For example, when `getY()` returns the `x` field. Usually, it might be a copy-paste error.\n\n**Example:**\n\n class Point {\n private int x;\n private int y;\n\n public void setX(int x) { // Warning: setter 'setX()' assigns field 'y'\n this.y = x;\n }\n\n public int getY() { // Warning: getter 'getY()' returns field 'x'\n return x;\n }\n }\n\n\nUse the checkbox below to report situations when a field in the class has a name that matches a name of a getter or a setter."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SuspiciousGetterSetter",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/JavaBeans issues",
"index": 142,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonSynchronizedMethodOverridesSynchronizedMethod",
"shortDescription": {
"text": "Unsynchronized method overrides 'synchronized' method"
},
"fullDescription": {
"text": "Reports non-'synchronized' methods overriding 'synchronized' methods. The overridden method will not be automatically synchronized if the superclass method is declared as 'synchronized'. This may result in unexpected race conditions when using the subclass. Example: 'class Super {\n synchronized void process() {}\n }\n class Sub extends Super {\n // Unsynchronized method 'process()' overrides synchronized method\n void process() {}\n }'",
"markdown": "Reports non-`synchronized` methods overriding `synchronized` methods.\n\n\nThe overridden method will not be automatically synchronized if the superclass method\nis declared as `synchronized`. This may result in unexpected race conditions when using the subclass.\n\n**Example:**\n\n\n class Super {\n synchronized void process() {}\n }\n class Sub extends Super {\n // Unsynchronized method 'process()' overrides synchronized method\n void process() {}\n } \n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonSynchronizedMethodOverridesSynchronizedMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TooBroadCatch",
"shortDescription": {
"text": "Overly broad 'catch' block"
},
"fullDescription": {
"text": "Reports 'catch' blocks with parameters that are more generic than the exception thrown by the corresponding 'try' block. Example: 'try {\n File file = new File(pathToFile);\n return file.getAbsolutePath();\n } catch (Exception ex) { // warning: 'catch' of 'Exception' is too broad, masking exceptions 'RuntimeException'\n return defaultFilePath;\n }' After the quick-fix is applied: 'try {\n File file = new File(pathToFile);\n return file.getAbsolutePath();\n } catch (RuntimeException ex) {\n return defaultFilePath;\n }' Configure the inspection: Use the Only warn on RuntimeException, Exception, Error or Throwable option to have this inspection warn only on the most generic exceptions. Use the Ignore exceptions which hide others but are themselves thrown option to ignore any exceptions that hide other exceptions but still may be thrown and thus are technically not overly broad.",
"markdown": "Reports `catch` blocks with parameters that are more generic than the exception thrown by the corresponding `try` block.\n\n**Example:**\n\n\n try {\n File file = new File(pathToFile);\n return file.getAbsolutePath();\n } catch (Exception ex) { // warning: 'catch' of 'Exception' is too broad, masking exceptions 'RuntimeException'\n return defaultFilePath;\n }\n\nAfter the quick-fix is applied:\n\n\n try {\n File file = new File(pathToFile);\n return file.getAbsolutePath();\n } catch (RuntimeException ex) {\n return defaultFilePath;\n }\n\nConfigure the inspection:\n\n* Use the **Only warn on RuntimeException, Exception, Error or Throwable** option to have this inspection warn only on the most generic exceptions.\n* Use the **Ignore exceptions which hide others but are themselves thrown** option to ignore any exceptions that hide other exceptions but still may be thrown and thus are technically not overly broad."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OverlyBroadCatchBlock",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Error handling",
"index": 9,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ProtectedMemberInFinalClass",
"shortDescription": {
"text": "'protected' member in 'final' class"
},
"fullDescription": {
"text": "Reports 'protected' members in 'final'classes. Since 'final' classes cannot be inherited, marking the method as 'protected' may be confusing. It is better to declare such members as 'private' or package-visible instead. Example: 'record Bar(int a, int b) {\n protected int sum() { \n return a + b;\n }\n}'\n After the quick-fix is applied: 'record Bar(int a, int b) {\n int sum() { \n return a + b;\n }\n}' As shown in the example, a class can be marked as 'final' explicitly or implicitly.",
"markdown": "Reports `protected` members in `final`classes.\n\nSince `final` classes cannot be inherited, marking the method as `protected`\nmay be confusing. It is better to declare such members as `private` or package-visible instead.\n\n**Example:**\n\n record Bar(int a, int b) {\n protected int sum() { \n return a + b;\n }\n }\n\nAfter the quick-fix is applied:\n\n record Bar(int a, int b) {\n int sum() { \n return a + b;\n }\n }\n\nAs shown in the example, a class can be marked as `final` explicitly or implicitly."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ProtectedMemberInFinalClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Declaration redundancy",
"index": 10,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryInitCause",
"shortDescription": {
"text": "Unnecessary call to 'Throwable.initCause()'"
},
"fullDescription": {
"text": "Reports calls to 'Throwable.initCause()' where an exception constructor also takes a 'Throwable cause' argument. In this case, the 'initCause()' call can be removed and its argument can be added to the call to the exception's constructor. Example: 'try {\n process();\n }\n catch (RuntimeException ex) {\n RuntimeException wrapper = new RuntimeException(\"Error while processing\");\n wrapper.initCause(ex); // Unnecessary call to 'Throwable.initCause()'\n throw wrapper;\n }' A quick-fix is available to pass the cause argument to the constructor. After the quick-fix is applied: 'try {\n process();\n }\n catch (RuntimeException ex) {\n RuntimeException wrapper = new RuntimeException(\"Error while processing\", ex);\n throw wrapper;\n }'",
"markdown": "Reports calls to `Throwable.initCause()` where an exception constructor also takes a `Throwable cause` argument.\n\nIn this case, the `initCause()` call can be removed and its argument can be added to the call to the exception's constructor.\n\n**Example:**\n\n\n try {\n process();\n }\n catch (RuntimeException ex) {\n RuntimeException wrapper = new RuntimeException(\"Error while processing\");\n wrapper.initCause(ex); // Unnecessary call to 'Throwable.initCause()'\n throw wrapper;\n }\n\nA quick-fix is available to pass the cause argument to the constructor. After the quick-fix is applied:\n\n\n try {\n process();\n }\n catch (RuntimeException ex) {\n RuntimeException wrapper = new RuntimeException(\"Error while processing\", ex);\n throw wrapper;\n }\n \n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryInitCause",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Error handling",
"index": 9,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ArrayCanBeReplacedWithEnumValues",
"shortDescription": {
"text": "Array can be replaced with enum values"
},
"fullDescription": {
"text": "Reports arrays of enum constants that can be replaced with a call to 'EnumType.values()'. Usually, when updating such an enum, you have to update the array as well. However, if you use 'EnumType.values()' instead, no modifications are required. Example: 'enum States {\n NOT_RUN, IN_PROGRESS, FINISHED;\n }\n \n handleStates(new States[] {NOT_RUN, IN_PROGRESS, FINISHED});' After the quick-fix is applied: 'handleStates(States.values());' New in 2019.1",
"markdown": "Reports arrays of enum constants that can be replaced with a call to `EnumType.values()`.\n\nUsually, when updating such an enum, you have to update the array as well. However, if you use `EnumType.values()`\ninstead, no modifications are required.\n\nExample:\n\n\n enum States {\n NOT_RUN, IN_PROGRESS, FINISHED;\n }\n \n handleStates(new States[] {NOT_RUN, IN_PROGRESS, FINISHED});\n\nAfter the quick-fix is applied:\n\n\n handleStates(States.values());\n\nNew in 2019.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ArrayCanBeReplacedWithEnumValues",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "WaitNotifyNotInSynchronizedContext",
"shortDescription": {
"text": "'wait()' or 'notify()' is not in synchronized context"
},
"fullDescription": {
"text": "Reports calls to 'wait()', 'notify()', and 'notifyAll()' that are not made inside a corresponding synchronized statement or synchronized method. Calling these methods on an object without holding a lock on that object causes 'IllegalMonitorStateException'. Such a construct is not necessarily an error, as the necessary lock may be acquired before the containing method is called, but it's worth looking at. Example: 'class Sync {\n private final Object lock = new Object();\n\n void test() throws InterruptedException {\n synchronized (this) {\n lock.wait(); // 'lock.wait()' is not synchronized on 'lock'\n }\n }\n }'",
"markdown": "Reports calls to `wait()`, `notify()`, and `notifyAll()` that are not made inside a corresponding synchronized statement or synchronized method.\n\n\nCalling these methods on an object\nwithout holding a lock on that object causes `IllegalMonitorStateException`.\nSuch a construct is not necessarily an error, as the necessary lock may be acquired before\nthe containing method is called, but it's worth looking at.\n\n**Example:**\n\n\n class Sync {\n private final Object lock = new Object();\n\n void test() throws InterruptedException {\n synchronized (this) {\n lock.wait(); // 'lock.wait()' is not synchronized on 'lock'\n }\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "WaitNotifyWhileNotSynced",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DollarSignInName",
"shortDescription": {
"text": "Use of '$' in identifier"
},
"fullDescription": {
"text": "Reports variables, methods, and classes with dollar signs ('$') in their names. While such names are legal Java, their use outside of generated java code is strongly discouraged. Example: 'class SalaryIn${}' Rename quick-fix is suggested only in the editor.",
"markdown": "Reports variables, methods, and classes with dollar signs (`$`) in their names. While such names are legal Java, their use outside of generated java code is strongly discouraged.\n\n**Example:**\n\n\n class SalaryIn${}\n\nRename quick-fix is suggested only in the editor."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DollarSignInName",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Naming conventions",
"index": 106,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DynamicRegexReplaceableByCompiledPattern",
"shortDescription": {
"text": "Dynamic regular expression could be replaced by compiled 'Pattern'"
},
"fullDescription": {
"text": "Reports calls to the regular expression methods (such as 'matches()' or 'split()') of 'java.lang.String' using constant arguments. Such calls may be profitably replaced with a 'private static final Pattern' field so that the regular expression does not have to be compiled each time it is used. Example: 'text.replaceAll(\"abc\", replacement);' After the quick-fix is applied: 'private static final Pattern ABC = Pattern.compile(\"abc\", Pattern.LITERAL);\n ABC.matcher(text).replaceAll(Matcher.quoteReplacement(replacement));'",
"markdown": "Reports calls to the regular expression methods (such as `matches()` or `split()`) of `java.lang.String` using constant arguments.\n\n\nSuch calls may be profitably replaced with a `private static final Pattern` field\nso that the regular expression does not have to be compiled each time it is used.\n\n**Example:**\n\n\n text.replaceAll(\"abc\", replacement);\n\nAfter the quick-fix is applied:\n\n\n private static final Pattern ABC = Pattern.compile(\"abc\", Pattern.LITERAL);\n ABC.matcher(text).replaceAll(Matcher.quoteReplacement(replacement));\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DynamicRegexReplaceableByCompiledPattern",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnqualifiedStaticUsage",
"shortDescription": {
"text": "Unqualified static access"
},
"fullDescription": {
"text": "Reports usage of static members that is not qualified with the class name. This is legal if the static member is in the same class, but may be confusing. Example: 'class Foo {\n static void foo() {}\n static int x;\n\n void bar() {\n foo();\n System.out.println(x);\n }\n\n static void baz() { foo(); }\n }' After the quick-fix is applied: 'class Foo {\n static void foo() {}\n static int x;\n\n void bar() {\n Foo.foo();\n System.out.println(Foo.x);\n }\n\n static void baz() { Foo.foo(); }\n }' Use the inspection settings to toggle the reporting for the following items: static fields access 'void bar() { System.out.println(x); }' calls to static methods 'void bar() { foo(); }' 'static void baz() { foo(); }' You can also configure the inspection to only report static member usage from a non-static context. In the above example, 'static void baz() { foo(); }' will not be reported.",
"markdown": "Reports usage of static members that is not qualified with the class name.\n\n\nThis is legal if the static member is in\nthe same class, but may be confusing.\n\n**Example:**\n\n\n class Foo {\n static void foo() {}\n static int x;\n\n void bar() {\n foo();\n System.out.println(x);\n }\n\n static void baz() { foo(); }\n }\n\nAfter the quick-fix is applied:\n\n\n class Foo {\n static void foo() {}\n static int x;\n\n void bar() {\n Foo.foo();\n System.out.println(Foo.x);\n }\n\n static void baz() { Foo.foo(); }\n }\n\nUse the inspection settings to toggle the reporting for the following items:\n\n*\n static fields access \n\n `void bar() { System.out.println(x); }`\n\n*\n calls to static methods \n\n `void bar() { foo(); }` \n\n `static void baz() { foo(); }`\n\n\nYou can also configure the inspection to only report static member usage from a non-static context.\nIn the above example, `static void baz() { foo(); }` will not be reported."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnqualifiedStaticUsage",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ControlFlowStatementWithoutBraces",
"shortDescription": {
"text": "Control flow statement without braces"
},
"fullDescription": {
"text": "Reports any 'if', 'while', 'do', or 'for' statements without braces. Some code styles, e.g. the Google Java Style guide, require braces for all control statements. When adding further statements to control statements without braces, it is important not to forget adding braces. When commenting out a line of code, it is also necessary to be more careful when not using braces, to not inadvertently make the next statement part of the control flow statement. Always using braces makes inserting or commenting out a line of code safer. It's likely the goto fail vulnerability would not have happened, if an always use braces code style was used. Control statements with braces make the control flow easier to see, without relying on, possibly incorrect, indentation. Example: 'class Strange {\n void x(boolean one, boolean two) {\n if(one)\n if(two)\n foo();\n else\n bar();\n }\n\n void foo() {}\n void bar() {}\n }' The quick-fix wraps the statement body with braces: 'class Strange {\n void x(boolean one, boolean two) {\n if(one) {\n if(two) {\n foo();\n } else {\n bar();\n }\n }\n }\n\n void foo() {}\n void bar() {}\n }'",
"markdown": "Reports any `if`, `while`, `do`, or `for` statements without braces. Some code styles, e.g. the [Google Java Style guide](https://google.github.io/styleguide/javaguide.html), require braces for all control statements.\n\n\nWhen adding further statements to control statements without braces, it is important not to forget adding braces.\nWhen commenting out a line of code, it is also necessary to be more careful when not using braces,\nto not inadvertently make the next statement part of the control flow statement.\nAlways using braces makes inserting or commenting out a line of code safer.\n\n\nIt's likely the [goto fail vulnerability](https://www.imperialviolet.org/2014/02/22/applebug.html) would not have happened,\nif an always use braces code style was used.\nControl statements with braces make the control flow easier to see, without relying on, possibly incorrect, indentation.\n\nExample:\n\n\n class Strange {\n void x(boolean one, boolean two) {\n if(one)\n if(two)\n foo();\n else\n bar();\n }\n\n void foo() {}\n void bar() {}\n }\n\nThe quick-fix wraps the statement body with braces:\n\n\n class Strange {\n void x(boolean one, boolean two) {\n if(one) {\n if(two) {\n foo();\n } else {\n bar();\n }\n }\n }\n\n void foo() {}\n void bar() {}\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ControlFlowStatementWithoutBraces",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EnumClass",
"shortDescription": {
"text": "Enumerated class"
},
"fullDescription": {
"text": "Reports enum classes. Such statements are not supported in Java 1.4 and earlier JVM.",
"markdown": "Reports **enum** classes. Such statements are not supported in Java 1.4 and earlier JVM."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EnumClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level issues",
"index": 246,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AnonymousHasLambdaAlternative",
"shortDescription": {
"text": "Anonymous type has shorter lambda alternative"
},
"fullDescription": {
"text": "Reports anonymous classes which could be transformed to a constructor or a factory method call with a lambda expression argument. The following classes are reported by this inspection: Anonymous classes extending 'ThreadLocal' which have an 'initialValue()' method (can be replaced with 'ThreadLocal.withInitial') Anonymous classes extending 'Thread' which have a 'run()' method (can be replaced with 'new Thread(Runnable)' Example: 'new Thread() {\n @Override\n public void run() {\n System.out.println(\"Hello from thread!\");\n }\n }.start();' After the quick-fix is applied: 'new Thread(() -> {\n System.out.println(\"Hello from thread!\");\n }).start();'",
"markdown": "Reports anonymous classes which could be transformed to a constructor or a factory method call with a lambda expression argument.\n\nThe following classes are reported by this inspection:\n\n* Anonymous classes extending `ThreadLocal` which have an `initialValue()` method (can be replaced with `ThreadLocal.withInitial`)\n* Anonymous classes extending `Thread` which have a `run()` method (can be replaced with `new Thread(Runnable)`\n\nExample:\n\n\n new Thread() {\n @Override\n public void run() {\n System.out.println(\"Hello from thread!\");\n }\n }.start();\n\nAfter the quick-fix is applied:\n\n\n new Thread(() -> {\n System.out.println(\"Hello from thread!\");\n }).start();\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AnonymousHasLambdaAlternative",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 8",
"index": 119,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ZeroLengthArrayInitialization",
"shortDescription": {
"text": "Zero-length array allocation"
},
"fullDescription": {
"text": "Reports allocations of arrays with known lengths of zero. Since array lengths in Java are non-modifiable, it is almost always possible to share zero-length arrays, rather than repeatedly allocate new ones. Such sharing may provide useful optimizations in the program runtime or footprint. Note that the inspection does not report zero-length arrays allocated as static final fields, since those arrays are assumed to be used for implementing array sharing.",
"markdown": "Reports allocations of arrays with known lengths of zero.\n\n\nSince array lengths in Java are non-modifiable, it is almost always possible to share zero-length arrays, rather than repeatedly\nallocate new ones. Such sharing may provide useful optimizations in the program runtime or footprint.\n\n\nNote that the inspection does not report zero-length arrays allocated as static final fields,\nsince those arrays are assumed to be used for implementing array sharing."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ZeroLengthArrayAllocation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Memory",
"index": 166,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MissingSerialAnnotation",
"shortDescription": {
"text": "'@Serial' annotation could be used"
},
"fullDescription": {
"text": "Reports methods and fields in the 'Serializable' and 'Externalizable' classes that are suitable to be annotated with the 'java.io.Serial' annotation. The quick-fix adds the annotation. Example: 'class Main implements Serializable {\n private static final long serialVersionUID = 7874493593505141603L;\n\n private void writeObject(ObjectOutputStream out) throws IOException {\n }\n}' After the quick-fix is applied: 'class Main implements Serializable {\n @Serial\n private static final long serialVersionUID = 7874493593505141603L;\n\n @Serial\n private void writeObject(ObjectOutputStream out) throws IOException {\n }\n}' Example: 'class Main implements Externalizable {\n protected Object readResolve() throws ObjectStreamException {\n return \"SomeObject\";\n }\n }' After the quick-fix is applied: 'class Main implements Externalizable {\n @Serial\n protected Object readResolve() throws ObjectStreamException {\n return \"SomeObject\";\n }\n }' For more information about all possible cases, refer the documentation for 'java.io.Serial'. This inspection only reports if the language level of the project or module is 14 or higher. New in 2020.3",
"markdown": "Reports methods and fields in the `Serializable` and `Externalizable` classes that are suitable to be annotated with the `java.io.Serial` annotation. The quick-fix adds the annotation.\n\n**Example:**\n\n\n class Main implements Serializable {\n private static final long serialVersionUID = 7874493593505141603L;\n\n private void writeObject(ObjectOutputStream out) throws IOException {\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class Main implements Serializable {\n @Serial\n private static final long serialVersionUID = 7874493593505141603L;\n\n @Serial\n private void writeObject(ObjectOutputStream out) throws IOException {\n }\n }\n\n**Example:**\n\n\n class Main implements Externalizable {\n protected Object readResolve() throws ObjectStreamException {\n return \"SomeObject\";\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class Main implements Externalizable {\n @Serial\n protected Object readResolve() throws ObjectStreamException {\n return \"SomeObject\";\n }\n }\n\nFor more information about all possible cases, refer the documentation for `java.io.Serial`.\n\nThis inspection only reports if the language level of the project or module is 14 or higher.\n\nNew in 2020.3"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "MissingSerialAnnotation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Serialization issues",
"index": 54,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MultipleExceptionsDeclaredOnTestMethod",
"shortDescription": {
"text": "Multiple exceptions declared on test method"
},
"fullDescription": {
"text": "Reports JUnit test method 'throws' clauses with more than one exception. Such clauses are unnecessarily verbose. Test methods will not be called from other project code, so there is no need to handle these exceptions separately. For example: '@Test\n public void testReflection() throws NoSuchMethodException,\n InvocationTargetException, IllegalAccessException {\n String result = (String) String.class.getMethod(\"trim\")\n .invoke(\" hello \");\n assertEquals(\"hello\", result);\n }' A quick fix is provided to replace the exception declarations with a single exception: '@Test\n public void testReflection() throws Exception {\n String result = (String) String.class.getMethod(\"trim\")\n .invoke(\" hello \");\n assertEquals(\"hello\", result);\n }'",
"markdown": "Reports JUnit test method `throws` clauses with more than one exception. Such clauses are unnecessarily verbose. Test methods will not be called from other project code, so there is no need to handle these exceptions separately.\n\nFor example:\n\n\n @Test\n public void testReflection() throws NoSuchMethodException,\n InvocationTargetException, IllegalAccessException {\n String result = (String) String.class.getMethod(\"trim\")\n .invoke(\" hello \");\n assertEquals(\"hello\", result);\n }\n\nA quick fix is provided to replace the exception declarations with a single exception:\n\n\n @Test\n public void testReflection() throws Exception {\n String result = (String) String.class.getMethod(\"trim\")\n .invoke(\" hello \");\n assertEquals(\"hello\", result);\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MultipleExceptionsDeclaredOnTestMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/JUnit",
"index": 100,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StandardVariableNames",
"shortDescription": {
"text": "Standard variable names"
},
"fullDescription": {
"text": "Reports variables with 'standard' names that do not correspond to their types. Such names may be confusing. There are the following standard names for specific types: i, j, k, m, n - 'int' f - 'float' d - 'double' b - 'byte' c, ch - 'char' l - 'long' s, str - 'String' Rename quick-fix is suggested only in the editor. Use the option to ignore parameter names which are identical to the parameter name from a direct super method.",
"markdown": "Reports variables with 'standard' names that do not correspond to their types. Such names may be confusing. There are the following standard names for specific types:\n\n* i, j, k, m, n - `int`\n* f - `float`\n* d - `double`\n* b - `byte`\n* c, ch - `char`\n* l - `long`\n* s, str - `String`\n\nRename quick-fix is suggested only in the editor.\n\n\nUse the option to ignore parameter names which are identical to the parameter name from a direct super method."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "StandardVariableNames",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Naming conventions",
"index": 106,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ComparisonToNaN",
"shortDescription": {
"text": "Comparison to 'Double.NaN' or 'Float.NaN'"
},
"fullDescription": {
"text": "Reports any comparisons to 'Double.NaN' or 'Float.NaN'. Such comparisons are never meaningful, as NaN is not equal to anything, including itself. Use the 'Double.isNaN()' or 'Float.isNaN()' methods instead. Example: 'if (x == Double.NaN) {...}' After the quick-fix is applied: 'if (Double.isNaN(x)) {...}'",
"markdown": "Reports any comparisons to `Double.NaN` or `Float.NaN`. Such comparisons are never meaningful, as NaN is not equal to anything, including itself. Use the `Double.isNaN()` or `Float.isNaN()` methods instead.\n\n**Example:**\n\n\n if (x == Double.NaN) {...}\n\nAfter the quick-fix is applied:\n\n\n if (Double.isNaN(x)) {...}\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ComparisonToNaN",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues",
"index": 49,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MultiCatchCanBeSplit",
"shortDescription": {
"text": "Multi-catch can be split into separate catch blocks"
},
"fullDescription": {
"text": "Reports multi-'catch' sections and suggests splitting them into separate 'catch' blocks. Example: 'try {\n int i = getIndex();\n } catch (NullPointerException|IndexOutOfBoundsException e) {\n e.printStackTrace();\n }' After the quick-fix is applied: 'try {\n int i = getIndex();\n } catch (NullPointerException e) {\n e.printStackTrace();\n } catch (IndexOutOfBoundsException e) {\n e.printStackTrace();\n }' Multi-'catch' appeared in Java 7. This inspection can help to downgrade for backward compatibility with earlier Java versions.",
"markdown": "Reports multi-`catch` sections and suggests splitting them into separate `catch` blocks.\n\nExample:\n\n\n try {\n int i = getIndex();\n } catch (NullPointerException|IndexOutOfBoundsException e) {\n e.printStackTrace();\n }\n\nAfter the quick-fix is applied:\n\n\n try {\n int i = getIndex();\n } catch (NullPointerException e) {\n e.printStackTrace();\n } catch (IndexOutOfBoundsException e) {\n e.printStackTrace();\n }\n\n\n*Multi-* `catch` appeared in Java 7.\nThis inspection can help to downgrade for backward compatibility with earlier Java versions."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "MultiCatchCanBeSplit",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConditionCoveredByFurtherCondition",
"shortDescription": {
"text": "Condition is covered by further condition"
},
"fullDescription": {
"text": "Reports conditions that become redundant as they are completely covered by a subsequent condition. For example, in the 'value != -1 && value > 0' condition, the first part is redundant: if it's false, then the second part is also false. Or in a condition like 'obj != null && obj instanceof String', the null-check is redundant as 'instanceof' operator implies non-nullity. New in 2018.3",
"markdown": "Reports conditions that become redundant as they are completely covered by a subsequent condition.\n\nFor example, in the `value != -1 && value > 0` condition, the first part is redundant:\nif it's false, then the second part is also false.\nOr in a condition like `obj != null && obj instanceof String`,\nthe null-check is redundant as `instanceof` operator implies non-nullity.\n\nNew in 2018.3"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ConditionCoveredByFurtherCondition",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JoinDeclarationAndAssignmentJava",
"shortDescription": {
"text": "Assignment can be joined with declaration"
},
"fullDescription": {
"text": "Reports variable assignments that can be joined with a variable declaration. Example: 'int x;\n x = 1;' The quick-fix converts the assignment into an initializer: 'int x = 1;' New in 2018.3",
"markdown": "Reports variable assignments that can be joined with a variable declaration.\n\nExample:\n\n\n int x;\n x = 1;\n\nThe quick-fix converts the assignment into an initializer:\n\n\n int x = 1;\n\nNew in 2018.3"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "JoinDeclarationAndAssignmentJava",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InnerClassVariableHidesOuterClassVariable",
"shortDescription": {
"text": "Inner class field hides outer class field"
},
"fullDescription": {
"text": "Reports inner class fields named identically to a field of a surrounding class. As a result of such naming, you may accidentally use the field from the inner class when using the identically named field of a surrounding class is intended. A quick-fix is suggested to rename the inner class field. Example: 'class Outer {\n private String name;\n\n class Inner {\n private String name;\n }\n }' Use the option to choose whether this inspection should report all name clashes, or only clashes with fields that are visible from the inner class.",
"markdown": "Reports inner class fields named identically to a field of a surrounding class. As a result of such naming, you may accidentally use the field from the inner class when using the identically named field of a surrounding class is intended.\n\nA quick-fix is suggested to rename the inner class field.\n\n**Example:**\n\n\n class Outer {\n private String name;\n\n class Inner {\n private String name;\n }\n }\n\n\nUse the option to choose whether this inspection should report all name clashes,\nor only clashes with fields that are visible from the inner class."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "InnerClassFieldHidesOuterClassField",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Visibility",
"index": 97,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryModifier",
"shortDescription": {
"text": "Unnecessary modifier"
},
"fullDescription": {
"text": "Reports redundant modifiers and suggests to remove them. The resulting code will be shorter, but the behaviour and meaning will remain the same. Example 1: '// all code is implicitly strictfp under Java 17 and higher\n strictfp class X {\n\n // inner enums are implicitly static\n static enum Inner {\n A, B, C\n }\n\n // inner records are implicitly static\n static record R() {\n }\n }' Example 2: 'final record R() {\n // all records are implicitly final\n }' Example 3: '// all interfaces are implicitly abstract\n abstract interface Printer {\n\n // all interface members are implicitly public\n public int size();\n\n // all inner classes of interfaces are implicitly static\n static class Inner {}\n }'",
"markdown": "Reports redundant modifiers and suggests to remove them. The resulting code will be shorter, but the behaviour and meaning will remain the same.\n\n**Example 1:**\n\n\n // all code is implicitly strictfp under Java 17 and higher\n strictfp class X {\n\n // inner enums are implicitly static\n static enum Inner {\n A, B, C\n }\n\n // inner records are implicitly static\n static record R() {\n }\n }\n\n**Example 2:**\n\n\n final record R() {\n // all records are implicitly final\n }\n\n**Example 3:**\n\n\n // all interfaces are implicitly abstract\n abstract interface Printer {\n\n // all interface members are implicitly public\n public int size();\n\n // all inner classes of interfaces are implicitly static\n static class Inner {}\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryModifier",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConditionalCanBePushedInsideExpression",
"shortDescription": {
"text": "Conditional can be pushed inside branch expression"
},
"fullDescription": {
"text": "Reports conditional expressions with 'then' and else branches that are similar enough so that the expression can be moved inside. This action shortens the code. Example: 'double g(int a, int b) {\n return a == b ? Math.cos(0) : Math.cos(1);\n }' After the quick-fix is applied: 'double g(int a, int b) {\n return Math.cos(a == b ? 0 : 1);\n }' New in 2017.2",
"markdown": "Reports conditional expressions with `then` and else branches that are similar enough so that the expression can be moved inside. This action shortens the code.\n\nExample:\n\n\n double g(int a, int b) {\n return a == b ? Math.cos(0) : Math.cos(1);\n }\n\nAfter the quick-fix is applied:\n\n\n double g(int a, int b) {\n return Math.cos(a == b ? 0 : 1);\n }\n\nNew in 2017.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ConditionalCanBePushedInsideExpression",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CloneInNonCloneableClass",
"shortDescription": {
"text": "'clone()' method in non-Cloneable class"
},
"fullDescription": {
"text": "Reports classes that override the 'clone()' method but don't implement the 'Cloneable' interface. This usually represents a programming error. Use the Only warn on 'public' clone methods option to ignore methods that aren't 'public'. For classes designed to be inherited, you may choose to override 'clone()' and declare it as 'protected' without implementing the 'Cloneable' interface and decide whether to implement the 'Cloneable' interface in subclasses.",
"markdown": "Reports classes that override the `clone()` method but don't implement the `Cloneable` interface. This usually represents a programming error.\n\n\nUse the **Only warn on 'public' clone methods** option to ignore methods that aren't `public`.\n\nFor classes designed to be inherited, you may choose to override `clone()` and declare it as `protected`\nwithout implementing the `Cloneable` interface and decide whether to implement the `Cloneable` interface in subclasses."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CloneInNonCloneableClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Cloning issues",
"index": 140,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Java8ListReplaceAll",
"shortDescription": {
"text": "Loop can be replaced with 'List.replaceAll()'"
},
"fullDescription": {
"text": "Reports loops which can be collapsed into a single 'List.replaceAll()' call. Example: 'for (int i = 0; i < strings.size(); i++) {\n String str = strings.get(i).toLowerCase();\n strings.set(i, str);\n }' After the quick-fix is applied: 'strings.replaceAll(String::toLowerCase);' This inspection only reports if the language level of the project or module is 8 or higher. New in 2022.1",
"markdown": "Reports loops which can be collapsed into a single `List.replaceAll()` call.\n\n**Example:**\n\n\n for (int i = 0; i < strings.size(); i++) {\n String str = strings.get(i).toLowerCase();\n strings.set(i, str);\n }\n\nAfter the quick-fix is applied:\n\n\n strings.replaceAll(String::toLowerCase);\n\n\nThis inspection only reports if the language level of the project or module is 8 or higher.\n\nNew in 2022.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "Java8ListReplaceAll",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 8",
"index": 119,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BigDecimalLegacyMethod",
"shortDescription": {
"text": "'BigDecimal' legacy method called"
},
"fullDescription": {
"text": "Reports calls to 'BigDecimal.divide()' or 'BigDecimal.setScale()' that use integer constants to specify the rounding mode. Since JDK 1.5, consider using methods that take the 'RoundingMode' 'enum' parameter instead. Example: 'new BigDecimal(\"42\").setScale(2, BigDecimal.ROUND_FLOOR);' After the quick-fix is applied: 'new BigDecimal(\"42\").setScale(2, RoundingMode.FLOOR);'",
"markdown": "Reports calls to `BigDecimal.divide()` or `BigDecimal.setScale()` that use integer constants to specify the rounding mode. Since JDK 1.5, consider using methods that take the `RoundingMode` `enum` parameter instead.\n\n**Example:**\n\n new BigDecimal(\"42\").setScale(2, BigDecimal.ROUND_FLOOR);\n\nAfter the quick-fix is applied:\n\n new BigDecimal(\"42\").setScale(2, RoundingMode.FLOOR);\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "BigDecimalLegacyMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 5",
"index": 117,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MissingPackageInfo",
"shortDescription": {
"text": "Missing 'package-info.java'"
},
"fullDescription": {
"text": "Reports packages that contain classes but do not contain the 'package-info.java' or 'package.html' files and are, thus, missing the package documentation. The quick-fix creates an initial 'package-info.java' file.",
"markdown": "Reports packages that contain classes but do not contain the `package-info.java` or `package.html` files and are, thus, missing the package documentation.\n\nThe quick-fix creates an initial `package-info.java` file."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MissingPackageInfo",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Javadoc",
"index": 95,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryConstructor",
"shortDescription": {
"text": "Redundant no-arg constructor"
},
"fullDescription": {
"text": "Reports unnecessary constructors. A constructor is unnecessary if it is the only constructor of a class, has no parameters, has the same access modifier as its containing class, and does not perform any initialization except explicitly or implicitly calling the superclass constructor without arguments. Such a constructor can be safely removed as it will be generated by the compiler even if not specified. Example: 'public class Foo {\n public Foo() {}\n }' After the quick-fix is applied: 'public class Foo {}' Use the inspection settings to ignore unnecessary constructors that have an annotation.",
"markdown": "Reports unnecessary constructors.\n\n\nA constructor is unnecessary if it is the only constructor of a class, has no parameters,\nhas the same access modifier as its containing class,\nand does not perform any initialization except explicitly or implicitly calling the superclass constructor without arguments.\nSuch a constructor can be safely removed as it will be generated by the compiler even if not specified.\n\n**Example:**\n\n\n public class Foo {\n public Foo() {}\n }\n\nAfter the quick-fix is applied:\n\n\n public class Foo {}\n\n\nUse the inspection settings to ignore unnecessary constructors that have an annotation."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantNoArgConstructor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StringBufferField",
"shortDescription": {
"text": "'StringBuilder' field"
},
"fullDescription": {
"text": "Reports fields of type 'java.lang.StringBuffer' or 'java.lang.StringBuilder'. Such fields can grow without limit and are often the cause of memory leaks. Example: 'public class Example {\n private StringBuilder builder = new StringBuilder();\n\n }'",
"markdown": "Reports fields of type `java.lang.StringBuffer` or `java.lang.StringBuilder`. Such fields can grow without limit and are often the cause of memory leaks.\n\n**Example:**\n\n\n public class Example {\n private StringBuilder builder = new StringBuilder();\n\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "StringBufferField",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Memory",
"index": 166,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassNameSameAsAncestorName",
"shortDescription": {
"text": "Class name same as ancestor name"
},
"fullDescription": {
"text": "Reports classes that have the same name as one of their superclasses, while their fully qualified names remain different. Such class names may be very confusing. Example: 'package util;\n abstract class Iterable<T> implements java.lang.Iterable<T> {}' A quick-fix that renames such classes is available only in the editor.",
"markdown": "Reports classes that have the same name as one of their superclasses, while their fully qualified names remain different. Such class names may be very confusing.\n\n**Example:**\n\n\n package util;\n abstract class Iterable<T> implements java.lang.Iterable<T> {}\n\nA quick-fix that renames such classes is available only in the editor."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ClassNameSameAsAncestorName",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Naming conventions/Class",
"index": 172,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ContinueStatementWithLabel",
"shortDescription": {
"text": "'continue' statement with label"
},
"fullDescription": {
"text": "Reports 'continue' statements with labels. Labeled 'continue' statements complicate refactoring and can be confusing. Example: 'void handle(List<String> strs) {\n outer:\n for (String s: strs) {\n for (char ch : s.toCharArray()) {\n if ('s' == ch) continue outer;\n handleChar(ch);\n }\n }\n }'",
"markdown": "Reports `continue` statements with labels.\n\nLabeled `continue` statements complicate refactoring and can be confusing.\n\nExample:\n\n\n void handle(List<String> strs) {\n outer:\n for (String s: strs) {\n for (char ch : s.toCharArray()) {\n if ('s' == ch) continue outer;\n handleChar(ch);\n }\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ContinueStatementWithLabel",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SimplifiableBooleanExpression",
"shortDescription": {
"text": "Simplifiable boolean expression"
},
"fullDescription": {
"text": "Reports boolean expressions that can be simplified. Example: 'void f(boolean foo, boolean bar) {\n boolean b = !(foo ^ bar);\n }' After the quick-fix is applied: 'void f(boolean foo, boolean bar) {\n boolean b = foo == bar;\n }' Example: 'void f(boolean foo, boolean bar) {\n boolean b = (foo && bar) || !foo;\n }' After the quick-fix is applied: 'void f(boolean foo, boolean bar) {\n boolean b = !foo || bar;\n }'",
"markdown": "Reports boolean expressions that can be simplified.\n\nExample:\n\n\n void f(boolean foo, boolean bar) {\n boolean b = !(foo ^ bar);\n }\n\nAfter the quick-fix is applied:\n\n\n void f(boolean foo, boolean bar) {\n boolean b = foo == bar;\n }\n\nExample:\n\n\n void f(boolean foo, boolean bar) {\n boolean b = (foo && bar) || !foo;\n }\n \nAfter the quick-fix is applied:\n\n\n void f(boolean foo, boolean bar) {\n boolean b = !foo || bar;\n }\n \n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SimplifiableBooleanExpression",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaModuleNaming",
"shortDescription": {
"text": "Java module name contradicts the convention"
},
"fullDescription": {
"text": "Reports cases when a module name contradicts Java Platform Module System recommendations. One of the recommendations is to avoid using digits at the end of module names. Example: 'module foo1.bar2 {}'",
"markdown": "Reports cases when a module name contradicts Java Platform Module System recommendations.\n\nOne of the [recommendations](http://mail.openjdk.org/pipermail/jpms-spec-experts/2017-March/000659.html)\nis to avoid using digits at the end of module names.\n\n**Example:**\n\n\n module foo1.bar2 {}\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JavaModuleNaming",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Naming conventions",
"index": 106,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnaryPlus",
"shortDescription": {
"text": "Unary plus"
},
"fullDescription": {
"text": "Reports usages of the '+' unary operator. The unary plus is usually a null operation, and its presence might represent a coding error. For example, in a combination with the increment operator (like in '+++') or with the equal operator (like in '=+'). Example: 'void unaryPlus(int i) {\n int x = + +i;\n }' The following quick fixes are suggested: Remove '+' operators before the 'i' variable: 'void unaryPlus(int i) {\n int x = i;\n }' Replace '+' operators with the prefix increment operator: 'void unaryPlus(int i) {\n int x = ++i;\n }' Use the checkbox below to report unary pluses that are used together with a binary or another unary expression. It means the inspection will not report situations when a unary plus expression is used in array initializer expressions or as a method argument.",
"markdown": "Reports usages of the `+` unary operator. The unary plus is usually a null operation, and its presence might represent a coding error. For example, in a combination with the increment operator (like in `+++`) or with the equal operator (like in `=+`).\n\n**Example:**\n\n\n void unaryPlus(int i) {\n int x = + +i;\n }\n\nThe following quick fixes are suggested:\n\n* Remove `+` operators before the `i` variable:\n\n\n void unaryPlus(int i) {\n int x = i;\n }\n\n* Replace `+` operators with the prefix increment operator:\n\n\n void unaryPlus(int i) {\n int x = ++i;\n }\n\n\nUse the checkbox below to report unary pluses that are used together with a binary or another unary expression.\nIt means the inspection will not report situations when a unary plus expression is used in array\ninitializer expressions or as a method argument."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "UnaryPlus",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues",
"index": 49,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConstructorCount",
"shortDescription": {
"text": "Class with too many constructors"
},
"fullDescription": {
"text": "Reports classes whose number of constructors exceeds the specified maximum. Classes with too many constructors are prone to initialization errors, and often modeling such a class as multiple subclasses is preferable. Configure the inspection: Use the Constructor count limit field to specify the maximum allowed number of constructors in a class. Use the Ignore deprecated constructors option to avoid adding deprecated constructors to the total count.",
"markdown": "Reports classes whose number of constructors exceeds the specified maximum.\n\nClasses with too many constructors are prone to initialization errors, and often modeling such a class as multiple subclasses is preferable.\n\nConfigure the inspection:\n\n* Use the **Constructor count limit** field to specify the maximum allowed number of constructors in a class.\n* Use the **Ignore deprecated constructors** option to avoid adding deprecated constructors to the total count."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ClassWithTooManyConstructors",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class metrics",
"index": 125,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MethodOverloadsParentMethod",
"shortDescription": {
"text": "Possibly unintended overload of method from superclass"
},
"fullDescription": {
"text": "Reports instance methods with the same name and the same number of parameters as a method in a superclass, but where at least one of the parameters is of a different incompatible type. In this case, the method in a subclass will be overloading the method from the superclass instead of overriding it. If it is unintended, it may result in latent bugs. Example: 'public class Foo {\n void foo(int x) {}\n }\n\n public class Bar extends Foo {\n void foo(Number x) {} // Method 'foo()' overloads a compatible method of a superclass,\n // when overriding might have been intended\n }' Use the option to choose whether the inspection should also report cases where parameter types are not compatible.",
"markdown": "Reports instance methods with the same name and the same number of parameters as a method in a superclass, but where at least one of the parameters is of a different incompatible type.\n\n\nIn this case, the method in a subclass will be overloading the method from the superclass\ninstead of overriding it. If it is unintended, it may result in latent bugs.\n\n**Example:**\n\n\n public class Foo {\n void foo(int x) {}\n }\n\n public class Bar extends Foo {\n void foo(Number x) {} // Method 'foo()' overloads a compatible method of a superclass,\n // when overriding might have been intended\n }\n\n\nUse the option to choose whether the inspection should also report cases where parameter types are not compatible."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MethodOverloadsMethodOfSuperclass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Visibility",
"index": 97,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DisjointPackage",
"shortDescription": {
"text": "Package with disjoint dependency graph"
},
"fullDescription": {
"text": "Reports packages whose classes can be separated into mutually independent subsets. Such disjoint packages indicate ad-hoc packaging or a lack of conceptual cohesion. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor.",
"markdown": "Reports packages whose classes can be separated into mutually independent subsets.\n\nSuch disjoint packages indicate ad-hoc packaging or a lack of conceptual cohesion.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DisjointPackage",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Packaging issues",
"index": 190,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MethodMayBeSynchronized",
"shortDescription": {
"text": "Method with single 'synchronized' block can be replaced with 'synchronized' method"
},
"fullDescription": {
"text": "Reports methods whose body contains a single 'synchronized' statement. A lock expression for this 'synchronized' statement must be equal to 'this' for instance methods or '[ClassName].class' for static methods. To improve readability of such methods, you can remove the 'synchronized' wrapper and mark the method as 'synchronized'. Example: 'public int generateInt(int x) {\n synchronized (this) {\n return 1;\n }\n }' After the quick-fix is applied: 'public synchronized int generateInt(int x) {\n return 1;\n }'",
"markdown": "Reports methods whose body contains a single `synchronized` statement. A lock expression for this `synchronized` statement must be equal to `this` for instance methods or `[ClassName].class` for static methods.\n\n\nTo improve readability of such methods,\nyou can remove the `synchronized` wrapper and mark the method as `synchronized`.\n\n**Example:**\n\n\n public int generateInt(int x) {\n synchronized (this) {\n return 1;\n }\n }\n\nAfter the quick-fix is applied:\n\n\n public synchronized int generateInt(int x) {\n return 1;\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MethodMayBeSynchronized",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ComparatorResultComparison",
"shortDescription": {
"text": "Suspicious usage of compare method"
},
"fullDescription": {
"text": "Reports comparisons of the result of 'Comparator.compare()' or 'Comparable.compareTo()' calls with non-zero constants. By contract, these methods can return any integer (not just -1, 0 or 1), so comparing against particular numbers is bad practice. Some widely used comparison methods (e.g. 'String.compareTo()') actually return values outside the [-1..1] range, and such a comparison may cause incorrect program behavior. Example: 'void validate(String s1, String s2) {\n // Comparing to 1 is incorrect\n if (s1.compareTo(s2) == 1) {\n throw new IllegalArgumentException(\"Incorrect order\");\n }\n }' After the quick-fix is applied: 'void validate(String s1, String s2) {\n if (s1.compareTo(s2) > 0) {\n throw new IllegalArgumentException(\"Incorrect order\");\n }\n }' New in 2017.2",
"markdown": "Reports comparisons of the result of `Comparator.compare()` or `Comparable.compareTo()` calls with non-zero constants. By contract, these methods can return any integer (not just -1, 0 or 1), so comparing against particular numbers is bad practice. Some widely used comparison methods (e.g. `String.compareTo()`) actually return values outside the \\[-1..1\\] range, and such a comparison may cause incorrect program behavior.\n\nExample:\n\n\n void validate(String s1, String s2) {\n // Comparing to 1 is incorrect\n if (s1.compareTo(s2) == 1) {\n throw new IllegalArgumentException(\"Incorrect order\");\n }\n }\n\nAfter the quick-fix is applied:\n\n\n void validate(String s1, String s2) {\n if (s1.compareTo(s2) > 0) {\n throw new IllegalArgumentException(\"Incorrect order\");\n }\n }\n\nNew in 2017.2"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ComparatorResultComparison",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ListIndexOfReplaceableByContains",
"shortDescription": {
"text": "'List.indexOf()' expression can be replaced with 'contains()'"
},
"fullDescription": {
"text": "Reports any 'List.indexOf()' expressions that can be replaced with the 'List.contains()' method. Example: 'boolean hasEmptyString(List<String> list) {\n // Warning: can be simplified\n return list.indexOf(\"\") >= 0;\n }' The provided quick-fix replaces the 'indexOf' call with the 'contains' call: 'boolean hasEmptyString(List<String> list) {\n // Quick-fix is applied\n return list.contains(\"\");\n }'",
"markdown": "Reports any `List.indexOf()` expressions that can be replaced with the `List.contains()` method.\n\nExample:\n\n\n boolean hasEmptyString(List<String> list) {\n // Warning: can be simplified\n return list.indexOf(\"\") >= 0;\n }\n\nThe provided quick-fix replaces the `indexOf` call with the `contains` call:\n\n\n boolean hasEmptyString(List<String> list) {\n // Quick-fix is applied\n return list.contains(\"\");\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ListIndexOfReplaceableByContains",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonStrictComparisonCanBeEquality",
"shortDescription": {
"text": "Non-strict inequality '>=' or '<=' can be replaced with '=='"
},
"fullDescription": {
"text": "Reports inequality conditions that, according to data flow analysis, can be satisfied only for a single operand value. Such conditions could be replaced with equality conditions to make the code clearer. Example: 'if (x >= 10) {\n ...\n if (x <= 10) { // can be replaced with 'x == 10'\n }\n }' New in 2022.2",
"markdown": "Reports inequality conditions that, according to data flow analysis, can be satisfied only for a single operand value. Such conditions could be replaced with equality conditions to make the code clearer.\n\nExample:\n\n\n if (x >= 10) {\n ...\n if (x <= 10) { // can be replaced with 'x == 10'\n }\n }\n\nNew in 2022.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "NonStrictComparisonCanBeEquality",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SuspiciousToArrayCall",
"shortDescription": {
"text": "Suspicious 'Collection.toArray()' call"
},
"fullDescription": {
"text": "Reports suspicious calls to 'Collection.toArray()'. The following types of calls are considered suspicious: when the type of the array argument is not the same as the array type to which the result is casted. when the type of the array argument does not match the type parameter in the collection declaration. Example: 'void m1(List list) {\n Number[] ns = (Number[]) list.toArray(new String[0]);\n}\n\nvoid m2(List<Number> list) {\n Number[] ns = list.toArray(new String[0]);\n}'",
"markdown": "Reports suspicious calls to `Collection.toArray()`.\n\nThe following types of calls are considered suspicious:\n\n* when the type of the array argument is not the same as the array type to which the result is casted.\n* when the type of the array argument does not match the type parameter in the collection declaration.\n\n**Example:**\n\n\n void m1(List list) {\n Number[] ns = (Number[]) list.toArray(new String[0]);\n }\n\n void m2(List<Number> list) {\n Number[] ns = list.toArray(new String[0]);\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SuspiciousToArrayCall",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StringToUpperWithoutLocale",
"shortDescription": {
"text": "Call to 'String.toUpperCase()' or 'toLowerCase()' without locale"
},
"fullDescription": {
"text": "Reports 'toUpperCase()' or 'toLowerCase()' calls on 'String' objects that do not specify a 'java.util.Locale'. In these cases the default system locale is used, which can cause problems in an internationalized environment. For example the code '\"i\".toUpperCase().equals(\"I\")' returns 'false' in the Turkish and Azerbaijani locales, where the dotted and dotless 'i' are separate letters. Calling 'toUpperCase()' on an English string containing an 'i', when running in a Turkish locale, will return incorrect results. Alternatively, when dealing with strings that should be treated as locale-independent, like HTML tags, this can lead to errors.",
"markdown": "Reports `toUpperCase()` or `toLowerCase()` calls on `String` objects that do not specify a `java.util.Locale`. In these cases the default system locale is used, which can cause problems in an internationalized environment.\n\n\nFor example the code `\"i\".toUpperCase().equals(\"I\")` returns `false` in the Turkish and Azerbaijani locales, where\nthe dotted and dotless 'i' are separate letters. Calling `toUpperCase()` on an English string containing an 'i', when running\nin a Turkish locale, will return incorrect results. Alternatively, when dealing with strings that should be treated as locale-independent,\nlike HTML tags, this can lead to errors."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "StringToUpperCaseOrToLowerCaseWithoutLocale",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Internationalization",
"index": 110,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassWithTooManyTransitiveDependents",
"shortDescription": {
"text": "Class with too many transitive dependents"
},
"fullDescription": {
"text": "Reports a class on which too many other classes are directly or indirectly dependent. Any modification to such a class may require changing many other classes, which may be expensive. Only top-level classes are reported. Use the Maximum number of transitive dependents field to specify the maximum allowed number of direct or indirect dependents for a class. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor.",
"markdown": "Reports a class on which too many other classes are directly or indirectly dependent.\n\nAny modification to such a class may require changing many other classes, which may be expensive.\n\nOnly top-level classes are reported.\n\nUse the **Maximum number of transitive dependents** field to specify the maximum allowed number of direct or indirect dependents\nfor a class.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ClassWithTooManyTransitiveDependents",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Dependency issues",
"index": 200,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CompareToUsesNonFinalVariable",
"shortDescription": {
"text": "Non-final field referenced in 'compareTo()'"
},
"fullDescription": {
"text": "Reports access to a non-'final' field inside a 'compareTo()' implementation. Such access may result in 'compareTo()' returning different results at different points in the object's lifecycle, which may in turn cause problems when using the standard collections classes, for example 'java.util.TreeSet'. A quick-fix to make the field 'final' is available only when there is no write access to the field, otherwise no fixes are suggested. Example: 'class Foo implements Comparable<Foo>{\n private int index;\n Foo(int idx) {\n index = idx;\n }\n @Override\n public int compareTo(Foo foo) {\n return Integer.compare(this.index, foo.index);\n }\n }' After the quick-fix is applied: 'class Foo implements Comparable<Foo>{\n private final int index;\n Foo(int idx) {\n index = idx;\n }\n @Override\n public int compareTo(Foo foo) {\n return Integer.compare(this.index, foo.index);\n }\n }'",
"markdown": "Reports access to a non-`final` field inside a `compareTo()` implementation.\n\n\nSuch access may result in `compareTo()`\nreturning different results at different points in the object's lifecycle, which may in turn cause problems when\nusing the standard collections classes, for example `java.util.TreeSet`.\n\n\nA quick-fix to make the field `final` is available\nonly when there is no write access to the field, otherwise no fixes are suggested.\n\n**Example:**\n\n\n class Foo implements Comparable<Foo>{\n private int index;\n Foo(int idx) {\n index = idx;\n }\n @Override\n public int compareTo(Foo foo) {\n return Integer.compare(this.index, foo.index);\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class Foo implements Comparable<Foo>{\n private final int index;\n Foo(int idx) {\n index = idx;\n }\n @Override\n public int compareTo(Foo foo) {\n return Integer.compare(this.index, foo.index);\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CompareToUsesNonFinalVariable",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SwitchStatement",
"shortDescription": {
"text": "'switch' statement"
},
"fullDescription": {
"text": "Reports 'switch' statements. 'switch' statements often (but not always) indicate a poor object-oriented design. Example: 'switch (i) {\n // code\n }'",
"markdown": "Reports `switch` statements.\n\n`switch` statements often (but not always) indicate a poor object-oriented design.\n\nExample:\n\n\n switch (i) {\n // code\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SwitchStatement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StringBufferReplaceableByString",
"shortDescription": {
"text": "'StringBuilder' can be replaced with 'String'"
},
"fullDescription": {
"text": "Reports usages of 'StringBuffer', 'StringBuilder', or 'StringJoiner' which can be replaced with a single 'String' concatenation. Using 'String' concatenation makes the code shorter and simpler. This inspection only reports when the suggested replacement does not result in significant performance drawback on modern JVMs. In many cases, 'String' concatenation may perform better. Example: 'StringBuilder result = new StringBuilder();\n result.append(\"i = \");\n result.append(i);\n result.append(\";\");\n return result.toString();' After the quick-fix is applied: 'String result = \"i = \" + i + \";\";\n return result;'",
"markdown": "Reports usages of `StringBuffer`, `StringBuilder`, or `StringJoiner` which can be replaced with a single `String` concatenation.\n\nUsing `String` concatenation\nmakes the code shorter and simpler.\n\n\nThis inspection only reports when the suggested replacement does not result in significant\nperformance drawback on modern JVMs. In many cases, `String` concatenation may perform better.\n\n**Example:**\n\n\n StringBuilder result = new StringBuilder();\n result.append(\"i = \");\n result.append(i);\n result.append(\";\");\n return result.toString();\n\nAfter the quick-fix is applied:\n\n\n String result = \"i = \" + i + \";\";\n return result;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "StringBufferReplaceableByString",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MalformedFormatString",
"shortDescription": {
"text": "Malformed format string"
},
"fullDescription": {
"text": "Reports format strings that don't comply with the standard Java syntax. By default, the inspection considers a compile-time constant a format string if it's used as an argument to the corresponding methods on 'java.util.Formatter', 'java.lang.String', 'java.io.PrintWriter' or 'java.io.PrintStream'. Example: 'String.format(\"x = %d, y = %d\", 42);' Use the inspection settings to mark additional classes and methods as related to string formatting. As an alternative, you can use the 'org.intellij.lang.annotations.PrintFormat' annotation to mark the format string method parameter. In this case, the format arguments parameter must immediately follow the format string and be the last method parameter. Example: 'void myFormatMethod(int mode, @PrintFormat String formatString, Object... args) {...}' Methods annotated in this way will also be recognized by this inspection.",
"markdown": "Reports format strings that don't comply with the standard Java syntax.\n\nBy default, the inspection considers a compile-time constant a format string if it's used as an argument to the corresponding methods on\n`java.util.Formatter`, `java.lang.String`, `java.io.PrintWriter` or `java.io.PrintStream`.\n\n**Example:**\n\n\n String.format(\"x = %d, y = %d\", 42);\n\nUse the inspection settings to mark additional classes and methods as related to string formatting.\n\nAs an alternative, you can use the `org.intellij.lang.annotations.PrintFormat` annotation\nto mark the format string method parameter. In this case,\nthe format arguments parameter must immediately follow the format string and be the last method parameter. Example:\n\n\n void myFormatMethod(int mode, @PrintFormat String formatString, Object... args) {...}\n\n\nMethods annotated in this way will also be recognized by this inspection."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "MalformedFormatString",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EndlessStream",
"shortDescription": {
"text": "Non-short-circuit operation consumes infinite stream"
},
"fullDescription": {
"text": "Reports non-short-circuit operations consuming an infinite stream. Such operations can be completed only by throwing an exception. Example: 'Stream.iterate(0, i -> i + 1).collect(Collectors.toList())'",
"markdown": "Reports non-short-circuit operations consuming an infinite stream. Such operations can be completed only by throwing an exception.\n\nExample:\n\n\n Stream.iterate(0, i -> i + 1).collect(Collectors.toList())\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "EndlessStream",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonFinalUtilityClass",
"shortDescription": {
"text": "Utility class is not 'final'"
},
"fullDescription": {
"text": "Reports utility classes that aren't 'final' or 'abstract'. Utility classes have all fields and methods declared as 'static'. Making them 'final' prevents them from being accidentally subclassed. Example: 'public class UtilityClass {\n public static void foo() {}\n }' After the quick-fix is applied: 'public final class UtilityClass {\n public static void foo() {}\n }'",
"markdown": "Reports utility classes that aren't `final` or `abstract`.\n\nUtility classes have all fields and methods declared as `static`.\nMaking them `final` prevents them from being accidentally subclassed.\n\n**Example:**\n\n\n public class UtilityClass {\n public static void foo() {}\n }\n\nAfter the quick-fix is applied:\n\n\n public final class UtilityClass {\n public static void foo() {}\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonFinalUtilityClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FuseStreamOperations",
"shortDescription": {
"text": "Subsequent steps can be fused into Stream API chain"
},
"fullDescription": {
"text": "Detects transformations outside a Stream API chain that could be incorporated into it. Example: 'List<String> list = stream.collect(Collectors.toList());\n list.sort(null);\n return list.toArray(new String[list.size()]);' After the conversion: 'return stream.sorted().toArray(String[]::new);' Note that sometimes the converted stream chain may replace explicit 'ArrayList' with 'Collectors.toList()' or explicit 'HashSet' with 'Collectors.toSet()'. The current library implementation uses these collections internally. However, this approach is not very reliable and might change in the future altering the semantics of your code. If you are concerned about it, use the Do not suggest 'toList()' or 'toSet()' collectors option to suggest 'Collectors.toCollection()' instead of 'toList' and 'toSet' collectors. This inspection only reports if the language level of the project or module is 8 or higher.",
"markdown": "Detects transformations outside a Stream API chain that could be incorporated into it.\n\nExample:\n\n\n List<String> list = stream.collect(Collectors.toList());\n list.sort(null);\n return list.toArray(new String[list.size()]);\n\nAfter the conversion:\n\n\n return stream.sorted().toArray(String[]::new);\n\n\nNote that sometimes the converted stream chain may replace explicit `ArrayList` with `Collectors.toList()` or explicit\n`HashSet` with `Collectors.toSet()`. The current library implementation uses these collections internally. However,\nthis approach is not very reliable and might change in the future altering the semantics of your code.\n\nIf you are concerned about it, use the **Do not suggest 'toList()' or 'toSet()' collectors** option to suggest\n`Collectors.toCollection()` instead of `toList` and `toSet` collectors.\n\nThis inspection only reports if the language level of the project or module is 8 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FuseStreamOperations",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ThrowableNotThrown",
"shortDescription": {
"text": "'Throwable' not thrown"
},
"fullDescription": {
"text": "Reports instantiations of 'Throwable' or its subclasses, where the created 'Throwable' is never actually thrown. Additionally, this inspection reports method calls that return instances of 'Throwable' or its subclasses, when the result of the method call is not thrown. Calls to methods annotated with the Error Prone's or AssertJ's '@CanIgnoreReturnValue' annotation will not be reported. Example: 'void check(String s) {\n if (s == null) {\n new NullPointerException(\"s\");\n }\n // ...\n }'",
"markdown": "Reports instantiations of `Throwable` or its subclasses, where the created `Throwable` is never actually thrown. Additionally, this inspection reports method calls that return instances of `Throwable` or its subclasses, when the result of the method call is not thrown.\n\nCalls to methods annotated with the Error Prone's or AssertJ's `@CanIgnoreReturnValue` annotation will not be reported.\n\n**Example:**\n\n\n void check(String s) {\n if (s == null) {\n new NullPointerException(\"s\");\n }\n // ...\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ThrowableNotThrown",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MisspelledMethodName",
"shortDescription": {
"text": "Method names differing only by case"
},
"fullDescription": {
"text": "Reports cases in which multiple methods of a class have the names that differ only by case. Such names may be very confusing. Example: 'public int hashcode() { // reported, should be hashCode probably?\n return 0;\n }' A quick-fix that renames such methods is available only in the editor. Use the Ignore methods overriding/implementing a super method option to ignore methods overriding or implementing a method from the superclass.",
"markdown": "Reports cases in which multiple methods of a class have the names that differ only by case. Such names may be very confusing.\n\n**Example:**\n\n\n public int hashcode() { // reported, should be hashCode probably?\n return 0;\n }\n\nA quick-fix that renames such methods is available only in the editor.\n\nUse the **Ignore methods overriding/implementing a super method** option to ignore methods overriding or implementing a method from\nthe superclass."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MethodNamesDifferingOnlyByCase",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Naming conventions/Method",
"index": 107,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ThreadLocalNotStaticFinal",
"shortDescription": {
"text": "'ThreadLocal' field not declared 'static final'"
},
"fullDescription": {
"text": "Reports fields of type 'java.lang.ThreadLocal' that are not declared 'static final'. In the most common case, a 'java.lang.ThreadLocal' instance associates state with a thread. A non-static non-final 'java.lang.ThreadLocal' field associates state with an instance-thread combination. This is usually unnecessary and quite often is a bug that can cause memory leaks and incorrect behavior. A quick-fix is suggested to make the field 'static final'. Example: 'private ThreadLocal tl = ThreadLocal.withInitial(() -> Boolean.TRUE);'",
"markdown": "Reports fields of type `java.lang.ThreadLocal` that are not declared `static final`.\n\n\nIn the most common case, a `java.lang.ThreadLocal` instance associates state with a thread.\nA non-static non-final `java.lang.ThreadLocal` field associates state with an instance-thread combination.\nThis is usually unnecessary and quite often is a bug that can cause memory leaks and incorrect behavior.\n\n\nA quick-fix is suggested to make the field `static final`.\n\n\n**Example:**\n\n\n private ThreadLocal tl = ThreadLocal.withInitial(() -> Boolean.TRUE);\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ThreadLocalNotStaticFinal",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AccessStaticViaInstance",
"shortDescription": {
"text": "Access static member via instance reference"
},
"fullDescription": {
"text": "Reports references to 'static' methods and fields via a class instance rather than the class itself. Even though referring to static members via instance variables is allowed by The Java Language Specification, this makes the code confusing as the reader may think that the result of the method depends on the instance. The quick-fix replaces the instance variable with the class name. Example: 'String s1 = s.valueOf(0);' After the quick-fix is applied: 'String s = String.valueOf(0);'",
"markdown": "Reports references to `static` methods and fields via a class instance rather than the class itself.\n\nEven though referring to static members via instance variables is allowed by The Java Language Specification,\nthis makes the code confusing as the reader may think that the result of the method depends on the instance.\n\nThe quick-fix replaces the instance variable with the class name.\n\nExample:\n\n\n String s1 = s.valueOf(0);\n\nAfter the quick-fix is applied:\n\n\n String s = String.valueOf(0);\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AccessStaticViaInstance",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Declaration redundancy",
"index": 10,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Dependency",
"shortDescription": {
"text": "Illegal package dependencies"
},
"fullDescription": {
"text": "Reports illegal dependencies between scopes according to the dependency rules given. Dependency rules can be used to prohibit usage from a scope to another scope. Use the Configure dependency rules button below to customize validation rules.",
"markdown": "Reports illegal dependencies between scopes according to the dependency rules given. Dependency rules can be used to prohibit usage from a scope to another scope.\n\nUse the **Configure dependency rules** button below to customize validation rules."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "Dependency",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JVM languages",
"index": 47,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "WriteOnlyObject",
"shortDescription": {
"text": "Write-only object"
},
"fullDescription": {
"text": "Reports objects that are modified but never queried. The inspection relies on the method mutation contract, which could be inferred or pre-annotated for some library methods. This inspection does not report collections, maps, and string builders, as these types are reported by other more precise inspections. Example: 'AtomicReference<String> ref = new AtomicReference<>();\n ref.set(\"hello\"); // ref is never used again' Use the Ignore impure constructors option to control whether to process objects created by constructor or method whose purity is not known. Unchecking the option may introduce some false-positives if the object reference is intentionally leaked during the construction. New in 2021.2",
"markdown": "Reports objects that are modified but never queried.\n\nThe inspection relies on the method mutation contract, which could be inferred\nor pre-annotated for some library methods. This inspection does not report collections, maps, and string builders, as these types\nare reported by other more precise inspections.\n\nExample:\n\n\n AtomicReference<String> ref = new AtomicReference<>();\n ref.set(\"hello\"); // ref is never used again\n\n\nUse the **Ignore impure constructors** option to control whether to process objects created by constructor or method whose purity is not known.\nUnchecking the option may introduce some false-positives if the object reference is intentionally leaked during the construction.\n**New in 2021.2**"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "WriteOnlyObject",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StringTokenizerDelimiter",
"shortDescription": {
"text": "Duplicated delimiters in 'StringTokenizer'"
},
"fullDescription": {
"text": "Reports 'StringTokenizer()' constructor calls or 'nextToken()' method calls that contain duplicate characters in the delimiter argument. Example: 'void printTokens(String text) {\n StringTokenizer tokenizer = new StringTokenizer(text, \"\\n\\n\");\n while (tokenizer.hasMoreTokens()) {\n System.out.println(tokenizer.nextToken());\n }\n }' After the quick-fix is applied: 'void printTokens(String text) {\n StringTokenizer tokenizer = new StringTokenizer(text, \"\\n\");\n while (tokenizer.hasMoreTokens()) {\n System.out.println(tokenizer.nextToken());\n }\n }'",
"markdown": "Reports `StringTokenizer()` constructor calls or `nextToken()` method calls that contain duplicate characters in the delimiter argument.\n\n**Example:**\n\n\n void printTokens(String text) {\n StringTokenizer tokenizer = new StringTokenizer(text, \"\\n\\n\");\n while (tokenizer.hasMoreTokens()) {\n System.out.println(tokenizer.nextToken());\n }\n }\n\nAfter the quick-fix is applied:\n\n\n void printTokens(String text) {\n StringTokenizer tokenizer = new StringTokenizer(text, \"\\n\");\n while (tokenizer.hasMoreTokens()) {\n System.out.println(tokenizer.nextToken());\n }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "StringTokenizerDelimiter",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MaskedAssertion",
"shortDescription": {
"text": "Assertion is suppressed by 'catch'"
},
"fullDescription": {
"text": "Reports 'assert' statements and test framework assertions that are suppressed by a surrounding catch block. Such assertions will never fail, as the thrown 'AssertionError' will be caught and silently ignored. Example 1: 'void javaAssertion() {\n try {\n ...\n assert 1 == 2;\n } catch (AssertionError e) {\n // the assertion is silently ignored\n }\n }' Example 2: '@Test\n void testWithAssertJ() {\n try {\n ...\n assertThat(1).as(\"test\").isEqualTo(2);\n } catch (AssertionError e) {\n // the assertion is silently ignored\n }\n }' Example 3: '@Test\n void testWithJunit() {\n try {\n ...\n assertEquals(1, 2);\n } catch (AssertionError e) {\n // the assertion is silently ignored\n }\n }' New in 2020.3",
"markdown": "Reports `assert` statements and test framework assertions that are suppressed by a surrounding catch block. Such assertions will never fail, as the thrown `AssertionError` will be caught and silently ignored.\n\n**Example 1:**\n\n\n void javaAssertion() {\n try {\n ...\n assert 1 == 2;\n } catch (AssertionError e) {\n // the assertion is silently ignored\n }\n }\n\n**Example 2:**\n\n\n @Test\n void testWithAssertJ() {\n try {\n ...\n assertThat(1).as(\"test\").isEqualTo(2);\n } catch (AssertionError e) {\n // the assertion is silently ignored\n }\n }\n\n**Example 3:**\n\n\n @Test\n void testWithJunit() {\n try {\n ...\n assertEquals(1, 2);\n } catch (AssertionError e) {\n // the assertion is silently ignored\n }\n }\n\nNew in 2020.3"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "MaskedAssertion",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Test frameworks",
"index": 182,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReflectionForUnavailableAnnotation",
"shortDescription": {
"text": "Reflective access to a source-only annotation"
},
"fullDescription": {
"text": "Reports attempts to reflectively check for the presence of a non-runtime annotation. Using 'Class.isAnnotationPresent()' to test for an annotation whose retention policy is set to 'SOURCE' or 'CLASS' (the default) will always have a negative result. This mistake is easy to overlook. Example: '{\n getClass().isAnnotationPresent(SourceAnnotation.class); //always false\n }\n\n @Retention(RetentionPolicy.SOURCE)\n @interface SourceAnnotation {}'",
"markdown": "Reports attempts to reflectively check for the presence of a non-runtime annotation.\n\nUsing `Class.isAnnotationPresent()` to test for an annotation\nwhose retention policy is set to `SOURCE` or `CLASS`\n(the default) will always have a negative result. This mistake is easy to overlook.\n\n**Example:**\n\n\n {\n getClass().isAnnotationPresent(SourceAnnotation.class); //always false\n }\n\n @Retention(RetentionPolicy.SOURCE)\n @interface SourceAnnotation {}\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ReflectionForUnavailableAnnotation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InstantiatingObjectToGetClassObject",
"shortDescription": {
"text": "Instantiating object to get 'Class' object"
},
"fullDescription": {
"text": "Reports code that instantiates a class to get its class object. It is more performant to access the class object directly by name. Example: 'Class<?> c = new Sample().getClass();' After the quick-fix is applied: 'Class<?> c = Sample.class;'",
"markdown": "Reports code that instantiates a class to get its class object.\n\nIt is more performant to access the class object\ndirectly by name.\n\n**Example:**\n\n\n Class<?> c = new Sample().getClass();\n\nAfter the quick-fix is applied:\n\n\n Class<?> c = Sample.class;\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "InstantiatingObjectToGetClassObject",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ShiftOutOfRange",
"shortDescription": {
"text": "Shift operation by inappropriate constant"
},
"fullDescription": {
"text": "Reports shift operations where the shift value is a constant outside the reasonable range. Integer shift operations outside the range '0..31' and long shift operations outside the range '0..63' are reported. Shifting by negative or overly large values is almost certainly a coding error. Example: 'int shiftSize = 32;\n // Warning: shift by 32 bits is equivalent to shift by 0 bits, so there's no shift at all.\n int mask = (1 << shiftSize) - 1;'",
"markdown": "Reports shift operations where the shift value is a constant outside the reasonable range.\n\nInteger shift operations outside the range `0..31` and long shift operations outside the\nrange `0..63` are reported. Shifting by negative or overly large values is almost certainly\na coding error.\n\n**Example:**\n\n\n int shiftSize = 32;\n // Warning: shift by 32 bits is equivalent to shift by 0 bits, so there's no shift at all.\n int mask = (1 << shiftSize) - 1;\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ShiftOutOfRange",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Bitwise operation issues",
"index": 231,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ThreadRun",
"shortDescription": {
"text": "Call to 'Thread.run()'"
},
"fullDescription": {
"text": "Reports calls to 'run()' on 'java.lang.Thread' or any of its subclasses. While occasionally intended, this is usually a mistake, because 'run()' doesn't start a new thread. To execute the code in a separate thread, 'start()' should be used.",
"markdown": "Reports calls to `run()` on `java.lang.Thread` or any of its subclasses.\n\n\nWhile occasionally intended, this is usually a mistake, because `run()` doesn't start a new thread.\nTo execute the code in a separate thread, `start()` should be used."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "CallToThreadRun",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JVM languages",
"index": 47,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InterfaceNeverImplemented",
"shortDescription": {
"text": "Interface which has no concrete subclass"
},
"fullDescription": {
"text": "Reports interfaces that have no concrete subclasses. Configure the inspection: Use the list below to add annotations. Interfaces declared with one of these annotations will be ignored by the inspection. Use the checkbox below to ignore interfaces that only declare constant fields. Such interfaces may still be usable even without implementations.",
"markdown": "Reports interfaces that have no concrete subclasses.\n\nConfigure the inspection:\n\n* Use the list below to add annotations. Interfaces declared with one of these annotations will be ignored by the inspection.\n* Use the checkbox below to ignore interfaces that only declare constant fields. Such interfaces may still be usable even without implementations."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "InterfaceNeverImplemented",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Inheritance issues",
"index": 159,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryModuleDependencyInspection",
"shortDescription": {
"text": "Unnecessary module dependency"
},
"fullDescription": {
"text": "Reports dependencies on modules that are not used. The quick-fix safely removes such unused dependencies.",
"markdown": "Reports dependencies on modules that are not used. The quick-fix safely removes such unused dependencies."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryModuleDependencyInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Declaration redundancy",
"index": 10,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SerializableRecordContainsIgnoredMembers",
"shortDescription": {
"text": "'record' contains ignored members"
},
"fullDescription": {
"text": "Reports serialization methods or fields defined in a 'record' class. Serialization methods include 'writeObject()', 'readObject()', 'readObjectNoData()', 'writeExternal()', and 'readExternal()' and the field 'serialPersistentFields'. These members are not used for the serialization or deserialization of records and therefore unnecessary. Examples: 'record R1() implements Serializable {\n // The field is ignored during record serialization\n @Serial\n private static final ObjectStreamField[] serialPersistentFields = new ObjectStreamField[0];\n\n // The method is ignored during record serialization\n @Serial\n private void writeObject(ObjectOutputStream out) throws IOException {\n }\n }' 'record R2() implements Externalizable {\n // The method is ignored during record serialization\n @Override\n public void writeExternal(ObjectOutput out) throws IOException {\n }\n\n // The method is ignored during record serialization\n @Override\n public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {\n }\n }' This inspection only reports if the language level of the project or module is 14 or higher. New in 2020.3",
"markdown": "Reports serialization methods or fields defined in a `record` class. Serialization methods include `writeObject()`, `readObject()`, `readObjectNoData()`, `writeExternal()`, and `readExternal()` and the field `serialPersistentFields`. These members are not used for the serialization or deserialization of records and therefore unnecessary.\n\n**Examples:**\n\n\n record R1() implements Serializable {\n // The field is ignored during record serialization\n @Serial\n private static final ObjectStreamField[] serialPersistentFields = new ObjectStreamField[0];\n\n // The method is ignored during record serialization\n @Serial\n private void writeObject(ObjectOutputStream out) throws IOException {\n }\n }\n\n\n record R2() implements Externalizable {\n // The method is ignored during record serialization\n @Override\n public void writeExternal(ObjectOutput out) throws IOException {\n }\n\n // The method is ignored during record serialization\n @Override\n public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {\n }\n }\n\nThis inspection only reports if the language level of the project or module is 14 or higher.\n\nNew in 2020.3"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SerializableRecordContainsIgnoredMembers",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Serialization issues",
"index": 54,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessarilyQualifiedInnerClassAccess",
"shortDescription": {
"text": "Unnecessarily qualified inner class access"
},
"fullDescription": {
"text": "Reports any references to inner classes that are unnecessarily qualified with the name of the enclosing class. Such a qualification can be safely removed, which sometimes adds an import for the inner class. Example: 'class X {\n X.Y foo;\n class Y{}\n }' After the quick-fix is applied: 'class X {\n Y foo;\n class Y{}\n }' Use the Ignore references for which an import is needed option to ignore references to inner classes, where removing the qualification adds an import.",
"markdown": "Reports any references to inner classes that are unnecessarily qualified with the name of the enclosing class.\n\nSuch a qualification can be safely removed, which sometimes adds an import for the inner class.\n\nExample:\n\n\n class X {\n X.Y foo;\n class Y{}\n }\n\nAfter the quick-fix is applied:\n\n\n class X {\n Y foo;\n class Y{}\n }\n\nUse the **Ignore references for which an import is needed** option to ignore references to inner classes, where\nremoving the qualification adds an import."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "UnnecessarilyQualifiedInnerClassAccess",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavadocLinkAsPlainText",
"shortDescription": {
"text": "Link specified as plain text"
},
"fullDescription": {
"text": "Reports links specified as plain text in Javadoc comments. The quick-fix suggests to wrap the link in <a> tag. Example: 'class Main {\n /**\n * https://en.wikipedia.org/\n */\n void foo() {}\n }' After the quick-fix is applied: 'class Main {\n /**\n * <a href=\"https://en.wikipedia.org/\">https://en.wikipedia.org/</a>\n */\n void foo() {}\n }' New in 2022.1",
"markdown": "Reports links specified as plain text in Javadoc comments.\n\n\nThe quick-fix suggests to wrap the link in \\<a\\> tag.\n\n**Example:**\n\n\n class Main {\n /**\n * https://en.wikipedia.org/\n */\n void foo() {}\n }\n\nAfter the quick-fix is applied:\n\n\n class Main {\n /**\n * <a href=\"https://en.wikipedia.org/\">https://en.wikipedia.org/</a>\n */\n void foo() {}\n }\n\nNew in 2022.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JavadocLinkAsPlainText",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Javadoc",
"index": 95,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SharedThreadLocalRandom",
"shortDescription": {
"text": "'ThreadLocalRandom' instance might be shared"
},
"fullDescription": {
"text": "Reports 'java.util.concurrent.ThreadLocalRandom' instances which might be shared between threads. A 'ThreadLocalRandom' should not be shared between threads because that is not thread-safe. The inspection reports instances that are assigned to a field used as a method argument, or assigned to a local variable and used in anonymous or nested classes as they might get shared between threads. Usages of 'ThreadLocalRandom' should typically look like 'ThreadLocalRandom.current().nextInt(...)' (or 'nextDouble(...)' etc.). When all usages are in this form, 'ThreadLocalRandom' instances cannot be used accidentally by multiple threads. Example: 'class Main {\n void printRandomNumbersAsync() {\n ThreadLocalRandom random = ThreadLocalRandom.current();\n CompletableFuture.supplyAsync(() -> generateNumbers(random))\n .thenAccept(numbers -> System.out.println(Arrays.toString(numbers)));\n }\n\n private int[] generateNumbers(Random random) {\n return random.ints(1000, 0, 100).toArray();\n }\n }' Use the options to list methods that are safe to be passed to 'ThreadLocalRandom' instances as an argument. It's possible to use regular expressions for method names.",
"markdown": "Reports `java.util.concurrent.ThreadLocalRandom` instances which might be shared between threads.\n\n\nA `ThreadLocalRandom` should not be shared between threads because that is not thread-safe.\nThe inspection reports instances that are assigned to a field used as a method argument,\nor assigned to a local variable and used in anonymous or nested classes as they might get shared between threads.\n\n\nUsages of `ThreadLocalRandom` should typically look like `ThreadLocalRandom.current().nextInt(...)`\n(or `nextDouble(...)` etc.).\nWhen all usages are in this form, `ThreadLocalRandom` instances cannot be used accidentally by multiple threads.\n\n**Example:**\n\n\n class Main {\n void printRandomNumbersAsync() {\n ThreadLocalRandom random = ThreadLocalRandom.current();\n CompletableFuture.supplyAsync(() -> generateNumbers(random))\n .thenAccept(numbers -> System.out.println(Arrays.toString(numbers)));\n }\n\n private int[] generateNumbers(Random random) {\n return random.ints(1000, 0, 100).toArray();\n }\n }\n \n\nUse the options to list methods that are safe to be passed to `ThreadLocalRandom` instances as an argument.\nIt's possible to use regular expressions for method names."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SharedThreadLocalRandom",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AbstractMethodOverridesConcreteMethod",
"shortDescription": {
"text": "Abstract method overrides concrete method"
},
"fullDescription": {
"text": "Reports 'abstract' methods that override concrete super methods. Methods overridden from 'java.lang.Object' are not reported by this inspection.",
"markdown": "Reports `abstract` methods that override concrete super methods.\n\nMethods overridden from `java.lang.Object` are not reported by this inspection."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AbstractMethodOverridesConcreteMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Inheritance issues",
"index": 159,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantFieldInitialization",
"shortDescription": {
"text": "Redundant field initialization"
},
"fullDescription": {
"text": "Reports fields explicitly initialized to their default values. Example: 'class Foo {\n int foo = 0;\n List bar = null;\n }' After the quick-fix is applied: 'class Foo {\n int foo;\n List bar;\n }' Use the inspection settings to only report explicit 'null' initialization, for example: 'class Foo {\n int foo = 0; // no warning\n List bar = null; // redundant field initialization warning\n }'",
"markdown": "Reports fields explicitly initialized to their default values.\n\n**Example:**\n\n\n class Foo {\n int foo = 0;\n List bar = null;\n }\n\nAfter the quick-fix is applied:\n\n\n class Foo {\n int foo;\n List bar;\n }\n\n\nUse the inspection settings to only report explicit `null` initialization, for example:\n\n\n class Foo {\n int foo = 0; // no warning\n List bar = null; // redundant field initialization warning\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantFieldInitialization",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReadObjectInitialization",
"shortDescription": {
"text": "Instance field may not be initialized by 'readObject()'"
},
"fullDescription": {
"text": "Reports fields that are not guaranteed to be initialized after the object is deserialized by the 'readObject()' method. The inspection doesn't report transient fields. Note: This inspection uses a very conservative control flow algorithm, and may incorrectly report fields as uninitialized. Example: 'class DataObject implements Serializable {\n String s; // s is not initialized in readObject\n int i;\n\n private void readObject(ObjectInputStream stream) throws IOException {\n i = stream.readInt();\n }\n}'",
"markdown": "Reports fields that are not guaranteed to be initialized after the object is deserialized by the `readObject()` method.\n\nThe inspection doesn't report transient fields.\n\n\nNote: This inspection uses a very conservative control flow algorithm, and may incorrectly report fields\nas uninitialized.\n\n**Example:**\n\n\n class DataObject implements Serializable {\n String s; // s is not initialized in readObject\n int i;\n\n private void readObject(ObjectInputStream stream) throws IOException {\n i = stream.readInt();\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "InstanceVariableMayNotBeInitializedByReadObject",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Serialization issues",
"index": 54,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonAtomicOperationOnVolatileField",
"shortDescription": {
"text": "Non-atomic operation on 'volatile' field"
},
"fullDescription": {
"text": "Reports non-atomic operations on volatile fields. An example of a non-atomic operation is updating the field using the increment operator. As the operation involves read and write, and other modifications may happen in between, data may become corrupted. The operation can be made atomic by surrounding it with a 'synchronized' block or using one of the classes from the 'java.util.concurrent.atomic' package. Example: 'private volatile int v = 1;\n\n void foo() {\n v = 2 * v;\n }'",
"markdown": "Reports non-atomic operations on volatile fields.\n\n\nAn example of a non-atomic operation is updating the field using the increment operator.\nAs the operation involves read and write, and other modifications may happen in between, data may become corrupted.\nThe operation can be made atomic by surrounding it with a `synchronized` block or\nusing one of the classes from the `java.util.concurrent.atomic` package.\n\n**Example:**\n\n\n private volatile int v = 1;\n\n void foo() {\n v = 2 * v;\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "NonAtomicOperationOnVolatileField",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "QuestionableName",
"shortDescription": {
"text": "Questionable name"
},
"fullDescription": {
"text": "Reports variables, methods, or classes with questionable, not really descriptive names. Such names do not help to understand the code, and most probably were created as a temporary thing but were forgotten afterwards. Example: 'int aa = 42;' Rename quick-fix is suggested only in the editor. Use the option to list names that should be reported.",
"markdown": "Reports variables, methods, or classes with questionable, not really descriptive names. Such names do not help to understand the code, and most probably were created as a temporary thing but were forgotten afterwards.\n\n**Example:**\n\n\n int aa = 42;\n\nRename quick-fix is suggested only in the editor.\n\n\nUse the option to list names that should be reported."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "QuestionableName",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Naming conventions",
"index": 106,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UNCHECKED_WARNING",
"shortDescription": {
"text": "Unchecked warning"
},
"fullDescription": {
"text": "Reports code on which an unchecked warning will be issued by the javac compiler. Every unchecked warning may potentially trigger 'ClassCastException' at runtime. Example: 'List items = Arrays.asList(\"string\", \"string\");\n List<Integer> numbers = Collections.unmodifiableList(items); // unchecked assignment'",
"markdown": "Reports code on which an unchecked warning will be issued by the javac compiler. Every unchecked warning may potentially trigger `ClassCastException` at runtime.\n\nExample:\n\n\n List items = Arrays.asList(\"string\", \"string\");\n List<Integer> numbers = Collections.unmodifiableList(items); // unchecked assignment\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "unchecked",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Compiler issues",
"index": 217,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ParameterCanBeLocal",
"shortDescription": {
"text": "Value passed as parameter never read"
},
"fullDescription": {
"text": "Reports redundant method parameters that can be replaced with local variables. If all local usages of a parameter are preceded by assignments to that parameter, the parameter can be removed and its usages replaced with local variables. It makes no sense to have such a parameter, as values that are passed to it are overwritten. Usually, the problem appears as a result of refactoring. Example: 'void test(int p) {\n p = 1;\n System.out.print(p);\n }' After the quick-fix is applied: 'void test() {\n int p = 1;\n System.out.print(p);\n }'",
"markdown": "Reports redundant method parameters that can be replaced with local variables.\n\nIf all local usages of a parameter are preceded by assignments to that parameter, the\nparameter can be removed and its usages replaced with local variables.\nIt makes no sense to have such a parameter, as values that are passed to it are overwritten.\nUsually, the problem appears as a result of refactoring.\n\nExample:\n\n\n void test(int p) {\n p = 1;\n System.out.print(p);\n }\n\nAfter the quick-fix is applied:\n\n\n void test() {\n int p = 1;\n System.out.print(p);\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ParameterCanBeLocal",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SwitchStatementDensity",
"shortDescription": {
"text": "'switch' statement with too low of a branch density"
},
"fullDescription": {
"text": "Reports 'switch' statements or expressions with a too low ratio of switch labels to executable statements. Such 'switch' statements may be confusing and should probably be refactored. Example: 'switch (i) { // one case and 5 executable statements -> 20% density\n case 1:\n System.out.println(\"1\");\n System.out.println(\"2\");\n System.out.println(\"3\");\n System.out.println(\"4\");\n System.out.println(\"5\");\n break;\n }' Use the Minimum density of branches field to specify the allowed ratio of the switch labels to executable statements.",
"markdown": "Reports `switch` statements or expressions with a too low ratio of switch labels to executable statements.\n\nSuch `switch` statements\nmay be confusing and should probably be refactored.\n\nExample:\n\n\n switch (i) { // one case and 5 executable statements -> 20% density\n case 1:\n System.out.println(\"1\");\n System.out.println(\"2\");\n System.out.println(\"3\");\n System.out.println(\"4\");\n System.out.println(\"5\");\n break;\n }\n\n\nUse the **Minimum density of branches** field to specify the allowed ratio of the switch labels to executable statements."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SwitchStatementDensity",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MismatchedJavadocCode",
"shortDescription": {
"text": "Mismatch between Javadoc and code"
},
"fullDescription": {
"text": "Reports parts of method specification written in English that contradict with the method declaration. This includes: Method specified to return 'true' or 'false' but its return type is not boolean. Method specified to return 'null' but it's annotated as '@NotNull' or its return type is primitive. Method specified to return list but its return type is set or array. And so on. Example: '/**\n * @return true if user is found, false otherwise\n */\n User findUser(String name);' Note that false-positives are possible, as this inspection tries to interpret a human language. However, if the inspection reports incorrectly, it's still possible that the description is confusing and should be rewritten. New in 2022.3",
"markdown": "Reports parts of method specification written in English that contradict with the method declaration. This includes:\n\n* Method specified to return `true` or `false` but its return type is not boolean.\n* Method specified to return `null` but it's annotated as `@NotNull` or its return type is primitive.\n* Method specified to return list but its return type is set or array.\n* And so on.\n\n**Example:**\n\n\n /**\n * @return true if user is found, false otherwise\n */\n User findUser(String name);\n\n\nNote that false-positives are possible, as this inspection tries to interpret a human language. However, if the inspection reports\nincorrectly, it's still possible that the description is confusing and should be rewritten.\n\n\nNew in 2022.3"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MismatchedJavadocCode",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Javadoc",
"index": 95,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SimplifiableAnnotation",
"shortDescription": {
"text": "Simplifiable annotation"
},
"fullDescription": {
"text": "Reports annotations that can be simplified to their single-element or marker shorthand form. Problems reported: Redundant 'value=' in annotation name-value pairs Redundant braces around array values that contain only a single value Redundant whitespace between the @-sign and the name of annotations Redundant whitespace between annotation names and parameter lists Redundant parentheses in annotations without any parameters Example: '@interface Foo { String[] value(); }\n\n @ Foo({\"foo\"})\n public String name;' After the quick-fix is applied: '@interface Foo { String[] value(); }\n\n @Foo(\"foo\")\n public String name;'",
"markdown": "Reports annotations that can be simplified to their single-element or marker shorthand form.\n\n\nProblems reported:\n\n* Redundant `value=` in annotation name-value pairs\n* Redundant braces around array values that contain only a single value\n* Redundant whitespace between the @-sign and the name of annotations\n* Redundant whitespace between annotation names and parameter lists\n* Redundant parentheses in annotations without any parameters\n\n**Example:**\n\n\n @interface Foo { String[] value(); }\n\n @ Foo({\"foo\"})\n public String name;\n\nAfter the quick-fix is applied:\n\n\n @interface Foo { String[] value(); }\n\n @Foo(\"foo\")\n public String name;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SimplifiableAnnotation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OverridableMethodCallDuringObjectConstruction",
"shortDescription": {
"text": "Overridable method called during object construction"
},
"fullDescription": {
"text": "Reports calls to overridable methods of the current class during object construction. A method is called during object construction if it is inside a: Constructor Non-static instance initializer Non-static field initializer 'clone()' method 'readObject()' method 'readObjectNoData()' method Methods are overridable if they are not declared as 'final', 'static', or 'private'. Package-local methods are considered safe, even though they are overridable. Such calls may result in subtle bugs, as object initialization may happen before the method call. Example: 'class Parent {\n void someMethod() { }\n }\n\n class Child extends Parent {\n Child() {\n someMethod();\n }\n }' This inspection shares the functionality with the following inspections: Abstract method called during object construction Overridden method called during object construction Only one inspection should be enabled at once to prevent warning duplication.",
"markdown": "Reports calls to overridable methods of the current class during object construction.\n\nA method is called during object construction if it is inside a:\n\n* Constructor\n* Non-static instance initializer\n* Non-static field initializer\n* `clone()` method\n* `readObject()` method\n* `readObjectNoData()` method\n* Methods are overridable if they are not declared as `final`, `static`, or `private`. Package-local methods are considered safe, even though they are overridable. Such calls may result in subtle bugs, as object initialization may happen before the method call.\n* **Example:**\n\n\n class Parent {\n void someMethod() { }\n }\n\n class Child extends Parent {\n Child() {\n someMethod();\n }\n }\n\n* This inspection shares the functionality with the following inspections:\n * Abstract method called during object construction\n * Overridden method called during object construction\n* Only one inspection should be enabled at once to prevent warning duplication."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OverridableMethodCallDuringObjectConstruction",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Initialization",
"index": 26,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ImplicitCallToSuper",
"shortDescription": {
"text": "Implicit call to 'super()'"
},
"fullDescription": {
"text": "Reports constructors that do not begin with a call to \"super\" constructor or another constructor of the same class. Such constructors can be thought of as implicitly beginning with a call to 'super()'. Some coding standards prefer that such calls to 'super()' be made explicitly. Example: 'class Foo {\n Foo() {}\n }' After the quick-fix is applied: 'class Foo {\n Foo() {\n super();\n }\n }' Use the inspection settings to ignore classes extending directly from 'Object'. For instance: 'class Foo {\n Foo() {} // Not reported\n }\n\n class Bar extends Foo {\n Bar() {} // Implicit call to 'super()'\n }'",
"markdown": "Reports constructors that do not begin with a call to \"super\" constructor or another constructor of the same class.\n\nSuch constructors can be thought of as implicitly beginning with a\ncall to `super()`. Some coding standards prefer that such calls to\n`super()` be made explicitly.\n\n**Example:**\n\n\n class Foo {\n Foo() {}\n }\n\nAfter the quick-fix is applied:\n\n\n class Foo {\n Foo() {\n super();\n }\n }\n\n\nUse the inspection settings to ignore classes extending directly from `Object`.\nFor instance:\n\n\n class Foo {\n Foo() {} // Not reported\n }\n\n class Bar extends Foo {\n Bar() {} // Implicit call to 'super()'\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ImplicitCallToSuper",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MissingDeprecatedAnnotation",
"shortDescription": {
"text": "Missing '@Deprecated' annotation"
},
"fullDescription": {
"text": "Reports module declarations, classes, fields, or methods that have the '@deprecated' Javadoc tag but do not have the '@java.lang.Deprecated' annotation. Example: '/**\n * @deprecated use {@code example()} instead\n */\n void sample(){ }' After the quick-fix is applied: '/**\n * @deprecated use {@code example()} instead\n */\n @Deprecated\n void sample(){ }' This inspection reports only if the language level of the project or module is 5 or higher. Use the checkbox below to report members annotated with '@Deprecated' without an explanation in a Javadoc '@deprecated' tag.",
"markdown": "Reports module declarations, classes, fields, or methods that have the `@deprecated` Javadoc tag but do not have the `@java.lang.Deprecated` annotation.\n\n**Example:**\n\n\n /**\n * @deprecated use {@code example()} instead\n */\n void sample(){ }\n\nAfter the quick-fix is applied:\n\n\n /**\n * @deprecated use {@code example()} instead\n */\n @Deprecated\n void sample(){ }\n\nThis inspection reports only if the language level of the project or module is 5 or higher.\n\n\nUse the checkbox below to report members annotated with `@Deprecated` without\nan explanation in a Javadoc `@deprecated` tag."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MissingDeprecatedAnnotation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Javadoc",
"index": 95,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CachedNumberConstructorCall",
"shortDescription": {
"text": "Number constructor call with primitive argument"
},
"fullDescription": {
"text": "Reports instantiations of new 'Long', 'Integer', 'Short', or 'Byte' objects that have a primitive 'long', 'integer', 'short', or 'byte' argument. It is recommended that you use the static method 'valueOf()' introduced in Java 5. By default, this method caches objects for values between -128 and 127 inclusive. Example: 'Integer i = new Integer(1);\n Long l = new Long(1L);' After the quick-fix is applied, the code changes to: 'Integer i = Integer.valueOf(1);\n Long l = Long.valueOf(1L);' This inspection only reports if the language level of the project or module is 5 or higher Use the Ignore new number expressions with a String argument option to ignore calls to number constructors with a 'String' argument. Use the Report only when constructor is @Deprecated option to only report calls to deprecated constructors. 'Long', 'Integer', 'Short' and 'Byte' constructors are deprecated since JDK 9.",
"markdown": "Reports instantiations of new `Long`, `Integer`, `Short`, or `Byte` objects that have a primitive `long`, `integer`, `short`, or `byte` argument.\n\nIt is recommended that you use the static method `valueOf()`\nintroduced in Java 5. By default, this method caches objects for values between -128 and\n127 inclusive.\n\n**Example:**\n\n\n Integer i = new Integer(1);\n Long l = new Long(1L);\n\nAfter the quick-fix is applied, the code changes to:\n\n\n Integer i = Integer.valueOf(1);\n Long l = Long.valueOf(1L);\n\nThis inspection only reports if the language level of the project or module is 5 or higher\n\n\nUse the **Ignore new number expressions with a String argument** option to ignore calls to number constructors with a `String` argument.\n\n\nUse the **Report only when constructor is @Deprecated** option to only report calls to deprecated constructors.\n`Long`, `Integer`, `Short` and `Byte` constructors are deprecated since JDK 9."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "CachedNumberConstructorCall",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues",
"index": 49,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MustAlreadyBeRemovedApi",
"shortDescription": {
"text": "API must already be removed"
},
"fullDescription": {
"text": "Reports declarations marked with '@ApiStatus.ScheduledForRemoval' that should have been removed in the current version of the declaring library. It compares the specified scheduled removal version with the version that you can set below. Specify the version as a string separated with dots and optionally postfixed with 'alpha', 'beta', 'snapshot', or 'eap'. Examples of valid versions: '1.0', '2.3.1', '2018.1', '7.5-snapshot', '3.0-eap'. Version comparison is intuitive: '1.0 < 2.0', '1.0-eap < 1.0', '2.3-snapshot < 2.3' and so on. For detailed comparison logic, refer to the implementation of VersionComparatorUtil.",
"markdown": "Reports declarations marked with `@ApiStatus.ScheduledForRemoval` that should have been removed in the current version of the declaring library.\n\nIt compares the specified scheduled removal version with the version that you can set below.\n\n\nSpecify the version as a string separated with dots and optionally postfixed with\n`alpha`, `beta`, `snapshot`, or `eap`.\n\nExamples of valid versions: `1.0`, `2.3.1`, `2018.1`, `7.5-snapshot`, `3.0-eap`.\n\n\nVersion comparison is intuitive: `1.0 < 2.0`, `1.0-eap < 1.0`, `2.3-snapshot < 2.3` and so on.\nFor detailed comparison logic, refer to the implementation of [VersionComparatorUtil](https://github.com/JetBrains/intellij-community/blob/master/platform/util-rt/src/com/intellij/util/text/VersionComparatorUtil.java)."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "MustAlreadyBeRemovedApi",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JVM languages",
"index": 47,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SimpleDateFormatWithoutLocale",
"shortDescription": {
"text": "'SimpleDateFormat' without locale"
},
"fullDescription": {
"text": "Reports instantiations of 'java.util.SimpleDateFormat' or 'java.time.format.DateTimeFormatter' that do not specify a 'java.util.Locale'. These calls will use the platform default locale, which depends on the OS settings. This can lead to surprising behaviour when the code is run on a different platform or the OS settings are changed. 'Example:' 'new SimpleDateFormat(\"yyyy\");\n DateTimeFormatter.ofPattern(\"d/M/y\");'",
"markdown": "Reports instantiations of `java.util.SimpleDateFormat` or `java.time.format.DateTimeFormatter` that do not specify a `java.util.Locale`. These calls will use the platform default locale, which depends on the OS settings. This can lead to surprising behaviour when the code is run on a different platform or the OS settings are changed.\n\n`Example:`\n\n\n new SimpleDateFormat(\"yyyy\");\n DateTimeFormatter.ofPattern(\"d/M/y\");\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SimpleDateFormatWithoutLocale",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Internationalization",
"index": 110,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AnnotationClass",
"shortDescription": {
"text": "Annotation interface"
},
"fullDescription": {
"text": "Reports annotation interfaces. Such interfaces are not supported under Java 1.4 and earlier.",
"markdown": "Reports annotation interfaces. Such interfaces are not supported under Java 1.4 and earlier."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AnnotationClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level issues",
"index": 246,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Finalize",
"shortDescription": {
"text": "'finalize()' should not be overridden"
},
"fullDescription": {
"text": "Reports overriding the 'Object.finalize()' method. According to the 'Object.finalize()' documentation: The finalization mechanism is inherently problematic. Finalization can lead to performance issues, deadlocks, and hangs. Errors in finalizers can lead to resource leaks; there is no way to cancel finalization if it is no longer necessary; and no ordering is specified among calls to 'finalize' methods of different objects. Furthermore, there are no guarantees regarding the timing of finalization. The 'finalize' method might be called on a finalizable object only after an indefinite delay, if at all. Configure the inspection: Use the Ignore for trivial 'finalize()' implementations option to ignore 'finalize()' implementations with an empty method body or a body containing only 'if' statements that have a condition which evaluates to 'false' and is a compile-time constant. For performance reasons it can be beneficial to override a non-trivial 'finalize()' with an empty implementation in a subclass. An empty final 'finalize()' implementation can also be used to prevent subclasses from overriding.",
"markdown": "Reports overriding the `Object.finalize()` method.\n\nAccording to the `Object.finalize()` documentation:\n>\n> The finalization mechanism is inherently problematic. Finalization can lead\n> to performance issues, deadlocks, and hangs. Errors in finalizers can lead\n> to resource leaks; there is no way to cancel finalization if it is no longer\n> necessary; and no ordering is specified among calls to `finalize`\n> methods of different objects. Furthermore, there are no guarantees regarding\n> the timing of finalization. The `finalize` method might be called\n> on a finalizable object only after an indefinite delay, if at all.\n\nConfigure the inspection:\n\n* Use the **Ignore for trivial 'finalize()' implementations** option to ignore `finalize()` implementations with an empty method body or a body containing only `if` statements that have a condition which evaluates to `false` and is a compile-time constant. For performance reasons it can be beneficial to override a non-trivial `finalize()` with an empty implementation in a subclass. An empty final `finalize()` implementation can also be used to prevent subclasses from overriding."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FinalizeDeclaration",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Finalization",
"index": 77,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PointlessArithmeticExpression",
"shortDescription": {
"text": "Pointless arithmetic expression"
},
"fullDescription": {
"text": "Reports pointless arithmetic expressions. Such expressions include adding or subtracting zero, multiplying by zero or one, and division by one. Such expressions may be the result of automated refactorings and they are unlikely to be what the developer intended to do. The quick-fix simplifies such expressions. Example: 'void f(int a) {\n int x = a - a;\n int y = a + 0;\n int res = x / x;\n }' After the quick-fix is applied: 'void f(int a) {\n int x = 0;\n int y = a;\n int res = 1;\n }' Note that in rare cases, the suggested replacement might not be completely equivalent to the original code for all possible inputs. For example, the inspection suggests replacing 'x / x' with '1'. However, if 'x' is zero, the original code throws 'ArithmeticException' or results in 'NaN'. Also, if 'x' is 'NaN', then the result is also 'NaN'. It's very unlikely that such behavior is intended.",
"markdown": "Reports pointless arithmetic expressions. Such expressions include adding or subtracting zero, multiplying by zero or one, and division by one.\n\nSuch expressions may be the result of automated refactorings and they are unlikely to be what the developer intended to do.\n\nThe quick-fix simplifies such expressions.\n\n**Example:**\n\n\n void f(int a) {\n int x = a - a;\n int y = a + 0;\n int res = x / x;\n }\n\nAfter the quick-fix is applied:\n\n\n void f(int a) {\n int x = 0;\n int y = a;\n int res = 1;\n }\n\n\nNote that in rare cases, the suggested replacement might not be completely equivalent to the original code\nfor all possible inputs. For example, the inspection suggests replacing `x / x` with `1`.\nHowever, if `x` is zero, the original code throws `ArithmeticException` or results in `NaN`.\nAlso, if `x` is `NaN`, then the result is also `NaN`. It's very unlikely that such behavior is intended."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PointlessArithmeticExpression",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues",
"index": 49,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ObjectNotify",
"shortDescription": {
"text": "Call to 'notify()' instead of 'notifyAll()'"
},
"fullDescription": {
"text": "Reports calls to 'Object.notify()'. While occasionally useful, in almost all cases 'Object.notifyAll()' is a better choice because calling 'Object.notify()' may lead to deadlocks. See Doug Lea's Concurrent Programming in Java for a discussion.",
"markdown": "Reports calls to `Object.notify()`. While occasionally useful, in almost all cases `Object.notifyAll()` is a better choice because calling `Object.notify()` may lead to deadlocks. See Doug Lea's *Concurrent Programming in Java* for a discussion."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CallToNotifyInsteadOfNotifyAll",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StringEqualsCharSequence",
"shortDescription": {
"text": "'String.equals()' called with 'CharSequence' argument"
},
"fullDescription": {
"text": "Reports calls to 'String.equals()' with a 'CharSequence' as the argument. 'String.equals()' can only return 'true' for 'String' arguments. To compare the contents of a 'String' with a non-'String' 'CharSequence' argument, use the 'contentEquals()' method. Example: 'boolean equals(String s, CharSequence ch) {\n return s.equals(ch);\n }' After quick-fix is applied: 'boolean equals(String s, CharSequence ch) {\n return s.contentEquals(ch);\n }' New in 2017.3",
"markdown": "Reports calls to `String.equals()` with a `CharSequence` as the argument.\n\n\n`String.equals()` can only return `true` for `String` arguments.\nTo compare the contents of a `String` with a non-`String` `CharSequence` argument,\nuse the `contentEquals()` method.\n\n**Example:**\n\n\n boolean equals(String s, CharSequence ch) {\n return s.equals(ch);\n }\n\nAfter quick-fix is applied:\n\n\n boolean equals(String s, CharSequence ch) {\n return s.contentEquals(ch);\n }\n\n\nNew in 2017.3"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "StringEqualsCharSequence",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PublicStaticCollectionField",
"shortDescription": {
"text": "'public static' collection field"
},
"fullDescription": {
"text": "Reports modifiable 'public' 'static' Collection fields. Even though they are often used to store collections of constant values, these fields nonetheless represent a security hazard, as their contents may be modified even if the field is declared as 'final'. Example: 'public static final List<String> EVENTS = new ArrayList<>();'\n Use the table in the Options section to specify methods returning unmodifiable collections. 'public' 'static' collection fields initialized with these methods will not be reported.",
"markdown": "Reports modifiable `public` `static` Collection fields.\n\nEven though they are often used to store collections of constant values, these fields nonetheless represent a security\nhazard, as their contents may be modified even if the field is declared as `final`.\n\n**Example:**\n\n\n public static final List<String> EVENTS = new ArrayList<>();\n \n\nUse the table in the **Options** section to specify methods returning unmodifiable collections.\n`public` `static` collection fields initialized with these methods will not be reported."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PublicStaticCollectionField",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Security",
"index": 32,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnconditionalWait",
"shortDescription": {
"text": "Unconditional 'wait()' call"
},
"fullDescription": {
"text": "Reports 'wait()' being called unconditionally within a synchronized context. Normally, 'wait()' is used to block a thread until some condition is true. If 'wait()' is called unconditionally, it often indicates that the condition was checked before a lock was acquired. In that case a data race may occur, with the condition becoming true between the time it was checked and the time the lock was acquired. While constructs found by this inspection are not necessarily incorrect, they are certainly worth examining. Example: 'class Bar {\n void foo() throws InterruptedException {\n synchronized (this) {\n wait(); // warning\n }\n }\n }'",
"markdown": "Reports `wait()` being called unconditionally within a synchronized context.\n\n\nNormally, `wait()` is used to block a thread until some condition is true. If\n`wait()` is called unconditionally, it often indicates that the condition was\nchecked before a lock was acquired. In that case a data race may occur, with the condition\nbecoming true between the time it was checked and the time the lock was acquired.\n\n\nWhile constructs found by this inspection are not necessarily incorrect, they are certainly worth examining.\n\n**Example:**\n\n\n class Bar {\n void foo() throws InterruptedException {\n synchronized (this) {\n wait(); // warning\n }\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnconditionalWait",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MethodOverridesInaccessibleMethodOfSuper",
"shortDescription": {
"text": "Method overrides inaccessible method of superclass"
},
"fullDescription": {
"text": "Reports methods with the same signature as an inaccessible method of a superclass, for example, a private method, or a package-private method of a superclass in another package. Such method names may be confusing because the method in the subclass may look like an override when in fact it hides the inaccessible method of the superclass. Moreover, if the visibility of the method in the superclass changes later, it may either silently change the semantics of the subclass or cause a compilation error. A quick-fix is suggested to rename the method. Example: 'public class Super {\n private void test() {\n }\n }\n\n public class Sub extends Super {\n void test() { // making 'Super.test()' public causes a compilation error\n // making 'Super.test()' package-private makes 'Sub.test()' an override\n }\n }'",
"markdown": "Reports methods with the same signature as an inaccessible method of a superclass, for example, a private method, or a package-private method of a superclass in another package.\n\n\nSuch method names may be confusing because the method in the subclass may look like an override when in fact\nit hides the inaccessible method of the superclass.\nMoreover, if the visibility of the method in the superclass changes later,\nit may either silently change the semantics of the subclass or cause a compilation error.\n\nA quick-fix is suggested to rename the method.\n\n**Example:**\n\n\n public class Super {\n private void test() {\n }\n }\n\n public class Sub extends Super {\n void test() { // making 'Super.test()' public causes a compilation error\n // making 'Super.test()' package-private makes 'Sub.test()' an override\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MethodOverridesInaccessibleMethodOfSuper",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Visibility",
"index": 97,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UtilityClassCanBeEnum",
"shortDescription": {
"text": "Utility class can be 'enum'"
},
"fullDescription": {
"text": "Reports utility classes that can be converted to enums. Some coding style guidelines require implementing utility classes as enums to avoid code coverage issues in 'private' constructors. Example: 'class StringUtils {\n public static final String EMPTY = \"\";\n }' After the quick-fix is applied: 'enum StringUtils {\n ;\n public static final String EMPTY = \"\";\n }'",
"markdown": "Reports utility classes that can be converted to enums.\n\nSome coding style guidelines require implementing utility classes as enums\nto avoid code coverage issues in `private` constructors.\n\n**Example:**\n\n\n class StringUtils {\n public static final String EMPTY = \"\";\n }\n\nAfter the quick-fix is applied:\n\n\n enum StringUtils {\n ;\n public static final String EMPTY = \"\";\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UtilityClassCanBeEnum",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ExtendsObject",
"shortDescription": {
"text": "Class explicitly extends 'Object'"
},
"fullDescription": {
"text": "Reports any classes that are explicitly declared to extend 'java.lang.Object'. Such declaration is redundant and can be safely removed. Example: 'class MyClass extends Object {\n }' The quick-fix removes the redundant 'extends Object' clause: 'class MyClass {\n }'",
"markdown": "Reports any classes that are explicitly declared to extend `java.lang.Object`.\n\nSuch declaration is redundant and can be safely removed.\n\nExample:\n\n\n class MyClass extends Object {\n }\n\nThe quick-fix removes the redundant `extends Object` clause:\n\n\n class MyClass {\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ClassExplicitlyExtendsObject",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReassignedVariable",
"shortDescription": {
"text": "Reassigned variable"
},
"fullDescription": {
"text": "Reports reassigned variables, which complicate reading and understanding the code. Example: 'int value = 2 * (height + width);\n System.out.println(\"perimeter: \" + value);\n\n value = height * width;\n System.out.println(\"area: \" + value);'",
"markdown": "Reports reassigned variables, which complicate reading and understanding the code.\n\nExample:\n\n\n int value = 2 * (height + width);\n System.out.println(\"perimeter: \" + value);\n\n value = height * width;\n System.out.println(\"area: \" + value);\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReassignedVariable",
"ideaSeverity": "TEXT ATTRIBUTES",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MethodNameSameAsClassName",
"shortDescription": {
"text": "Method name same as class name"
},
"fullDescription": {
"text": "Reports methods that are named identically to their class. While such naming is allowed by the Java language, by convention it is reserved for defining constructors. Using it for methods is probably a mistake or bad practice. Example: 'class MyClass {\n int val;\n\n // Method MyClass named identically to its containing class.\n // Likely, 'void' was added by mistake.\n void MyClass(int val) {\n this.val = val;\n }\n }' When appropriate, a quick-fix converts the method to a constructor: 'class MyClass {\n int val;\n\n MyClass(int val) {\n this.val = val;\n }\n }' Another quick-fix renames the method.",
"markdown": "Reports methods that are named identically to their class. While such naming is allowed by the Java language, by convention it is reserved for defining constructors. Using it for methods is probably a mistake or bad practice.\n\n**Example:**\n\n\n class MyClass {\n int val;\n\n // Method MyClass named identically to its containing class.\n // Likely, 'void' was added by mistake.\n void MyClass(int val) {\n this.val = val;\n }\n }\n\nWhen appropriate, a quick-fix converts the method to a constructor:\n\n\n class MyClass {\n int val;\n\n MyClass(int val) {\n this.val = val;\n }\n }\n\nAnother quick-fix renames the method."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MethodNameSameAsClassName",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Naming conventions/Method",
"index": 107,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LocalVariableNamingConvention",
"shortDescription": {
"text": "Local variable naming convention"
},
"fullDescription": {
"text": "Reports local variables whose names are too short, too long, or do not follow the specified regular expression pattern. Example: 'int X = 42;' should be reported if the inspection is enabled with the default settings in which a variable name should start with a lowercase letter. Configure the inspection: Use the fields in the Options section to specify the minimum length, maximum length, and a regular expression expected for local variable names. Specify 0 in order not to check the length of names. Regular expressions should be specified in the standard java.util.regex format. Use checkboxes to ignore 'for'-loop and 'catch' section parameters.",
"markdown": "Reports local variables whose names are too short, too long, or do not follow the specified regular expression pattern.\n\n**Example:** `int X = 42;`\nshould be reported if the inspection is enabled with the default settings in which a variable name should start with a lowercase letter.\n\nConfigure the inspection:\n\n\nUse the fields in the **Options** section to specify the minimum length, maximum length, and a regular expression expected for local variable names.\nSpecify **0** in order not to check the length of names. Regular expressions should be specified in the standard **java.util.regex** format.\n\nUse checkboxes to ignore `for`-loop and `catch` section parameters."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LocalVariableNamingConvention",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Naming conventions",
"index": 106,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NestedSwitchStatement",
"shortDescription": {
"text": "Nested 'switch' statement"
},
"fullDescription": {
"text": "Reports nested 'switch' statements or expressions. Nested 'switch' statements may result in extremely confusing code. These statements may be extracted to a separate method. Example: 'int res = switch (i) {\n case 0 -> 0;\n default -> switch (i) {\n case 100 -> 0;\n default -> i;\n };\n };'",
"markdown": "Reports nested `switch` statements or expressions.\n\nNested `switch` statements\nmay result in extremely confusing code. These statements may be extracted to a separate method.\n\nExample:\n\n\n int res = switch (i) {\n case 0 -> 0;\n default -> switch (i) {\n case 100 -> 0;\n default -> i;\n };\n };\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NestedSwitchStatement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EmptyTryBlock",
"shortDescription": {
"text": "Empty 'try' block"
},
"fullDescription": {
"text": "Reports empty 'try' blocks, including try-with-resources statements. 'try' blocks with comments are considered empty. This inspection doesn't report empty 'try' blocks found in JSP files.",
"markdown": "Reports empty `try` blocks, including try-with-resources statements.\n\n`try` blocks with comments are considered empty.\n\n\nThis inspection doesn't report empty `try` blocks found in JSP files."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "EmptyTryBlock",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Error handling",
"index": 9,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CollectionsFieldAccessReplaceableByMethodCall",
"shortDescription": {
"text": "Reference to empty collection field can be replaced with method call"
},
"fullDescription": {
"text": "Reports usages of 'java.util.Collections' fields: 'EMPTY_LIST', 'EMPTY_MAP' or 'EMPTY_SET'. These field usages may be replaced with the following method calls: 'emptyList()', 'emptyMap()', or 'emptySet()'. Such method calls prevent unchecked warnings by the compiler because the type parameters can be inferred. Example: 'List<Integer> emptyList = Collections.EMPTY_LIST;' After the quick-fix is applied: 'List<Integer> emptyList = Collections.emptyList();' This inspection only reports if the language level of the project or module is 5 or higher.",
"markdown": "Reports usages of `java.util.Collections` fields: `EMPTY_LIST`, `EMPTY_MAP` or `EMPTY_SET`. These field usages may be replaced with the following method calls: `emptyList()`, `emptyMap()`, or `emptySet()`. Such method calls prevent unchecked warnings by the compiler because the type parameters can be inferred.\n\n**Example:**\n\n\n List<Integer> emptyList = Collections.EMPTY_LIST;\n\nAfter the quick-fix is applied:\n\n\n List<Integer> emptyList = Collections.emptyList();\n\nThis inspection only reports if the language level of the project or module is 5 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CollectionsFieldAccessReplaceableByMethodCall",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 5",
"index": 117,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "WaitOrAwaitWithoutTimeout",
"shortDescription": {
"text": "'wait()' or 'await()' without timeout"
},
"fullDescription": {
"text": "Reports calls to 'Object.wait()' or 'Condition.await()' without specifying a timeout. Such calls may be dangerous in high-availability programs, as failures in one component may result in blockages of the waiting component if 'notify()'/'notifyAll()' or 'signal()'/'signalAll()' never get called. Example: 'void foo(Object bar) throws InterruptedException {\n bar.wait();\n }'",
"markdown": "Reports calls to `Object.wait()` or `Condition.await()` without specifying a timeout.\n\n\nSuch calls may be dangerous in high-availability programs, as failures in one\ncomponent may result in blockages of the waiting component\nif `notify()`/`notifyAll()`\nor `signal()`/`signalAll()` never get called.\n\n**Example:**\n\n\n void foo(Object bar) throws InterruptedException {\n bar.wait();\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "WaitOrAwaitWithoutTimeout",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AssertWithSideEffects",
"shortDescription": {
"text": "'assert' statement with side effects"
},
"fullDescription": {
"text": "Reports 'assert' statements that cause side effects. Since assertions can be switched off, these side effects are not guaranteed, which can cause subtle bugs. Common unwanted side effects detected by this inspection are modifications of variables and fields. When methods calls are involved, they are analyzed one level deep. Example: 'assert i++ < 10;'",
"markdown": "Reports `assert` statements that cause side effects.\n\n\nSince assertions can be switched off,\nthese side effects are not guaranteed, which can cause subtle bugs. Common unwanted side effects detected by this inspection are\nmodifications of variables and fields. When methods calls are involved, they are analyzed one level deep.\n\n**Example:**\n\n\n assert i++ < 10;\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "AssertWithSideEffects",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LiteralAsArgToStringEquals",
"shortDescription": {
"text": "String literal may be 'equals()' qualifier"
},
"fullDescription": {
"text": "Reports 'String.equals()' or 'String.equalsIgnoreCase()' calls with a string literal argument. Some coding standards specify that string literals should be the qualifier of 'equals()', rather than argument, thus minimizing 'NullPointerException'-s. A quick-fix is available to exchange the literal and the expression. Example: 'boolean isFoo(String value) {\n return value.equals(\"foo\");\n }' After the quick-fix is applied: 'boolean isFoo(String value) {\n return \"foo\".equals(value);\n }'",
"markdown": "Reports `String.equals()` or `String.equalsIgnoreCase()` calls with a string literal argument.\n\nSome coding standards specify that string literals should be the qualifier of `equals()`, rather than\nargument, thus minimizing `NullPointerException`-s.\n\nA quick-fix is available to exchange the literal and the expression.\n\n**Example:**\n\n\n boolean isFoo(String value) {\n return value.equals(\"foo\");\n }\n\nAfter the quick-fix is applied:\n\n\n boolean isFoo(String value) {\n return \"foo\".equals(value);\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LiteralAsArgToStringEquals",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DuplicateExpressions",
"shortDescription": {
"text": "Multiple occurrences of the same expression"
},
"fullDescription": {
"text": "Reports multiple equivalent occurrences of the same expression within a method (or constructor, or class initializer) if the result of the expression can be reused. The expression is reported if it's free of side effects and its result is always the same (in terms of 'Object.equals()'). The examples of such expressions are 'a + b', 'Math.max(a, b)', 'a.equals(b)', 's.substring(a,b)'. To make sure the result is always the same, it's verified that the variables used in the expression don't change their values between the occurrences of the expression. Such expressions may contain methods of immutable classes like 'String', 'BigDecimal', and so on, and of utility classes like 'Objects', 'Math' (except 'random()'). The well-known methods, such as 'Object.equals()', 'Object.hashCode()', 'Object.toString()', 'Comparable.compareTo()', and 'Comparator.compare()' are OK as well because they normally don't have any observable side effects. Use the Expression complexity threshold option to specify the minimal expression complexity threshold. Specifying bigger numbers will remove reports on short expressions. 'Path.of' and 'Paths.get' calls are treated as equivalent calls if they have the same arguments. These calls are always reported no matter how complex their arguments are. This behaviour can be tweaked using different complexity threshold. New in 2018.3",
"markdown": "Reports multiple equivalent occurrences of the same expression within a method (or constructor, or class initializer) if the result of the expression can be reused.\n\n\nThe expression is reported if it's free of side effects and its result is always the same (in terms of `Object.equals()`).\nThe examples of such expressions are `a + b`, `Math.max(a, b)`, `a.equals(b)`,\n`s.substring(a,b)`. To make sure the result is always the same, it's verified that the variables used in the expression don't\nchange their values between the occurrences of the expression.\n\n\nSuch expressions may contain methods of immutable classes like `String`, `BigDecimal`, and so on,\nand of utility classes like `Objects`, `Math` (except `random()`).\nThe well-known methods, such as `Object.equals()`, `Object.hashCode()`, `Object.toString()`,\n`Comparable.compareTo()`, and `Comparator.compare()` are OK as well because they normally don't have\nany observable side effects.\n\n\nUse the **Expression complexity threshold** option to specify the minimal expression complexity threshold. Specifying bigger\nnumbers will remove reports on short expressions.\n\n\n`Path.of` and `Paths.get` calls are treated as equivalent calls if they have the same arguments. These calls\nare always reported no matter how complex their arguments are. This behaviour can be tweaked using different complexity threshold.\n\nNew in 2018.3"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "DuplicateExpressions",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ThrowableSupplierOnlyThrowException",
"shortDescription": {
"text": "Throwable supplier never returns a value"
},
"fullDescription": {
"text": "Reports 'Supplier' lambdas in 'Optional.orElseThrow()' calls that throw an exception, instead of returning it. Example: 'optional.orElseThrow(() -> {\n throw new RuntimeException();\n});' After the quick-fix is applied: 'optional.orElseThrow(() -> new RuntimeException());' New in 2023.1",
"markdown": "Reports `Supplier` lambdas in `Optional.orElseThrow()` calls that throw an exception, instead of returning it.\n\n**Example:**\n\n\n optional.orElseThrow(() -> {\n throw new RuntimeException();\n });\n\nAfter the quick-fix is applied:\n\n\n optional.orElseThrow(() -> new RuntimeException());\n\nNew in 2023.1"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ThrowableSupplierOnlyThrowException",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Error handling",
"index": 9,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IfStatementMissingBreakInLoop",
"shortDescription": {
"text": "Early loop exit in 'if' condition"
},
"fullDescription": {
"text": "Reports loops with an 'if' statement that can end with 'break' without changing the semantics. This prevents redundant loop iterations. Example: 'boolean found = false;\n for (int i = 0; i < arr.length; i++) {\n if (Objects.equals(value, arr[i])) {\n found = true;\n }\n }' After the quick-fix is applied: 'boolean found = false;\n for (int i = 0; i < arr.length; i++) {\n if (Objects.equals(value, arr[i])) {\n found = true;\n break;\n }\n }' New in 2019.2",
"markdown": "Reports loops with an `if` statement that can end with `break` without changing the semantics. This prevents redundant loop iterations.\n\n**Example:**\n\n\n boolean found = false;\n for (int i = 0; i < arr.length; i++) {\n if (Objects.equals(value, arr[i])) {\n found = true;\n }\n }\n\nAfter the quick-fix is applied:\n\n\n boolean found = false;\n for (int i = 0; i < arr.length; i++) {\n if (Objects.equals(value, arr[i])) {\n found = true;\n break;\n }\n }\n\nNew in 2019.2"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "IfStatementMissingBreakInLoop",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantStreamOptionalCall",
"shortDescription": {
"text": "Redundant step in 'Stream' or 'Optional' call chain"
},
"fullDescription": {
"text": "Reports redundant 'Stream' or 'Optional' calls like 'map(x -> x)', 'filter(x -> true)' or redundant 'sorted()' or 'distinct()' calls. Note that a mapping operation in code like 'streamOfIntegers.map(Integer::valueOf)' works as 'requireNonNull()' check: if the stream contains 'null', it throws a 'NullPointerException', thus it's not absolutely redundant. Disable the Report redundant boxing in Stream.map() option if you do not want such cases to be reported. This inspection only reports if the language level of the project or module is 8 or higher.",
"markdown": "Reports redundant `Stream` or `Optional` calls like `map(x -> x)`, `filter(x -> true)` or redundant `sorted()` or `distinct()` calls.\n\nNote that a mapping operation in code like `streamOfIntegers.map(Integer::valueOf)`\nworks as `requireNonNull()` check:\nif the stream contains `null`, it throws a `NullPointerException`, thus it's not absolutely redundant.\nDisable the **Report redundant boxing in Stream.map()** option if you do not want such cases to be reported.\n\nThis inspection only reports if the language level of the project or module is 8 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantStreamOptionalCall",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantStringFormatCall",
"shortDescription": {
"text": "Redundant call to 'String.format()'"
},
"fullDescription": {
"text": "Reports calls to methods like 'format()' and 'printf()' that can be safely removed or simplified. Example: 'System.out.println(String.format(\"Total count: %d\", 42));' After the quick-fix is applied: 'System.out.printf(\"Total count: %d%n\", 42);'",
"markdown": "Reports calls to methods like `format()` and `printf()` that can be safely removed or simplified.\n\n**Example:**\n\n\n System.out.println(String.format(\"Total count: %d\", 42));\n\nAfter the quick-fix is applied:\n\n\n System.out.printf(\"Total count: %d%n\", 42);\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantStringFormatCall",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MethodOverridesStaticMethod",
"shortDescription": {
"text": "Method tries to override 'static' method of superclass"
},
"fullDescription": {
"text": "Reports 'static' methods with a signature identical to a 'static' method of a superclass. Such a method may look like an override when in fact it hides the method from the superclass because 'static' methods in Java cannot be overridden. Example: 'class Parent {\n static void method(){}\n }\n\n class Example extends Parent {\n static void method(){} //warning\n }'",
"markdown": "Reports `static` methods with a signature identical to a `static` method of a superclass. Such a method may look like an override when in fact it hides the method from the superclass because `static` methods in Java cannot be overridden.\n\n**Example:**\n\n\n class Parent {\n static void method(){}\n }\n\n class Example extends Parent {\n static void method(){} //warning\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MethodOverridesStaticMethodOfSuperclass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Visibility",
"index": 97,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantCompareToJavaTime",
"shortDescription": {
"text": "Expression with 'java.time' 'compareTo()' call can be simplified"
},
"fullDescription": {
"text": "Reports 'java.time' comparisons with 'compareTo()' calls that can be replaced with 'isAfter()', 'isBefore()' or 'isEqual()' calls. Example: 'LocalDate date1 = LocalDate.now();\n LocalDate date2 = LocalDate.now();\n boolean t = date1.compareTo(date2) > 0;' After the quick-fix is applied: 'LocalDate date1 = LocalDate.now();\n LocalDate date2 = LocalDate.now();\n boolean t = date1.isAfter(date2);' New in 2022.3",
"markdown": "Reports `java.time` comparisons with `compareTo()` calls that can be replaced with `isAfter()`, `isBefore()` or `isEqual()` calls.\n\nExample:\n\n\n LocalDate date1 = LocalDate.now();\n LocalDate date2 = LocalDate.now();\n boolean t = date1.compareTo(date2) > 0;\n\nAfter the quick-fix is applied:\n\n\n LocalDate date1 = LocalDate.now();\n LocalDate date2 = LocalDate.now();\n boolean t = date1.isAfter(date2);\n\nNew in 2022.3"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantCompareToJavaTime",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnclearBinaryExpression",
"shortDescription": {
"text": "Multiple operators with different precedence"
},
"fullDescription": {
"text": "Reports binary, conditional, or 'instanceof' expressions that consist of different operators without parentheses. Such expressions can be less readable due to different precedence rules of operators. Example: 'int n = 3 + 9 * 8 + 1;' After quick-fix is applied: 'int n = 3 + (9 * 8) + 1;'",
"markdown": "Reports binary, conditional, or `instanceof` expressions that consist of different operators without parentheses. Such expressions can be less readable due to different precedence rules of operators.\n\nExample:\n\n\n int n = 3 + 9 * 8 + 1;\n\nAfter quick-fix is applied:\n\n\n int n = 3 + (9 * 8) + 1;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "UnclearExpression",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ChainedMethodCall",
"shortDescription": {
"text": "Chained method calls"
},
"fullDescription": {
"text": "Reports method calls whose target is another method call. The quick-fix suggests to introduce a local variable. Example: 'class X {\n int foo(File f) {\n return f.getName().length();\n }\n }' After the quick-fix is applied: 'class X {\n int foo(File f) {\n final String name = f.getName();\n return name.length();\n }\n }' Use the inspection options to toggle warnings for the following cases: chained method calls in field initializers, for instance, 'private final int i = new Random().nextInt();' chained method calls operating on the same type, for instance, 'new StringBuilder().append(\"x: \").append(new X()).append(\"y: \").append(new Y()).toString();'.",
"markdown": "Reports method calls whose target is another method call. The quick-fix suggests to introduce a local variable.\n\n**Example:**\n\n\n class X {\n int foo(File f) {\n return f.getName().length();\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class X {\n int foo(File f) {\n final String name = f.getName();\n return name.length();\n }\n }\n\nUse the inspection options to toggle warnings for the following cases:\n\n*\n chained method calls in field initializers,\n for instance, `private final int i = new Random().nextInt();`\n\n*\n chained method calls operating on the same type,\n for instance, `new StringBuilder().append(\"x: \").append(new X()).append(\"y: \").append(new Y()).toString();`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ChainedMethodCall",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MethodRefCanBeReplacedWithLambda",
"shortDescription": {
"text": "Method reference can be replaced with lambda"
},
"fullDescription": {
"text": "Reports method references, like 'MyClass::myMethod' and 'myObject::myMethod', and suggests replacing them with an equivalent lambda expression. Lambda expressions can be easier to modify than method references. Example: 'System.out::println' After the quick-fix is applied: 's -> System.out.println(s)' By default, this inspection does not highlight the code in the editor, but only provides a quick-fix.",
"markdown": "Reports method references, like `MyClass::myMethod` and `myObject::myMethod`, and suggests replacing them with an equivalent lambda expression.\n\nLambda expressions can be easier to modify than method references.\n\nExample:\n\n\n System.out::println\n\nAfter the quick-fix is applied:\n\n\n s -> System.out.println(s)\n\nBy default, this inspection does not highlight the code in the editor, but only provides a quick-fix."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "MethodRefCanBeReplacedWithLambda",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IncorrectDateTimeFormat",
"shortDescription": {
"text": "Incorrect 'DateTimeFormat' pattern"
},
"fullDescription": {
"text": "Reports incorrect date time format patterns. The following errors are reported: Unsupported pattern letters, like \"TT\" Using reserved characters, like \"#\" Incorrect use of padding Unbalanced brackets Incorrect amount of consecutive pattern letters Examples: 'DateTimeFormatter.ofPattern(\"[][]]\"); // Closing ']' without previous opening '['\n DateTimeFormatter.ofPattern(\"TT\"); // Illegal pattern letter 'T'\n DateTimeFormatter.ofPattern(\"{\"); // Use of reserved character '{'\n DateTimeFormatter.ofPattern(\"MMMMMM\"); // Too many consecutive pattern letters 'M'' New in 2022.3",
"markdown": "Reports incorrect date time format patterns.\n\nThe following errors are reported:\n\n* Unsupported pattern letters, like \"TT\"\n* Using reserved characters, like \"#\"\n* Incorrect use of padding\n* Unbalanced brackets\n* Incorrect amount of consecutive pattern letters\n\nExamples:\n\n\n DateTimeFormatter.ofPattern(\"[][]]\"); // Closing ']' without previous opening '['\n DateTimeFormatter.ofPattern(\"TT\"); // Illegal pattern letter 'T'\n DateTimeFormatter.ofPattern(\"{\"); // Use of reserved character '{'\n DateTimeFormatter.ofPattern(\"MMMMMM\"); // Too many consecutive pattern letters 'M'\n\nNew in 2022.3"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "IncorrectDateTimeFormat",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BooleanParameter",
"shortDescription": {
"text": "'public' method with 'boolean' parameter"
},
"fullDescription": {
"text": "Reports public methods that accept a 'boolean' parameter. It's almost always bad practice to add a 'boolean' parameter to a public method (part of an API) if that method is not a setter. When reading code using such a method, it can be difficult to decipher what the 'boolean' stands for without looking at the source or documentation. This problem is also known as the boolean trap. The 'boolean' parameter can often be replaced with an 'enum'. Example: '// Warning: it's hard to understand what the\n // boolean parameters mean when looking at\n // a call to this method\n public boolean setPermission(File f,\n int access,\n boolean enable,\n boolean ownerOnly) {\n // ...\n }' Use the Only report methods with multiple boolean parameters option to warn only when a method contains more than one boolean parameter.",
"markdown": "Reports public methods that accept a `boolean` parameter.\n\nIt's almost always bad practice to add a `boolean` parameter to a public method (part of an API) if that method is not a setter.\nWhen reading code using such a method, it can be difficult to decipher what the `boolean` stands for without looking at\nthe source or documentation.\n\nThis problem is also known as [the boolean trap](https://ariya.io/2011/08/hall-of-api-shame-boolean-trap).\nThe `boolean` parameter can often be replaced with an `enum`.\n\nExample:\n\n\n // Warning: it's hard to understand what the\n // boolean parameters mean when looking at\n // a call to this method\n public boolean setPermission(File f,\n int access,\n boolean enable,\n boolean ownerOnly) {\n // ...\n }\n\n\nUse the **Only report methods with multiple boolean parameters** option to warn only when a method contains more than one boolean parameter."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "BooleanParameter",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Abstraction issues",
"index": 83,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CopyConstructorMissesField",
"shortDescription": {
"text": "Copy constructor misses field"
},
"fullDescription": {
"text": "Reports copy constructors that don't copy all the fields of the class. 'final' fields with initializers and 'transient' fields are considered unnecessary to copy. Example: 'class Point {\n\n private int x;\n private int y;\n\n Point(int x, int y) {\n this.x = x;\n this.y = y;\n }\n\n Point(Point other) {\n // fields x and y are not initialized\n }\n }' New in 2018.1",
"markdown": "Reports copy constructors that don't copy all the fields of the class.\n\n\n`final` fields with initializers and `transient` fields are considered unnecessary to copy.\n\n**Example:**\n\n\n class Point {\n\n private int x;\n private int y;\n\n Point(int x, int y) {\n this.x = x;\n this.y = y;\n }\n\n Point(Point other) {\n // fields x and y are not initialized\n }\n }\n\nNew in 2018.1"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "CopyConstructorMissesField",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CastCanBeRemovedNarrowingVariableType",
"shortDescription": {
"text": "Too weak variable type leads to unnecessary cast"
},
"fullDescription": {
"text": "Reports type casts that can be removed if the variable type is narrowed to the cast type. Example: 'Object x = \" string \";\n System.out.println(((String)x).trim());' Here, changing the type of 'x' to 'String' makes the cast redundant. The suggested quick-fix updates the variable type and removes all redundant casts on that variable: 'String x = \" string \";\n System.out.println(x.trim());' New in 2018.2",
"markdown": "Reports type casts that can be removed if the variable type is narrowed to the cast type.\n\nExample:\n\n\n Object x = \" string \";\n System.out.println(((String)x).trim());\n\n\nHere, changing the type of `x` to `String` makes the cast redundant. The suggested quick-fix updates the variable type and\nremoves all redundant casts on that variable:\n\n\n String x = \" string \";\n System.out.println(x.trim());\n\nNew in 2018.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CastCanBeRemovedNarrowingVariableType",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnsecureRandomNumberGeneration",
"shortDescription": {
"text": "Insecure random number generation"
},
"fullDescription": {
"text": "Reports any uses of 'java.lang.Random' or 'java.lang.Math.random()'. In secure environments, 'java.secure.SecureRandom' is a better choice, since is offers cryptographically secure random number generation. Example: 'long token = new Random().nextLong();'",
"markdown": "Reports any uses of `java.lang.Random` or `java.lang.Math.random()`.\n\n\nIn secure environments,\n`java.secure.SecureRandom` is a better choice, since is offers cryptographically secure\nrandom number generation.\n\n**Example:**\n\n\n long token = new Random().nextLong();\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnsecureRandomNumberGeneration",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Security",
"index": 32,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NullableProblems",
"shortDescription": {
"text": "@NotNull/@Nullable problems"
},
"fullDescription": {
"text": "Reports problems related to nullability annotations. Examples: Overriding methods are not annotated: 'abstract class A {\n @NotNull abstract String m();\n}\nclass B extends A {\n String m() { return \"empty string\"; }\n}' Annotated primitive types: '@NotNull int myFoo;' Both '@Nullable' and '@NotNull' are present on the same member: '@Nullable @NotNull String myFooString;' Collection of nullable elements is assigned into a collection of non-null elements: 'void testList(List<@Nullable String> nullableList) {\n List<@NotNull String> list2 = nullableList;\n}' Use the Configure Annotations button to specify nullability annotations and the checkboxes to fine-tune where the inspection should provide warnings. This inspection only reports if the language level of the project or module is 5 or higher, and nullability annotations are available on the classpath.",
"markdown": "Reports problems related to nullability annotations.\n\n**Examples:**\n\n* Overriding methods are not annotated:\n\n\n abstract class A {\n @NotNull abstract String m();\n }\n class B extends A {\n String m() { return \"empty string\"; }\n }\n \n* Annotated primitive types: `@NotNull int myFoo;`\n* Both `@Nullable` and `@NotNull` are present on the same member: `@Nullable @NotNull String myFooString;`\n* Collection of nullable elements is assigned into a collection of non-null elements:\n\n\n void testList(List<@Nullable String> nullableList) {\n List<@NotNull String> list2 = nullableList;\n }\n \nUse the **Configure Annotations** button to specify nullability annotations and the checkboxes to fine-tune where the inspection should provide warnings.\n\nThis inspection only reports if the language level of the project or module is 5 or higher,\nand nullability annotations are available on the classpath."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NullableProblems",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs/Nullability problems",
"index": 249,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EqualsBetweenInconvertibleTypes",
"shortDescription": {
"text": "'equals()' between objects of inconvertible types"
},
"fullDescription": {
"text": "Reports calls to 'equals()' where the target and argument are of incompatible types. While such a call might theoretically be useful, most likely it is a bug. Example: 'new HashSet<String>().equals(new TreeSet<Integer>());'",
"markdown": "Reports calls to `equals()` where the target and argument are of incompatible types.\n\nWhile such a call might theoretically be useful, most likely it is a bug.\n\n**Example:**\n\n\n new HashSet<String>().equals(new TreeSet<Integer>());\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "EqualsBetweenInconvertibleTypes",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SynchronizationOnGetClass",
"shortDescription": {
"text": "Synchronization on 'getClass()'"
},
"fullDescription": {
"text": "Reports synchronization on a call to 'getClass()'. If the class containing the synchronization is subclassed, the subclass will synchronize on a different class object. Usually the call to 'getClass()' can be replaced with a class literal expression, for example 'String.class'. An even better solution is synchronizing on a 'private static final' lock object, access to which can be completely controlled. Example: 'synchronized(getClass()) {}'",
"markdown": "Reports synchronization on a call to `getClass()`.\n\n\nIf the class containing the synchronization is subclassed, the subclass\nwill\nsynchronize on a different class object. Usually the call to `getClass()` can be replaced with a class literal expression, for\nexample `String.class`. An even better solution is synchronizing on a `private static final` lock object, access to\nwhich can be completely controlled.\n\n**Example:**\n\n synchronized(getClass()) {}\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SynchronizationOnGetClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ThrownExceptionsPerMethod",
"shortDescription": {
"text": "Method with too many exceptions declared"
},
"fullDescription": {
"text": "Reports methods that have too many types of exceptions in its 'throws' list. Methods with too many exceptions declared are a good sign that your error handling code is getting overly complex. Use the Exceptions thrown limit field to specify the maximum number of exception types a method is allowed to have in its 'throws' list.",
"markdown": "Reports methods that have too many types of exceptions in its `throws` list.\n\nMethods with too many exceptions declared are a good sign that your error handling code is getting overly complex.\n\nUse the **Exceptions thrown limit** field to specify the maximum number of exception types a method is allowed to have in its `throws` list."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MethodWithTooExceptionsDeclared",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Method metrics",
"index": 139,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantThrows",
"shortDescription": {
"text": "Redundant 'throws' clause"
},
"fullDescription": {
"text": "Reports exceptions that are declared in a method's signature but never thrown by the method itself or its implementations and overriding methods. The inspection ignores methods related to serialization, for example the methods 'readObject()' and 'writeObject()'. Example: 'void method() throws InterruptedException {\n System.out.println();\n }' The quick-fix removes unnecessary exceptions from the declaration and normalizes redundant 'try'-'catch' statements: 'void method() {\n System.out.println();\n }' Note: Some exceptions may not be reported during in-editor highlighting for performance reasons. To see all results, run the inspection by selecting Code | Inspect Code or Code | Analyze Code | Run Inspection by Name from the main menu. Use the Ignore exceptions thrown by entry point methods option to not report exceptions thrown by for example 'main()' methods. Entry point methods can be configured in the settings of the Java | Declaration redundancy | Unused declaration inspection.",
"markdown": "Reports exceptions that are declared in a method's signature but never thrown by the method itself or its implementations and overriding methods.\n\nThe inspection ignores methods related to serialization, for example the methods `readObject()` and `writeObject()`.\n\n**Example:**\n\n\n void method() throws InterruptedException {\n System.out.println();\n }\n\nThe quick-fix removes unnecessary exceptions from the declaration and normalizes redundant `try`-`catch` statements:\n\n\n void method() {\n System.out.println();\n }\n\n\n**Note:** Some exceptions may not be reported during in-editor highlighting for performance reasons.\nTo see all results, run the inspection by selecting **Code \\| Inspect Code** or **Code \\| Analyze Code \\| Run Inspection by Name** from the main menu.\n\nUse the **Ignore exceptions thrown by entry point methods** option to not report exceptions thrown by\nfor example `main()` methods.\nEntry point methods can be configured in the settings of the\n[Java \\| Declaration redundancy \\| Unused declaration](settings://Errors?Unused%20Declaration%20entry%20point) inspection.\n\n<br />"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantThrows",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Declaration redundancy",
"index": 10,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PointlessBitwiseExpression",
"shortDescription": {
"text": "Pointless bitwise expression"
},
"fullDescription": {
"text": "Reports pointless bitwise expressions. Such expressions include applying the '&' operator to the maximum value for the given type, applying the 'or' operator to zero, and shifting by zero. Such expressions may be the result of automated refactorings not followed through to completion and are unlikely to be originally intended. Examples: '// Warning: operation is pointless and can be replaced with just `flags`\n // 0xFFFF_FFFF is the maximum value for an integer, and both literals are treated\n // as 32 bit integer literals.\n int bits = flags & 0xFFFF_FFFF;\n\n // Warning: operation is pointless and can be replaced with just `bits`\n // OR-ing with 0 always outputs the other operand.\n int or = bits | 0x0;\n\n // Warning: operation is pointless, as always results in 0\n int xor = or ^ or;'",
"markdown": "Reports pointless bitwise expressions.\n\n\nSuch expressions include applying the `&` operator to the maximum value for the given type, applying the\n`or` operator to zero, and shifting by zero. Such expressions may be the result of automated\nrefactorings not followed through to completion and are unlikely to be originally intended.\n\n**Examples:**\n\n\n // Warning: operation is pointless and can be replaced with just `flags`\n // 0xFFFF_FFFF is the maximum value for an integer, and both literals are treated\n // as 32 bit integer literals.\n int bits = flags & 0xFFFF_FFFF;\n\n // Warning: operation is pointless and can be replaced with just `bits`\n // OR-ing with 0 always outputs the other operand.\n int or = bits | 0x0;\n\n // Warning: operation is pointless, as always results in 0\n int xor = or ^ or;\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PointlessBitwiseExpression",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Bitwise operation issues",
"index": 231,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DuplicateThrows",
"shortDescription": {
"text": "Duplicate throws"
},
"fullDescription": {
"text": "Reports duplicate exceptions in a method 'throws' list. Example: 'void f() throws Exception, Exception {}' After the quick-fix is applied: 'void f() throws Exception {}' Use the Ignore exceptions subclassing others option to ignore exceptions subclassing other exceptions.",
"markdown": "Reports duplicate exceptions in a method `throws` list.\n\nExample:\n\n\n void f() throws Exception, Exception {}\n\nAfter the quick-fix is applied:\n\n\n void f() throws Exception {}\n\n\nUse the **Ignore exceptions subclassing others** option to ignore exceptions subclassing other exceptions."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DuplicateThrows",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Declaration redundancy",
"index": 10,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnstableTypeUsedInSignature",
"shortDescription": {
"text": "Unstable type is used in signature"
},
"fullDescription": {
"text": "Reports declarations of classes, methods, and fields that reference an unstable API type in the signature, but are not marked with the same unstable annotation. This inspection ensures that the signatures of a public API do not expose any unstable (internal, experimental) types. For example, if a method returns an experimental class, the method itself is considered experimental because incompatible changes of the type (deletion or move to another package) lead to incompatible method signature changes. Use the list below to specify which annotations mark an unstable API.",
"markdown": "Reports declarations of classes, methods, and fields that reference an unstable API type in the signature, but are not marked with the same unstable annotation.\n\n\nThis inspection ensures that the signatures of a public API do not expose any *unstable* (internal, experimental) types.\nFor example, if a method returns an *experimental* class, the method itself is considered *experimental*\nbecause incompatible changes of the type (deletion or move to another package) lead to incompatible method signature changes.\n\nUse the list below to specify which annotations mark an unstable API."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnstableTypeUsedInSignature",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JVM languages",
"index": 47,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PrivateMemberAccessBetweenOuterAndInnerClass",
"shortDescription": {
"text": "Synthetic accessor call"
},
"fullDescription": {
"text": "Reports references from a nested class to non-constant 'private' members of an outer class. For such references, javac will generate package-private synthetic accessor methods, which may compromise the security because members appearing to be private will in fact be accessible from the entire package. A nested class and its outer class are compiled to separate class files. The Java virtual machine normally prohibits access from a class to private fields and methods of another class. To enable access from a nested class to private members of an outer class, javac creates a package-private synthetic accessor method. By making the 'private' member package-private instead, the actual accessibility is made explicit. This also saves a little bit of memory, which may improve performance in resource constrained environments. This inspection only reports if the language level of the project or module is 10 or lower. Under Java 11 and higher accessor methods are not generated anymore, because of nest-based access control (JEP 181). Example: 'class Outer {\n private void x() {}\n\n class Inner {\n void y() {\n x();\n }\n }\n }' After the quick fix is applied: 'class Outer {\n void x() {}\n\n class Inner {\n void y() {\n x();\n }\n }\n }'",
"markdown": "Reports references from a nested class to non-constant `private` members of an outer class. For such references, javac will generate package-private synthetic accessor methods, which may compromise the security because members appearing to be private will in fact be accessible from the entire package.\n\n\nA nested class and its outer class are compiled to separate\nclass files. The Java virtual machine normally prohibits access from a class to private fields and methods of\nanother class. To enable access from a nested class to private members of an outer class, javac creates a package-private\nsynthetic accessor method.\n\n\nBy making the `private` member package-private instead, the actual accessibility is made explicit.\nThis also saves a little bit of memory, which may improve performance in resource constrained environments.\n\n\nThis inspection only reports if the language level of the project or module is 10 or lower.\nUnder Java 11 and higher accessor methods are not generated anymore,\nbecause of nest-based access control ([JEP 181](https://openjdk.org/jeps/181)).\n\n**Example:**\n\n\n class Outer {\n private void x() {}\n\n class Inner {\n void y() {\n x();\n }\n }\n }\n\nAfter the quick fix is applied:\n\n\n class Outer {\n void x() {}\n\n class Inner {\n void y() {\n x();\n }\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SyntheticAccessorCall",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance/Embedded",
"index": 178,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StringOperationCanBeSimplified",
"shortDescription": {
"text": "Redundant 'String' operation"
},
"fullDescription": {
"text": "Reports redundant calls to 'String' constructors and methods like 'toString()' or 'substring()' that can be replaced with a simpler expression. For example, calls to these methods can be safely removed in code like '\"string\".substring(0)', '\"string\".toString()', or 'new StringBuilder().toString().substring(1,3)'. Example: 'System.out.println(new String(\"message\"));' After the quick-fix is applied: 'System.out.println(\"message\");' Note that the quick-fix removes the redundant constructor call, and this may affect 'String' referential equality. If you need to preserve it, even though it is considered bad practice, suppress the warning or use the inspection setting to ignore redundant 'String' constructor calls. Use the Do not report String constructor calls option below to not report code like the example above. This will avoid changing the outcome of String comparisons with '==' or '!=' after applying the quick-fix in code that uses 'new String()' calls to guarantee a different object identity. New in 2018.1",
"markdown": "Reports redundant calls to `String` constructors and methods like `toString()` or `substring()` that can be replaced with a simpler expression.\n\nFor example, calls to these methods can be safely removed in code\nlike `\"string\".substring(0)`, `\"string\".toString()`, or\n`new StringBuilder().toString().substring(1,3)`.\n\nExample:\n\n\n System.out.println(new String(\"message\"));\n\nAfter the quick-fix is applied:\n\n\n System.out.println(\"message\");\n\n\nNote that the quick-fix removes the redundant constructor call, and this may affect `String` referential equality.\nIf you need to preserve it, even though it is considered bad practice, suppress the warning or use the inspection setting to ignore\nredundant `String` constructor calls.\n\n\nUse the **Do not report String constructor calls** option below to not report code like the example above.\nThis will avoid changing the outcome of String comparisons with `==` or `!=` after applying\nthe quick-fix in code that uses `new String()` calls to guarantee a different object identity.\n\nNew in 2018.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "StringOperationCanBeSimplified",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassReferencesSubclass",
"shortDescription": {
"text": "Class references one of its subclasses"
},
"fullDescription": {
"text": "Reports classes which contain references to one of their subclasses. Such references may be confusing and violate several rules of object-oriented design. Example: 'class Entity {\n // Warning: the class references its subclass\n void compare(SimpleEntity entity) {\n ...\n }\n }\n class SimpleEntity extends Entity {\n ...\n }'",
"markdown": "Reports classes which contain references to one of their subclasses. Such references may be confusing and violate several rules of object-oriented design.\n\nExample:\n\n\n class Entity {\n // Warning: the class references its subclass\n void compare(SimpleEntity entity) {\n ...\n }\n }\n class SimpleEntity extends Entity {\n ...\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ClassReferencesSubclass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Abstraction issues",
"index": 83,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IterableUsedAsVararg",
"shortDescription": {
"text": "Iterable is used as vararg"
},
"fullDescription": {
"text": "Reports suspicious usages of 'Collection' or 'Iterable' in vararg method calls. For example, in the following method: '<T> boolean contains(T needle, T... haystack) {...}' a call like 'if(contains(\"item\", listOfStrings)) {...}' looks suspicious as the list will be wrapped into a single element array. Such code can be successfully compiled and will likely run without exceptions, but it's probably used by mistake. New in 2019.2",
"markdown": "Reports suspicious usages of `Collection` or `Iterable` in vararg method calls.\n\nFor example, in the following method:\n\n\n <T> boolean contains(T needle, T... haystack) {...}\n\na call like\n\n\n if(contains(\"item\", listOfStrings)) {...}\n\nlooks suspicious as the list will be wrapped into a single element array.\nSuch code can be successfully compiled and will likely run without\nexceptions, but it's probably used by mistake.\n\nNew in 2019.2"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "IterableUsedAsVararg",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MethodNameSameAsParentName",
"shortDescription": {
"text": "Method name same as parent class name"
},
"fullDescription": {
"text": "Reports methods that have the same name as the superclass of the method's class, as such a method name may be confusing. This inspection doesn't check interfaces or superclasses deep in the hierarchy. Example: 'class Parent {}\n class Child extends Parent {\n public Parent Parent() {\n return null;\n }\n }' A quick-fix that renames such methods is available only in the editor.",
"markdown": "Reports methods that have the same name as the superclass of the method's class, as such a method name may be confusing.\n\nThis inspection doesn't check interfaces or superclasses deep in the hierarchy.\n\n**Example:**\n\n\n class Parent {}\n class Child extends Parent {\n public Parent Parent() {\n return null;\n }\n }\n\nA quick-fix that renames such methods is available only in the editor."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MethodNameSameAsParentName",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Naming conventions/Method",
"index": 107,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AmbiguousFieldAccess",
"shortDescription": {
"text": "Access to inherited field looks like access to element from surrounding code"
},
"fullDescription": {
"text": "Reports access to a superclass field from an anonymous, inner or local class, if a local variable, parameter, or field with the same name is available in the code surrounding the class. In this case it may seem that an element from the surrounding code is accessed, when in fact it is an access to a field from the superclass. To clarify the intent of the code, it is recommended to add an explicit 'super' qualifier to the field access. Example: 'class First {\n protected String ambiguous;\n }\n class Second {\n void foo(String ambiguous) {\n new First() {\n {\n System.out.println(ambiguous); // the field is accessed, not the parameter\n }\n };\n }\n }' After the quick-fix is applied: 'class First {\n protected String ambiguous;\n }\n class Second {\n void foo(String ambiguous) {\n new First() {\n {\n System.out.println(super.ambiguous);\n }\n };\n }\n }'",
"markdown": "Reports access to a superclass field from an anonymous, inner or local class, if a local variable, parameter, or field with the same name is available in the code surrounding the class. In this case it may seem that an element from the surrounding code is accessed, when in fact it is an access to a field from the superclass.\n\n\nTo clarify the intent of the code, it is recommended to add an explicit\n`super` qualifier to the field access.\n\n**Example:**\n\n\n class First {\n protected String ambiguous;\n }\n class Second {\n void foo(String ambiguous) {\n new First() {\n {\n System.out.println(ambiguous); // the field is accessed, not the parameter\n }\n };\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class First {\n protected String ambiguous;\n }\n class Second {\n void foo(String ambiguous) {\n new First() {\n {\n System.out.println(super.ambiguous);\n }\n };\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AmbiguousFieldAccess",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Visibility",
"index": 97,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonProtectedConstructorInAbstractClass",
"shortDescription": {
"text": "Public constructor in abstract class"
},
"fullDescription": {
"text": "Reports 'public' constructors of 'abstract' classes. Constructors of 'abstract' classes can only be called from the constructors of their subclasses, declaring them 'public' may be confusing. The quick-fix makes such constructors protected. Example: 'public abstract class Foo {\n public Foo () { // warning: has 'public' modifier\n /* ... */\n }\n }' After the quick-fix is applied: 'public abstract class Foo {\n protected Foo () {\n /* ... */\n }\n }' Configure the inspection: Use the Ignore for non-public classes option below to ignore 'public' constructors in non-public classes.",
"markdown": "Reports `public` constructors of `abstract` classes.\n\n\nConstructors of `abstract` classes can only be called from the constructors of\ntheir subclasses, declaring them `public` may be confusing.\n\nThe quick-fix makes such constructors protected.\n\n**Example:**\n\n\n public abstract class Foo {\n public Foo () { // warning: has 'public' modifier\n /* ... */\n }\n }\n\nAfter the quick-fix is applied:\n\n\n public abstract class Foo {\n protected Foo () {\n /* ... */\n }\n }\n\nConfigure the inspection:\n\nUse the **Ignore for non-public classes** option below to ignore `public` constructors in non-public classes."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ConstructorNotProtectedInAbstractClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Inheritance issues",
"index": 159,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ComparableImplementedButEqualsNotOverridden",
"shortDescription": {
"text": "'Comparable' implemented but 'equals()' not overridden"
},
"fullDescription": {
"text": "Reports classes that implement 'java.lang.Comparable' but do not override 'equals()'. If 'equals()' is not overridden, the 'equals()' implementation is not consistent with the 'compareTo()' implementation. If an object of such a class is added to a collection such as 'java.util.SortedSet', this collection will violate the contract of 'java.util.Set', which is defined in terms of 'equals()'. Example: 'class Length implements Comparable<Length> {\n private int cm = 0;\n\n @Override\n public int compareTo(@NotNull Length o) {\n if (cm == o.cm) return 0;\n return cm < o.cm ? -1 : 1;\n }\n }' After the quick fix is applied: 'class Length implements Comparable<Length> {\n private int cm = 0;\n\n @Override\n public int compareTo(@NotNull Length o) {\n if (cm == o.cm) return 0;\n return cm < o.cm ? -1 : 1;\n }\n\n @Override\n public boolean equals(Object o) {\n return o instanceof Length && compareTo((Length) o) == 0;\n }\n }'",
"markdown": "Reports classes that implement `java.lang.Comparable` but do not override `equals()`.\n\n\nIf `equals()`\nis not overridden, the `equals()` implementation is not consistent with\nthe `compareTo()` implementation. If an object of such a class is added\nto a collection such as `java.util.SortedSet`, this collection will violate\nthe contract of `java.util.Set`, which is defined in terms of\n`equals()`.\n\n**Example:**\n\n\n class Length implements Comparable<Length> {\n private int cm = 0;\n\n @Override\n public int compareTo(@NotNull Length o) {\n if (cm == o.cm) return 0;\n return cm < o.cm ? -1 : 1;\n }\n }\n\nAfter the quick fix is applied:\n\n\n class Length implements Comparable<Length> {\n private int cm = 0;\n\n @Override\n public int compareTo(@NotNull Length o) {\n if (cm == o.cm) return 0;\n return cm < o.cm ? -1 : 1;\n }\n\n @Override\n public boolean equals(Object o) {\n return o instanceof Length && compareTo((Length) o) == 0;\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ComparableImplementedButEqualsNotOverridden",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MapReplaceableByEnumMap",
"shortDescription": {
"text": "'Map' can be replaced with 'EnumMap'"
},
"fullDescription": {
"text": "Reports instantiations of 'java.util.Map' objects whose key types are enumerated classes. Such 'java.util.Map' objects can be replaced with 'java.util.EnumMap' objects. 'java.util.EnumMap' implementations can be much more efficient because the underlying data structure is a simple array. Example: 'Map<MyEnum, String> myEnums = new HashMap<>();' After the quick-fix is applied: 'Map<MyEnum, String> myEnums = new EnumMap<>(MyEnum.class);'",
"markdown": "Reports instantiations of `java.util.Map` objects whose key types are enumerated classes. Such `java.util.Map` objects can be replaced with `java.util.EnumMap` objects.\n\n\n`java.util.EnumMap` implementations can be much more efficient\nbecause the underlying data structure is a simple array.\n\n**Example:**\n\n\n Map<MyEnum, String> myEnums = new HashMap<>();\n\nAfter the quick-fix is applied:\n\n\n Map<MyEnum, String> myEnums = new EnumMap<>(MyEnum.class);\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MapReplaceableByEnumMap",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReturnNull",
"shortDescription": {
"text": "Return of 'null'"
},
"fullDescription": {
"text": "Reports 'return' statements with 'null' return values. While occasionally useful, this construct may make the code more prone to failing with a 'NullPointerException'. If a method is designed to return 'null', it is suggested to mark it with the '@Nullable' annotation - such methods will be ignored by this inspection. Example: 'class Person {\n public String getName () {\n return null;\n }\n }' After the quick-fix is applied: 'class Person {\n @Nullable\n public String getName () {\n return null;\n }\n }' If the return type is 'java.util.Optional', an additional quick-fix to convert 'null' to 'Optional.empty()' is suggested. Use the following options to configure the inspection: Whether to ignore 'private' methods. This will also ignore return of 'null' from anonymous classes and lambdas. Whether 'null' values on array returns, collection object returns, plain object returns, or a combination of the three should be reported. Return of 'null' in methods with return type 'java.util.Optional' are always reported. Click Configure annotations to specify which annotations should be considered 'nullable'.",
"markdown": "Reports `return` statements with `null` return values. While occasionally useful, this construct may make the code more prone to failing with a `NullPointerException`.\n\n\nIf a method is designed to return `null`, it is suggested to mark it with the\n`@Nullable` annotation - such methods will be ignored by this inspection.\n\n**Example:**\n\n\n class Person {\n public String getName () {\n return null;\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class Person {\n @Nullable\n public String getName () {\n return null;\n }\n }\n\n\nIf the return type is `java.util.Optional`, an additional quick-fix to convert\n`null` to `Optional.empty()` is suggested.\n\n\nUse the following options to configure the inspection:\n\n* Whether to ignore `private` methods. This will also ignore return of `null` from anonymous classes and lambdas.\n* Whether `null` values on array returns, collection object returns, plain object returns, or a combination of the three should be reported. Return of `null` in methods with return type `java.util.Optional` are always reported.\n* Click **Configure annotations** to specify which annotations should be considered 'nullable'."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ReturnOfNull",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs/Nullability problems",
"index": 249,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnpredictableBigDecimalConstructorCall",
"shortDescription": {
"text": "Unpredictable 'BigDecimal' constructor call"
},
"fullDescription": {
"text": "Reports calls to 'BigDecimal' constructors that accept a 'double' value. These constructors produce 'BigDecimal' that is exactly equal to the supplied 'double' value. However, because doubles are encoded in the IEEE 754 64-bit double-precision binary floating-point format, the exact value can be unexpected. For example, 'new BigDecimal(0.1)' yields a 'BigDecimal' object. Its value is '0.1000000000000000055511151231257827021181583404541015625' which is the nearest number to 0.1 representable as a double. To get 'BigDecimal' that stores the same value as written in the source code, use either 'new BigDecimal(\"0.1\")' or 'BigDecimal.valueOf(0.1)'. Example: 'class Constructor {\n void foo() {\n new BigDecimal(0.1);\n }\n }' After the quick-fix is applied: 'class Constructor {\n void foo() {\n new BigDecimal(\"0.1\");\n }\n }'",
"markdown": "Reports calls to `BigDecimal` constructors that accept a `double` value. These constructors produce `BigDecimal` that is exactly equal to the supplied `double` value. However, because doubles are encoded in the IEEE 754 64-bit double-precision binary floating-point format, the exact value can be unexpected.\n\nFor example, `new BigDecimal(0.1)` yields a `BigDecimal` object. Its value is\n`0.1000000000000000055511151231257827021181583404541015625`\nwhich is the nearest number to 0.1 representable as a double.\nTo get `BigDecimal` that stores the same value as written in the source code,\nuse either `new BigDecimal(\"0.1\")` or `BigDecimal.valueOf(0.1)`.\n\n**Example:**\n\n\n class Constructor {\n void foo() {\n new BigDecimal(0.1);\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class Constructor {\n void foo() {\n new BigDecimal(\"0.1\");\n }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "UnpredictableBigDecimalConstructorCall",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues",
"index": 49,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConditionalBreakInInfiniteLoop",
"shortDescription": {
"text": "Conditional break inside loop"
},
"fullDescription": {
"text": "Reports conditional breaks at the beginning or at the end of a loop and suggests adding a loop condition instead to shorten the code. Example: 'while (true) {\n if (i == 23) break;\n i++;\n }' After the quick fix is applied: 'while (i != 23) {\n i++;\n }'",
"markdown": "Reports conditional breaks at the beginning or at the end of a loop and suggests adding a loop condition instead to shorten the code.\n\nExample:\n\n\n while (true) {\n if (i == 23) break;\n i++;\n }\n\nAfter the quick fix is applied:\n\n\n while (i != 23) {\n i++;\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ConditionalBreakInInfiniteLoop",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantClassCall",
"shortDescription": {
"text": "Redundant 'isInstance()' or 'cast()' call"
},
"fullDescription": {
"text": "Reports redundant calls of 'java.lang.Class' methods. For example, 'Xyz.class.isInstance(object)' can be replaced with 'object instanceof Xyz'. The instanceof check is preferred: even though the performance will probably be the same as these methods are intrinsics, they better indicate a static check. New in 2018.2",
"markdown": "Reports redundant calls of `java.lang.Class` methods.\n\nFor example, `Xyz.class.isInstance(object)` can be replaced with `object instanceof Xyz`.\nThe instanceof check is preferred: even though the performance will probably be the same as these methods are intrinsics,\nthey better indicate a static check.\n\nNew in 2018.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantClassCall",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IfStatementWithIdenticalBranches",
"shortDescription": {
"text": "'if' statement with identical branches"
},
"fullDescription": {
"text": "Reports 'if' statements in which common parts can be extracted from the branches. These common parts are independent from the condition and make 'if' statements harder to understand. Example: 'if (x > 12) {\n doSomethingBefore();\n doSomethingDifferent1();\n doSomethingAfter();\n } else {\n doSomethingBefore();\n doSomethingDifferent2();\n doSomethingAfter();\n }' After the quick-fix is applied: 'doSomethingBefore();\n if (x > 12) {\n doSomethingDifferent1();\n } else {\n doSomethingDifferent2();\n }\n doSomethingAfter();' Updated in 2018.1",
"markdown": "Reports `if` statements in which common parts can be extracted from the branches.\n\nThese common parts are independent from the condition and make `if` statements harder to understand.\n\nExample:\n\n\n if (x > 12) {\n doSomethingBefore();\n doSomethingDifferent1();\n doSomethingAfter();\n } else {\n doSomethingBefore();\n doSomethingDifferent2();\n doSomethingAfter();\n }\n\nAfter the quick-fix is applied:\n\n\n doSomethingBefore();\n if (x > 12) {\n doSomethingDifferent1();\n } else {\n doSomethingDifferent2();\n }\n doSomethingAfter();\n\nUpdated in 2018.1"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "IfStatementWithIdenticalBranches",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InterfaceWithOnlyOneDirectInheritor",
"shortDescription": {
"text": "Interface with a single direct inheritor"
},
"fullDescription": {
"text": "Reports interfaces that have precisely one direct inheritor. While such interfaces may offer admirable clarity of design, in memory-constrained or bandwidth-limited environments, they needlessly increase the total footprint of the application. Consider merging the interface with its inheritor. This inspection is intended for Java ME and other highly resource constrained environments. Applying the results of this inspection without consideration might have negative effects on code clarity and design.",
"markdown": "Reports interfaces that have precisely one direct inheritor. While such interfaces may offer admirable clarity of design, in memory-constrained or bandwidth-limited environments, they needlessly increase the total footprint of the application. Consider merging the interface with its inheritor.\n\n\nThis inspection is intended for Java ME and other highly resource constrained environments.\nApplying the results of this inspection without consideration might have negative effects on code clarity and design."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "InterfaceWithOnlyOneDirectInheritor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance/Embedded",
"index": 178,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SerializableHasSerializationMethods",
"shortDescription": {
"text": "Serializable class without 'readObject()' and 'writeObject()'"
},
"fullDescription": {
"text": "Reports 'Serializable' classes that do not implement 'readObject()' and 'writeObject()' methods. If 'readObject()' and 'writeObject()' methods are not implemented, the default serialization algorithms are used, which may be sub-optimal for performance and compatibility in many environments. Use the following options to configure the inspection: List classes whose inheritors should not be reported by this inspection. This is meant for classes that inherit 'Serializable' from a superclass but are not intended for serialization. Whether to ignore 'Serializable' classes without non-static fields. Whether to ignore 'Serializable' anonymous classes.",
"markdown": "Reports `Serializable` classes that do not implement `readObject()` and `writeObject()` methods.\n\n\nIf `readObject()` and `writeObject()` methods are not implemented,\nthe default serialization algorithms are used,\nwhich may be sub-optimal for performance and compatibility in many environments.\n\n\nUse the following options to configure the inspection:\n\n* List classes whose inheritors should not be reported by this inspection. This is meant for classes that inherit `Serializable` from a superclass but are not intended for serialization.\n* Whether to ignore `Serializable` classes without non-static fields.\n* Whether to ignore `Serializable` anonymous classes."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SerializableHasSerializationMethods",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Serialization issues",
"index": 54,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IdempotentLoopBody",
"shortDescription": {
"text": "Idempotent loop body"
},
"fullDescription": {
"text": "Reports loops whose second and all subsequent iterations do not produce any additional side effects other than the one produced by the first iteration, which can indicate a programming error. Such loops may iterate only zero, one, or infinite number of times. If the infinite number of times case is unreachable, such a loop can be replaced with an 'if' statement. Otherwise, there's a possibility that the program can get stuck. Example: 'public void foo(String baseName, String names) {\n int suffix = 1;\n String name = baseName;\n while (names.contains(name)) {\n // error: suffix is not updated making loop body idempotent\n name = baseName + suffix;\n }\n }' New in 2018.1",
"markdown": "Reports loops whose second and all subsequent iterations do not produce any additional side effects other than the one produced by the first iteration, which can indicate a programming error.\n\nSuch loops may iterate only zero, one, or infinite number of times.\nIf the infinite number of times case is unreachable, such a loop can be replaced with an `if` statement.\nOtherwise, there's a possibility that the program can get stuck.\n\nExample:\n\n\n public void foo(String baseName, String names) {\n int suffix = 1;\n String name = baseName;\n while (names.contains(name)) {\n // error: suffix is not updated making loop body idempotent\n name = baseName + suffix;\n }\n }\n\nNew in 2018.1"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "IdempotentLoopBody",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FieldNamingConvention",
"shortDescription": {
"text": "Field naming convention"
},
"fullDescription": {
"text": "Reports fields whose names are too short, too long, or do not follow the specified regular expression pattern. Example: if the inspection is enabled for constants, and the minimum specified length for a field name is 5 (the default), the following constant produces a warning because the length of its name is 3, which is less than 5: 'public static final int MAX = 42;'. A quick-fix that renames such fields is available only in the editor. Configure the inspection: Use the list in the Options section to specify which fields should be checked. Deselect the checkboxes for the fields for which you want to skip the check. For each field type, specify the minimum length, maximum length, and the regular expression expected for field names using the provided input fields. Specify 0 in the length fields to skip the corresponding checks. Regular expressions should be specified in the standard 'java.util.regex' format.",
"markdown": "Reports fields whose names are too short, too long, or do not follow the specified regular expression pattern.\n\n**Example:** if the inspection is enabled for constants, and the minimum specified length for a field name is 5 (the default), the following constant\nproduces a warning because the length of its name is 3, which is less than 5: `public static final int MAX = 42;`.\n\nA quick-fix that renames such fields is available only in the editor.\n\nConfigure the inspection:\n\nUse the list in the **Options** section to specify which fields should be checked. Deselect the checkboxes for the fields for which\nyou want to skip the check.\n\nFor each field type, specify the minimum length, maximum length, and the regular expression expected for field names using the\nprovided input fields.\nSpecify **0** in the length fields to skip the corresponding checks.\n\nRegular expressions should be specified in the standard\n`java.util.regex` format."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FieldNamingConvention",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Naming conventions",
"index": 106,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SameParameterValue",
"shortDescription": {
"text": "Method parameter always has the same value"
},
"fullDescription": {
"text": "Reports method parameters that always have the same constant value. Example: 'static void printPoint(int x, int y) { // x is always 0\n System.out.println(x + \", \" + y);\n }\n\n public static void main(String[] args) {\n printPoint(0, 1);\n printPoint(0, 2);\n }' The quick-fix inlines the constant value. This may simplify the method implementation. Use the Ignore when a quick-fix can not be provided option to suppress the inspections when: the parameter is modified inside the method the parameter value that is being passed is a reference to an inaccessible field (Java ony) the parameter is a vararg (Java only) Use the Maximal method visibility option to control the maximum visibility of methods to be reported. Use the Minimal method usage count to report parameter field to specify the minimal number of method usages with the same parameter value.",
"markdown": "Reports method parameters that always have the same constant value.\n\nExample:\n\n\n static void printPoint(int x, int y) { // x is always 0\n System.out.println(x + \", \" + y);\n }\n\n public static void main(String[] args) {\n printPoint(0, 1);\n printPoint(0, 2);\n }\n\nThe quick-fix inlines the constant value. This may simplify the method implementation.\n\n\nUse the **Ignore when a quick-fix can not be provided** option to suppress the inspections when:\n\n* the parameter is modified inside the method\n* the parameter value that is being passed is a reference to an inaccessible field (Java ony)\n* the parameter is a vararg (Java only)\n\n\nUse the **Maximal method visibility** option to control the maximum visibility of methods to be reported.\n\n\nUse the **Minimal method usage count to report parameter** field to specify the minimal number of method usages with the same parameter value."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SameParameterValue",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Declaration redundancy",
"index": 10,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CatchMayIgnoreException",
"shortDescription": {
"text": "Catch block may ignore exception"
},
"fullDescription": {
"text": "Reports 'catch' blocks that are empty or may ignore an exception. While occasionally intended, empty 'catch' blocks may complicate debugging. Also, ignoring a 'catch' parameter might be wrong. Finally, the static code analyzer reports if it detects that a 'catch' block may silently ignore important VM exceptions like 'NullPointerException'. Ignoring such an exception (without logging or rethrowing it) may hide a bug. The inspection won't report any 'catch' parameters named 'ignore' or 'ignored'. Conversely, the inspection will warn you about any 'catch' parameters named 'ignore' or 'ignored' that are actually in use. Additionally, the inspection won't report 'catch' parameters inside test sources named 'expected' or 'ok'. You can use a quick-fix to change the exception name to 'ignored'. For empty catch blocks, an additional quick-fix to generate the catch body is suggested. You can modify the \"Catch Statement Body\" template on the Code tab in Settings | Editor | File and Code Templates. Example: 'try {\n throwingMethod();\n } catch (IOException ex) {\n\n }' After the quick-fix is applied: 'try {\n System.out.println(System.in.read());\n } catch (IOException ignored) {\n\n }' Configure the inspection: Use the Do not warn when 'catch' block contains a comment option to ignore 'catch' blocks with comments. Use the Do not warn when 'catch' block is not empty option to ignore 'catch' blocks that contain statements or comments inside, while the variable itself is not used. Use the Do not warn when exception named 'ignore(d)' is not actually ignored option to ignore variables named 'ignored' if they are in use. New in 2018.1",
"markdown": "Reports `catch` blocks that are empty or may ignore an exception.\n\nWhile occasionally intended, empty `catch` blocks may complicate debugging.\nAlso, ignoring a `catch` parameter might be wrong.\nFinally, the static code analyzer reports if it detects that a `catch` block may silently ignore important VM\nexceptions like `NullPointerException`. Ignoring such an exception\n(without logging or rethrowing it) may hide a bug.\n\n\nThe inspection won't report any `catch` parameters named `ignore` or `ignored`.\nConversely, the inspection will warn you about any `catch` parameters named `ignore` or `ignored` that are actually in use.\nAdditionally, the inspection won't report `catch` parameters inside test sources named `expected` or `ok`.\n\n\nYou can use a quick-fix to change the exception name to `ignored`.\nFor empty **catch** blocks, an additional quick-fix to generate the **catch** body is suggested.\nYou can modify the \"Catch Statement Body\" template on the Code tab in\n[Settings \\| Editor \\| File and Code Templates](settings://fileTemplates).\n\n**Example:**\n\n\n try {\n throwingMethod();\n } catch (IOException ex) {\n\n }\n\nAfter the quick-fix is applied:\n\n\n try {\n System.out.println(System.in.read());\n } catch (IOException ignored) {\n\n }\n\nConfigure the inspection:\n\n* Use the **Do not warn when 'catch' block contains a comment** option to ignore `catch` blocks with comments.\n* Use the **Do not warn when 'catch' block is not empty** option to ignore `catch` blocks that contain statements or comments inside, while the variable itself is not used.\n* Use the **Do not warn when exception named 'ignore(d)' is not actually ignored** option to ignore variables named `ignored` if they are in use.\n\nNew in 2018.1"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "CatchMayIgnoreException",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Error handling",
"index": 9,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FieldNotUsedInToString",
"shortDescription": {
"text": "Field not used in 'toString()' method"
},
"fullDescription": {
"text": "Reports any fields that are not used in the 'toString()' method of a class. This inspection can help discover the fields that were added after the 'toString()' method was created and for which the 'toString()' method was not updated. The quick-fix regenerates the 'toString()' method. In the Generate | toString() dialog, it is possible to exclude fields from this check. This inspection will also check for problems with getter methods if the Enable getters in code generation option is enabled there. Example: 'public class Relevant {\n private String name; // not used in toString()\n private int index;\n private int length;\n\n @Override\n public String toString() {\n return \"Relevant{\" + \"index=\" + index +\n \", length=\" + length + '}';\n }\n }' After the quick-fix is applied: 'public class Relevant {\n private String name;\n private int index;\n private int length;\n\n @Override\n public String toString() {\n return \"Relevant{\" + \"name='\" + name + '\\'' +\n \", index=\" + index + \", length=\" + length + '}';\n }\n }'",
"markdown": "Reports any fields that are not used in the `toString()` method of a class.\n\nThis inspection can help discover the\nfields that were added after the `toString()` method was created and for which the `toString()` method was not\nupdated. The quick-fix regenerates the `toString()` method.\n\n\nIn the **Generate \\| toString()** dialog, it is possible to exclude fields from this check.\nThis inspection will also check for problems with getter methods if the *Enable getters in code generation* option is enabled there.\n\nExample:\n\n\n public class Relevant {\n private String name; // not used in toString()\n private int index;\n private int length;\n\n @Override\n public String toString() {\n return \"Relevant{\" + \"index=\" + index +\n \", length=\" + length + '}';\n }\n }\n\nAfter the quick-fix is applied:\n\n\n public class Relevant {\n private String name;\n private int index;\n private int length;\n\n @Override\n public String toString() {\n return \"Relevant{\" + \"name='\" + name + '\\'' +\n \", index=\" + index + \", length=\" + length + '}';\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FieldNotUsedInToString",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/toString() issues",
"index": 263,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SynchronizeOnValueBasedClass",
"shortDescription": {
"text": "Value-based warnings"
},
"fullDescription": {
"text": "Reports attempts to synchronize on an instance of a value-based class that produce compile-time warnings and raise run-time exceptions starting from Java 16. For example, 'java.lang.Double' is annotated with 'jdk.internal.ValueBased', so the following code will produce a compile-time warning: 'Double d = 20.0;\nsynchronized (d) { ... } // javac warning' New in 2021.1",
"markdown": "Reports attempts to synchronize on an instance of a value-based class that produce compile-time warnings and raise run-time exceptions starting from Java 16.\n\n\nFor example, `java.lang.Double` is annotated with `jdk.internal.ValueBased`, so the following code will\nproduce a compile-time warning:\n\n\n Double d = 20.0;\n synchronized (d) { ... } // javac warning\n\nNew in 2021.1"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "synchronization",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Compiler issues",
"index": 217,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SwitchStatementsWithoutDefault",
"shortDescription": {
"text": "'switch' statement without 'default' branch"
},
"fullDescription": {
"text": "Reports 'switch' statements that do not contain 'default' labels. Adding the 'default' label guarantees that all possible scenarios are covered, and it becomes easier to make assumptions about the current state of the program. Note that by default, the inspection does not report 'switch' statements if all cases for enums or 'sealed' classes are covered. Use the Ignore exhaustive switch statements option if you want to change this behavior.",
"markdown": "Reports `switch` statements that do not contain `default` labels.\n\nAdding the `default` label guarantees that all possible scenarios are covered, and it becomes\neasier to make assumptions about the current state of the program.\n\n\nNote that by default, the inspection does not report `switch` statements if all cases for enums or `sealed` classes are covered.\nUse the **Ignore exhaustive switch statements** option if you want to change this behavior."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "SwitchStatementWithoutDefaultBranch",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HardcodedLineSeparators",
"shortDescription": {
"text": "Hardcoded line separator"
},
"fullDescription": {
"text": "Reports linefeed ('\\n') and carriage return ('\\r') character escape sequences used in string literals, character literals or text blocks. These characters are commonly used as line separators, and portability may suffer if they are hardcoded. Example: 'String count = \"first\\nsecond\\rthird\";'",
"markdown": "Reports linefeed (`\\n`) and carriage return (`\\r`) character escape sequences used in string literals, character literals or text blocks. These characters are commonly used as line separators, and portability may suffer if they are hardcoded.\n\n**Example:**\n\n\n String count = \"first\\nsecond\\rthird\";\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "HardcodedLineSeparator",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Portability",
"index": 179,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LabeledStatement",
"shortDescription": {
"text": "Labeled statement"
},
"fullDescription": {
"text": "Reports labeled statements that can complicate refactorings and control flow of the method. Example: 'label:\n while (true) {\n // code\n }'",
"markdown": "Reports labeled statements that can complicate refactorings and control flow of the method.\n\nExample:\n\n\n label:\n while (true) {\n // code\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LabeledStatement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DesignForExtension",
"shortDescription": {
"text": "Design for extension"
},
"fullDescription": {
"text": "Reports methods which are not 'static', 'private', 'final' or 'abstract', and whose bodies are not empty. Coding in a style that avoids such methods protects the contracts of classes from being broken by their subclasses. The benefit of this style is that subclasses cannot corrupt the state of the superclass by forgetting to call the super method. The cost is that subclasses are limited in their flexibility, in particular they cannot prevent execution of code in the superclass. Use the quick-fix to add the missing modifiers. Example: 'class Foo {\n public boolean equals(Object o) { return true; }\n }' After the quick-fix is applied: 'class Foo {\n public final boolean equals(Object o) { return true; }\n }' This inspection is intended for code that is going to be used in secure environments, and is probably not appropriate for less restrictive environments.",
"markdown": "Reports methods which are not `static`, `private`, `final` or `abstract`, and whose bodies are not empty.\n\n\nCoding in a style that avoids such methods protects the contracts of classes from being broken by their subclasses. The\nbenefit of this style is that subclasses cannot corrupt the state of the superclass by forgetting to call the super method. The cost is\nthat\nsubclasses are limited in their flexibility, in particular they cannot prevent execution of code in the superclass. Use the quick-fix to\nadd\nthe missing modifiers.\n\n**Example:**\n\n\n class Foo {\n public boolean equals(Object o) { return true; }\n }\n\nAfter the quick-fix is applied:\n\n\n class Foo {\n public final boolean equals(Object o) { return true; }\n }\n\nThis inspection is intended for code that is going to be used in secure environments, and is probably not appropriate for less restrictive environments."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DesignForExtension",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Security",
"index": 32,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SimplifyStreamApiCallChains",
"shortDescription": {
"text": "Stream API call chain can be simplified"
},
"fullDescription": {
"text": "Reports stream API call chains that can be simplified. Simplification will often avoid some temporary object creation during collection traversal. The inspection replaces the following call chains: 'collection.stream().forEach()' → 'collection.forEach()' 'collection.stream().collect(toList/toSet/toCollection())' → 'new CollectionType<>(collection)' 'collection.stream().toArray()' → 'collection.toArray()' 'Arrays.asList().stream()' → 'Arrays.stream()' or 'Stream.of()' 'IntStream.range(0, array.length).mapToObj(idx -> array[idx])' → 'Arrays.stream(array)' 'IntStream.range(0, list.size()).mapToObj(idx -> list.get(idx))' → 'list.stream()' 'Collections.singleton().stream()' → 'Stream.of()' 'Collections.emptyList().stream()' → 'Stream.empty()' 'stream.filter().findFirst().isPresent()' → 'stream.anyMatch()' 'stream.collect(counting())' → 'stream.count()' 'stream.collect(maxBy())' → 'stream.max()' 'stream.collect(mapping())' → 'stream.map().collect()' 'stream.collect(reducing())' → 'stream.reduce()' 'stream.collect(summingInt())' → 'stream.mapToInt().sum()' 'stream.mapToObj(x -> x)' → 'stream.boxed()' 'stream.map(x -> {...; return x;})' → 'stream.peek(x -> ...)' '!stream.anyMatch()' → 'stream.noneMatch()' '!stream.anyMatch(x -> !(...))' → 'stream.allMatch()' 'stream.map().anyMatch(Boolean::booleanValue)' → 'stream.anyMatch()' 'IntStream.range(expr1, expr2).mapToObj(x -> array[x])' → 'Arrays.stream(array, expr1, expr2)' 'Collection.nCopies(count, ...)' → 'Stream.generate().limit(count)' 'stream.sorted(comparator).findFirst()' → 'Stream.min(comparator)' 'optional.orElseGet(() -> { throw new ...; })' → 'optional.orElseThrow()' Note that the replacement semantics may have minor differences in some cases. For example, 'Collections.synchronizedList(...).stream().forEach()' is not synchronized while 'Collections.synchronizedList(...).forEach()' is synchronized. Also, 'collect(Collectors.maxBy())' returns an empty 'Optional' if the resulting element is 'null' while 'Stream.max()' throws 'NullPointerException' in this case.",
"markdown": "Reports stream API call chains that can be simplified. Simplification will often avoid some temporary object creation during collection traversal.\n\n\nThe inspection replaces the following call chains:\n\n* `collection.stream().forEach()` → `collection.forEach()`\n* `collection.stream().collect(toList/toSet/toCollection())` → `new CollectionType<>(collection)`\n* `collection.stream().toArray()` → `collection.toArray()`\n* `Arrays.asList().stream()` → `Arrays.stream()` or `Stream.of()`\n* `IntStream.range(0, array.length).mapToObj(idx -> array[idx])` → `Arrays.stream(array)`\n* `IntStream.range(0, list.size()).mapToObj(idx -> list.get(idx))` → `list.stream()`\n* `Collections.singleton().stream()` → `Stream.of()`\n* `Collections.emptyList().stream()` → `Stream.empty()`\n* `stream.filter().findFirst().isPresent()` → `stream.anyMatch()`\n* `stream.collect(counting())` → `stream.count()`\n* `stream.collect(maxBy())` → `stream.max()`\n* `stream.collect(mapping())` → `stream.map().collect()`\n* `stream.collect(reducing())` → `stream.reduce()`\n* `stream.collect(summingInt())` → `stream.mapToInt().sum()`\n* `stream.mapToObj(x -> x)` → `stream.boxed()`\n* `stream.map(x -> {...; return x;})` → `stream.peek(x -> ...)`\n* `!stream.anyMatch()` → `stream.noneMatch()`\n* `!stream.anyMatch(x -> !(...))` → `stream.allMatch()`\n* `stream.map().anyMatch(Boolean::booleanValue)` → `stream.anyMatch()`\n* `IntStream.range(expr1, expr2).mapToObj(x -> array[x])` → `Arrays.stream(array, expr1, expr2)`\n* `Collection.nCopies(count, ...)` → `Stream.generate().limit(count)`\n* `stream.sorted(comparator).findFirst()` → `Stream.min(comparator)`\n* `optional.orElseGet(() -> { throw new ...; })` → `optional.orElseThrow()`\n\n\nNote that the replacement semantics may have minor differences in some cases. For example,\n`Collections.synchronizedList(...).stream().forEach()` is not synchronized while\n`Collections.synchronizedList(...).forEach()` is synchronized.\nAlso, `collect(Collectors.maxBy())` returns an empty `Optional` if the resulting element is\n`null` while `Stream.max()` throws `NullPointerException` in this case."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SimplifyStreamApiCallChains",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SafeVarargsDetector",
"shortDescription": {
"text": "Possible heap pollution from parameterized vararg type"
},
"fullDescription": {
"text": "Reports methods with variable arity, which can be annotated as '@SafeVarargs'. The '@SafeVarargs' annotation suppresses unchecked warnings about parameterized array creation at call sites. Example: 'public class Foo<T> {\n private List<T> list = new ArrayList<>();\n\n public final void safeVarargs(T... elements) {\n Collections.addAll(list, elements);\n }\n }' After the quick-fix is applied: 'public class Foo<T> {\n private List<T> list = new ArrayList<>();\n\n @SafeVarargs\n public final void safeVarargs(T... elements) {\n Collections.addAll(list, elements);\n }\n }' This annotation is not supported under Java 1.6 or earlier JVMs.",
"markdown": "Reports methods with variable arity, which can be annotated as `@SafeVarargs`. The `@SafeVarargs` annotation suppresses unchecked warnings about parameterized array creation at call sites.\n\n**Example:**\n\n\n public class Foo<T> {\n private List<T> list = new ArrayList<>();\n\n public final void safeVarargs(T... elements) {\n Collections.addAll(list, elements);\n }\n }\n\nAfter the quick-fix is applied:\n\n\n public class Foo<T> {\n private List<T> list = new ArrayList<>();\n\n @SafeVarargs\n public final void safeVarargs(T... elements) {\n Collections.addAll(list, elements);\n }\n }\n\n\nThis annotation is not supported under Java 1.6 or earlier JVMs."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "unchecked",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 7",
"index": 163,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ComparatorMethodParameterNotUsed",
"shortDescription": {
"text": "Suspicious 'Comparator.compare()' implementation"
},
"fullDescription": {
"text": "Reports problems in 'Comparator.compare()' and 'Comparable.compareTo()' implementations. The following cases are reported: A parameter is not used. Most likely this is a typo and the other parameter is compared with itself, or the method is not implemented correctly. It's evident that the method does not return '0' for the same elements. Such a comparison method violates the contract and can produce unpredictable results when equal elements are encountered. In particular, sorting may fail with an exception on some data. The comparison method never returns positive or negative value. To fulfill the contract, if the comparison method returns positive values, it should also return negative ones if arguments are supplied in reversed order. The comparison method returns 'Integer.MIN_VALUE'. While allowed by the contract, it may be error-prone, as some call sites may incorrectly try to invert the return value of the comparison method using the unary minus operator. The negated value of 'Integer.MIN_VALUE' is 'Integer.MIN_VALUE'. Example: 'Comparator<String> lambda =\n (a, b) -> a.length() > b.length()\n ? 0\n : Math.random() > 0.5 ? -1 : 1;'",
"markdown": "Reports problems in `Comparator.compare()` and `Comparable.compareTo()` implementations.\n\nThe following cases are reported:\n\n* A parameter is not used. Most likely this is a typo and the other parameter is compared with itself, or the method is not implemented correctly.\n* It's evident that the method does not return `0` for the same elements. Such a comparison method violates the contract and can produce unpredictable results when equal elements are encountered. In particular, sorting may fail with an exception on some data.\n* The comparison method never returns positive or negative value. To fulfill the contract, if the comparison method returns positive values, it should also return negative ones if arguments are supplied in reversed order.\n* The comparison method returns `Integer.MIN_VALUE`. While allowed by the contract, it may be error-prone, as some call sites may incorrectly try to invert the return value of the comparison method using the unary minus operator. The negated value of `Integer.MIN_VALUE` is `Integer.MIN_VALUE`.\n\n**Example:**\n\n\n Comparator<String> lambda =\n (a, b) -> a.length() > b.length()\n ? 0\n : Math.random() > 0.5 ? -1 : 1;\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ComparatorMethodParameterNotUsed",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Annotation",
"shortDescription": {
"text": "Annotation"
},
"fullDescription": {
"text": "Reports annotations. Annotations are not supported in Java 1.4 and earlier JVM.",
"markdown": "Reports annotations. Annotations are not supported in Java 1.4 and earlier JVM."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "Annotation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level issues",
"index": 246,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryUnicodeEscape",
"shortDescription": {
"text": "Unnecessary unicode escape sequence"
},
"fullDescription": {
"text": "Reports unnecessary unicode escape sequences. For example, when the file encoding can handle the character without escaping it. Unicode control characters are not reported by this inspection (except for a line feed and a tab). Example: 'String s = \"\\u0062\";'",
"markdown": "Reports unnecessary unicode escape sequences. For example, when the file encoding can handle the character without escaping it. Unicode control characters are not reported by this inspection (except for a line feed and a tab).\n\n**Example:**\n\n String s = \"\\u0062\";\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryUnicodeEscape",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Internationalization",
"index": 110,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StringTokenizer",
"shortDescription": {
"text": "Use of 'StringTokenizer'"
},
"fullDescription": {
"text": "Reports usages of the 'StringTokenizer' class. Excessive use of 'StringTokenizer' is incorrect in an internationalized environment.",
"markdown": "Reports usages of the `StringTokenizer` class. Excessive use of `StringTokenizer` is incorrect in an internationalized environment."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UseOfStringTokenizer",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Internationalization",
"index": 110,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UseBulkOperation",
"shortDescription": {
"text": "Bulk operation can be used instead of iteration"
},
"fullDescription": {
"text": "Reports single operations inside loops that could be replaced with a bulk method. Not only are bulk methods shorter, but in some cases they may be more performant as well. Example: 'void test(Collection<Integer> numbers) {\n List<Integer> result = new ArrayList<>();\n for (Integer i : numbers) {\n result.add(i);\n }\n }' After the fix is applied: 'void test(Collection<Integer> numbers) {\n List<Integer> result = new ArrayList<>();\n result.addAll(numbers);\n }' The Use Arrays.asList() to wrap arrays option allows to report arrays, even if the bulk method requires a collection. In this case the quick-fix will automatically wrap the array in 'Arrays.asList()' call. New in 2017.1",
"markdown": "Reports single operations inside loops that could be replaced with a bulk method.\n\n\nNot only are bulk methods shorter, but in some cases they may be more performant as well.\n\n**Example:**\n\n void test(Collection<Integer> numbers) {\n List<Integer> result = new ArrayList<>();\n for (Integer i : numbers) {\n result.add(i);\n }\n }\n\nAfter the fix is applied:\n\n\n void test(Collection<Integer> numbers) {\n List<Integer> result = new ArrayList<>();\n result.addAll(numbers);\n }\n\n\nThe **Use Arrays.asList() to wrap arrays** option allows to report arrays, even if the bulk method requires a collection.\nIn this case the quick-fix will automatically wrap the array in `Arrays.asList()` call.\n\nNew in 2017.1"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "UseBulkOperation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AbstractMethodOverridesAbstractMethod",
"shortDescription": {
"text": "Abstract method overrides abstract method"
},
"fullDescription": {
"text": "Reports 'abstract' methods that override 'abstract' methods. Such methods don't make sense because any concrete child class will have to implement the abstract method anyway. Methods whose return types, exception declarations, annotations, or modifiers differ from the overridden method are not reported by this inspection. Configure the inspection: Use the Ignore methods with different Javadoc than their super methods option to ignore any abstract methods whose JavaDoc comment differs from their super method.",
"markdown": "Reports `abstract` methods that override `abstract` methods.\n\nSuch methods don't make sense because any concrete child class will have to implement the abstract method anyway.\n\n\nMethods whose return types, exception declarations, annotations, or modifiers differ from the overridden method are not reported by this inspection.\n\n\nConfigure the inspection:\n\n* Use the **Ignore methods with different Javadoc than their super methods** option to ignore any abstract methods whose JavaDoc comment differs from their super method."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AbstractMethodOverridesAbstractMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Inheritance issues",
"index": 159,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConfusingOctalEscape",
"shortDescription": {
"text": "Confusing octal escape sequence"
},
"fullDescription": {
"text": "Reports string literals containing an octal escape sequence immediately followed by a digit. Such strings may be confusing, and are often the result of errors in escape code creation. Example: 'System.out.println(\"\\1234\"); // Octal escape sequence '\\123' immediately followed by a digit'",
"markdown": "Reports string literals containing an octal escape sequence immediately followed by a digit.\n\nSuch strings may be confusing, and are often the result of errors in escape code creation.\n\n**Example:**\n\n\n System.out.println(\"\\1234\"); // Octal escape sequence '\\123' immediately followed by a digit\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ConfusingOctalEscapeSequence",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LambdaParameterHidingMemberVariable",
"shortDescription": {
"text": "Lambda parameter hides field"
},
"fullDescription": {
"text": "Reports lambda parameters named identically to a field of a surrounding class. As a result of such naming, you may accidentally use the lambda parameter when using the identically named field is intended. A quick-fix is suggested to rename the lambda parameter. Example: 'public class MyClass {\n public Object foo;\n\n void sort(List<Integer> list) {\n list.sort((foo, bar) -> foo - bar);\n }\n }' Use the option to choose whether to ignore fields that are not visible from the lambda expression. For example, private fields of a superclass.",
"markdown": "Reports lambda parameters named identically to a field of a surrounding class. As a result of such naming, you may accidentally use the lambda parameter when using the identically named field is intended.\n\nA quick-fix is suggested to rename the lambda parameter.\n\n**Example:**\n\n\n public class MyClass {\n public Object foo;\n\n void sort(List<Integer> list) {\n list.sort((foo, bar) -> foo - bar);\n }\n }\n\n\nUse the option to choose whether to ignore fields that are not visible from the lambda expression.\nFor example, private fields of a superclass."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LambdaParameterHidesMemberVariable",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Visibility",
"index": 97,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MissortedModifiers",
"shortDescription": {
"text": "Missorted modifiers"
},
"fullDescription": {
"text": "Reports declarations whose modifiers are not in the canonical preferred order (as stated in the Java Language Specification). Example: 'class Foo {\n native public final void foo();\n }' After the quick-fix is applied: 'class Foo {\n public final native void foo();\n }' Use the inspection settings to: toggle the reporting of misplaced annotations: (annotations with 'ElementType.TYPE_USE' not directly before the type and after the modifier keywords, or other annotations not before the modifier keywords). When this option is disabled, any annotation can be positioned before or after the modifier keywords. Modifier lists with annotations in between the modifier keywords will always be reported. specify whether the 'ElementType.TYPE_USE' annotation should be positioned directly before a type, even when the annotation has other targets specified.",
"markdown": "Reports declarations whose modifiers are not in the canonical preferred order (as stated in the Java Language Specification).\n\n**Example:**\n\n\n class Foo {\n native public final void foo();\n }\n\nAfter the quick-fix is applied:\n\n\n class Foo {\n public final native void foo();\n }\n\nUse the inspection settings to:\n\n*\n toggle the reporting of misplaced annotations:\n (annotations with `ElementType.TYPE_USE` *not* directly\n before the type and after the modifier keywords, or\n other annotations *not* before the modifier keywords).\n When this option is disabled, any annotation can be positioned before or after the modifier keywords.\n Modifier lists with annotations in between the modifier keywords will always be reported.\n\n*\n specify whether the `ElementType.TYPE_USE` annotation should be positioned directly before\n a type, even when the annotation has other targets specified."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MissortedModifiers",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TransientFieldInNonSerializableClass",
"shortDescription": {
"text": "Transient field in non-serializable class"
},
"fullDescription": {
"text": "Reports 'transient' fields in classes that do not implement 'java.io.Serializable'. Example: 'public class NonSerializableClass {\n private transient String password;\n }' After the quick-fix is applied: 'public class NonSerializableClass {\n private String password;\n }'",
"markdown": "Reports `transient` fields in classes that do not implement `java.io.Serializable`.\n\n**Example:**\n\n\n public class NonSerializableClass {\n private transient String password;\n }\n\nAfter the quick-fix is applied:\n\n\n public class NonSerializableClass {\n private String password;\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "TransientFieldInNonSerializableClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Serialization issues",
"index": 54,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ExceptionPackage",
"shortDescription": {
"text": "Exception package"
},
"fullDescription": {
"text": "Reports packages that only contain classes that extend 'java.lang.Throwable', either directly or indirectly. Although exceptions usually don't depend on other classes for their implementation, they are normally not used separately. It is often a better design to locate exceptions in the same package as the classes that use them. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor.",
"markdown": "Reports packages that only contain classes that extend `java.lang.Throwable`, either directly or indirectly.\n\nAlthough exceptions usually don't depend on other classes for their implementation, they are normally not used separately.\nIt is often a better design to locate exceptions in the same package as the classes that use them.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ExceptionPackage",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Packaging issues",
"index": 190,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TypeParameterExtendsObject",
"shortDescription": {
"text": "Type parameter explicitly extends 'Object'"
},
"fullDescription": {
"text": "Reports type parameters and wildcard type arguments that are explicitly declared to extend 'java.lang.Object'. Such 'extends' clauses are redundant as 'java.lang.Object' is a supertype for all classes. Example: 'class ClassA<T extends Object> {}' If you need to preserve the 'extends Object' clause because of annotations, disable the Ignore when java.lang.Object is annotated option. This might be useful, for example, when you use a nullness analyzer, and the 'extends Object' clause holds a '@Nullable'/'@NotNull' annotation. Example: 'class MyClass<T extends @NotNull Object> {}'",
"markdown": "Reports type parameters and wildcard type arguments that are explicitly declared to extend `java.lang.Object`.\n\nSuch 'extends' clauses are redundant as `java.lang.Object` is a supertype for all classes.\n\n**Example:**\n\n class ClassA<T extends Object> {}\n\n\nIf you need to preserve the 'extends Object' clause because of annotations, disable the\n**Ignore when java.lang.Object is annotated** option.\nThis might be useful, for example, when you use a nullness analyzer, and the 'extends Object' clause\nholds a `@Nullable`/`@NotNull` annotation.\n\n**Example:**\n\n class MyClass<T extends @NotNull Object> {}\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "TypeParameterExplicitlyExtendsObject",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StringConcatenationInsideStringBufferAppend",
"shortDescription": {
"text": "String concatenation as argument to 'StringBuilder.append()' call"
},
"fullDescription": {
"text": "Reports 'String' concatenation used as the argument to 'StringBuffer.append()', 'StringBuilder.append()' or 'Appendable.append()'. Such calls may profitably be turned into chained append calls on the existing 'StringBuffer/Builder/Appendable' saving the cost of an extra 'StringBuffer/Builder' allocation. This inspection ignores compile-time evaluated 'String' concatenations, in which case the conversion would only worsen performance. Example: 'void bar(StringBuilder builder, String name) {\n builder.append(\"Hello,\" + name); //warning\n builder.append(\"Hello,\" + \"world\"); //no warning\n }'",
"markdown": "Reports `String` concatenation used as the argument to `StringBuffer.append()`, `StringBuilder.append()` or `Appendable.append()`.\n\n\nSuch calls may profitably be turned into chained append calls on the existing `StringBuffer/Builder/Appendable`\nsaving the cost of an extra `StringBuffer/Builder` allocation.\nThis inspection ignores compile-time evaluated `String` concatenations, in which case the conversion would only\nworsen performance.\n\n**Example:**\n\n\n void bar(StringBuilder builder, String name) {\n builder.append(\"Hello,\" + name); //warning\n builder.append(\"Hello,\" + \"world\"); //no warning\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "StringConcatenationInsideStringBufferAppend",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance",
"index": 7,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantCollectionOperation",
"shortDescription": {
"text": "Redundant 'Collection' operation"
},
"fullDescription": {
"text": "Reports unnecessarily complex collection operations which have simpler alternatives. Example: 'void f(String[] array, Collection<String> collection) {\n String[] strings = Arrays.asList(array).subList(0, 10).toArray(new String[0]);\n boolean contains = collection.containsAll(Collections.singletonList(\"x\"));\n }' After the quick-fix is applied: 'void f(String[] array, Collection<String> collection) {\n String[] strings = Arrays.copyOf(array, 10);\n boolean contains = collection.contains(\"x\");\n }' New in 2018.1",
"markdown": "Reports unnecessarily complex collection operations which have simpler alternatives.\n\nExample:\n\n\n void f(String[] array, Collection<String> collection) {\n String[] strings = Arrays.asList(array).subList(0, 10).toArray(new String[0]);\n boolean contains = collection.containsAll(Collections.singletonList(\"x\"));\n }\n\nAfter the quick-fix is applied:\n\n\n void f(String[] array, Collection<String> collection) {\n String[] strings = Arrays.copyOf(array, 10);\n boolean contains = collection.contains(\"x\");\n }\n\nNew in 2018.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantCollectionOperation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OverriddenMethodCallDuringObjectConstruction",
"shortDescription": {
"text": "Overridden method called during object construction"
},
"fullDescription": {
"text": "Reports any calls to overridden methods of the current class during object construction. This happens if an object construction is inside: A constructor A non-static instance initializer A non-static field initializer 'clone()' 'readObject()' 'readObjectNoData()' Such calls may result in subtle bugs, as the object is not guaranteed to be initialized before the method call occurs. Example: 'abstract class Parent {\n void someMethod() { }\n }\n\n class Child extends Parent {\n Child() {\n someMethod();\n }\n\n @Override\n void someMethod() { }\n }' This inspection shares its functionality with: The Abstract method called during object construction inspection The Overridable method called during object construction inspection Only one inspection should be enabled at the same time to prevent duplicate warnings.",
"markdown": "Reports any calls to overridden methods of the current class during object construction. This happens if an object construction is inside:\n\n* A constructor\n* A non-static instance initializer\n* A non-static field initializer\n* `clone()`\n* `readObject()`\n* `readObjectNoData()`\n\nSuch calls may result in subtle bugs, as the object is not guaranteed to be initialized before the method call occurs.\n\nExample:\n\n\n abstract class Parent {\n void someMethod() { }\n }\n\n class Child extends Parent {\n Child() {\n someMethod();\n }\n\n @Override\n void someMethod() { }\n }\n\nThis inspection shares its functionality with:\n\n* The **Abstract method called during object construction** inspection\n* The **Overridable method called during object construction** inspection\n\nOnly one inspection should be enabled at the same time to prevent duplicate warnings."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OverriddenMethodCallDuringObjectConstruction",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Initialization",
"index": 26,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SameReturnValue",
"shortDescription": {
"text": "Method always returns the same value"
},
"fullDescription": {
"text": "Reports methods and method hierarchies that always return the same constant. The inspection works differently in batch-mode (from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name) and on-the-fly in the editor: In batch-mode, the inspection reports methods and method hierarchies that always return the same constant. In the editor, the inspection only reports methods that have more than one 'return' statement, do not have super methods, and cannot be overridden. If a method overrides or implements a method, a contract may require it to return a specific constant, but at the same time, we may want to have several exit points. If a method can be overridden, it is possible that a different value will be returned in subclasses. Example: 'class X {\n // Warn only in batch-mode:\n int xxx() { // Method 'xxx()' and all its overriding methods always return '0'\n return 0;\n }\n }\n\n class Y extends X {\n @Override\n int xxx() {\n return 0;\n }\n\n // Warn only in batch-mode:\n int yyy() { // Method 'yyy()' always returns '0'\n return 0;\n }\n\n // Warn both in batch-mode and on-the-fly:\n final int zzz(boolean flag) { // Method 'zzz()' always returns '0'\n if (Math.random() > 0.5) {\n return 0;\n }\n return 0;\n }\n }'",
"markdown": "Reports methods and method hierarchies that always return the same constant.\n\n\nThe inspection works differently in batch-mode\n(from **Code \\| Inspect Code** or **Code \\| Analyze Code \\| Run Inspection by Name**)\nand on-the-fly in the editor:\n\n* In batch-mode, the inspection reports methods and method hierarchies that always return the same constant.\n* In the editor, the inspection only reports methods that have more than one `return` statement, do not have super methods, and cannot be overridden. If a method overrides or implements a method, a contract may require it to return a specific constant, but at the same time, we may want to have several exit points. If a method can be overridden, it is possible that a different value will be returned in subclasses.\n\n**Example:**\n\n\n class X {\n // Warn only in batch-mode:\n int xxx() { // Method 'xxx()' and all its overriding methods always return '0'\n return 0;\n }\n }\n\n class Y extends X {\n @Override\n int xxx() {\n return 0;\n }\n\n // Warn only in batch-mode:\n int yyy() { // Method 'yyy()' always returns '0'\n return 0;\n }\n\n // Warn both in batch-mode and on-the-fly:\n final int zzz(boolean flag) { // Method 'zzz()' always returns '0'\n if (Math.random() > 0.5) {\n return 0;\n }\n return 0;\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SameReturnValue",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Declaration redundancy",
"index": 10,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ThreeNegationsPerMethod",
"shortDescription": {
"text": "Method with more than three negations"
},
"fullDescription": {
"text": "Reports methods with three or more negations. Such methods may be confusing. Example: 'void doSmth(int a, int b, boolean flag1, boolean flag2) {\n if (!flag && !flag2) {\n if (a != b) {\n doOther();\n }\n }\n }' Without negations, the method becomes easier to understand: 'void doSmth(int a, int b, boolean flag1, boolean flag2) {\n if (flag1 || flag2 || a == b) return;\n doOther();\n }' Configure the inspection: Use the Ignore negations in 'equals()' methods option to disable the inspection within 'equals()' methods. Use the Ignore negations in 'assert' statements to disable the inspection within 'assert' statements.",
"markdown": "Reports methods with three or more negations. Such methods may be confusing.\n\n**Example:**\n\n\n void doSmth(int a, int b, boolean flag1, boolean flag2) {\n if (!flag && !flag2) {\n if (a != b) {\n doOther();\n }\n }\n }\n\nWithout negations, the method becomes easier to understand:\n\n\n void doSmth(int a, int b, boolean flag1, boolean flag2) {\n if (flag1 || flag2 || a == b) return;\n doOther();\n }\n\nConfigure the inspection:\n\n* Use the **Ignore negations in 'equals()' methods** option to disable the inspection within `equals()` methods.\n* Use the **Ignore negations in 'assert' statements** to disable the inspection within `assert` statements."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MethodWithMoreThanThreeNegations",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Method metrics",
"index": 139,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ThreadWithDefaultRunMethod",
"shortDescription": {
"text": "Instantiating a 'Thread' with default 'run()' method"
},
"fullDescription": {
"text": "Reports instantiations of 'Thread' or an inheritor without specifying a 'Runnable' parameter or overriding the 'run()' method. Such threads do nothing useful. Example: 'new Thread().start();'",
"markdown": "Reports instantiations of `Thread` or an inheritor without specifying a `Runnable` parameter or overriding the `run()` method. Such threads do nothing useful.\n\n**Example:**\n\n\n new Thread().start();\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "InstantiatingAThreadWithDefaultRunMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TestOnlyProblems",
"shortDescription": {
"text": "Test-only usage in production code"
},
"fullDescription": {
"text": "Reports '@TestOnly'- and '@VisibleForTesting'-annotated methods and classes that are used in production code. Also reports usage of applying '@TestOnly' '@VisibleForTesting' to the same element. The problems are not reported if such method or class is referenced from: Code under the Test Sources folder A test class (JUnit/TestNG) Another '@TestOnly'-annotated method Example (in production code): '@TestOnly\n fun foo() { ... }\n\n fun main () {\n foo()\n }'",
"markdown": "Reports `@TestOnly`- and `@VisibleForTesting`-annotated methods and classes that are used in production code. Also reports usage of applying `@TestOnly` `@VisibleForTesting` to the same element.\n\nThe problems are not reported if such method or class is referenced from:\n\n* Code under the **Test Sources** folder\n* A test class (JUnit/TestNG)\n* Another `@TestOnly`-annotated method\n\n**Example (in production code):**\n\n\n @TestOnly\n fun foo() { ... }\n\n fun main () {\n foo()\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "TestOnlyProblems",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JVM languages/Test frameworks",
"index": 128,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MeaninglessRecordAnnotationInspection",
"shortDescription": {
"text": "Meaningless record annotation"
},
"fullDescription": {
"text": "Reports annotations used on record components that have no effect. This can happen in two cases: The reported annotation has the METHOD target, but the corresponding accessor is explicitly defined. The reported annotation has the PARAMETER target, but the canonical constructor is explicitly defined. Example: '@Target(ElementType.METHOD)\n@interface A { }\n \n// The annotation will not appear in bytecode at all,\n// as it should be propagated to the accessor but accessor is explicitly defined \nrecord R(@A int x) {\n public int x() { return x; }\n}' New in 2021.1",
"markdown": "Reports annotations used on record components that have no effect.\n\nThis can happen in two cases:\n\n* The reported annotation has the METHOD target, but the corresponding accessor is explicitly defined.\n* The reported annotation has the PARAMETER target, but the canonical constructor is explicitly defined.\n\nExample:\n\n\n @Target(ElementType.METHOD)\n @interface A { }\n \n // The annotation will not appear in bytecode at all,\n // as it should be propagated to the accessor but accessor is explicitly defined \n record R(@A int x) {\n public int x() { return x; }\n }\n\nNew in 2021.1"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "MeaninglessRecordAnnotationInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MagicConstant",
"shortDescription": {
"text": "Magic Constant"
},
"fullDescription": {
"text": "Reports expressions that can be replaced with \"magic\" constants. Example 1: '// Bare literal \"2\" is used, warning:\n Font font = new Font(\"Arial\", 2)' Example 2: '// Predefined constant is used, good:\n Font font = new Font(\"Arial\", Font.ITALIC)' When possible, the quick-fix inserts an appropriate predefined constant. The behavior of this inspection is controlled by 'org.intellij.lang.annotations.MagicConstant' annotation. Some standard Java library methods are pre-annotated, but you can use this annotation in your code as well.",
"markdown": "Reports expressions that can be replaced with \"magic\" constants.\n\nExample 1:\n\n\n // Bare literal \"2\" is used, warning:\n Font font = new Font(\"Arial\", 2)\n\nExample 2:\n\n\n // Predefined constant is used, good:\n Font font = new Font(\"Arial\", Font.ITALIC)\n\n\nWhen possible, the quick-fix inserts an appropriate predefined constant.\n\n\nThe behavior of this inspection is controlled by `org.intellij.lang.annotations.MagicConstant` annotation.\nSome standard Java library methods are pre-annotated, but you can use this annotation in your code as well."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "MagicConstant",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SuspiciousDateFormat",
"shortDescription": {
"text": "Suspicious date format pattern"
},
"fullDescription": {
"text": "Reports date format patterns that are likely used by mistake. The following patterns are reported: Uppercase \"Y\", unless \"w\" appears nearby. It stands for \"Week year\" that is almost always the same as normal \"Year\" (lowercase \"y\" pattern), but may point to the next year at the end of December. Uppercase \"M\" (month) close to \"H\", \"K\", \"h\", or \"k\" (hour). It's likely that a lowercase \"m\" (minute) was intended. Lowercase \"m\" (minute) close to \"y\" (year) or \"d\" (day in month). It's likely that an uppercase \"M\" (month) was intended. Uppercase \"D\" (day in year) close to \"M\", or \"L\" (month). It's likely that a lowercase \"d\" (day in month) was intended. Uppercase \"S\" (milliseconds) close to \"m\" (minutes). It's likely that a lowercase \"s\" (seconds) was intended. Examples: 'new SimpleDateFormat(\"YYYY-MM-dd\")': likely '\"yyyy-MM-dd\"' was intended. 'new SimpleDateFormat(\"yyyy-MM-DD\")': likely '\"yyyy-MM-dd\"' was intended. 'new SimpleDateFormat(\"HH:MM\")': likely '\"HH:mm\"' was intended. New in 2020.1",
"markdown": "Reports date format patterns that are likely used by mistake.\n\nThe following patterns are reported:\n\n* Uppercase \"Y\", unless \"w\" appears nearby. It stands for \"Week year\" that is almost always the same as normal \"Year\" (lowercase \"y\" pattern), but may point to the next year at the end of December.\n* Uppercase \"M\" (month) close to \"H\", \"K\", \"h\", or \"k\" (hour). It's likely that a lowercase \"m\" (minute) was intended.\n* Lowercase \"m\" (minute) close to \"y\" (year) or \"d\" (day in month). It's likely that an uppercase \"M\" (month) was intended.\n* Uppercase \"D\" (day in year) close to \"M\", or \"L\" (month). It's likely that a lowercase \"d\" (day in month) was intended.\n* Uppercase \"S\" (milliseconds) close to \"m\" (minutes). It's likely that a lowercase \"s\" (seconds) was intended.\n\n\nExamples: \n\n`new SimpleDateFormat(\"YYYY-MM-dd\")`: likely `\"yyyy-MM-dd\"` was intended. \n\n`new SimpleDateFormat(\"yyyy-MM-DD\")`: likely `\"yyyy-MM-dd\"` was intended. \n\n`new SimpleDateFormat(\"HH:MM\")`: likely `\"HH:mm\"` was intended.\n\nNew in 2020.1"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SuspiciousDateFormat",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "VolatileArrayField",
"shortDescription": {
"text": "Volatile array field"
},
"fullDescription": {
"text": "Reports array fields that are declared 'volatile'. Such declarations may be confusing because accessing the array itself follows the rules for 'volatile' fields, but accessing the array's contents does not. Example: 'class Data {\n private volatile int[] idx = new int[0];\n }' If such volatile access is needed for array contents, consider using 'java.util.concurrent.atomic' classes instead: 'class Data {\n private final AtomicIntegerArray idx = new AtomicIntegerArray(new int[0]);\n }'",
"markdown": "Reports array fields that are declared `volatile`. Such declarations may be confusing because accessing the array itself follows the rules for `volatile` fields, but accessing the array's contents does not.\n\n**Example:**\n\n\n class Data {\n private volatile int[] idx = new int[0];\n }\n\n\nIf such volatile access is needed for array contents, consider using\n`java.util.concurrent.atomic` classes instead:\n\n\n class Data {\n private final AtomicIntegerArray idx = new AtomicIntegerArray(new int[0]);\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "VolatileArrayField",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryInheritDoc",
"shortDescription": {
"text": "Unnecessary '{@inheritDoc}' Javadoc comment"
},
"fullDescription": {
"text": "Reports Javadoc comments that contain only an '{@inheritDoc}' tag. Since Javadoc copies the super class' comment if no comment is present, a comment containing only '{@inheritDoc}' adds nothing. Also, it reports the '{@inheritDoc}' usages in invalid locations, for example, in fields. Suggests removing the unnecessary Javadoc comment. Example: 'class Example implements Comparable<Example> {\n /**\n * {@inheritDoc}\n */\n @Override\n public int compareTo(Example o) {\n return 0;\n }\n }' After the quick-fix is applied: 'class Example implements Comparable<Example> {\n @Override\n public int compareTo(Example o) {\n return 0;\n }\n }'",
"markdown": "Reports Javadoc comments that contain only an `{@inheritDoc}` tag. Since Javadoc copies the super class' comment if no comment is present, a comment containing only `{@inheritDoc}` adds nothing.\n\nAlso, it reports the `{@inheritDoc}` usages in invalid locations, for example, in fields.\n\nSuggests removing the unnecessary Javadoc comment.\n\n**Example:**\n\n\n class Example implements Comparable<Example> {\n /**\n * {@inheritDoc}\n */\n @Override\n public int compareTo(Example o) {\n return 0;\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class Example implements Comparable<Example> {\n @Override\n public int compareTo(Example o) {\n return 0;\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryInheritDoc",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Javadoc",
"index": 95,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonReproducibleMathCall",
"shortDescription": {
"text": "Non-reproducible call to 'Math'"
},
"fullDescription": {
"text": "Reports calls to 'java.lang.Math' methods, which results are not guaranteed to be reproduced precisely. In environments where reproducibility of results is required, 'java.lang.StrictMath' should be used instead.",
"markdown": "Reports calls to `java.lang.Math` methods, which results are not guaranteed to be reproduced precisely.\n\nIn environments where reproducibility of results is required, `java.lang.StrictMath`\nshould be used instead."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonReproducibleMathCall",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues",
"index": 49,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ParametersPerConstructor",
"shortDescription": {
"text": "Constructor with too many parameters"
},
"fullDescription": {
"text": "Reports constructors whose number of parameters exceeds the specified maximum. Such objects are hard to instantiate, especially if some parameters are optional. Constructors with too many parameters may indicate that refactoring is necessary. Consider applying the builder pattern, for example. Example: 'public BankAccount(long accountNumber,\n String owner,\n double balance,\n double interestRate) {\n // fields initialization\n }' Configure the inspection: Use the Parameter limit field to specify the maximum allowed number of parameters in a constructor. Use the Ignore constructors with visibility list to specify whether the inspection should ignore constructors with specific visibility.",
"markdown": "Reports constructors whose number of parameters exceeds the specified maximum. Such objects are hard to instantiate, especially if some parameters are optional. Constructors with too many parameters may indicate that refactoring is necessary. Consider applying the builder pattern, for example.\n\n**Example:**\n\n\n public BankAccount(long accountNumber,\n String owner,\n double balance,\n double interestRate) {\n // fields initialization\n }\n\nConfigure the inspection:\n\n* Use the **Parameter limit** field to specify the maximum allowed number of parameters in a constructor.\n* Use the **Ignore constructors with visibility** list to specify whether the inspection should ignore constructors with specific visibility."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ConstructorWithTooManyParameters",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Method metrics",
"index": 139,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonExtendableApiUsage",
"shortDescription": {
"text": "Class, interface, or method should not be extended"
},
"fullDescription": {
"text": "Reports classes, interfaces and methods that extend, implement, or override API elements marked with '@ApiStatus.NonExtendable'. The '@ApiStatus.NonExtendable' annotation indicates that the class, interface, or method must not be extended, implemented, or overridden. Since casting such interfaces and classes to the internal library implementation is rather common, if a client provides a different implementation, you will get 'ClassCastException'. Adding new abstract methods to such classes and interfaces will break the compatibility with the client's implementations.",
"markdown": "Reports classes, interfaces and methods that extend, implement, or override API elements marked with `@ApiStatus.NonExtendable`.\n\n\nThe `@ApiStatus.NonExtendable` annotation indicates that the class, interface, or method **must not be extended,\nimplemented, or overridden** .\nSince casting such interfaces and classes to the internal library implementation is rather common,\nif a client provides a different implementation, you will get `ClassCastException`.\nAdding new abstract methods to such classes and interfaces will break the compatibility with the client's implementations."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "NonExtendableApiUsage",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JVM languages",
"index": 47,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnusedAssignment",
"shortDescription": {
"text": "Unused assignment"
},
"fullDescription": {
"text": "Reports assignment values that are not used after assignment. If the assignment value is unused, it's better to remove the assignment to shorten the code and avoid redundant allocations. The following cases are reported: variables that are never read after assignment variables that are always overwritten with a new value before being read variable initializers that are redundant (for one of the two reasons above) Configure the inspection: Use the Report redundant initializers option to report redundant initializers: 'int getI() {\n int i = 0; // redundant initialization\n i = 2;\n return i;\n }' Use the Report prefix expressions that can be replaced with binary expressions option to report cases where an '++i' expression may be replaced with 'i + 1': 'int preInc(int value) {\n int res = value;\n return ++res;\n }' Use the Report postfix expressions where the changed value is not used option to report 'i++' cases where the value of 'i' is not used later: 'int postInc(int value) {\n int res = value;\n return res++;\n }' Use the Report pattern variables whose values are never used option to report cases where the value of a pattern variable is overwritten before it is read: 'if (object instanceof String s) {\n s = \"hello\";\n System.out.println(s);\n }' Use the Report iteration parameters whose values are never used option to report cases where the value of an iteration parameter of an enhanced 'for' statements is overwritten before it is read: 'for (String arg : args) {\n arg = \"test\";\n System.out.println(arg);\n }'",
"markdown": "Reports assignment values that are not used after assignment. If the assignment value is unused, it's better to remove the assignment to shorten the code and avoid redundant allocations.\n\nThe following cases are reported:\n\n* variables that are never read after assignment\n* variables that are always overwritten with a new value before being read\n* variable initializers that are redundant (for one of the two reasons above)\n\nConfigure the inspection:\n\n\nUse the **Report redundant initializers** option to report redundant initializers:\n\n\n int getI() {\n int i = 0; // redundant initialization\n i = 2;\n return i;\n }\n\n\nUse the **Report prefix expressions that can be replaced with binary expressions** option to report cases\nwhere an `++i` expression may be replaced with `i + 1`:\n\n\n int preInc(int value) {\n int res = value;\n return ++res;\n }\n\n\nUse the **Report postfix expressions where the changed value is not used** option to report `i++` cases\nwhere the value of `i` is not used later:\n\n\n int postInc(int value) {\n int res = value;\n return res++;\n }\n\n\nUse the **Report pattern variables whose values are never used** option to report cases where the value of a pattern variable\nis overwritten before it is read:\n\n\n if (object instanceof String s) {\n s = \"hello\";\n System.out.println(s);\n }\n\n\nUse the **Report iteration parameters whose values are never used** option to report cases where the value of an iteration parameter\nof an enhanced `for` statements is overwritten before it is read:\n\n\n for (String arg : args) {\n arg = \"test\";\n System.out.println(arg);\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "UnusedAssignment",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ProtectedField",
"shortDescription": {
"text": "Protected field"
},
"fullDescription": {
"text": "Reports 'protected' fields. Constants (that is, variables marked 'static' or 'final') are not reported. Example: 'public class A {\n protected Object object; // warning\n protected final static int MODE = 0; // constant, no warning\n }'",
"markdown": "Reports `protected` fields.\n\nConstants (that is, variables marked `static` or `final`) are not reported.\n\n**Example:**\n\n\n public class A {\n protected Object object; // warning\n protected final static int MODE = 0; // constant, no warning\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ProtectedField",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Encapsulation",
"index": 211,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AssignmentUsedAsCondition",
"shortDescription": {
"text": "Assignment used as condition"
},
"fullDescription": {
"text": "Reports assignments that are used as a condition of an 'if', 'while', 'for', or 'do' statement, or a conditional expression. Although occasionally intended, this usage is confusing and may indicate a typo, for example, '=' instead of '=='. The quick-fix replaces '=' with '=='. Example: 'void update(String str, boolean empty) {\n // Warning: 'empty' is reassigned,\n // not compared to str.isEmpty()\n if (empty = str.isEmpty()) {\n ...\n }\n }' After the quick-fix is applied: 'void update(String str, boolean empty) {\n if (empty == str.isEmpty()) {\n ...\n }\n }'",
"markdown": "Reports assignments that are used as a condition of an `if`, `while`, `for`, or `do` statement, or a conditional expression.\n\nAlthough occasionally intended, this usage is confusing and may indicate a typo, for example, `=` instead of `==`.\n\nThe quick-fix replaces `=` with `==`.\n\n**Example:**\n\n\n void update(String str, boolean empty) {\n // Warning: 'empty' is reassigned,\n // not compared to str.isEmpty()\n if (empty = str.isEmpty()) {\n ...\n }\n }\n\nAfter the quick-fix is applied:\n\n\n void update(String str, boolean empty) {\n if (empty == str.isEmpty()) {\n ...\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AssignmentUsedAsCondition",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Assignment issues",
"index": 98,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PublicField",
"shortDescription": {
"text": "'public' field"
},
"fullDescription": {
"text": "Reports 'public' fields. Constants (fields marked with 'static' and 'final') are not reported. Example: 'class Main {\n public String name;\n }' After the quick-fix is applied: 'class Main {\n private String name;\n\n public String getName() {\n return name;\n }\n\n public void setName(String name) {\n this.name = name;\n }\n }' Configure the inspection: Use the Ignore If Annotated By list to specify annotations to ignore. The inspection will ignore fields with any of these annotations. Use the Ignore 'public final' fields of an enum option to ignore 'public final' fields of the 'enum' type.",
"markdown": "Reports `public` fields. Constants (fields marked with `static` and `final`) are not reported.\n\n**Example:**\n\n\n class Main {\n public String name;\n }\n\nAfter the quick-fix is applied:\n\n\n class Main {\n private String name;\n\n public String getName() {\n return name;\n }\n\n public void setName(String name) {\n this.name = name;\n }\n }\n\nConfigure the inspection:\n\n* Use the **Ignore If Annotated By** list to specify annotations to ignore. The inspection will ignore fields with any of these annotations.\n* Use the **Ignore 'public final' fields of an enum** option to ignore `public final` fields of the `enum` type."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PublicField",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Encapsulation",
"index": 211,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ThrowsRuntimeException",
"shortDescription": {
"text": "Unchecked exception declared in 'throws' clause"
},
"fullDescription": {
"text": "Reports declaration of an unchecked exception ('java.lang.RuntimeException' or one of its subclasses) in the 'throws' clause of a method. Declarations of unchecked exceptions are not required and may be deleted or moved to a Javadoc '@throws' tag. Example: 'public class InvalidDataException extends RuntimeException {}\n\n class TextEditor {\n void readSettings() throws InvalidDataException {} // warning: Unchecked exception 'InvalidDataException' declared in 'throws' clause\n }'",
"markdown": "Reports declaration of an unchecked exception (`java.lang.RuntimeException` or one of its subclasses) in the `throws` clause of a method.\n\nDeclarations of unchecked exceptions are not required and may be deleted or moved to a Javadoc `@throws` tag.\n\n**Example:**\n\n\n public class InvalidDataException extends RuntimeException {}\n\n class TextEditor {\n void readSettings() throws InvalidDataException {} // warning: Unchecked exception 'InvalidDataException' declared in 'throws' clause\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ThrowsRuntimeException",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Error handling",
"index": 9,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NewObjectEquality",
"shortDescription": {
"text": "New object is compared using '=='"
},
"fullDescription": {
"text": "Reports code that applies '==' or '!=' to a newly allocated object instead of calling 'equals()'. The references to newly allocated objects cannot point at existing objects, thus the comparison will always evaluate to 'false'. The inspection may also report newly created objects returned from simple methods. Example: 'void test(Object obj) {\n if (new Object() == obj) {...}\n }' After the quick-fix is applied: 'void test(Object obj) {\n if (new Object().equals(obj)) {...}\n }' New in 2018.3",
"markdown": "Reports code that applies `==` or `!=` to a newly allocated object instead of calling `equals()`.\n\n\nThe references to newly allocated objects cannot point at existing objects,\nthus the comparison will always evaluate to `false`. The inspection may also report newly\ncreated objects returned from simple methods.\n\n**Example:**\n\n\n void test(Object obj) {\n if (new Object() == obj) {...}\n }\n\nAfter the quick-fix is applied:\n\n\n void test(Object obj) {\n if (new Object().equals(obj)) {...}\n }\n\n\nNew in 2018.3"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "NewObjectEquality",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TryWithIdenticalCatches",
"shortDescription": {
"text": "Identical 'catch' branches in 'try' statement"
},
"fullDescription": {
"text": "Reports identical 'catch' sections in a single 'try' statement. Collapsing such sections into one multi-catch block reduces code duplication and prevents the situations when one 'catch' section is updated, and another one is not. Example: 'try {\n doSmth();\n }\n catch (IOException e) {\n LOG.error(e);\n }\n catch (URISyntaxException e) {\n LOG.error(e);\n }' A quick-fix is available to make the code more compact: 'try {\n doSmth();\n }\n catch (IOException | URISyntaxException e) {\n LOG.error(e);\n }' This inspection only reports if the language level of the project or module is 7 or higher.",
"markdown": "Reports identical `catch` sections in a single `try` statement.\n\nCollapsing such sections into one *multi-catch* block reduces code duplication and prevents\nthe situations when one `catch` section is updated, and another one is not.\n\n**Example:**\n\n\n try {\n doSmth();\n }\n catch (IOException e) {\n LOG.error(e);\n }\n catch (URISyntaxException e) {\n LOG.error(e);\n }\n\nA quick-fix is available to make the code more compact:\n\n\n try {\n doSmth();\n }\n catch (IOException | URISyntaxException e) {\n LOG.error(e);\n }\n\nThis inspection only reports if the language level of the project or module is 7 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "TryWithIdenticalCatches",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 7",
"index": 163,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LambdaCanBeReplacedWithAnonymous",
"shortDescription": {
"text": "Lambda can be replaced with anonymous class"
},
"fullDescription": {
"text": "Reports lambda expressions that can be replaced with anonymous classes. Expanding lambda expressions to anonymous classes may be useful if you need to implement other methods inside an anonymous class. Example: 's -> System.out.println(s)' After the quick-fix is applied: 'new Consumer<String>() {\n @Override\n public void accept(String s) {\n System.out.println(s);\n }\n}' Lambda expression appeared in Java 8. This inspection can help to downgrade for backward compatibility with earlier Java versions.",
"markdown": "Reports lambda expressions that can be replaced with anonymous classes.\n\n\nExpanding lambda expressions to anonymous classes may be useful if you need to implement other\nmethods inside an anonymous class.\n\nExample:\n\n\n s -> System.out.println(s)\n\nAfter the quick-fix is applied:\n\n new Consumer<String>() {\n @Override\n public void accept(String s) {\n System.out.println(s);\n }\n }\n\n\n*Lambda expression* appeared in Java 8.\nThis inspection can help to downgrade for backward compatibility with earlier Java versions."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "LambdaCanBeReplacedWithAnonymous",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PackageDotHtmlMayBePackageInfo",
"shortDescription": {
"text": "'package.html' may be converted to 'package-info.java'"
},
"fullDescription": {
"text": "Reports any 'package.html' files which are used for documenting packages. Since JDK 1.5, it is recommended that you use 'package-info.java' files instead, as such files can also contain package annotations. This way, package-info.java becomes a sole repository for package level annotations and documentation. Example: 'package.html' '<html>\n <body>\n Documentation example.\n </body>\n</html>' After the quick-fix is applied: 'package-info.java' '/**\n * Documentation example.\n */\npackage com.sample;'",
"markdown": "Reports any `package.html` files which are used for documenting packages.\n\nSince JDK 1.5, it is recommended that you use `package-info.java` files instead, as such\nfiles can also contain package annotations. This way, package-info.java becomes a\nsole repository for package level annotations and documentation.\n\nExample: `package.html`\n\n\n <html>\n <body>\n Documentation example.\n </body>\n </html>\n\nAfter the quick-fix is applied: `package-info.java`\n\n\n /**\n * Documentation example.\n */\n package com.sample;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PackageDotHtmlMayBePackageInfo",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Javadoc",
"index": 95,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantArrayCreation",
"shortDescription": {
"text": "Redundant array creation"
},
"fullDescription": {
"text": "Reports arrays that are created specifically to be passed as a varargs parameter. Example: 'Arrays.asList(new String[]{\"Hello\", \"world\"})' The quick-fix replaces the array initializer with individual arguments: 'Arrays.asList(\"Hello\", \"world\")'",
"markdown": "Reports arrays that are created specifically to be passed as a varargs parameter.\n\nExample:\n\n`Arrays.asList(new String[]{\"Hello\", \"world\"})`\n\nThe quick-fix replaces the array initializer with individual arguments:\n\n`Arrays.asList(\"Hello\", \"world\")`"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantArrayCreation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonShortCircuitBoolean",
"shortDescription": {
"text": "Non-short-circuit boolean expression"
},
"fullDescription": {
"text": "Reports usages of the non-short-circuit forms of boolean 'and' and 'or' ('&', '|', '&=' and '|='). Although the non-short-circuit versions are occasionally useful, in most cases the short-circuit forms ('&&' and '||') are intended and such unintentional usages may lead to subtle bugs. A quick-fix is suggested to use the short-circuit versions. Example: 'void foo(boolean x, boolean y, boolean z) {\n if (x | y) { x |= z; }\n }' After the quick-fix is applied: 'void foo(boolean x, boolean y) {\n if (x || y) { x = x || z; }\n }'",
"markdown": "Reports usages of the non-short-circuit forms of boolean 'and' and 'or' (`&`, `|`, `&=` and `|=`). Although the non-short-circuit versions are occasionally useful, in most cases the short-circuit forms (`&&` and `||`) are intended and such unintentional usages may lead to subtle bugs.\n\n\nA quick-fix is suggested to use the short-circuit versions.\n\n**Example:**\n\n\n void foo(boolean x, boolean y, boolean z) {\n if (x | y) { x |= z; }\n }\n\nAfter the quick-fix is applied:\n\n\n void foo(boolean x, boolean y) {\n if (x || y) { x = x || z; }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonShortCircuitBooleanExpression",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ThrowablePrintedToSystemOut",
"shortDescription": {
"text": "'Throwable' printed to 'System.out'"
},
"fullDescription": {
"text": "Reports calls to 'System.out.println()' with an exception as an argument. Using print statements for logging exceptions hides the stack trace from you, which can complicate the investigation of the problem. It is recommended that you use logger instead. Calls to 'System.out.print()', 'System.err.println()', and 'System.err.print()' with an exception argument are also reported. It is better to use a logger to log exceptions instead. For example, instead of: 'try {\n foo();\n } catch (Exception e) {\n System.out.println(e);\n }' use the following code: 'try {\n foo();\n } catch (Exception e) {\n logger.warn(e); // logger call may be different\n }'",
"markdown": "Reports calls to `System.out.println()` with an exception as an argument.\n\nUsing print statements for logging exceptions hides the stack trace from you, which can complicate the investigation of the problem.\nIt is recommended that you use logger instead.\n\nCalls to `System.out.print()`, `System.err.println()`, and `System.err.print()` with an exception argument are also\nreported. It is better to use a logger to log exceptions instead.\n\nFor example, instead of:\n\n\n try {\n foo();\n } catch (Exception e) {\n System.out.println(e);\n }\n\nuse the following code:\n\n\n try {\n foo();\n } catch (Exception e) {\n logger.warn(e); // logger call may be different\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ThrowablePrintedToSystemOut",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code maturity",
"index": 67,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AmbiguousMethodCall",
"shortDescription": {
"text": "Call to inherited method looks like call to local method"
},
"fullDescription": {
"text": "Reports calls to a superclass method from an anonymous, inner or local class, if a method with the same signature exists in the code surrounding the class. In this case it may seem that a method from the surrounding code is called, when in fact it is a call to a method from the superclass. To clarify the intent of the code, it is recommended to add an explicit 'super' qualifier to the method call. Example: 'class Parent {\n void ambiguous(){}\n }\n\n class Example {\n void ambiguous(){}\n\n class Inner extends Parent {\n void example(){\n ambiguous(); //warning\n }\n }\n }' After the quick-fix is applied: 'class Parent {\n void ambiguous(){}\n }\n\n class Example {\n void ambiguous(){}\n\n class Inner extends Parent {\n void example(){\n super.ambiguous();\n }\n }\n }'",
"markdown": "Reports calls to a superclass method from an anonymous, inner or local class, if a method with the same signature exists in the code surrounding the class. In this case it may seem that a method from the surrounding code is called, when in fact it is a call to a method from the superclass.\n\n\nTo clarify the intent of the code, it is recommended to add an explicit\n`super` qualifier to the method call.\n\n**Example:**\n\n\n class Parent {\n void ambiguous(){}\n }\n\n class Example {\n void ambiguous(){}\n\n class Inner extends Parent {\n void example(){\n ambiguous(); //warning\n }\n }\n }\n \nAfter the quick-fix is applied:\n\n\n class Parent {\n void ambiguous(){}\n }\n\n class Example {\n void ambiguous(){}\n\n class Inner extends Parent {\n void example(){\n super.ambiguous();\n }\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AmbiguousMethodCall",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Visibility",
"index": 97,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StaticInheritance",
"shortDescription": {
"text": "Static inheritance"
},
"fullDescription": {
"text": "Reports interfaces that are implemented only to provide access to constants. This kind of inheritance is often confusing and may hide important dependency information.",
"markdown": "Reports interfaces that are implemented only to provide access to constants. This kind of inheritance is often confusing and may hide important dependency information."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "StaticInheritance",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Inheritance issues",
"index": 159,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantUnmodifiable",
"shortDescription": {
"text": "Redundant usage of unmodifiable collection wrappers"
},
"fullDescription": {
"text": "Reports redundant calls to unmodifiable collection wrappers from the 'Collections' class. If the argument that is passed to an unmodifiable collection wrapper is already immutable, such a wrapping becomes redundant. Example: 'List<String> x = Collections.unmodifiableList(Collections.singletonList(\"abc\"));' After the quick-fix is applied: 'List<String> x = Collections.singletonList(\"abc\");' In order to detect the methods that return unmodifiable collections, the inspection uses the 'org.jetbrains.annotations.Unmodifiable' and 'org.jetbrains.annotations.UnmodifiableView' annotations. Use them to extend the inspection to your own unmodifiable collection wrappers. New in 2020.3",
"markdown": "Reports redundant calls to unmodifiable collection wrappers from the `Collections` class.\n\nIf the argument that is passed to an unmodifiable\ncollection wrapper is already immutable, such a wrapping becomes redundant.\n\nExample:\n\n\n List<String> x = Collections.unmodifiableList(Collections.singletonList(\"abc\"));\n\nAfter the quick-fix is applied:\n\n\n List<String> x = Collections.singletonList(\"abc\");\n\nIn order to detect the methods that return unmodifiable collections, the\ninspection uses the `org.jetbrains.annotations.Unmodifiable`\nand `org.jetbrains.annotations.UnmodifiableView` annotations.\nUse them to extend the inspection to your own unmodifiable collection\nwrappers.\n\nNew in 2020.3"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantUnmodifiable",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConstantValue",
"shortDescription": {
"text": "Constant values"
},
"fullDescription": {
"text": "Reports expressions and conditions that always produce the same result, like true, false, null, or zero. Such expressions could be replaced with the corresponding constant value. Very often though they signal about a bug in the code. Examples: '// always true\n // root cause: || is used instead of &&\n if (x > 0 || x < 10) {}\n\n System.out.println(str.trim());\n // always false\n // root cause: variable was dereferenced before null-check\n if (str == null) {}' The inspection behavior may be controlled by a number of annotations, such as nullability annotations, '@Contract' annotation, '@Range' annotation and so on. Configure the inspection: Use the Don't report assertions with condition statically proven to be always true option to avoid reporting assertions that were statically proven to be always true. This also includes conditions like 'if (alwaysFalseCondition) throw new IllegalArgumentException();'. Use the Ignore assert statements option to control how the inspection treats 'assert' statements. By default, the option is disabled, which means that the assertions are assumed to be executed (-ea mode). If the option is enabled, the assertions will be completely ignored (-da mode). Use the Warn when constant is stored in variable option to display warnings when variable is used, whose value is known to be a constant. Before IntelliJ IDEA 2022.3, this inspection was part of \"Constant Conditions & Exceptions\" inspection. Now, it split into two inspections: \"Constant Values\" and \"Nullability and data flow problems\".",
"markdown": "Reports expressions and conditions that always produce the same result, like true, false, null, or zero. Such expressions could be replaced with the corresponding constant value. Very often though they signal about a bug in the code.\n\nExamples:\n\n // always true\n // root cause: || is used instead of &&\n if (x > 0 || x < 10) {}\n\n System.out.println(str.trim());\n // always false\n // root cause: variable was dereferenced before null-check\n if (str == null) {}\n\n\nThe inspection behavior may be controlled by a number of annotations, such as\n[nullability](https://www.jetbrains.com/help/idea/nullable-and-notnull-annotations.html) annotations,\n[@Contract](https://www.jetbrains.com/help/idea/contract-annotations.html) annotation,\n`@Range` annotation and so on.\n\nConfigure the inspection:\n\n* Use the **Don't report assertions with condition statically proven to be always true** option to avoid reporting assertions that were statically proven to be always true. This also includes conditions like `if (alwaysFalseCondition) throw new IllegalArgumentException();`.\n* Use the **Ignore assert statements** option to control how the inspection treats `assert` statements. By default, the option is disabled, which means that the assertions are assumed to be executed (-ea mode). If the option is enabled, the assertions will be completely ignored (-da mode).\n* Use the **Warn when constant is stored in variable** option to display warnings when variable is used, whose value is known to be a constant.\n\n\nBefore IntelliJ IDEA 2022.3, this inspection was part of \"Constant Conditions \\& Exceptions\" inspection. Now, it split into two inspections:\n\"Constant Values\" and \"Nullability and data flow problems\"."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ConstantValue",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CastCanBeReplacedWithVariable",
"shortDescription": {
"text": "Cast can be replaced with variable"
},
"fullDescription": {
"text": "Reports type cast operations that can be replaced with existing local or pattern variables with the same value. Example: 'void foo(Object obj) {\n String s = (String) obj;\n System.out.println(((String) obj).trim());\n }' After the quick-fix is applied: 'void foo(Object obj) {\n String s = (String) obj;\n System.out.println(s.trim());\n }' New in 2022.3",
"markdown": "Reports type cast operations that can be replaced with existing local or pattern variables with the same value.\n\nExample:\n\n\n void foo(Object obj) {\n String s = (String) obj;\n System.out.println(((String) obj).trim());\n }\n\nAfter the quick-fix is applied:\n\n\n void foo(Object obj) {\n String s = (String) obj;\n System.out.println(s.trim());\n }\n\nNew in 2022.3"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "CastCanBeReplacedWithVariable",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "VarargParameter",
"shortDescription": {
"text": "Varargs method"
},
"fullDescription": {
"text": "Reports methods that accept an arbitrary number of parameters (also known as varargs methods). Example: 'enum EnumConstants {\n A(null), B, C;\n\n EnumConstants(String... ss) {}\n}' A quick-fix is available to replace a variable argument parameter with an equivalent array parameter. Relevant arguments in method calls are wrapped in an array initializer expression. After the quick-fix is applied: 'enum EnumConstants {\n A(null), B(new String[]{}), C(new String[]{});\n\n EnumConstants(String[] ss) {}\n}' Varargs method appeared in Java 5. This inspection can help to downgrade for backward compatibility with earlier Java versions.",
"markdown": "Reports methods that accept an arbitrary number of parameters (also known as varargs methods).\n\n**Example:**\n\n\n enum EnumConstants {\n A(null), B, C;\n\n EnumConstants(String... ss) {}\n }\n\nA quick-fix is available to replace a variable argument\nparameter with an equivalent array parameter. Relevant arguments in method calls are wrapped in an array initializer expression.\nAfter the quick-fix is applied:\n\n\n enum EnumConstants {\n A(null), B(new String[]{}), C(new String[]{});\n\n EnumConstants(String[] ss) {}\n }\n\n\n*Varargs method* appeared in Java 5.\nThis inspection can help to downgrade for backward compatibility with earlier Java versions."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "VariableArgumentMethod",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level issues",
"index": 246,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ArrayLengthInLoopCondition",
"shortDescription": {
"text": "Array.length in loop condition"
},
"fullDescription": {
"text": "Reports accesses to the '.length' property of an array in the condition part of a loop statement. In highly resource constrained environments, such calls may have adverse performance implications. This inspection is intended for Java ME and other highly resource constrained environments. Applying the results of this inspection without consideration might have negative effects on code clarity and design. Example: 'void foo(Object[] x) {\n for (int i = 0; i < x.length; i++) { /**/ }\n }'",
"markdown": "Reports accesses to the `.length` property of an array in the condition part of a loop statement. In highly resource constrained environments, such calls may have adverse performance implications.\n\n\nThis inspection is intended for Java ME and other highly resource constrained environments.\nApplying the results of this inspection without consideration might have negative effects on code clarity and design.\n\n**Example:**\n\n\n void foo(Object[] x) {\n for (int i = 0; i < x.length; i++) { /**/ }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ArrayLengthInLoopCondition",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Performance/Embedded",
"index": 178,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonSerializableWithSerializationMethods",
"shortDescription": {
"text": "Non-serializable class with 'readObject()' or 'writeObject()'"
},
"fullDescription": {
"text": "Reports non-'Serializable' classes that define 'readObject()' or 'writeObject()' methods. Such methods in that context normally indicate an error. Example: 'public class SampleClass {\n private void readObject(ObjectInputStream str) {}\n private void writeObject(ObjectOutputStream str) {}\n }'",
"markdown": "Reports non-`Serializable` classes that define `readObject()` or `writeObject()` methods. Such methods in that context normally indicate an error.\n\n**Example:**\n\n\n public class SampleClass {\n private void readObject(ObjectInputStream str) {}\n private void writeObject(ObjectOutputStream str) {}\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonSerializableClassWithSerializationMethods",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Serialization issues",
"index": 54,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CloneReturnsClassType",
"shortDescription": {
"text": "'clone()' should have return type equal to the class it contains"
},
"fullDescription": {
"text": "Reports 'clone()' methods with return types different from the class they're located in. Often a 'clone()' method will have a return type of 'java.lang.Object', which makes it harder to use by its clients. Effective Java (the second and third editions) recommends making the return type of the 'clone()' method the same as the class type of the object it returns. Example: 'class Foo implements Cloneable {\n public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n throw new AssertionError();\n }\n }\n }' After the quick-fix is applied: 'class Foo implements Cloneable {\n public Foo clone() {\n try {\n return (Foo)super.clone();\n } catch (CloneNotSupportedException e) {\n throw new AssertionError();\n }\n }\n }'",
"markdown": "Reports `clone()` methods with return types different from the class they're located in.\n\nOften a `clone()` method will have a return type of `java.lang.Object`, which makes it harder to use by its clients.\n*Effective Java* (the second and third editions) recommends making the return type of the `clone()` method the same as the\nclass type of the object it returns.\n\n**Example:**\n\n\n class Foo implements Cloneable {\n public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n throw new AssertionError();\n }\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class Foo implements Cloneable {\n public Foo clone() {\n try {\n return (Foo)super.clone();\n } catch (CloneNotSupportedException e) {\n throw new AssertionError();\n }\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CloneReturnsClassType",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Cloning issues",
"index": 140,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OptionalToIf",
"shortDescription": {
"text": "'Optional' can be replaced with sequence of 'if' statements"
},
"fullDescription": {
"text": "Reports 'Optional' call chains that can be replaced with a sequence of 'if' statements. Example: 'return Optional.ofNullable(name)\n .map(this::extractInitials)\n .map(initials -> initials.toUpperCase(Locale.ENGLISH))\n .orElseGet(this::getDefault);' After the quick-fix is applied: 'if (name != null) {\n String initials = extractInitials(name);\n if (initials != null) return initials.toUpperCase(Locale.ENGLISH);\n }\n return getDefault();' 'java.util.Optional' appeared in Java 8. This inspection can help to downgrade for backward compatibility with earlier Java versions. New in 2020.2",
"markdown": "Reports `Optional` call chains that can be replaced with a sequence of `if` statements.\n\nExample:\n\n\n return Optional.ofNullable(name)\n .map(this::extractInitials)\n .map(initials -> initials.toUpperCase(Locale.ENGLISH))\n .orElseGet(this::getDefault);\n\nAfter the quick-fix is applied:\n\n\n if (name != null) {\n String initials = extractInitials(name);\n if (initials != null) return initials.toUpperCase(Locale.ENGLISH);\n }\n return getDefault();\n\n\n`java.util.Optional` appeared in Java 8.\nThis inspection can help to downgrade for backward compatibility with earlier Java versions.\n\nNew in 2020.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "OptionalToIf",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IllegalDependencyOnInternalPackage",
"shortDescription": {
"text": "Illegal dependency on internal package"
},
"fullDescription": {
"text": "Reports references in modules without 'module-info.java' on packages which are not exported from named modules. Such configuration may occur when some modules in the project are already migrated to Java modules but others are still non-modular. By analogy to the JDK, such non-modular code should not get access to the code in named modules which is not explicitly exported.",
"markdown": "Reports references in modules without `module-info.java` on packages which are not exported from named modules.\n\nSuch configuration may occur when some modules in the project are already migrated to Java modules but others are still non-modular.\nBy analogy to the JDK, such non-modular code should not get access to the code in named modules which is not explicitly exported."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "IllegalDependencyOnInternalPackage",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JVM languages",
"index": 47,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OverlyComplexArithmeticExpression",
"shortDescription": {
"text": "Overly complex arithmetic expression"
},
"fullDescription": {
"text": "Reports arithmetic expressions with the excessive number of terms. Such expressions might be hard to understand and might contain errors. Parameters, field references, and other primary expressions are counted as a term. Example: 'int calc(int a, int b) {\n return a + a + a + b + b + b + b; // The line contains 7 terms and will be reported.\n }' Use the field below to specify a number of terms allowed in arithmetic expressions.",
"markdown": "Reports arithmetic expressions with the excessive number of terms. Such expressions might be hard to understand and might contain errors.\n\nParameters, field references, and other primary expressions are counted as a term.\n\n**Example:**\n\n int calc(int a, int b) {\n return a + a + a + b + b + b + b; // The line contains 7 terms and will be reported.\n }\n\nUse the field below to specify a number of terms allowed in arithmetic expressions."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OverlyComplexArithmeticExpression",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Numeric issues",
"index": 49,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ThreadDumpStack",
"shortDescription": {
"text": "Call to 'Thread.dumpStack()'"
},
"fullDescription": {
"text": "Reports usages of 'Thread.dumpStack()'. Such statements are often used for temporary debugging and should be either removed from the production code or replaced with a more robust logging facility.",
"markdown": "Reports usages of `Thread.dumpStack()`.\n\nSuch statements are often used for temporary debugging and should be either removed from the production code\nor replaced with a more robust logging facility."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CallToThreadDumpStack",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code maturity",
"index": 67,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryBlockStatement",
"shortDescription": {
"text": "Unnecessary code block"
},
"fullDescription": {
"text": "Reports code blocks that are redundant to the semantics of the program and can be replaced with their contents. The code blocks that are the bodies of 'if', 'do', 'while', or 'for' statements will not be reported by this inspection. Example: 'void foo() {\n { // unnecessary\n int result = call();\n analyze(result);\n } // unnecessary\n }' Configure the inspection: Use the Ignore branches of 'switch' statements option to ignore the code blocks that are used as branches of switch statements.",
"markdown": "Reports code blocks that are redundant to the semantics of the program and can be replaced with their contents.\n\nThe code blocks that are the bodies of `if`, `do`,\n`while`, or `for` statements will not be reported by this\ninspection.\n\nExample:\n\n\n void foo() {\n { // unnecessary\n int result = call();\n analyze(result);\n } // unnecessary\n }\n\nConfigure the inspection:\n\n\nUse the **Ignore branches of 'switch' statements** option to ignore the code blocks that are used as branches of switch statements."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "UnnecessaryCodeBlock",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryUnboxing",
"shortDescription": {
"text": "Unnecessary unboxing"
},
"fullDescription": {
"text": "Reports unboxing, that is explicit unwrapping of wrapped primitive values. Unboxing is unnecessary as of Java 5 and later, and can safely be removed. Examples: 'Integer i = Integer.valueOf(42).intValue();' → 'Integer i = Integer.valueOf(42);' 'int k = Integer.valueOf(42).intValue();' → 'int k = Integer.valueOf(42);' (reports only when the Only report truly superfluously unboxed expressions option is not checked) Use the Only report truly superfluously unboxed expressions option to only report truly superfluous unboxing, where an unboxed value is immediately boxed either implicitly or explicitly. In this case, the entire unboxing-boxing step can be removed. The inspection doesn't report simple explicit unboxing. This inspection only reports if the language level of the project or module is 5 or higher.",
"markdown": "Reports unboxing, that is explicit unwrapping of wrapped primitive values.\n\nUnboxing is unnecessary as of Java 5 and later, and can safely be removed.\n\n**Examples:**\n\n* `Integer i = Integer.valueOf(42).intValue();` → `Integer i = Integer.valueOf(42);`\n* `int k = Integer.valueOf(42).intValue();` → `int k = Integer.valueOf(42);`\n\n (reports only when the **Only report truly superfluously unboxed expressions** option is not checked)\n\n\nUse the **Only report truly superfluously unboxed expressions** option to only report truly superfluous unboxing,\nwhere an unboxed value is immediately boxed either implicitly or explicitly.\nIn this case, the entire unboxing-boxing step can be removed. The inspection doesn't report simple explicit unboxing.\n\nThis inspection only reports if the language level of the project or module is 5 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryUnboxing",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 5",
"index": 117,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IteratorHasNextCallsIteratorNext",
"shortDescription": {
"text": "'Iterator.hasNext()' which calls 'next()'"
},
"fullDescription": {
"text": "Reports implementations of 'Iterator.hasNext()' or 'ListIterator.hasPrevious()' that call 'Iterator.next()' or 'ListIterator.previous()' on the iterator instance. Such calls are almost certainly an error, as methods like 'hasNext()' should not modify the iterators state, while 'next()' should. Example: 'class MyIterator implements Iterator<Integer> {\n public boolean hasNext() {\n return next() != null;\n }\n }'",
"markdown": "Reports implementations of `Iterator.hasNext()` or `ListIterator.hasPrevious()` that call `Iterator.next()` or `ListIterator.previous()` on the iterator instance. Such calls are almost certainly an error, as methods like `hasNext()` should not modify the iterators state, while `next()` should.\n\n**Example:**\n\n\n class MyIterator implements Iterator<Integer> {\n public boolean hasNext() {\n return next() != null;\n }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "IteratorHasNextCallsIteratorNext",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EqualsAndHashcode",
"shortDescription": {
"text": "'equals()' and 'hashCode()' not paired"
},
"fullDescription": {
"text": "Reports classes that override the 'equals()' method but do not override the 'hashCode()' method or vice versa, which can potentially lead to problems when the class is added to a 'Collection' or a 'HashMap'. The quick-fix generates the default implementation for an absent method. Example: 'class StringHolder {\n String s;\n\n @Override public int hashCode() {\n return s != null ? s.hashCode() : 0;\n }\n}' After the quick-fix is applied: 'class StringHolder {\n String s;\n\n @Override public int hashCode() {\n return s != null ? s.hashCode() : 0;\n }\n\n @Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (!(o instanceof StringHolder)) return false;\n\n StringHolder holder = (StringHolder)o;\n\n if (s != null ? !s.equals(holder.s) : holder.s != null) return false;\n\n return true;\n }\n}'",
"markdown": "Reports classes that override the `equals()` method but do not override the `hashCode()` method or vice versa, which can potentially lead to problems when the class is added to a `Collection` or a `HashMap`.\n\nThe quick-fix generates the default implementation for an absent method.\n\nExample:\n\n\n class StringHolder {\n String s;\n\n @Override public int hashCode() {\n return s != null ? s.hashCode() : 0;\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class StringHolder {\n String s;\n\n @Override public int hashCode() {\n return s != null ? s.hashCode() : 0;\n }\n\n @Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (!(o instanceof StringHolder)) return false;\n\n StringHolder holder = (StringHolder)o;\n\n if (s != null ? !s.equals(holder.s) : holder.s != null) return false;\n\n return true;\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EqualsAndHashcode",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StringRepeatCanBeUsed",
"shortDescription": {
"text": "String.repeat() can be used"
},
"fullDescription": {
"text": "Reports loops that can be replaced with a single 'String.repeat()' method (available since Java 11). Example: 'void append(StringBuilder sb, int count, Object obj) {\n for (int i = 0; i < count; i++) {\n sb.append(obj);\n }\n }' After the quick-fix is applied: 'void append(StringBuilder sb, int count, Object obj) {\n sb.append(String.valueOf(obj).repeat(Math.max(0, count)));\n }' By default, the inspection may wrap 'count' with 'Math.max(0, count)' if it cannot prove statically that 'count' is not negative. This is done to prevent possible semantics change, as 'String.repeat()' rejects negative numbers. Use the Add Math.max(0,count) to avoid possible semantics change option to disable this behavior if required. Similarly, a string you want to repeat can be wrapped in 'String.valueOf' to prevent possible 'NullPointerException' if it's unknown whether it can be 'null'. This inspection only reports if the language level of the project or module is 11 or higher. New in 2019.1",
"markdown": "Reports loops that can be replaced with a single `String.repeat()` method (available since Java 11).\n\n**Example:**\n\n\n void append(StringBuilder sb, int count, Object obj) {\n for (int i = 0; i < count; i++) {\n sb.append(obj);\n }\n }\n\nAfter the quick-fix is applied:\n\n\n void append(StringBuilder sb, int count, Object obj) {\n sb.append(String.valueOf(obj).repeat(Math.max(0, count)));\n }\n\n\nBy default, the inspection may wrap `count` with `Math.max(0, count)` if it cannot prove statically that `count` is\nnot negative. This is done to prevent possible semantics change, as `String.repeat()` rejects negative numbers.\nUse the **Add Math.max(0,count) to avoid possible semantics change** option to disable this behavior if required.\n\nSimilarly, a string you want to repeat can be wrapped in\n`String.valueOf` to prevent possible `NullPointerException` if it's unknown whether it can be `null`.\n\nThis inspection only reports if the language level of the project or module is 11 or higher.\n\nNew in 2019.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "StringRepeatCanBeUsed",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 11",
"index": 185,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SynchronizationOnStaticField",
"shortDescription": {
"text": "Synchronization on 'static' field"
},
"fullDescription": {
"text": "Reports synchronization on 'static' fields. While not strictly incorrect, synchronization on 'static' fields can lead to bad performance because of contention.",
"markdown": "Reports synchronization on `static` fields. While not strictly incorrect, synchronization on `static` fields can lead to bad performance because of contention."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SynchronizationOnStaticField",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Threading issues",
"index": 82,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SwitchStatementWithConfusingDeclaration",
"shortDescription": {
"text": "Local variable used and declared in different 'switch' branches"
},
"fullDescription": {
"text": "Reports local variables declared in one branch of a 'switch' statement and used in another branch. Such declarations can be extremely confusing. Example: 'switch(i) {\n case 2:\n int x = 0;\n break;\n case 3:\n x = 3;\n System.out.println(x);\n break;\n }'",
"markdown": "Reports local variables declared in one branch of a `switch` statement and used in another branch. Such declarations can be extremely confusing.\n\nExample:\n\n\n switch(i) {\n case 2:\n int x = 0;\n break;\n case 3:\n x = 3;\n System.out.println(x);\n break;\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "LocalVariableUsedAndDeclaredInDifferentSwitchBranches",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SuspiciousArrayMethodCall",
"shortDescription": {
"text": "Suspicious 'Arrays' method call"
},
"fullDescription": {
"text": "Reports calls to non-generic-array manipulation methods like 'Arrays.fill()' with mismatched argument types. Such calls don't do anything useful and are likely to be mistakes. Example: 'int foo(String[] strings) {\n return Arrays.binarySearch(strings, 1);\n }' New in 2017.2",
"markdown": "Reports calls to non-generic-array manipulation methods like `Arrays.fill()` with mismatched argument types. Such calls don't do anything useful and are likely to be mistakes.\n\n**Example:**\n\n\n int foo(String[] strings) {\n return Arrays.binarySearch(strings, 1);\n }\n\nNew in 2017.2"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SuspiciousArrayMethodCall",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassHasNoToStringMethod",
"shortDescription": {
"text": "Class does not override 'toString()' method"
},
"fullDescription": {
"text": "Reports classes without a 'toString()' method.",
"markdown": "Reports classes without a `toString()` method."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ClassHasNoToStringMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/toString() issues",
"index": 263,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FieldAccessNotGuarded",
"shortDescription": {
"text": "Unguarded field access or method call"
},
"fullDescription": {
"text": "Reports accesses of fields declared as '@GuardedBy' that are not guarded by an appropriate synchronization structure. Example: '@GuardedBy(\"this\")\n void x() {\n notify();\n }\n void y() {\n x(); // unguarded method call\n }' Supported '@GuardedBy' annotations are: 'net.jcip.annotations.GuardedBy' 'javax.annotation.concurrent.GuardedBy' 'org.apache.http.annotation.GuardedBy' 'com.android.annotations.concurrency.GuardedBy' 'androidx.annotation.GuardedBy' 'com.google.errorprone.annotations.concurrent.GuardedBy'",
"markdown": "Reports accesses of fields declared as `@GuardedBy` that are not guarded by an appropriate synchronization structure.\n\nExample:\n\n\n @GuardedBy(\"this\")\n void x() {\n notify();\n }\n void y() {\n x(); // unguarded method call\n }\n\nSupported `@GuardedBy` annotations are:\n\n* `net.jcip.annotations.GuardedBy`\n* `javax.annotation.concurrent.GuardedBy`\n* `org.apache.http.annotation.GuardedBy`\n* `com.android.annotations.concurrency.GuardedBy`\n* `androidx.annotation.GuardedBy`\n* `com.google.errorprone.annotations.concurrent.GuardedBy`"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FieldAccessNotGuarded",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Concurrency annotation issues",
"index": 99,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MagicNumber",
"shortDescription": {
"text": "Magic number"
},
"fullDescription": {
"text": "Reports \"magic numbers\": numeric literals that are not named by a constant declaration. Using magic numbers can lead to unclear code, as well as errors if a magic number is changed in one location but remains unchanged not another. The numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 100, 1000, 0L, 1L, 2L, 0.0, 1.0, 0.0F and 1.0F are not reported by this inspection. Example: 'void checkFileSize(long bytes) {\n if (bytes > 1_048_576) {\n throw new IllegalArgumentException(\"too big\");\n }\n }' A quick-fix introduces a new constant: 'static final int MAX_SUPPORTED_FILE_SIZE = 1_048_576;\n\n void checkFileSize(long bytes) {\n if (bytes > MAX_SUPPORTED_FILE_SIZE) {\n throw new IllegalArgumentException(\"too big\");\n }\n }' Configure the inspection: Use the Ignore constants in 'hashCode()' methods option to disable this inspection within 'hashCode()' methods. Use the Ignore in annotations option to ignore magic numbers in annotations. Use the Ignore initial capacity for StringBuilders and Collections option to ignore magic numbers used as initial capacity when constructing 'Collection', 'Map', 'StringBuilder' or 'StringBuffer' objects.",
"markdown": "Reports \"magic numbers\": numeric literals that are not named by a constant declaration.\n\nUsing magic numbers can lead to unclear code, as well as errors if a magic\nnumber is changed in one location but remains unchanged not another. The numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 100, 1000, 0L, 1L, 2L,\n0.0, 1.0, 0.0F and 1.0F are not reported by this inspection.\n\nExample:\n\n\n void checkFileSize(long bytes) {\n if (bytes > 1_048_576) {\n throw new IllegalArgumentException(\"too big\");\n }\n }\n\nA quick-fix introduces a new constant:\n\n\n static final int MAX_SUPPORTED_FILE_SIZE = 1_048_576;\n\n void checkFileSize(long bytes) {\n if (bytes > MAX_SUPPORTED_FILE_SIZE) {\n throw new IllegalArgumentException(\"too big\");\n }\n }\n\nConfigure the inspection:\n\n* Use the **Ignore constants in 'hashCode()' methods** option to disable this inspection within `hashCode()` methods.\n* Use the **Ignore in annotations** option to ignore magic numbers in annotations.\n* Use the **Ignore initial capacity for StringBuilders and Collections** option to ignore magic numbers used as initial capacity when constructing `Collection`, `Map`, `StringBuilder` or `StringBuffer` objects."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MagicNumber",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Abstraction issues",
"index": 83,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NegativelyNamedBooleanVariable",
"shortDescription": {
"text": "Negatively named boolean variable"
},
"fullDescription": {
"text": "Reports negatively named variables, for example: 'disabled', 'hidden', or 'isNotChanged'. Usually, inverting the 'boolean' value and removing the negation from the name makes the code easier to understand. Example: 'boolean disabled = false;'",
"markdown": "Reports negatively named variables, for example: `disabled`, `hidden`, or `isNotChanged`.\n\nUsually, inverting the `boolean` value and removing the negation from the name makes the code easier to understand.\n\nExample:\n\n\n boolean disabled = false;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NegativelyNamedBooleanVariable",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Data flow",
"index": 61,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MethodReturnAlwaysConstant",
"shortDescription": {
"text": "Method returns per-class constant"
},
"fullDescription": {
"text": "Reports methods that only return a constant, which may differ for various inheritors. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor.",
"markdown": "Reports methods that only return a constant, which may differ for various inheritors.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MethodReturnAlwaysConstant",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SillyAssignment",
"shortDescription": {
"text": "Variable is assigned to itself"
},
"fullDescription": {
"text": "Reports assignments of a variable to itself. Example: 'a = a;' The quick-fix removes the assigment.",
"markdown": "Reports assignments of a variable to itself.\n\n**Example:**\n\n\n a = a;\n\nThe quick-fix removes the assigment."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SillyAssignment",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Declaration redundancy",
"index": 10,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BoundedWildcard",
"shortDescription": {
"text": "Can use bounded wildcard"
},
"fullDescription": {
"text": "Reports generic method parameters that can make use of bounded wildcards. Example: 'void process(Consumer<Number> consumer);' should be replaced with: 'void process(Consumer<? super Number> consumer);' This method signature is more flexible because it accepts more types: not only 'Consumer<Number>', but also 'Consumer<Object>'. Likewise, type parameters in covariant position: 'T produce(Producer<T> p);' should be replaced with: 'T produce(Producer<? extends T> p);' To quote Joshua Bloch in Effective Java third Edition: Item 31: Use bounded wildcards to increase API flexibility Using wildcard types in your APIs, while tricky, makes the APIs far more flexible. If you write a library that will be widely used, the proper use of wildcard types should be considered mandatory. Remember the basic rule: producer-extends, consumer-super (PECS). Also remember that all Comparables and Comparators are consumers. Use the inspection options to toggle the reporting for: invariant classes. An example of an invariant class is 'java.util.List<T>' because it both accepts values (via the 'List.add(T)' method) and produces values (via the 'T List.get()' method). On the other hand, 'contravariant' classes only receive values, for example, 'java.util.function.Consumer<T>' with the only method 'accept(T)'. Similarly, 'covariant' classes only produce values, for example, 'java.util.function.Supplier<T>' with the only method 'T get()'. People often use bounded wildcards in covariant/contravariant classes but avoid wildcards in invariant classes, for example, 'void process(List<? extends T> l)'. Disable this option to ignore such invariant classes and leave them rigidly typed, for example, 'void process(List<T> l)'. 'private' methods, which can be considered as not a part of the public API instance methods",
"markdown": "Reports generic method parameters that can make use of [bounded wildcards](https://en.wikipedia.org/wiki/Wildcard_(Java)).\n\n**Example:**\n\n\n void process(Consumer<Number> consumer);\n\nshould be replaced with:\n\n\n void process(Consumer<? super Number> consumer);\n\n\nThis method signature is more flexible because it accepts more types: not only\n`Consumer<Number>`, but also `Consumer<Object>`.\n\nLikewise, type parameters in covariant position:\n\n\n T produce(Producer<T> p);\n\nshould be replaced with:\n\n\n T produce(Producer<? extends T> p);\n\n\nTo quote [Joshua Bloch](https://en.wikipedia.org/wiki/Joshua_Bloch#Effective_Java) in *Effective Java* third Edition:\n>\n> #### Item 31: Use bounded wildcards to increase API flexibility\n>\n> Using wildcard types in your APIs, while tricky, makes the APIs far more flexible. If you write a library that will be widely used, the proper use of wildcard types should be considered mandatory. Remember the basic rule: producer-extends, consumer-super (PECS). Also remember that all Comparables and Comparators are consumers.\n\n\nUse the inspection options to toggle the reporting for:\n\n*\n invariant classes. An example of an invariant class is `java.util.List<T>` because it both accepts values\n (via the `List.add(T)` method)\n and produces values (via the `T List.get()` method).\n\n\n On the\n other hand, `contravariant` classes only receive values, for example, `java.util.function.Consumer<T>`\n with the only method `accept(T)`. Similarly, `covariant` classes\n only produce values, for example, `java.util.function.Supplier<T>`\n with the only method `T get()`.\n\n\n People often use bounded wildcards in covariant/contravariant\n classes but avoid wildcards in invariant classes, for example, `void process(List<? extends T> l)`.\n Disable this option to ignore such invariant classes and leave them rigidly typed, for example, `void\n process(List<T> l)`.\n*\n `private` methods, which can be considered as not a part of the public API\n\n*\n instance methods"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "BoundedWildcard",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code style issues",
"index": 132,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IfStatementWithTooManyBranches",
"shortDescription": {
"text": "'if' statement with too many branches"
},
"fullDescription": {
"text": "Reports 'if' statements with too many branches. Such statements may be confusing and are often a sign of inadequate levels of design abstraction. Use the Maximum number of branches field to specify the maximum number of branches an 'if' statement is allowed to have.",
"markdown": "Reports `if` statements with too many branches.\n\nSuch statements may be confusing and are often a sign of inadequate levels of design\nabstraction.\n\n\nUse the **Maximum number of branches** field to specify the maximum number of branches an `if` statement is allowed to have."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "IfStatementWithTooManyBranches",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Control flow issues",
"index": 34,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonSerializableObjectPassedToObjectStream",
"shortDescription": {
"text": "Non-serializable object passed to 'ObjectOutputStream'"
},
"fullDescription": {
"text": "Reports non-'Serializable' objects used as arguments to 'java.io.ObjectOutputStream.write()'. Such calls will result in runtime exceptions. This inspection assumes objects of the types 'java.util.Collection' and 'java.util.Map' to be 'Serializable', unless the types they are declared in are non-'Serializable'. Example: 'public class IWantToSerializeThis {\n public static void main(String[] args) throws IOException {\n try(var stream = new ObjectOutputStream(Files.newOutputStream(Paths.get(\"output\")))) {\n // Warning -- will fail with NotSerializableException\n stream.writeObject(new IWantToSerializeThis());\n }\n }\n }'",
"markdown": "Reports non-`Serializable` objects used as arguments to `java.io.ObjectOutputStream.write()`. Such calls will result in runtime exceptions.\n\n\nThis inspection assumes objects of the types `java.util.Collection` and\n`java.util.Map` to be `Serializable`, unless the types\nthey are declared in are non-`Serializable`.\n\n**Example:**\n\n\n public class IWantToSerializeThis {\n public static void main(String[] args) throws IOException {\n try(var stream = new ObjectOutputStream(Files.newOutputStream(Paths.get(\"output\")))) {\n // Warning -- will fail with NotSerializableException\n stream.writeObject(new IWantToSerializeThis());\n }\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonSerializableObjectPassedToObjectStream",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Serialization issues",
"index": 54,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UseOfObsoleteDateTimeApi",
"shortDescription": {
"text": "Use of obsolete date-time API"
},
"fullDescription": {
"text": "Reports usages of 'java.util.Date', 'java.util.Calendar', 'java.util.GregorianCalendar', 'java.util.TimeZone', and 'java.util.SimpleTimeZone'. While still supported, these classes were made obsolete by the JDK8 Date-Time API and should probably not be used in new development.",
"markdown": "Reports usages of `java.util.Date`, `java.util.Calendar`, `java.util.GregorianCalendar`, `java.util.TimeZone`, and `java.util.SimpleTimeZone`.\n\nWhile still supported, these classes were made obsolete by the JDK8 Date-Time API and should probably\nnot be used in new development."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UseOfObsoleteDateTimeApi",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Code maturity",
"index": 67,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NullArgumentToVariableArgMethod",
"shortDescription": {
"text": "Confusing argument to varargs method"
},
"fullDescription": {
"text": "Reports calls to variable arity methods that have a single argument in the vararg parameter position, which is either a 'null' or an array of a subtype of the vararg parameter. Such an argument may be confusing as it is unclear if a varargs or non-varargs call is desired. Example: 'String[] ss = new String[]{\"foo\", \"bar\"};\n System.out.printf(\"%s\", ss);' In this example only the first element of the array will be printed, not the entire array.",
"markdown": "Reports calls to variable arity methods that have a single argument in the vararg parameter position, which is either a `null` or an array of a subtype of the vararg parameter. Such an argument may be confusing as it is unclear if a varargs or non-varargs call is desired.\n\n**Example:**\n\n\n String[] ss = new String[]{\"foo\", \"bar\"};\n System.out.printf(\"%s\", ss);\n\nIn this example only the first element of the array will be printed, not the entire array."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ConfusingArgumentToVarargsMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Probable bugs",
"index": 13,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AnonymousInnerClassMayBeStatic",
"shortDescription": {
"text": "Anonymous class may be a named 'static' inner class"
},
"fullDescription": {
"text": "Reports anonymous classes that may be safely replaced with 'static' inner classes. An anonymous class may be a 'static' inner class if it doesn't explicitly reference its enclosing instance or local classes from its surrounding method. A 'static' inner class does not keep an implicit reference to its enclosing instance. This prevents a common cause of memory leaks and uses less memory per class instance. Since Java 18, only serializable anonymous classes keep an implicit reference to its enclosing instance, if this reference is not used. So, if module language level is Java 18 or higher, this inspection reports serializable classes only. The quick-fix extracts the anonymous class into a named 'static' inner class. Example: 'void sample() {\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n }\n });\n }' After the quick-fix is applied: 'void sample() {\n Thread thread = new Thread(new Task());\n }\n\n private static class Task implements Runnable {\n @Override\n public void run() {\n }\n }'",
"markdown": "Reports anonymous classes that may be safely replaced with `static` inner classes. An anonymous class may be a `static` inner class if it doesn't explicitly reference its enclosing instance or local classes from its surrounding method.\n\n\nA `static` inner class does not keep an implicit reference to its enclosing instance.\nThis prevents a common cause of memory leaks and uses less memory per class instance.\n\n\nSince Java 18, only serializable anonymous classes keep an implicit reference to its enclosing instance,\nif this reference is not used. So, if module language level is Java 18 or higher,\nthis inspection reports serializable classes only.\n\nThe quick-fix extracts the anonymous class into a named `static` inner class.\n\n**Example:**\n\n\n void sample() {\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n }\n });\n }\n\nAfter the quick-fix is applied:\n\n\n void sample() {\n Thread thread = new Thread(new Task());\n }\n\n private static class Task implements Runnable {\n @Override\n public void run() {\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AnonymousInnerClassMayBeStatic",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Memory",
"index": 166,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UsagesOfObsoleteApi",
"shortDescription": {
"text": "Usages of ApiStatus.@Obsolete"
},
"fullDescription": {
"text": "Reports declarations (classes, methods, fields) annotated as '@ApiStatus.Obsolete'. Sometimes it's impossible to delete the current API, though it might not work correctly, there is a newer, or better, or more generic API. This way, it's a weaker variant of '@Deprecated' annotation. The annotated API is not supposed to be used in the new code, but it's permitted to postpone the migration of the existing code, therefore the usage is not considered a warning.",
"markdown": "Reports declarations (classes, methods, fields) annotated as `@ApiStatus.Obsolete`.\n\n\nSometimes it's impossible to delete the current API, though it might not work correctly, there is a newer, or better, or more generic API.\nThis way, it's a weaker variant of `@Deprecated` annotation.\nThe annotated API is not supposed to be used in the new code, but it's permitted to postpone the migration of the existing code,\ntherefore the usage is not considered a warning."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "UsagesOfObsoleteApi",
"ideaSeverity": "TEXT ATTRIBUTES",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "JVM languages",
"index": 47,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConstantDeclaredInInterface",
"shortDescription": {
"text": "Constant declared in interface"
},
"fullDescription": {
"text": "Reports constants ('public static final' fields) declared in interfaces. Some coding standards require declaring constants in abstract classes instead.",
"markdown": "Reports constants (`public static final` fields) declared in interfaces.\n\nSome coding standards require declaring constants in abstract classes instead."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ConstantDeclaredInInterface",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class structure",
"index": 19,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NoExplicitFinalizeCalls",
"shortDescription": {
"text": "'finalize()' called explicitly"
},
"fullDescription": {
"text": "Reports calls to 'Object.finalize()'. Calling 'Object.finalize()' explicitly may result in objects being placed in an inconsistent state. The garbage collector automatically calls this method on an object when it determines that there are no references to this object. The inspection doesn't report calls to 'super.finalize()' from within implementations of 'finalize()' as they're benign. Example: 'MyObject m = new MyObject();\n m.finalize();\n System.gc()'",
"markdown": "Reports calls to `Object.finalize()`.\n\nCalling `Object.finalize()` explicitly may result in objects being placed in an\ninconsistent state.\nThe garbage collector automatically calls this method on an object when it determines that there are no references to this object.\n\nThe inspection doesn't report calls to `super.finalize()` from within implementations of `finalize()` as\nthey're benign.\n\n**Example:**\n\n\n MyObject m = new MyObject();\n m.finalize();\n System.gc()\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "FinalizeCalledExplicitly",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Finalization",
"index": 77,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StaticImport",
"shortDescription": {
"text": "Static import"
},
"fullDescription": {
"text": "Reports 'import static' statements. Such 'import' statements are not supported under Java 1.4 or earlier JVMs. Configure the inspection: Use the table below to specify the classes that will be ignored by the inspection when used in an 'import static' statement. Use the Ignore single field static imports checkbox to ignore single-field 'import static' statements. Use the Ignore single method static imports checkbox to ignore single-method 'import static' statements.",
"markdown": "Reports `import static` statements.\n\nSuch `import` statements are not supported under Java 1.4 or earlier JVMs.\n\nConfigure the inspection:\n\n* Use the table below to specify the classes that will be ignored by the inspection when used in an `import static` statement.\n* Use the **Ignore single field static imports** checkbox to ignore single-field `import static` statements.\n* Use the **Ignore single method static imports** checkbox to ignore single-method `import static` statements."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "StaticImport",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Imports",
"index": 43,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceNullCheck",
"shortDescription": {
"text": "Null check can be replaced with method call"
},
"fullDescription": {
"text": "Reports 'null' checks that can be replaced with a call to a static method from 'Objects' or 'Stream'. Example: 'if (message == null) {\n application.messageStorage().save(new EmptyMessage());\n } else {\n application.messageStorage().save(message);\n }' After the quick-fix is applied: 'application.messageStorage()\n .save(Objects.requireNonNullElseGet(message, () -> new EmptyMessage()));' Use the Don't warn if the replacement is longer than the original option to ignore the cases when the replacement is longer than the original code. New in 2017.3",
"markdown": "Reports `null` checks that can be replaced with a call to a static method from `Objects` or `Stream`.\n\n**Example:**\n\n\n if (message == null) {\n application.messageStorage().save(new EmptyMessage());\n } else {\n application.messageStorage().save(message);\n }\n\nAfter the quick-fix is applied:\n\n\n application.messageStorage()\n .save(Objects.requireNonNullElseGet(message, () -> new EmptyMessage()));\n\n\nUse the **Don't warn if the replacement is longer than the original** option to ignore the cases when the replacement is longer than the\noriginal code.\n\nNew in 2017.3"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ReplaceNullCheck",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Java language level migration aids/Java 9",
"index": 205,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FieldCount",
"shortDescription": {
"text": "Class with too many fields"
},
"fullDescription": {
"text": "Reports classes whose number of fields exceeds the specified maximum. Classes with a large number of fields are often trying to do too much. Consider splitting such a class into multiple smaller classes. Configure the inspection: Use the Field count limit field to specify the maximum allowed number of fields in a class. Use the Include constant fields in count option to indicate whether constant fields should be counted. By default only immutable 'static final' objects are counted as constants. Use the 'static final' fields count as constant option to count any 'static final' field as constant. Use the Include enum constants in count option to specify whether 'enum' constants in 'enum' classes should be counted.",
"markdown": "Reports classes whose number of fields exceeds the specified maximum.\n\nClasses with a large number of fields are often trying to do too much. Consider splitting such a class into multiple smaller classes.\n\nConfigure the inspection:\n\n* Use the **Field count limit** field to specify the maximum allowed number of fields in a class.\n* Use the **Include constant fields in count** option to indicate whether constant fields should be counted.\n* By default only immutable `static final` objects are counted as constants. Use the **'static final' fields count as constant** option to count any `static final` field as constant.\n* Use the **Include enum constants in count** option to specify whether `enum` constants in `enum` classes should be counted."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ClassWithTooManyFields",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Class metrics",
"index": 125,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "org.jetbrains.kotlin",
"version": "232-1.9.0-IJ8660.185",
"rules": [
{
"id": "RemoveSingleExpressionStringTemplate",
"shortDescription": {
"text": "Redundant string template"
},
"fullDescription": {
"text": "Reports single-expression string templates that can be safely removed. Example: 'val x = \"Hello\"\n val y = \"$x\"' After the quick-fix is applied: 'val x = \"Hello\"\n val y = x // <== Updated'",
"markdown": "Reports single-expression string templates that can be safely removed.\n\n**Example:**\n\n val x = \"Hello\"\n val y = \"$x\"\n\nAfter the quick-fix is applied:\n\n val x = \"Hello\"\n val y = x // <== Updated\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RemoveSingleExpressionStringTemplate",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IncompleteDestructuring",
"shortDescription": {
"text": "Incomplete destructuring declaration"
},
"fullDescription": {
"text": "Reports incomplete destructuring declaration. Example: 'data class Person(val name: String, val age: Int)\n val person = Person(\"\", 0)\n val (name) = person' The quick fix completes destructuring declaration with new variables: 'data class Person(val name: String, val age: Int)\n val person = Person(\"\", 0)\n val (name, age) = person'",
"markdown": "Reports incomplete destructuring declaration.\n\n**Example:**\n\n\n data class Person(val name: String, val age: Int)\n val person = Person(\"\", 0)\n val (name) = person\n\nThe quick fix completes destructuring declaration with new variables:\n\n\n data class Person(val name: String, val age: Int)\n val person = Person(\"\", 0)\n val (name, age) = person\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "IncompleteDestructuring",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TrailingComma",
"shortDescription": {
"text": "Trailing comma recommendations"
},
"fullDescription": {
"text": "Reports trailing commas that do not follow the recommended style guide.",
"markdown": "Reports trailing commas that do not follow the recommended [style guide](https://kotlinlang.org/docs/coding-conventions.html#trailing-commas)."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "TrailingComma",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AmbiguousNonLocalJump",
"shortDescription": {
"text": "Ambiguous non-local 'break' or 'continue'"
},
"fullDescription": {
"text": "Reports 'break' or 'continue' usages inside of lambdas of loop-like functions. 'break' and 'continue' keywords always apply to the real loops ('for', 'while', 'do-while'). 'break' and 'continue' never apply to any function; for example, 'break' and 'continue' don't apply to 'forEach', 'filter', 'map'. Using 'break' or 'continue' inside a loop-like function (for example, 'forEach') may be confusing. The inspection suggests adding a label to clarify to which statement 'break' or 'continue' applies to. Since Kotlin doesn't have a concept of loop-like functions, the inspection uses the heuristic. It assumes that functions that don't have one of 'callsInPlace(EXACTLY_ONCE)' or 'callsInPlace(AT_LEAST_ONCE)' contracts are loop-like functions. Example: 'for (file in files) {\n file.readLines().forEach { line ->\n if (line == commentMarkerLine) continue\n println(line)\n }\n }' The quick-fix adds clarifying labels: 'loop@ for (file in files) {\n file.readLines().forEach { line ->\n if (line == commentMarkerLine) continue@loop\n println(line)\n }\n }'",
"markdown": "Reports `break` or `continue` usages inside of lambdas of loop-like functions.\n\n\n`break` and `continue` keywords always apply to the real loops (`for`,\n`while`, `do-while`). `break` and `continue` never apply to any function; for example,\n`break` and `continue` don't apply to `forEach`, `filter`, `map`.\n\n\nUsing `break` or `continue` inside a loop-like function (for example, `forEach`) may be confusing.\nThe inspection suggests adding a label to clarify to which statement `break` or `continue` applies to.\n\n\nSince Kotlin doesn't have a concept of loop-like functions, the inspection uses the heuristic. It assumes that functions that don't\nhave one of `callsInPlace(EXACTLY_ONCE)` or `callsInPlace(AT_LEAST_ONCE)` contracts are loop-like functions.\n\n**Example:**\n\n\n for (file in files) {\n file.readLines().forEach { line ->\n if (line == commentMarkerLine) continue\n println(line)\n }\n }\n\nThe quick-fix adds clarifying labels:\n\n\n loop@ for (file in files) {\n file.readLines().forEach { line ->\n if (line == commentMarkerLine) continue@loop\n println(line)\n }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "AmbiguousNonLocalJump",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceWithStringBuilderAppendRange",
"shortDescription": {
"text": "'StringBuilder.append(CharArray, offset, len)' call on the JVM"
},
"fullDescription": {
"text": "Reports a 'StringBuilder.append(CharArray, offset, len)' function call on the JVM platform that should be replaced with a 'StringBuilder.appendRange(CharArray, startIndex, endIndex)' function call. The 'append' function behaves differently on the JVM, JS and Native platforms, so using the 'appendRange' function is recommended. Example: 'fun f(charArray: CharArray, offset: Int, len: Int): String {\n return buildString {\n append(charArray, offset, len)\n }\n }' After the quick-fix is applied: 'fun f(charArray: CharArray, offset: Int, len: Int): String {\n return buildString {\n appendRange(charArray, offset, offset + len)\n }\n }'",
"markdown": "Reports a `StringBuilder.append(CharArray, offset, len)` function call on the JVM platform that should be replaced with a `StringBuilder.appendRange(CharArray, startIndex, endIndex)` function call.\n\nThe `append` function behaves differently on the JVM, JS and Native platforms, so using the `appendRange` function is recommended.\n\n**Example:**\n\n\n fun f(charArray: CharArray, offset: Int, len: Int): String {\n return buildString {\n append(charArray, offset, len)\n }\n }\n\nAfter the quick-fix is applied:\n\n\n fun f(charArray: CharArray, offset: Int, len: Int): String {\n return buildString {\n appendRange(charArray, offset, offset + len)\n }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ReplaceWithStringBuilderAppendRange",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Other problems",
"index": 56,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KotlinInvalidBundleOrProperty",
"shortDescription": {
"text": "Invalid property key"
},
"fullDescription": {
"text": "Reports unresolved references to '.properties' file keys and resource bundles in Kotlin files.",
"markdown": "Reports unresolved references to `.properties` file keys and resource bundles in Kotlin files."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "InvalidBundleOrProperty",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Kotlin",
"index": 11,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ObjectPropertyName",
"shortDescription": {
"text": "Object property naming convention"
},
"fullDescription": {
"text": "Reports properties that do not follow the naming conventions. The following properties are reported: Top-level properties Properties in objects and companion objects You can specify the required pattern in the inspection options. Recommended naming conventions: it has to start with an uppercase letter, use camel case and no underscores. Example: '// top-level property\n val USER_NAME_FIELD = \"UserName\"\n // top-level property holding reference to singleton object\n val PersonComparator: Comparator<Person> = /*...*/\n\n class Person {\n companion object {\n // property in companion object\n val NO_NAME = Person()\n }\n }'",
"markdown": "Reports properties that do not follow the naming conventions.\n\nThe following properties are reported:\n\n* Top-level properties\n* Properties in objects and companion objects\n\nYou can specify the required pattern in the inspection options.\n\n[Recommended naming conventions](https://kotlinlang.org/docs/coding-conventions.html#naming-rules): it has to start with an uppercase letter, use camel case and no underscores.\n\n**Example:**\n\n\n // top-level property\n val USER_NAME_FIELD = \"UserName\"\n // top-level property holding reference to singleton object\n val PersonComparator: Comparator<Person> = /*...*/\n\n class Person {\n companion object {\n // property in companion object\n val NO_NAME = Person()\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ObjectPropertyName",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Naming conventions",
"index": 71,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KotlinCovariantEquals",
"shortDescription": {
"text": "Covariant 'equals()'"
},
"fullDescription": {
"text": "Reports 'equals()' that takes an argument type other than 'Any?' if the class does not have another 'equals()' that takes 'Any?' as its argument type. Example: 'class Foo {\n fun equals(other: Foo?): Boolean {\n return true\n }\n }' To fix the problem create 'equals()' method that takes an argument of type 'Any?'.",
"markdown": "Reports `equals()` that takes an argument type other than `Any?` if the class does not have another `equals()` that takes `Any?` as its argument type.\n\n**Example:**\n\n\n class Foo {\n fun equals(other: Foo?): Boolean {\n return true\n }\n }\n\nTo fix the problem create `equals()` method that takes an argument of type `Any?`."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "CovariantEquals",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceSizeZeroCheckWithIsEmpty",
"shortDescription": {
"text": "Size zero check can be replaced with 'isEmpty()'"
},
"fullDescription": {
"text": "Reports 'size == 0' checks on 'Collections/Array/String' that should be replaced with 'isEmpty()'. Using 'isEmpty()' makes your code simpler. The quick-fix replaces the size check with 'isEmpty()'. Example: 'fun foo() {\n val arrayOf = arrayOf(1, 2, 3)\n arrayOf.size == 0\n }' After the quick-fix is applied: 'fun foo() {\n val arrayOf = arrayOf(1, 2, 3)\n arrayOf.isEmpty()\n }'",
"markdown": "Reports `size == 0` checks on `Collections/Array/String` that should be replaced with `isEmpty()`.\n\nUsing `isEmpty()` makes your code simpler.\n\nThe quick-fix replaces the size check with `isEmpty()`.\n\n**Example:**\n\n\n fun foo() {\n val arrayOf = arrayOf(1, 2, 3)\n arrayOf.size == 0\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo() {\n val arrayOf = arrayOf(1, 2, 3)\n arrayOf.isEmpty()\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceSizeZeroCheckWithIsEmpty",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AmbiguousExpressionInWhenBranchMigration",
"shortDescription": {
"text": "Ambiguous logical expressions in 'when' branches since 1.7"
},
"fullDescription": {
"text": "Reports ambiguous logical expressions in 'when' branches which cause compilation errors in Kotlin 1.8 and later. 'fun Int.matches(strict: Boolean): Boolean = when (strict) {\n true -> this == 6\n this in (4..7) -> true // is ambiguous\n else -> false\n }' After the quick-fix is applied: 'fun Int.matches(strict: Boolean): Boolean = when (strict) {\n true -> this == 6\n (this in (4..7)) -> true // wrapped in parentheses\n else -> false\n }' Inspection is available for Kotlin language level starting from 1.7.",
"markdown": "Reports ambiguous logical expressions in `when` branches which cause compilation errors in Kotlin 1.8 and later.\n\n\n fun Int.matches(strict: Boolean): Boolean = when (strict) {\n true -> this == 6\n this in (4..7) -> true // is ambiguous\n else -> false\n }\n\nAfter the quick-fix is applied:\n\n\n fun Int.matches(strict: Boolean): Boolean = when (strict) {\n true -> this == 6\n (this in (4..7)) -> true // wrapped in parentheses\n else -> false\n }\n\nInspection is available for Kotlin language level starting from 1.7."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AmbiguousExpressionInWhenBranchMigration",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Migration",
"index": 86,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KotlinTestJUnit",
"shortDescription": {
"text": "kotlin-test-junit could be used"
},
"fullDescription": {
"text": "Reports usage of 'kotlin-test' and 'junit' dependency without 'kotlin-test-junit'. It is recommended to use 'kotlin-test-junit' dependency to work with Kotlin and JUnit.",
"markdown": "Reports usage of `kotlin-test` and `junit` dependency without `kotlin-test-junit`.\n\nIt is recommended to use `kotlin-test-junit` dependency to work with Kotlin and JUnit."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "KotlinTestJUnit",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin",
"index": 11,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceNotNullAssertionWithElvisReturn",
"shortDescription": {
"text": "Not-null assertion can be replaced with 'return'"
},
"fullDescription": {
"text": "Reports not-null assertion ('!!') calls that can be replaced with the elvis operator and return ('?: return'). A not-null assertion can lead to NPE (NullPointerException) that is not expected. Avoiding the use of '!!' is good practice. The quick-fix replaces the not-null assertion with 'return' or 'return null'. Example: 'fun test(number: Int?) {\n val x = number!!\n }' After the quick-fix is applied: 'fun test(number: Int?) {\n val x = number ?: return\n }'",
"markdown": "Reports not-null assertion (`!!`) calls that can be replaced with the elvis operator and return (`?: return`).\n\nA not-null assertion can lead to NPE (NullPointerException) that is not expected. Avoiding the use of `!!` is good practice.\n\nThe quick-fix replaces the not-null assertion with `return` or `return null`.\n\n**Example:**\n\n\n fun test(number: Int?) {\n val x = number!!\n }\n\nAfter the quick-fix is applied:\n\n\n fun test(number: Int?) {\n val x = number ?: return\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceNotNullAssertionWithElvisReturn",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceStringFormatWithLiteral",
"shortDescription": {
"text": "'String.format' call can be replaced with string templates"
},
"fullDescription": {
"text": "Reports 'String.format' calls that can be replaced with string templates. Using string templates makes your code simpler. The quick-fix replaces the call with a string template. Example: 'fun main() {\n val id = \"abc\"\n val date = \"123\"\n val s = String.format(\"%s_%s_%s\", id, date, id)\n }' After the quick-fix is applied: 'fun main() {\n val id = \"abc\"\n val date = \"123\"\n val s = \"${id}_${date}_$id\"\n }'",
"markdown": "Reports `String.format` calls that can be replaced with string templates.\n\nUsing string templates makes your code simpler.\n\nThe quick-fix replaces the call with a string template.\n\n**Example:**\n\n\n fun main() {\n val id = \"abc\"\n val date = \"123\"\n val s = String.format(\"%s_%s_%s\", id, date, id)\n }\n\nAfter the quick-fix is applied:\n\n\n fun main() {\n val id = \"abc\"\n val date = \"123\"\n val s = \"${id}_${date}_$id\"\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceStringFormatWithLiteral",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceWithOperatorAssignment",
"shortDescription": {
"text": "Assignment can be replaced with operator assignment"
},
"fullDescription": {
"text": "Reports modifications of variables with a simple assignment (such as 'y = y + x') that can be replaced with an operator assignment. The quick-fix replaces the assignment with an assignment operator. Example: 'fun foo() {\n val list = mutableListOf(1, 2, 3)\n list = list + 4\n }' After the quick-fix is applied: 'fun foo() {\n val list = mutableListOf(1, 2, 3)\n list += 4\n }'",
"markdown": "Reports modifications of variables with a simple assignment (such as `y = y + x`) that can be replaced with an operator assignment.\n\nThe quick-fix replaces the assignment with an assignment operator.\n\n**Example:**\n\n\n fun foo() {\n val list = mutableListOf(1, 2, 3)\n list = list + 4\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo() {\n val list = mutableListOf(1, 2, 3)\n list += 4\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceWithOperatorAssignment",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnusedSymbol",
"shortDescription": {
"text": "Unused symbol"
},
"fullDescription": {
"text": "Reports symbols that are not used or not reachable from entry points.",
"markdown": "Reports symbols that are not used or not reachable from entry points."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "unused",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceArrayEqualityOpWithArraysEquals",
"shortDescription": {
"text": "Arrays comparison via '==' and '!='"
},
"fullDescription": {
"text": "Reports usages of '==' or '!=' operator for arrays that should be replaced with 'contentEquals()'. The '==' and '!='operators compare array references instead of their content. Examples: 'fun test() {\n val a = arrayOf(1, 2, 3)\n val b = arrayOf(1, 2, 3)\n println(a == b) // references comparison\n }' After the quick-fix is applied: 'fun test() {\n val a = arrayOf(1, 2, 3)\n val b = arrayOf(1, 2, 3)\n println(a.contentEquals(b))\n }'",
"markdown": "Reports usages of `==` or `!=` operator for arrays that should be replaced with `contentEquals()`.\n\n\nThe `==` and `!=`operators compare array references instead of their content.\n\n**Examples:**\n\n fun test() {\n val a = arrayOf(1, 2, 3)\n val b = arrayOf(1, 2, 3)\n println(a == b) // references comparison\n }\n\nAfter the quick-fix is applied:\n\n fun test() {\n val a = arrayOf(1, 2, 3)\n val b = arrayOf(1, 2, 3)\n println(a.contentEquals(b))\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ReplaceArrayEqualityOpWithArraysEquals",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnlabeledReturnInsideLambda",
"shortDescription": {
"text": "Unlabeled return inside lambda"
},
"fullDescription": {
"text": "Reports unlabeled 'return' expressions inside inline lambda. Such expressions can be confusing because it might be unclear which scope belongs to 'return'. Change to return@… quick-fix can be used to amend the code automatically. Example: 'fun test(list: List<Int>) {\n list.forEach {\n // This return expression returns from the function test\n // One can change it to return@forEach to change the scope\n if (it == 10) return\n }\n }' After the quick-fix is applied: 'fun test(list: List<Int>) {\n list.forEach {\n if (it == 10) return@test\n }\n }'",
"markdown": "Reports unlabeled `return` expressions inside inline lambda.\n\nSuch expressions can be confusing because it might be unclear which scope belongs to `return`.\n\n**Change to return@...** quick-fix can be used to amend the code automatically.\n\nExample:\n\n\n fun test(list: List<Int>) {\n list.forEach {\n // This return expression returns from the function test\n // One can change it to return@forEach to change the scope\n if (it == 10) return\n }\n }\n\nAfter the quick-fix is applied:\n\n\n fun test(list: List<Int>) {\n list.forEach {\n if (it == 10) return@test\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "UnlabeledReturnInsideLambda",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LateinitVarOverridesLateinitVar",
"shortDescription": {
"text": "'lateinit var' property overrides 'lateinit var' property"
},
"fullDescription": {
"text": "Reports 'lateinit var' properties that override other 'lateinit var' properties. A subclass instance will have two fields for a single property, and the one from the superclass will remain effectively unused. Example: 'open class BaseClass {\n open lateinit var name: String\n }\n\n class RealClass : BaseClass() {\n override lateinit var name: String\n }'",
"markdown": "Reports `lateinit var` properties that override other `lateinit var` properties.\n\nA subclass instance will have two fields for a single property, and the one from the superclass will remain effectively unused.\n\n**Example:**\n\n\n open class BaseClass {\n open lateinit var name: String\n }\n\n class RealClass : BaseClass() {\n override lateinit var name: String\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "LateinitVarOverridesLateinitVar",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "VerboseNullabilityAndEmptiness",
"shortDescription": {
"text": "Verbose nullability and emptiness check"
},
"fullDescription": {
"text": "Reports combination of 'null' and emptiness checks that can be simplified into a single check. The quick-fix replaces highlighted checks with a combined check call, such as 'isNullOrEmpty()'. Example: 'fun test(list: List<Int>?) {\n if (list == null || list.isEmpty()) {\n println(\"List is empty!\")\n } else {\n println(list.joinToString())\n }\n }' After the quick-fix is applied: 'fun test(list: List<Int>?) {\n if (list.isNullOrEmpty()) {\n println(\"List is empty!\")\n } else {\n println(list.joinToString())\n }\n }'",
"markdown": "Reports combination of `null` and emptiness checks that can be simplified into a single check.\n\nThe quick-fix replaces highlighted checks with a combined check call, such as `isNullOrEmpty()`.\n\n**Example:**\n\n\n fun test(list: List<Int>?) {\n if (list == null || list.isEmpty()) {\n println(\"List is empty!\")\n } else {\n println(list.joinToString())\n }\n }\n\nAfter the quick-fix is applied:\n\n\n fun test(list: List<Int>?) {\n if (list.isNullOrEmpty()) {\n println(\"List is empty!\")\n } else {\n println(list.joinToString())\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "VerboseNullabilityAndEmptiness",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DifferentKotlinGradleVersion",
"shortDescription": {
"text": "Kotlin Gradle and IDE plugins versions are different"
},
"fullDescription": {
"text": "Reports that Gradle plugin version isn't properly supported in the current IDE plugin. This can cause inconsistencies between IDE and Gradle builds in error reporting or code behavior. Example: 'dependencies {\n classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:0.0.1\"\n }' To fix the problem change the kotlin gradle plugin version to match the version of kotlin that is bundled into the IDE plugin.",
"markdown": "Reports that Gradle plugin version isn't properly supported in the current IDE plugin.\n\nThis can cause inconsistencies between IDE and Gradle builds in error reporting or code behavior.\n\n**Example:**\n\n\n dependencies {\n classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:0.0.1\"\n }\n\nTo fix the problem change the kotlin gradle plugin version to match the version of kotlin that is bundled into the IDE plugin."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "DifferentKotlinGradleVersion",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin",
"index": 11,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantInnerClassModifier",
"shortDescription": {
"text": "Redundant 'inner' modifier"
},
"fullDescription": {
"text": "Reports the 'inner' modifier on a class as redundant if it doesn't reference members of its outer class. Example: 'class Foo {\n inner class InnerClass { // redundant `inner` modifier\n fun hello() {\n println(\"Hi!\")\n }\n }\n }\n\n class List {\n val objects = Array<Any>(42) { Any() }\n\n inner class Iterator { // Not redundant `inner` modifier\n fun next(): Any {\n return objects[0]\n }\n }\n }' After the quick-fix is applied: 'class Foo {\n class InnerClass { // redundant `inner` modifier\n fun hello() {\n println(\"Hi!\")\n }\n }\n }\n\n class List {\n val objects = Array<Any>(42) { Any() }\n\n inner class Iterator { // Not redundant `inner` modifier\n fun next(): Any {\n return objects[0]\n }\n }\n }'",
"markdown": "Reports the `inner` modifier on a class as redundant if it doesn't reference members of its outer class.\n\n**Example:**\n\n\n class Foo {\n inner class InnerClass { // redundant `inner` modifier\n fun hello() {\n println(\"Hi!\")\n }\n }\n }\n\n class List {\n val objects = Array<Any>(42) { Any() }\n\n inner class Iterator { // Not redundant `inner` modifier\n fun next(): Any {\n return objects[0]\n }\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class Foo {\n class InnerClass { // redundant `inner` modifier\n fun hello() {\n println(\"Hi!\")\n }\n }\n }\n\n class List {\n val objects = Array<Any>(42) { Any() }\n\n inner class Iterator { // Not redundant `inner` modifier\n fun next(): Any {\n return objects[0]\n }\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantInnerClassModifier",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MavenCoroutinesDeprecation",
"shortDescription": {
"text": "Incompatible kotlinx.coroutines dependency is used with Kotlin 1.3+ in Maven"
},
"fullDescription": {
"text": "Reports kotlinx.coroutines library dependencies in Maven that should be updated in order to be compatible with Kotlin 1.3 and later.",
"markdown": "Reports **kotlinx.coroutines** library dependencies in Maven that should be updated in order to be compatible with Kotlin 1.3 and later."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "MavenCoroutinesDeprecation",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Migration/Maven",
"index": 160,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GradleKotlinxCoroutinesDeprecation",
"shortDescription": {
"text": "Incompatible kotlinx.coroutines dependency is used with Kotlin 1.3+ in Gradle"
},
"fullDescription": {
"text": "Reports 'kotlinx.coroutines' library dependencies in Gradle that should be updated to be compatible with Kotlin 1.3+. Example: 'dependencies {\n implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.0.1'\n }' The quick fix changes the 'kotlinx.coroutines' library version to a compatible with Kotlin 1.3: 'dependencies {\n implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.27.0-eap13'\n }'",
"markdown": "Reports `kotlinx.coroutines` library dependencies in Gradle that should be updated to be compatible with Kotlin 1.3+.\n\n**Example:**\n\n\n dependencies {\n implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.0.1'\n }\n\nThe quick fix changes the `kotlinx.coroutines` library version to a compatible with Kotlin 1.3:\n\n\n dependencies {\n implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.27.0-eap13'\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "GradleKotlinxCoroutinesDeprecation",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Migration/Gradle",
"index": 165,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "WarningOnMainUnusedParameterMigration",
"shortDescription": {
"text": "Unused 'args' on 'main' since 1.4"
},
"fullDescription": {
"text": "Reports 'main' function with an unused single parameter. Since Kotlin 1.4, it is possible to use the 'main' function without parameter as the entry point to the Kotlin program. The compiler reports a warning for the 'main' function with an unused parameter.",
"markdown": "Reports `main` function with an unused single parameter.\n\nSince Kotlin 1.4, it is possible to use the `main` function without parameter as the entry point to the Kotlin program.\nThe compiler reports a warning for the `main` function with an unused parameter."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "WarningOnMainUnusedParameterMigration",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Migration",
"index": 86,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConstantConditionIf",
"shortDescription": {
"text": "Condition of 'if' expression is constant"
},
"fullDescription": {
"text": "Reports 'if' expressions that have 'true' or 'false' constant literal condition and can be simplified. While occasionally intended, this construction is confusing and often the result of a typo or previous refactoring. Example: 'fun example() {\n if (true) {\n throw IllegalStateException(\"Unexpected state\")\n }\n }' The quick-fix removes the 'if' condition: 'fun example() {\n throw IllegalStateException(\"Unexpected state\")\n }'",
"markdown": "Reports `if` expressions that have `true` or `false` constant literal condition and can be simplified.\n\nWhile occasionally intended, this construction is confusing and often the result of a typo\nor previous refactoring.\n\n**Example:**\n\n\n fun example() {\n if (true) {\n throw IllegalStateException(\"Unexpected state\")\n }\n }\n\nThe quick-fix removes the `if` condition:\n\n\n fun example() {\n throw IllegalStateException(\"Unexpected state\")\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ConstantConditionIf",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NoConstructorMigration",
"shortDescription": {
"text": "Forbidden constructor call"
},
"fullDescription": {
"text": "Reports a constructor calls on functional supertypes that will lead to compilation error since 1.9. Motivation types: The implementation does not abide by a published spec or documentation More details: KT-46344: No error for a super class constructor call on a function interface in supertypes list The quick-fix removes a constructor call. Example: 'abstract class A : () -> Int()' After the quick-fix is applied: 'abstract class A : () -> Int' This inspection only reports if the Kotlin language level of the project or module is 1.7 or higher.",
"markdown": "Reports a constructor calls on functional supertypes that will lead to compilation error since 1.9.\n\nMotivation types:\n\n* The implementation does not abide by a published spec or documentation\n\n**More details:** [KT-46344: No error for a super class constructor call on a function interface in supertypes list](https://youtrack.jetbrains.com/issue/KT-46344)\n\nThe quick-fix removes a constructor call.\n\n**Example:**\n\n\n abstract class A : () -> Int()\n\nAfter the quick-fix is applied:\n\n\n abstract class A : () -> Int\n\nThis inspection only reports if the Kotlin language level of the project or module is 1.7 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "NoConstructorMigration",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Migration",
"index": 86,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ImplicitThis",
"shortDescription": {
"text": "Implicit 'this'"
},
"fullDescription": {
"text": "Reports usages of implicit this. Example: 'class Foo {\n fun s() = \"\"\n\n fun test() {\n s()\n }\n }' The quick fix specifies this explicitly: 'class Foo {\n fun s() = \"\"\n\n fun test() {\n this.s()\n }\n }'",
"markdown": "Reports usages of implicit **this** .\n\n**Example:**\n\n\n class Foo {\n fun s() = \"\"\n\n fun test() {\n s()\n }\n }\n\nThe quick fix specifies **this** explicitly:\n\n\n class Foo {\n fun s() = \"\"\n\n fun test() {\n this.s()\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ImplicitThis",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DifferentStdlibGradleVersion",
"shortDescription": {
"text": "Kotlin library and Gradle plugin versions are different"
},
"fullDescription": {
"text": "Reports different Kotlin stdlib and compiler versions. Example: 'dependencies {\n classpath \"org.jetbrains.kotlin:kotlin-stdlib:0.0.1\"\n }' To fix the problem change the kotlin stdlib version to match the kotlin compiler version.",
"markdown": "Reports different Kotlin stdlib and compiler versions.\n\n**Example:**\n\n\n dependencies {\n classpath \"org.jetbrains.kotlin:kotlin-stdlib:0.0.1\"\n }\n\nTo fix the problem change the kotlin stdlib version to match the kotlin compiler version."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "DifferentStdlibGradleVersion",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin",
"index": 11,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantCompanionReference",
"shortDescription": {
"text": "Redundant 'Companion' reference"
},
"fullDescription": {
"text": "Reports redundant 'Companion' reference. Example: 'class A {\n companion object {\n fun create() = A()\n }\n }\n fun test() {\n val s = A.Companion.create()\n }' After the quick-fix is applied: 'class A {\n companion object {\n fun create() = A()\n }\n }\n fun test() {\n val s = A.create()\n }'",
"markdown": "Reports redundant `Companion` reference.\n\n**Example:**\n\n\n class A {\n companion object {\n fun create() = A()\n }\n }\n fun test() {\n val s = A.Companion.create()\n }\n\nAfter the quick-fix is applied:\n\n\n class A {\n companion object {\n fun create() = A()\n }\n }\n fun test() {\n val s = A.create()\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantCompanionReference",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KDocUnresolvedReference",
"shortDescription": {
"text": "Unresolved reference in KDoc"
},
"fullDescription": {
"text": "Reports unresolved references in KDoc comments. Example: '/**\n * [unresolvedLink]\n */\n fun foo() {}' To fix the problem make the link valid.",
"markdown": "Reports unresolved references in KDoc comments.\n\n**Example:**\n\n\n /**\n * [unresolvedLink]\n */\n fun foo() {}\n\nTo fix the problem make the link valid."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "KDocUnresolvedReference",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NestedLambdaShadowedImplicitParameter",
"shortDescription": {
"text": "Nested lambda has shadowed implicit parameter"
},
"fullDescription": {
"text": "Reports nested lambdas with shadowed implicit parameters. Example: 'fun foo(listOfLists: List<List<String>>) {\n listOfLists.forEach {\n it.forEach {\n println(it)\n }\n }\n}' After the quick-fix is applied: 'fun foo(listOfLists: List<List<String>>) {\n listOfLists.forEach {\n it.forEach { it1 ->\n println(it1)\n }\n }\n}'",
"markdown": "Reports nested lambdas with shadowed implicit parameters.\n\n**Example:**\n\n\n fun foo(listOfLists: List<List<String>>) {\n listOfLists.forEach {\n it.forEach {\n println(it)\n }\n }\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo(listOfLists: List<List<String>>) {\n listOfLists.forEach {\n it.forEach { it1 ->\n println(it1)\n }\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "NestedLambdaShadowedImplicitParameter",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantSamConstructor",
"shortDescription": {
"text": "Redundant SAM constructor"
},
"fullDescription": {
"text": "Reports SAM (Single Abstract Method) constructor usages which can be replaced with lambdas. Example: 'fun main() {\n foo(Runnable { println(\"Hi!\") })\n }\n\n fun foo(other: Runnable) {}' After the quick-fix is applied: 'fun main() {\n foo( { println(\"Hi!\") })\n }\n\n fun foo(other: Runnable) {}'",
"markdown": "Reports SAM (Single Abstract Method) constructor usages which can be replaced with lambdas.\n\n**Example:**\n\n\n fun main() {\n foo(Runnable { println(\"Hi!\") })\n }\n\n fun foo(other: Runnable) {}\n\nAfter the quick-fix is applied:\n\n\n fun main() {\n foo( { println(\"Hi!\") })\n }\n\n fun foo(other: Runnable) {}\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantSamConstructor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KotlinSealedInheritorsInJava",
"shortDescription": {
"text": "Inheritance of Kotlin sealed interface/class from Java"
},
"fullDescription": {
"text": "Reports attempts to inherit from Kotlin sealed interfaces or classes in Java code. Example: '// Kotlin file: MathExpression.kt\n\nsealed class MathExpression\n\ndata class Const(val number: Double) : MathExpression()\ndata class Sum(val e1: MathExpression, val e2: MathExpression) : MathExpression()' '// Java file: NotANumber.java\n\npublic class NotANumber extends MathExpression {\n}'",
"markdown": "Reports attempts to inherit from Kotlin sealed interfaces or classes in Java code.\n\n**Example:**\n\n\n // Kotlin file: MathExpression.kt\n\n sealed class MathExpression\n\n data class Const(val number: Double) : MathExpression()\n data class Sum(val e1: MathExpression, val e2: MathExpression) : MathExpression()\n\n\n // Java file: NotANumber.java\n\n public class NotANumber extends MathExpression {\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "KotlinSealedInheritorsInJava",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Java interop issues",
"index": 186,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MemberVisibilityCanBePrivate",
"shortDescription": {
"text": "Class member can have 'private' visibility"
},
"fullDescription": {
"text": "Reports declarations that can be made 'private' to follow the encapsulation principle. Example: 'class Service(val url: String) {\n fun connect(): URLConnection = URL(url).openConnection()\n}' After the quick-fix is applied (considering there are no usages of 'url' outside of 'Service' class): 'class Service(private val url: String) {\n fun connect(): URLConnection = URL(url).openConnection()\n}'",
"markdown": "Reports declarations that can be made `private` to follow the encapsulation principle.\n\n**Example:**\n\n\n class Service(val url: String) {\n fun connect(): URLConnection = URL(url).openConnection()\n }\n\nAfter the quick-fix is applied (considering there are no usages of `url` outside of `Service` class):\n\n\n class Service(private val url: String) {\n fun connect(): URLConnection = URL(url).openConnection()\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "MemberVisibilityCanBePrivate",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NullChecksToSafeCall",
"shortDescription": {
"text": "Null-checks can be replaced with safe-calls"
},
"fullDescription": {
"text": "Reports chained null-checks that can be replaced with safe-calls. Example: 'fun test(my: My?) {\n if (my != null && my.foo() != null) {}\n }' After the quick-fix is applied: 'fun test(my: My?) {\n if (my?.foo() != null) {}\n }'",
"markdown": "Reports chained null-checks that can be replaced with safe-calls.\n\n**Example:**\n\n\n fun test(my: My?) {\n if (my != null && my.foo() != null) {}\n }\n\nAfter the quick-fix is applied:\n\n\n fun test(my: My?) {\n if (my?.foo() != null) {}\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NullChecksToSafeCall",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ArrayInDataClass",
"shortDescription": {
"text": "Array property in data class"
},
"fullDescription": {
"text": "Reports properties with an 'Array' type in a 'data' class without overridden 'equals()' or 'hashCode()'. Array parameters are compared by reference equality, which is likely an unexpected behavior. It is strongly recommended to override 'equals()' and 'hashCode()' in such cases. Example: 'data class Text(val lines: Array<String>)' The quick-fix generates missing 'equals()' and 'hashCode()' implementations: 'data class Text(val lines: Array<String>) {\n override fun equals(other: Any?): Boolean {\n if (this === other) return true\n if (javaClass != other?.javaClass) return false\n\n other as Text\n\n if (!lines.contentEquals(other.lines)) return false\n\n return true\n }\n\n override fun hashCode(): Int {\n return lines.contentHashCode()\n }\n }'",
"markdown": "Reports properties with an `Array` type in a `data` class without overridden `equals()` or `hashCode()`.\n\n\nArray parameters are compared by reference equality, which is likely an unexpected behavior.\nIt is strongly recommended to override `equals()` and `hashCode()` in such cases.\n\n**Example:**\n\n\n data class Text(val lines: Array<String>)\n\nThe quick-fix generates missing `equals()` and `hashCode()` implementations:\n\n\n data class Text(val lines: Array<String>) {\n override fun equals(other: Any?): Boolean {\n if (this === other) return true\n if (javaClass != other?.javaClass) return false\n\n other as Text\n\n if (!lines.contentEquals(other.lines)) return false\n\n return true\n }\n\n override fun hashCode(): Int {\n return lines.contentHashCode()\n }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "ArrayInDataClass",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LocalVariableName",
"shortDescription": {
"text": "Local variable naming convention"
},
"fullDescription": {
"text": "Reports local variables that do not follow the naming conventions. You can specify the required pattern in the inspection options. Recommended naming conventions: it has to start with a lowercase letter, use camel case and no underscores. Example: 'fun fibonacciNumber(index: Int): Long = when(index) {\n 0 -> 0\n else -> {\n // does not follow naming conventions: contains underscore symbol (`_`)\n var number_one: Long = 0\n // does not follow naming conventions: starts with an uppercase letter\n var NUMBER_TWO: Long = 1\n // follow naming conventions: starts with a lowercase letter, use camel case and no underscores.\n var numberThree: Long = number_one + NUMBER_TWO\n\n for(currentIndex in 2..index) {\n numberThree = number_one + NUMBER_TWO\n number_one = NUMBER_TWO\n NUMBER_TWO = numberThree\n }\n numberThree\n }\n }'",
"markdown": "Reports local variables that do not follow the naming conventions.\n\nYou can specify the required pattern in the inspection options.\n\n[Recommended naming conventions](https://kotlinlang.org/docs/coding-conventions.html#function-names): it has to start with a lowercase letter, use camel case and no underscores.\n\n**Example:**\n\n\n fun fibonacciNumber(index: Int): Long = when(index) {\n 0 -> 0\n else -> {\n // does not follow naming conventions: contains underscore symbol (`_`)\n var number_one: Long = 0\n // does not follow naming conventions: starts with an uppercase letter\n var NUMBER_TWO: Long = 1\n // follow naming conventions: starts with a lowercase letter, use camel case and no underscores.\n var numberThree: Long = number_one + NUMBER_TWO\n\n for(currentIndex in 2..index) {\n numberThree = number_one + NUMBER_TWO\n number_one = NUMBER_TWO\n NUMBER_TWO = numberThree\n }\n numberThree\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "LocalVariableName",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Naming conventions",
"index": 71,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceUntilWithRangeUntil",
"shortDescription": {
"text": "Replace 'until' with '..<' operator"
},
"fullDescription": {
"text": "Reports 'until' that can be replaced with '..<' operator. Every 'until' to '..<' replacement doesn't change the semantic in any way. The UX research shows that developers make ~20-30% fewer errors when reading code containing '..<' compared to 'until'. Example: 'fun main(args: Array<String>) {\n for (index in 0 until args.size) {\n println(index)\n }\n }' After the quick-fix is applied: 'fun main(args: Array<String>) {\n for (index in 0..<args.size) {\n println(index)\n }\n }' This inspection only reports if the Kotlin language level of the project or module is 1.7 or higher.",
"markdown": "Reports `until` that can be replaced with `..<` operator.\n\nEvery `until` to `..<` replacement doesn't change the semantic in any way.\n\nThe UX research shows that developers make \\~20-30% fewer errors when reading code containing `..<` compared to `until`.\n\n**Example:**\n\n\n fun main(args: Array<String>) {\n for (index in 0 until args.size) {\n println(index)\n }\n }\n\nAfter the quick-fix is applied:\n\n\n fun main(args: Array<String>) {\n for (index in 0..<args.size) {\n println(index)\n }\n }\n\nThis inspection only reports if the Kotlin language level of the project or module is 1.7 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceUntilWithRangeUntil",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RemoveRedundantQualifierName",
"shortDescription": {
"text": "Redundant qualifier name"
},
"fullDescription": {
"text": "Reports redundant qualifiers (or their parts) on class names, functions, and properties. A fully qualified name is an unambiguous identifier that specifies which object, function, or property a call refers to. In the contexts where the name can be shortened, the inspection informs on the opportunity and the associated 'Remove redundant qualifier name' quick-fix allows amending the code. Examples: 'package my.simple.name\n import kotlin.Int.Companion.MAX_VALUE\n\n class Foo\n\n fun main() {\n val a = my.simple.name.Foo() // 'Foo' resides in the declared 'my.simple.name' package, qualifier is redundant\n val b = kotlin.Int.MAX_VALUE // Can be replaced with 'MAX_VALUE' since it's imported\n val c = kotlin.Double.MAX_VALUE // Can be replaced with 'Double.MAX_VALUE' since built-in types are imported automatically\n }' After the quick-fix is applied: 'package my.simple.name\n import kotlin.Int.Companion.MAX_VALUE\n\n class Foo\n\n fun main() {\n val a = Foo()\n val b = MAX_VALUE\n val c = Double.MAX_VALUE\n }'",
"markdown": "Reports redundant qualifiers (or their parts) on class names, functions, and properties.\n\n\nA fully qualified name is an unambiguous identifier that specifies which object, function, or property a call refers to.\nIn the contexts where the name can be shortened, the inspection informs on the opportunity and the associated\n'Remove redundant qualifier name' quick-fix allows amending the code.\n\n**Examples:**\n\n\n package my.simple.name\n import kotlin.Int.Companion.MAX_VALUE\n\n class Foo\n\n fun main() {\n val a = my.simple.name.Foo() // 'Foo' resides in the declared 'my.simple.name' package, qualifier is redundant\n val b = kotlin.Int.MAX_VALUE // Can be replaced with 'MAX_VALUE' since it's imported\n val c = kotlin.Double.MAX_VALUE // Can be replaced with 'Double.MAX_VALUE' since built-in types are imported automatically\n }\n\nAfter the quick-fix is applied:\n\n\n package my.simple.name\n import kotlin.Int.Companion.MAX_VALUE\n\n class Foo\n\n fun main() {\n val a = Foo()\n val b = MAX_VALUE\n val c = Double.MAX_VALUE\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RemoveRedundantQualifierName",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RemoveCurlyBracesFromTemplate",
"shortDescription": {
"text": "Redundant curly braces in string template"
},
"fullDescription": {
"text": "Reports usages of curly braces in string templates around simple identifiers. Use the 'Remove curly braces' quick-fix to remove the redundant braces. Examples: 'fun redundant() {\n val x = 4\n val y = \"${x}\" // <== redundant\n }\n\n fun correctUsage() {\n val x = \"x\"\n val y = \"${x.length}\" // <== Ok\n }' After the quick-fix is applied: 'fun redundant() {\n val x = 4\n val y = \"$x\"\n }\n\n fun correctUsage() {\n val x = \"x\" <== Updated\n val y = \"${x.length}\"\n }'",
"markdown": "Reports usages of curly braces in string templates around simple identifiers.\n\nUse the 'Remove curly braces' quick-fix to remove the redundant braces.\n\n**Examples:**\n\n\n fun redundant() {\n val x = 4\n val y = \"${x}\" // <== redundant\n }\n\n fun correctUsage() {\n val x = \"x\"\n val y = \"${x.length}\" // <== Ok\n }\n\nAfter the quick-fix is applied:\n\n\n fun redundant() {\n val x = 4\n val y = \"$x\"\n }\n\n fun correctUsage() {\n val x = \"x\" <== Updated\n val y = \"${x.length}\"\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RemoveCurlyBracesFromTemplate",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceSubstringWithIndexingOperation",
"shortDescription": {
"text": "'substring' call should be replaced with indexing operator"
},
"fullDescription": {
"text": "Reports calls like '\"abc\".substring(0, 1)' that can be replaced with '\"abc\"[0]'. Obtaining the element by index makes your code simpler. The quick-fix replaces the 'substring' call with the indexing operator. Example: 'fun foo() {\n \"abc\".substring(0, 1)\n }' After the quick-fix is applied: 'fun foo() {\n \"abc\"[0]\n }'",
"markdown": "Reports calls like `\"abc\".substring(0, 1)` that can be replaced with `\"abc\"[0]`.\n\nObtaining the element by index makes your code simpler.\n\nThe quick-fix replaces the `substring` call with the indexing operator.\n\n**Example:**\n\n\n fun foo() {\n \"abc\".substring(0, 1)\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo() {\n \"abc\"[0]\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceSubstringWithIndexingOperation",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MoveLambdaOutsideParentheses",
"shortDescription": {
"text": "Lambda argument inside parentheses"
},
"fullDescription": {
"text": "Reports lambda expressions in parentheses which can be moved outside. Example: 'fun square(a: Int, b: (Int) -> Int) {\n b(a * a)\n}\n\nfun foo() {\n square(2, { it })\n}' After the quick-fix is applied: 'fun foo() {\n square(2){ it }\n}'",
"markdown": "Reports lambda expressions in parentheses which can be moved outside.\n\n**Example:**\n\n\n fun square(a: Int, b: (Int) -> Int) {\n b(a * a)\n }\n\n fun foo() {\n square(2, { it })\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo() {\n square(2){ it }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "MoveLambdaOutsideParentheses",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantUnitExpression",
"shortDescription": {
"text": "Redundant 'Unit'"
},
"fullDescription": {
"text": "Reports redundant 'Unit' expressions. 'Unit' in Kotlin can be used as the return type of functions that do not return anything meaningful. The 'Unit' type has only one possible value, which is the 'Unit' object. Examples: 'fun redundantA(): Unit {\n return Unit // redundant, 'Unit' is returned by default and matches the expected return type\n }\n\n fun requiredA(condition: Boolean): Any {\n if (condition) return \"hello\"\n return Unit // explicit 'Unit' is required since the expected type is 'Any'\n }\n\n fun redundantB(condition: Boolean): Any = if (condition) {\n fun ancillary(): Int = 1\n println(\"${ancillary()}\")\n Unit // redundant since the last expression is already of type 'Unit'\n } else {\n println(\"else\")\n }\n\n fun requiredB(condition: Boolean): Any = if (condition) {\n 1024\n Unit // required, otherwise '1024' (Int) would be the return value\n } else {\n println(\"else\")\n }'",
"markdown": "Reports redundant `Unit` expressions.\n\n\n`Unit` in Kotlin can be used as the return type of functions that do not return anything meaningful.\nThe `Unit` type has only one possible value, which is the `Unit` object.\n\n**Examples:**\n\n\n fun redundantA(): Unit {\n return Unit // redundant, 'Unit' is returned by default and matches the expected return type\n }\n\n fun requiredA(condition: Boolean): Any {\n if (condition) return \"hello\"\n return Unit // explicit 'Unit' is required since the expected type is 'Any'\n }\n\n fun redundantB(condition: Boolean): Any = if (condition) {\n fun ancillary(): Int = 1\n println(\"${ancillary()}\")\n Unit // redundant since the last expression is already of type 'Unit'\n } else {\n println(\"else\")\n }\n\n fun requiredB(condition: Boolean): Any = if (condition) {\n 1024\n Unit // required, otherwise '1024' (Int) would be the return value\n } else {\n println(\"else\")\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantUnitExpression",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PlatformExtensionReceiverOfInline",
"shortDescription": {
"text": "'inline fun' with nullable receiver until Kotlin 1.2"
},
"fullDescription": {
"text": "Reports potentially unsafe calls of inline functions with flexible nullable (platform type with unknown nullability) extension receivers. Before Kotlin 1.2, calls of 'inline fun' with flexible nullable extension receiver (a platform type with an unknown nullability) did not include nullability checks in bytecode. Since Kotlin 1.2, nullability checks are included into the bytecode (see KT-12899). It's recommended to add an explicit '!!' you want an exception to be thrown, or consider changing the function's receiver type to nullable if it should work without exceptions. Example: 'inline fun String.removePrefix(prefix: String): String {\n return this.substring(prefix.length)\n }\n\n fun main() {\n // `System.getProperty` returns not denotable `String!` type\n val property = System.getProperty(\"user.dir\")\n println(property.removePrefix(\"/home\"))\n }' After the quick-fix is applied: 'inline fun String.removePrefix(prefix: String): String {\n return this.substring(prefix.length)\n }\n\n fun main() {\n // `System.getProperty` returns not denotable `String!` type\n val property = System.getProperty(\"user.dir\")\n println(property!!.removePrefix(\"/home\"))\n }' This inspection only reports if the Kotlin language level of the project or module is lower than 1.2.",
"markdown": "Reports potentially unsafe calls of inline functions with flexible nullable (platform type with unknown nullability) extension receivers.\n\n\nBefore Kotlin 1.2, calls of `inline fun` with flexible nullable extension receiver (a platform type with an unknown\nnullability) did not include nullability checks in bytecode. Since Kotlin 1.2, nullability checks are included into the bytecode\n(see [KT-12899](https://youtrack.jetbrains.com/issue/KT-12899)).\n\n\nIt's recommended to add an explicit `!!` you want an exception to be thrown,\nor consider changing the function's receiver type to nullable if it should work without exceptions.\n\n**Example:**\n\n\n inline fun String.removePrefix(prefix: String): String {\n return this.substring(prefix.length)\n }\n\n fun main() {\n // `System.getProperty` returns not denotable `String!` type\n val property = System.getProperty(\"user.dir\")\n println(property.removePrefix(\"/home\"))\n }\n\nAfter the quick-fix is applied:\n\n\n inline fun String.removePrefix(prefix: String): String {\n return this.substring(prefix.length)\n }\n\n fun main() {\n // `System.getProperty` returns not denotable `String!` type\n val property = System.getProperty(\"user.dir\")\n println(property!!.removePrefix(\"/home\"))\n }\n\nThis inspection only reports if the Kotlin language level of the project or module is lower than 1.2."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PlatformExtensionReceiverOfInline",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Java interop issues",
"index": 186,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SuspiciousEqualsCombination",
"shortDescription": {
"text": "Suspicious combination of == and ==="
},
"fullDescription": {
"text": "Reports '==' and '===' comparisons that are both used on the same variable within a single expression. Due to similarities '==' and '===' could be mixed without notice, and it takes a close look to check that '==' used instead of '===' Example: 'if (type === FIELD || type == METHOD || type == ANNOTATION_METHOD || // Note that \"==\" is used incorrectly\n type === LAMBDA_EXPRESSION) return'",
"markdown": "Reports `==` and `===` comparisons that are both used on the same variable within a single expression.\n\nDue to similarities `==` and `===` could be mixed without notice, and\nit takes a close look to check that `==` used instead of `===`\n\nExample:\n\n\n if (type === FIELD || type == METHOD || type == ANNOTATION_METHOD || // Note that \"==\" is used incorrectly\n type === LAMBDA_EXPRESSION) return\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "SuspiciousEqualsCombination",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnusedDataClassCopyResult",
"shortDescription": {
"text": "Unused result of data class copy"
},
"fullDescription": {
"text": "Reports calls to data class 'copy' function without using its result.",
"markdown": "Reports calls to data class `copy` function without using its result."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "UnusedDataClassCopyResult",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantElseInIf",
"shortDescription": {
"text": "Redundant 'else' in 'if'"
},
"fullDescription": {
"text": "Reports redundant 'else' in 'if' with 'return' Example: 'fun foo(arg: Boolean): Int {\n if (arg) return 0\n else { // This else is redundant, code in braces could be just shifted left\n someCode()\n }\n }' After the quick-fix is applied: 'fun foo(arg: Boolean): Int {\n if (arg) return 0\n someCode()\n }'",
"markdown": "Reports redundant `else` in `if` with `return`\n\n**Example:**\n\n\n fun foo(arg: Boolean): Int {\n if (arg) return 0\n else { // This else is redundant, code in braces could be just shifted left\n someCode()\n }\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo(arg: Boolean): Int {\n if (arg) return 0\n someCode()\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RedundantElseInIf",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaIoSerializableObjectMustHaveReadResolve",
"shortDescription": {
"text": "Serializable object must implement 'readResolve'"
},
"fullDescription": {
"text": "Reports 'object's ('data object' including) that implement 'java.io.Serializable' but don't implement readResolve Example: 'import java.io.Serializable\n\n object Foo : Serializable' The quick fix implements 'readResolve' method: 'import java.io.Serializable\n\n object Foo : Serializable {\n private fun readResolve() = Foo\n }'",
"markdown": "Reports `object`s (`data object` including) that implement `java.io.Serializable` but don't implement\n[readResolve](https://docs.oracle.com/en/java/javase/11/docs/specs/serialization/input.html#the-readresolve-method)\n\n**Example:**\n\n\n import java.io.Serializable\n\n object Foo : Serializable\n\nThe quick fix implements `readResolve` method:\n\n\n import java.io.Serializable\n\n object Foo : Serializable {\n private fun readResolve() = Foo\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "JavaIoSerializableObjectMustHaveReadResolve",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantUnitReturnType",
"shortDescription": {
"text": "Redundant 'Unit' return type"
},
"fullDescription": {
"text": "Reports a redundant 'Unit' return type which can be omitted.",
"markdown": "Reports a redundant `Unit` return type which can be omitted."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantUnitReturnType",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnusedEquals",
"shortDescription": {
"text": "Unused equals expression"
},
"fullDescription": {
"text": "Reports unused 'equals'('==') expressions.",
"markdown": "Reports unused `equals`(`==`) expressions."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "UnusedEquals",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConvertLambdaToReference",
"shortDescription": {
"text": "Can be replaced with function reference"
},
"fullDescription": {
"text": "Reports function literal expressions that can be replaced with function references. Replacing lambdas with function references often makes code look more concise and understandable. Example: 'fun Int.isEven() = this % 2 == 0\n\n fun example() {\n val numbers = listOf(1, 2, 4, 7, 9, 10)\n val evenNumbers = numbers.filter { it.isEven() }\n }' After the quick-fix is applied: 'fun Int.isEven() = this % 2 == 0\n\n fun example() {\n val numbers = listOf(1, 2, 4, 7, 9, 10)\n val evenNumbers = numbers.filter(Int::isEven)\n }'",
"markdown": "Reports function literal expressions that can be replaced with function references.\n\nReplacing lambdas with function references often makes code look more concise and understandable.\n\n**Example:**\n\n\n fun Int.isEven() = this % 2 == 0\n\n fun example() {\n val numbers = listOf(1, 2, 4, 7, 9, 10)\n val evenNumbers = numbers.filter { it.isEven() }\n }\n\nAfter the quick-fix is applied:\n\n\n fun Int.isEven() = this % 2 == 0\n\n fun example() {\n val numbers = listOf(1, 2, 4, 7, 9, 10)\n val evenNumbers = numbers.filter(Int::isEven)\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ConvertLambdaToReference",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantSetter",
"shortDescription": {
"text": "Redundant property setter"
},
"fullDescription": {
"text": "Reports redundant property setters. Setter is considered to be redundant in one of the following cases: Setter has no body. Accessor visibility isn't changed, declaration isn't 'external' and has no annotations. 'var myPropWithRedundantSetter: Int = 0\n set // redundant\n\n var myPropA: Int = 0\n private set // OK - property visibility is changed to private\n\n var myPropB: Int = 0\n external set // OK - implemented not in Kotlin (external)\n\n var myPropC: Int = 0\n @Inject set // OK - accessor is annotated' Setter body is a block with a single statement assigning the parameter to the backing field. 'var prop: Int = 0\n set(value) { // redundant\n field = value\n }'",
"markdown": "Reports redundant property setters.\n\n\nSetter is considered to be redundant in one of the following cases:\n\n1. Setter has no body. Accessor visibility isn't changed, declaration isn't `external` and has no annotations.\n\n\n var myPropWithRedundantSetter: Int = 0\n set // redundant\n\n var myPropA: Int = 0\n private set // OK - property visibility is changed to private\n\n var myPropB: Int = 0\n external set // OK - implemented not in Kotlin (external)\n\n var myPropC: Int = 0\n @Inject set // OK - accessor is annotated\n \n2. Setter body is a block with a single statement assigning the parameter to the backing field.\n\n\n var prop: Int = 0\n set(value) { // redundant\n field = value\n }\n \n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RedundantSetter",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InlineClassDeprecatedMigration",
"shortDescription": {
"text": "Inline classes are deprecated since 1.5"
},
"fullDescription": {
"text": "Reports inline classes that are deprecated and cause compilation warnings in Kotlin 1.5 and later. See What's new in Kotlin 1.5.0 Example: 'inline class Password(val s: String)' After the quick-fix is applied: '@JvmInline\n value class Password(val s: String)' Inspection is available for Kotlin language level starting from 1.5.",
"markdown": "Reports inline classes that are deprecated and cause compilation warnings in Kotlin 1.5 and later.\nSee [What's new in Kotlin 1.5.0](https://kotlinlang.org/docs/whatsnew15.html#inline-classes)\n\nExample:\n\n\n inline class Password(val s: String)\n\nAfter the quick-fix is applied:\n\n\n @JvmInline\n value class Password(val s: String)\n\nInspection is available for Kotlin language level starting from 1.5."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "InlineClassDeprecatedMigration",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Migration",
"index": 86,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KotlinMavenPluginPhase",
"shortDescription": {
"text": "Kotlin Maven Plugin misconfigured"
},
"fullDescription": {
"text": "Reports kotlin-maven-plugin configuration issues",
"markdown": "Reports kotlin-maven-plugin configuration issues"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "KotlinMavenPluginPhase",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin",
"index": 11,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConvertToStringTemplate",
"shortDescription": {
"text": "String concatenation that can be converted to string template"
},
"fullDescription": {
"text": "Reports string concatenation that can be converted to a string template. Using string templates is recommended as it makes code easier to read. Example: 'fun example() {\n val capitals = mapOf(\"France\" to \"Paris\", \"Spain\" to \"Madrid\")\n for ((country, capital) in capitals) {\n print(capital + \" is a capital of \" + country)\n }\n }' After the quick-fix is applied: 'fun example() {\n val capitals = mapOf(\"France\" to \"Paris\", \"Spain\" to \"Madrid\")\n for ((country, capital) in capitals) {\n print(\"$capital is a capital of $country\")\n }\n }'",
"markdown": "Reports string concatenation that can be converted to a string template.\n\nUsing string templates is recommended as it makes code easier to read.\n\n**Example:**\n\n\n fun example() {\n val capitals = mapOf(\"France\" to \"Paris\", \"Spain\" to \"Madrid\")\n for ((country, capital) in capitals) {\n print(capital + \" is a capital of \" + country)\n }\n }\n\nAfter the quick-fix is applied:\n\n\n fun example() {\n val capitals = mapOf(\"France\" to \"Paris\", \"Spain\" to \"Madrid\")\n for ((country, capital) in capitals) {\n print(\"$capital is a capital of $country\")\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ConvertToStringTemplate",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantLambdaOrAnonymousFunction",
"shortDescription": {
"text": "Redundant creation of lambda or anonymous function"
},
"fullDescription": {
"text": "Reports lambdas or anonymous functions that are created and used immediately. 'fun test() {\n ({ println() })() // redundant\n (fun() { println() })() // redundant\n }'",
"markdown": "Reports lambdas or anonymous functions that are created and used immediately.\n\n\n fun test() {\n ({ println() })() // redundant\n (fun() { println() })() // redundant\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RedundantLambdaOrAnonymousFunction",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceGuardClauseWithFunctionCall",
"shortDescription": {
"text": "Guard clause can be replaced with Kotlin's function call"
},
"fullDescription": {
"text": "Reports guard clauses that can be replaced with a function call. Example: 'fun test(foo: Int?) {\n if (foo == null) throw IllegalArgumentException(\"foo\") // replaceable clause\n }' After the quick-fix is applied: 'fun test(foo: Int?) {\n checkNotNull(foo)\n }'",
"markdown": "Reports guard clauses that can be replaced with a function call.\n\n**Example:**\n\n fun test(foo: Int?) {\n if (foo == null) throw IllegalArgumentException(\"foo\") // replaceable clause\n }\n\nAfter the quick-fix is applied:\n\n fun test(foo: Int?) {\n checkNotNull(foo)\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceGuardClauseWithFunctionCall",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceToStringWithStringTemplate",
"shortDescription": {
"text": "Call of 'toString' could be replaced with string template"
},
"fullDescription": {
"text": "Reports 'toString' function calls that can be replaced with a string template. Using string templates makes your code simpler. The quick-fix replaces 'toString' with a string template. Example: 'fun test(): String {\n val x = 1\n return x.toString()\n }' After the quick-fix is applied: 'fun test(): String {\n val x = 1\n return \"$x\"\n }'",
"markdown": "Reports `toString` function calls that can be replaced with a string template.\n\nUsing string templates makes your code simpler.\n\nThe quick-fix replaces `toString` with a string template.\n\n**Example:**\n\n\n fun test(): String {\n val x = 1\n return x.toString()\n }\n\nAfter the quick-fix is applied:\n\n\n fun test(): String {\n val x = 1\n return \"$x\"\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceToStringWithStringTemplate",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantSemicolon",
"shortDescription": {
"text": "Redundant semicolon"
},
"fullDescription": {
"text": "Reports redundant semicolons (';') that can be safely removed. Kotlin does not require a semicolon at the end of each statement or expression. The quick-fix is suggested to remove redundant semicolons. Example: 'val myMap = mapOf(\"one\" to 1, \"two\" to 2);\n myMap.forEach { (key, value) -> print(\"$key -> $value\")};' After the quick-fix is applied: 'val myMap = mapOf(\"one\" to 1, \"two\" to 2)\n myMap.forEach { (key, value) -> print(\"$key -> $value\")}' There are two cases though where a semicolon is required: Several statements placed on a single line need to be separated with semicolons: 'map.forEach { val (key, value) = it; println(\"$key -> $value\") }' 'enum' classes that also declare properties or functions, require a semicolon after the list of enum constants: 'enum class Mode {\n SILENT, VERBOSE;\n\n fun isSilent(): Boolean = this == SILENT\n }'",
"markdown": "Reports redundant semicolons (`;`) that can be safely removed.\n\n\nKotlin does not require a semicolon at the end of each statement or expression.\nThe quick-fix is suggested to remove redundant semicolons.\n\n**Example:**\n\n\n val myMap = mapOf(\"one\" to 1, \"two\" to 2);\n myMap.forEach { (key, value) -> print(\"$key -> $value\")};\n\nAfter the quick-fix is applied:\n\n\n val myMap = mapOf(\"one\" to 1, \"two\" to 2)\n myMap.forEach { (key, value) -> print(\"$key -> $value\")}\n\nThere are two cases though where a semicolon is required:\n\n1. Several statements placed on a single line need to be separated with semicolons:\n\n\n map.forEach { val (key, value) = it; println(\"$key -> $value\") }\n\n2. `enum` classes that also declare properties or functions, require a semicolon after the list of enum constants:\n\n\n enum class Mode {\n SILENT, VERBOSE;\n\n fun isSilent(): Boolean = this == SILENT\n }\n \n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantSemicolon",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ComplexRedundantLet",
"shortDescription": {
"text": "Redundant argument-based 'let' call"
},
"fullDescription": {
"text": "Reports a redundant argument-based 'let' call. 'let' is redundant when the lambda parameter is only used as a qualifier in a call expression. If you need to give a name to the qualifying expression, declare a local variable. Example: 'fun splitNumbers() {\n \"1,2,3\".let { it.split(',') }\n }' The quick-fix removes the extra 'let()' call: 'fun example() {\n \"1,2,3\".split(',')\n }' Alternative: 'fun splitNumbers() {\n val numbers = \"1,2,3\"\n numbers.split(',')\n }'",
"markdown": "Reports a redundant argument-based `let` call.\n\n`let` is redundant when the lambda parameter is only used as a qualifier in a call expression.\n\nIf you need to give a name to the qualifying expression, declare a local variable.\n\n**Example:**\n\n\n fun splitNumbers() {\n \"1,2,3\".let { it.split(',') }\n }\n\nThe quick-fix removes the extra `let()` call:\n\n\n fun example() {\n \"1,2,3\".split(',')\n }\n\nAlternative:\n\n\n fun splitNumbers() {\n val numbers = \"1,2,3\"\n numbers.split(',')\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ComplexRedundantLet",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IfThenToElvis",
"shortDescription": {
"text": "If-Then foldable to '?:'"
},
"fullDescription": {
"text": "Reports 'if-then' expressions that can be folded into elvis ('?:') expressions. Example: 'fun maybeFoo(): String? = \"foo\"\n\n var foo = maybeFoo()\n val bar = if (foo == null) \"hello\" else foo' The quick fix converts the 'if-then' expression into an elvis ('?:') expression: 'fun maybeFoo(): String? = \"foo\"\n\n var foo = maybeFoo()\n val bar = foo ?: \"hello\"'",
"markdown": "Reports `if-then` expressions that can be folded into elvis (`?:`) expressions.\n\n**Example:**\n\n\n fun maybeFoo(): String? = \"foo\"\n\n var foo = maybeFoo()\n val bar = if (foo == null) \"hello\" else foo\n\nThe quick fix converts the `if-then` expression into an elvis (`?:`) expression:\n\n\n fun maybeFoo(): String? = \"foo\"\n\n var foo = maybeFoo()\n val bar = foo ?: \"hello\"\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "IfThenToElvis",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "WrapUnaryOperator",
"shortDescription": {
"text": "Ambiguous unary operator use with number constant"
},
"fullDescription": {
"text": "Reports an unary operator followed by a dot qualifier such as '-1.inc()'. Code like '-1.inc()' can be misleading because '-' has a lower precedence than '.inc()'. As a result, '-1.inc()' evaluates to '-2' and not '0' as it might be expected. Wrap unary operator and value with () quick-fix can be used to amend the code automatically.",
"markdown": "Reports an unary operator followed by a dot qualifier such as `-1.inc()`.\n\nCode like `-1.inc()` can be misleading because `-` has a lower precedence than `.inc()`.\nAs a result, `-1.inc()` evaluates to `-2` and not `0` as it might be expected.\n\n**Wrap unary operator and value with ()** quick-fix can be used to amend the code automatically."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "WrapUnaryOperator",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RemoveExplicitSuperQualifier",
"shortDescription": {
"text": "Unnecessary supertype qualification"
},
"fullDescription": {
"text": "Reports 'super' member calls with redundant supertype qualification. Code in a derived class can call its superclass functions and property accessors implementations using the 'super' keyword. To specify the supertype from which the inherited implementation is taken, 'super' can be qualified by the supertype name in angle brackets, e.g. 'super<Base>'. Sometimes this qualification is redundant and can be omitted. Use the 'Remove explicit supertype qualification' quick-fix to clean up the code. Examples: 'open class B {\n open fun foo(){}\n }\n\n class A : B() {\n override fun foo() {\n super<B>.foo() // <== redundant because 'B' is the only supertype\n }\n }\n\n interface I {\n fun foo() {}\n }\n\n class C : B(), I {\n override fun foo() {\n super<B>.foo() // <== here <B> qualifier is needed to distinguish 'B.foo()' from 'I.foo()'\n }\n }' After the quick-fix is applied: 'open class B {\n open fun foo(){}\n }\n\n class A : B() {\n override fun foo() {\n super.foo() // <== Updated\n }\n }\n\n interface I {\n fun foo() {}\n }\n\n class C : B(), I {\n override fun foo() {\n super<B>.foo()\n }\n }'",
"markdown": "Reports `super` member calls with redundant supertype qualification.\n\n\nCode in a derived class can call its superclass functions and property accessors implementations using the `super` keyword.\nTo specify the supertype from which the inherited implementation is taken, `super` can be qualified by the supertype name in\nangle brackets, e.g. `super<Base>`. Sometimes this qualification is redundant and can be omitted.\nUse the 'Remove explicit supertype qualification' quick-fix to clean up the code.\n\n**Examples:**\n\n\n open class B {\n open fun foo(){}\n }\n\n class A : B() {\n override fun foo() {\n super<B>.foo() // <== redundant because 'B' is the only supertype\n }\n }\n\n interface I {\n fun foo() {}\n }\n\n class C : B(), I {\n override fun foo() {\n super<B>.foo() // <== here <B> qualifier is needed to distinguish 'B.foo()' from 'I.foo()'\n }\n }\n\nAfter the quick-fix is applied:\n\n\n open class B {\n open fun foo(){}\n }\n\n class A : B() {\n override fun foo() {\n super.foo() // <== Updated\n }\n }\n\n interface I {\n fun foo() {}\n }\n\n class C : B(), I {\n override fun foo() {\n super<B>.foo()\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RemoveExplicitSuperQualifier",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantExplicitType",
"shortDescription": {
"text": "Obvious explicit type"
},
"fullDescription": {
"text": "Reports local variables' explicitly given types which are obvious and thus redundant, like 'val f: Foo = Foo()'. Example: 'class Point(val x: Int, val y: Int)\n\n fun foo() {\n val t: Boolean = true\n val p: Point = Point(1, 2)\n val i: Int = 42\n }' After the quick-fix is applied: 'class Point(val x: Int, val y: Int)\n\n fun foo() {\n val t = true\n val p = Point(1, 2)\n val i = 42\n }'",
"markdown": "Reports local variables' explicitly given types which are obvious and thus redundant, like `val f: Foo = Foo()`.\n\n**Example:**\n\n\n class Point(val x: Int, val y: Int)\n\n fun foo() {\n val t: Boolean = true\n val p: Point = Point(1, 2)\n val i: Int = 42\n }\n\nAfter the quick-fix is applied:\n\n\n class Point(val x: Int, val y: Int)\n\n fun foo() {\n val t = true\n val p = Point(1, 2)\n val i = 42\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantExplicitType",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SuspiciousVarProperty",
"shortDescription": {
"text": "Suspicious 'var' property: its setter does not influence its getter result"
},
"fullDescription": {
"text": "Reports 'var' properties with default setter and getter that do not reference backing field. Such properties do not affect calling its setter; therefore, it will be clearer to change such property to 'val' and delete the initializer. Change to val and delete initializer quick-fix can be used to amend the code automatically. Example: '// This property always returns '1' and it doesn't important that the property is a 'var'\n var foo: Int = 0\n get() = 1'",
"markdown": "Reports `var` properties with default setter and getter that do not reference backing field.\n\n\nSuch properties do not affect calling its setter; therefore, it will be clearer to change such property to `val` and delete the initializer.\n\n**Change to val and delete initializer** quick-fix can be used to amend the code automatically.\n\nExample:\n\n\n // This property always returns '1' and it doesn't important that the property is a 'var'\n var foo: Int = 0\n get() = 1\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SuspiciousVarProperty",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MoveVariableDeclarationIntoWhen",
"shortDescription": {
"text": "Variable declaration could be moved inside 'when'"
},
"fullDescription": {
"text": "Reports variable declarations that can be moved inside a 'when' expression. Example: 'fun someCalc(x: Int) = x * 42\n\nfun foo(x: Int): Int {\n val a = someCalc(x)\n return when (a) {\n 1 -> a\n 2 -> 2 * a\n else -> 24\n }\n}' After the quick-fix is applied: 'fun foo(x: Int): Int {\n return when (val a = someCalc(x)) {\n 1 -> a\n 2 -> 2 * a\n else -> 24\n }\n}'",
"markdown": "Reports variable declarations that can be moved inside a `when` expression.\n\n**Example:**\n\n\n fun someCalc(x: Int) = x * 42\n\n fun foo(x: Int): Int {\n val a = someCalc(x)\n return when (a) {\n 1 -> a\n 2 -> 2 * a\n else -> 24\n }\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo(x: Int): Int {\n return when (val a = someCalc(x)) {\n 1 -> a\n 2 -> 2 * a\n else -> 24\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "MoveVariableDeclarationIntoWhen",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RemoveEmptyParenthesesFromAnnotationEntry",
"shortDescription": {
"text": "Remove unnecessary parentheses"
},
"fullDescription": {
"text": "Reports redundant empty parentheses in annotation entries. Use the 'Remove unnecessary parentheses' quick-fix to clean up the code. Examples: 'annotation class MyAnnotationA\n annotation class MyAnnotationB(val x: Int)\n annotation class MyAnnotationC(val x: Int = 10) // default value is present\n\n @MyAnnotationA() // <== parentheses are redundant\n fun testA() {\n }\n\n @MyAnnotationB() // <== missing argument, parentheses are required\n fun testB() {\n }\n\n @MyAnnotationC() // <== parentheses are redundant\n fun testC() {\n }'",
"markdown": "Reports redundant empty parentheses in annotation entries.\n\nUse the 'Remove unnecessary parentheses' quick-fix to clean up the code.\n\n**Examples:**\n\n\n annotation class MyAnnotationA\n annotation class MyAnnotationB(val x: Int)\n annotation class MyAnnotationC(val x: Int = 10) // default value is present\n\n @MyAnnotationA() // <== parentheses are redundant\n fun testA() {\n }\n\n @MyAnnotationB() // <== missing argument, parentheses are required\n fun testB() {\n }\n\n @MyAnnotationC() // <== parentheses are redundant\n fun testC() {\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RemoveEmptyParenthesesFromAnnotationEntry",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SimplifiableCallChain",
"shortDescription": {
"text": "Call chain on collection type can be simplified"
},
"fullDescription": {
"text": "Reports two-call chains replaceable by a single call. It can help you to avoid redundant code execution. The quick-fix replaces the call chain with a single call. Example: 'fun main() {\n listOf(1, 2, 3).filter { it > 1 }.count()\n }' After the quick-fix is applied: 'fun main() {\n listOf(1, 2, 3).count { it > 1 }\n }'",
"markdown": "Reports two-call chains replaceable by a single call.\n\nIt can help you to avoid redundant code execution.\n\nThe quick-fix replaces the call chain with a single call.\n\n**Example:**\n\n\n fun main() {\n listOf(1, 2, 3).filter { it > 1 }.count()\n }\n\nAfter the quick-fix is applied:\n\n\n fun main() {\n listOf(1, 2, 3).count { it > 1 }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "SimplifiableCallChain",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnusedUnaryOperator",
"shortDescription": {
"text": "Unused unary operator"
},
"fullDescription": {
"text": "Reports unary operators for number types on unused expressions. Unary operators break previous expression if they are used without braces. As a result, mathematical expressions spanning multi lines can be misleading. Example: 'fun main() {\n val result = 1 + 2 * 3\n + 3 // <== note that '+ 3' doesn't belong to the 'result' variable, it is unused\n println(\"Result = $result\") // The result is '7' and not '10' as it might be expected\n }'",
"markdown": "Reports unary operators for number types on unused expressions.\n\nUnary operators break previous expression if they are used without braces.\nAs a result, mathematical expressions spanning multi lines can be misleading.\n\nExample:\n\n\n fun main() {\n val result = 1 + 2 * 3\n + 3 // <== note that '+ 3' doesn't belong to the 'result' variable, it is unused\n println(\"Result = $result\") // The result is '7' and not '10' as it might be expected\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "UnusedUnaryOperator",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClassName",
"shortDescription": {
"text": "Class naming convention"
},
"fullDescription": {
"text": "Reports class names that do not follow the recommended naming conventions. Consistent naming allows for easier code reading and understanding. According to the Kotlin official style guide, class names should start with an uppercase letter and use camel case. It is possible to introduce other naming rules by changing the \"Pattern\" regular expression. Example: 'class user(val name: String)' The quick-fix renames the class according to the Kotlin naming conventions: 'class User(val name: String)'",
"markdown": "Reports class names that do not follow the recommended naming conventions.\n\n\nConsistent naming allows for easier code reading and understanding.\nAccording to the [Kotlin official style guide](https://kotlinlang.org/docs/coding-conventions.html#naming-rules),\nclass names should start with an uppercase letter and use camel case.\n\nIt is possible to introduce other naming rules by changing the \"Pattern\" regular expression.\n\n**Example:**\n\n\n class user(val name: String)\n\nThe quick-fix renames the class according to the Kotlin naming conventions:\n\n\n class User(val name: String)\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ClassName",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Naming conventions",
"index": 71,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RemoveEmptyPrimaryConstructor",
"shortDescription": {
"text": "Redundant empty primary constructor"
},
"fullDescription": {
"text": "Reports empty primary constructors when they are implicitly available anyway. A primary constructor is redundant and can be safely omitted when it does not have any annotations or visibility modifiers. Use the 'Remove empty primary constructor' quick-fix to clean up the code. Examples: 'class MyClassA constructor() // redundant, can be replaced with 'class MyClassA'\n\n annotation class MyAnnotation\n class MyClassB @MyAnnotation constructor() // required because of annotation\n\n class MyClassC private constructor() // required because of visibility modifier'",
"markdown": "Reports empty primary constructors when they are implicitly available anyway.\n\n\nA primary constructor is redundant and can be safely omitted when it does not have any annotations or visibility modifiers.\nUse the 'Remove empty primary constructor' quick-fix to clean up the code.\n\n**Examples:**\n\n\n class MyClassA constructor() // redundant, can be replaced with 'class MyClassA'\n\n annotation class MyAnnotation\n class MyClassB @MyAnnotation constructor() // required because of annotation\n\n class MyClassC private constructor() // required because of visibility modifier\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RemoveEmptyPrimaryConstructor",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RemoveEmptySecondaryConstructorBody",
"shortDescription": {
"text": "Redundant constructor body"
},
"fullDescription": {
"text": "Reports empty bodies of secondary constructors.",
"markdown": "Reports empty bodies of secondary constructors."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RemoveEmptySecondaryConstructorBody",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConvertPairConstructorToToFunction",
"shortDescription": {
"text": "Convert Pair constructor to 'to' function"
},
"fullDescription": {
"text": "Reports a 'Pair' constructor invocation that can be replaced with a 'to()' infix function call. Explicit constructor invocations may add verbosity, especially if they are used multiple times. Replacing constructor calls with 'to()' makes code easier to read and maintain. Example: 'val countries = mapOf(\n Pair(\"France\", \"Paris\"),\n Pair(\"Spain\", \"Madrid\"),\n Pair(\"Germany\", \"Berlin\")\n )' After the quick-fix is applied: 'val countries = mapOf(\n \"France\" to \"Paris\",\n \"Spain\" to \"Madrid\",\n \"Germany\" to \"Berlin\"\n )'",
"markdown": "Reports a `Pair` constructor invocation that can be replaced with a `to()` infix function call.\n\n\nExplicit constructor invocations may add verbosity, especially if they are used multiple times.\nReplacing constructor calls with `to()` makes code easier to read and maintain.\n\n**Example:**\n\n\n val countries = mapOf(\n Pair(\"France\", \"Paris\"),\n Pair(\"Spain\", \"Madrid\"),\n Pair(\"Germany\", \"Berlin\")\n )\n\nAfter the quick-fix is applied:\n\n\n val countries = mapOf(\n \"France\" to \"Paris\",\n \"Spain\" to \"Madrid\",\n \"Germany\" to \"Berlin\"\n )\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ConvertPairConstructorToToFunction",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantVisibilityModifier",
"shortDescription": {
"text": "Redundant visibility modifier"
},
"fullDescription": {
"text": "Reports visibility modifiers that match the default visibility of an element ('public' for most elements, 'protected' for members that override a protected member).",
"markdown": "Reports visibility modifiers that match the default visibility of an element (`public` for most elements, `protected` for members that override a protected member)."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantVisibilityModifier",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EnumValuesSoftDeprecateInJava",
"shortDescription": {
"text": "'Enum.values()' is recommended to be replaced by 'Enum.getEntries()' since Kotlin 1.9"
},
"fullDescription": {
"text": "Reports calls from Java to 'values()' method of Kotlin enum classes that can be replaced with 'getEntries()'. Use of 'Enum.getEntries()' may improve performance of your code. More details: KT-48872 Provide modern and performant replacement for Enum.values()",
"markdown": "Reports calls from Java to `values()` method of Kotlin enum classes that can be replaced with `getEntries()`.\n\n\nUse of `Enum.getEntries()` may improve performance of your code.\n\n\n**More details:** [KT-48872 Provide modern and performant replacement for Enum.values()](https://youtrack.jetbrains.com/issue/KT-48872)"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "EnumValuesSoftDeprecateInJava",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Other problems",
"index": 56,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UsePropertyAccessSyntax",
"shortDescription": {
"text": "Accessor call that can be replaced with property access syntax"
},
"fullDescription": {
"text": "Reports Java 'get' and 'set' method calls that can be replaced with the Kotlin synthetic properties. Use property access syntax quick-fix can be used to amend the code automatically. Example: '// Java:\n public class JavaClassWithGetter {\n private final String expr = \"result\";\n\n // ...\n\n public String getExpr() {\n return expr;\n }\n }' '// Kotlin:\n fun test(j: JavaClassWithGetter) {\n // ...\n j.getExpr() // <== The quick-fix simplifies the expression to 'j.expr'\n }'",
"markdown": "Reports Java `get` and `set` method calls that can be replaced with the Kotlin synthetic properties.\n\n**Use property access syntax** quick-fix can be used to amend the code automatically.\n\nExample:\n\n\n // Java:\n public class JavaClassWithGetter {\n private final String expr = \"result\";\n\n // ...\n\n public String getExpr() {\n return expr;\n }\n }\n\n\n // Kotlin:\n fun test(j: JavaClassWithGetter) {\n // ...\n j.getExpr() // <== The quick-fix simplifies the expression to 'j.expr'\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "UsePropertyAccessSyntax",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UseExpressionBody",
"shortDescription": {
"text": "Expression body syntax is preferable here"
},
"fullDescription": {
"text": "Reports 'return' expressions (one-liners or 'when') that can be replaced with expression body syntax. Expression body syntax is recommended by the style guide. Convert to expression body quick-fix can be used to amend the code automatically. Example: 'fun sign(x: Int): Int {\n return when { // <== can be simplified\n x < 0 -> -1\n x > 0 -> 1\n else -> 0\n }\n }' After the quick-fix is applied: 'fun sign(x: Int): Int = when {\n x < 0 -> -1\n x > 0 -> 1\n else -> 0\n }'",
"markdown": "Reports `return` expressions (one-liners or `when`) that can be replaced with expression body syntax.\n\nExpression body syntax is recommended by the [style guide](https://kotlinlang.org/docs/coding-conventions.html#functions).\n\n**Convert to expression body** quick-fix can be used to amend the code automatically.\n\nExample:\n\n\n fun sign(x: Int): Int {\n return when { // <== can be simplified\n x < 0 -> -1\n x > 0 -> 1\n else -> 0\n }\n }\n\nAfter the quick-fix is applied:\n\n\n fun sign(x: Int): Int = when {\n x < 0 -> -1\n x > 0 -> 1\n else -> 0\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "UseExpressionBody",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MapGetWithNotNullAssertionOperator",
"shortDescription": {
"text": "'map.get()' with not-null assertion operator (!!)"
},
"fullDescription": {
"text": "Reports 'map.get()!!' that can be replaced with 'map.getValue()', 'map.getOrElse()', and so on. Example: 'fun test(map: Map<Int, String>): String = map.get(0)!!' After the quick-fix is applied: 'fun test(map: Map<Int, String>): String = map.getValue(0)'",
"markdown": "Reports `map.get()!!` that can be replaced with `map.getValue()`, `map.getOrElse()`, and so on.\n\n**Example:**\n\n\n fun test(map: Map<Int, String>): String = map.get(0)!!\n\nAfter the quick-fix is applied:\n\n\n fun test(map: Map<Int, String>): String = map.getValue(0)\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "MapGetWithNotNullAssertionOperator",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SortModifiers",
"shortDescription": {
"text": "Non-canonical modifier order"
},
"fullDescription": {
"text": "Reports modifiers that do not follow the order recommended by the style guide. Sort modifiers quick-fix can be used to amend the code automatically. Examples: 'private inline fun correctOrder(f: () -> Unit) {} // <== Ok\n\n infix private fun Int.wrongOrder(expr: Int) {} // <== wrong order, quick-fix amends the modifiers to \"private infix\"'",
"markdown": "Reports modifiers that do not follow the order recommended by the [style guide](https://kotlinlang.org/docs/coding-conventions.html#modifiers-order).\n\n**Sort modifiers** quick-fix can be used to amend the code automatically.\n\nExamples:\n\n\n private inline fun correctOrder(f: () -> Unit) {} // <== Ok\n\n infix private fun Int.wrongOrder(expr: Int) {} // <== wrong order, quick-fix amends the modifiers to \"private infix\"\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "SortModifiers",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CopyWithoutNamedArguments",
"shortDescription": {
"text": "'copy' method of data class is called without named arguments"
},
"fullDescription": {
"text": "Reports calls to a data class' 'copy()' method without named arguments. As all arguments of the 'copy()' function are optional, it might be hard to understand what properties are modified. Providing parameter names explicitly makes code easy to understand without navigating to the 'data class' declaration. Example: 'data class User(val name: String, val age: Int)\n\n fun copyUser(user: User): User {\n return user.copy(\"John\")\n }' The quick-fix provides parameter names to all 'copy()' arguments: 'data class User(val name: String, val age: Int)\n\n fun copyUser(user: User): User {\n return user.copy(name = \"John\")\n }'",
"markdown": "Reports calls to a data class' `copy()` method without named arguments.\n\n\nAs all arguments of the `copy()` function are optional, it might be hard to understand what properties are modified.\nProviding parameter names explicitly makes code easy to understand without navigating to the `data class` declaration.\n\n**Example:**\n\n\n data class User(val name: String, val age: Int)\n\n fun copyUser(user: User): User {\n return user.copy(\"John\")\n }\n\nThe quick-fix provides parameter names to all `copy()` arguments:\n\n\n data class User(val name: String, val age: Int)\n\n fun copyUser(user: User): User {\n return user.copy(name = \"John\")\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "CopyWithoutNamedArguments",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceRangeToWithRangeUntil",
"shortDescription": {
"text": "'rangeTo' or the '..' call should be replaced with '..<'"
},
"fullDescription": {
"text": "Reports calls to 'rangeTo' or the '..' operator instead of calls to '..<'. Using corresponding functions makes your code simpler. The quick-fix replaces 'rangeTo' or the '..' call with '..<'. Example: 'fun foo(a: Int) {\n for (i in 0..a - 1) {\n\n }\n }' After the quick-fix is applied: 'fun foo(a: Int) {\n for (i in 0..<a) {\n\n }\n }'",
"markdown": "Reports calls to `rangeTo` or the `..` operator instead of calls to `..<`.\n\nUsing corresponding functions makes your code simpler.\n\nThe quick-fix replaces `rangeTo` or the `..` call with `..<`.\n\n**Example:**\n\n\n fun foo(a: Int) {\n for (i in 0..a - 1) {\n\n }\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo(a: Int) {\n for (i in 0..<a) {\n\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceRangeToWithRangeUntil",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConvertCallChainIntoSequence",
"shortDescription": {
"text": "Call chain on collection could be converted into 'Sequence' to improve performance"
},
"fullDescription": {
"text": "Reports call chain on a 'Collection' that should be converted into Sequence. Each 'Collection' transforming function (such as 'map()' or 'filter()') creates a new 'Collection' (typically 'List' or 'Set') under the hood. In case of multiple consequent calls, and a huge number of items in 'Collection', memory traffic might be significant. In such a case, using 'Sequence' is preferred. Example: 'class Entity(val key: String, val value: String)\n\n fun getValues(lines: List<String>) = lines\n .filter { it.isNotEmpty() }\n .map { it.split(',', limit = 2) }\n .filter { it.size == 2 }\n .map { Entity(it[0], it[1]) }' The quick-fix wraps call chain into 'asSequence()' and 'toList()': 'class Entity(val key: String, val value: String)\n\n fun getValues(lines: List<String>) = lines\n .asSequence()\n .filter { it.isNotEmpty() }\n .map { it.split(',', limit = 2) }\n .filter { it.size == 2 }\n .map { Entity(it[0], it[1]) }\n .toList()'",
"markdown": "Reports call chain on a `Collection` that should be converted into **Sequence** .\n\nEach `Collection` transforming function (such as `map()` or `filter()`) creates a new\n`Collection` (typically `List` or `Set`) under the hood.\nIn case of multiple consequent calls, and a huge number of items in `Collection`, memory traffic might be significant.\nIn such a case, using `Sequence` is preferred.\n\n**Example:**\n\n\n class Entity(val key: String, val value: String)\n\n fun getValues(lines: List<String>) = lines\n .filter { it.isNotEmpty() }\n .map { it.split(',', limit = 2) }\n .filter { it.size == 2 }\n .map { Entity(it[0], it[1]) }\n\nThe quick-fix wraps call chain into `asSequence()` and `toList()`:\n\n\n class Entity(val key: String, val value: String)\n\n fun getValues(lines: List<String>) = lines\n .asSequence()\n .filter { it.isNotEmpty() }\n .map { it.split(',', limit = 2) }\n .filter { it.size == 2 }\n .map { Entity(it[0], it[1]) }\n .toList()\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ConvertCallChainIntoSequence",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceWithImportAlias",
"shortDescription": {
"text": "Fully qualified name can be replaced with existing import alias"
},
"fullDescription": {
"text": "Reports fully qualified names that can be replaced with an existing import alias. Example: 'import foo.Foo as Bar\nfun main() {\n foo.Foo()\n}' After the quick-fix is applied: 'import foo.Foo as Bar\nfun main() {\n Bar()\n}'",
"markdown": "Reports fully qualified names that can be replaced with an existing import alias.\n\n**Example:**\n\n\n import foo.Foo as Bar\n fun main() {\n foo.Foo()\n }\n\nAfter the quick-fix is applied:\n\n\n import foo.Foo as Bar\n fun main() {\n Bar()\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceWithImportAlias",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConvertNaNEquality",
"shortDescription": {
"text": "Convert equality check with 'NaN' to 'isNaN' call"
},
"fullDescription": {
"text": "Reports an equality check with 'Float.NaN' or 'Double.NaN' that should be replaced with an 'isNaN()' check. According to IEEE 754, equality check against NaN always returns 'false', even for 'NaN == NaN'. Therefore, such a check is likely to be a mistake. The quick-fix replaces comparison with 'isNaN()' check that uses a different comparison technique and handles 'NaN' values correctly. Example: 'fun check(value: Double): Boolean {\n return Double.NaN == value\n }' After the fix is applied: 'fun check(value: Double): Boolean {\n return value.isNaN()\n }'",
"markdown": "Reports an equality check with `Float.NaN` or `Double.NaN` that should be replaced with an `isNaN()` check.\n\n\nAccording to IEEE 754, equality check against NaN always returns `false`, even for `NaN == NaN`.\nTherefore, such a check is likely to be a mistake.\n\nThe quick-fix replaces comparison with `isNaN()` check that uses a different comparison technique and handles `NaN` values correctly.\n\n**Example:**\n\n\n fun check(value: Double): Boolean {\n return Double.NaN == value\n }\n\nAfter the fix is applied:\n\n\n fun check(value: Double): Boolean {\n return value.isNaN()\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ConvertNaNEquality",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceManualRangeWithIndicesCalls",
"shortDescription": {
"text": "Range can be converted to indices or iteration"
},
"fullDescription": {
"text": "Reports 'until' and 'rangeTo' operators that can be replaced with 'Collection.indices' or iteration over collection inside 'for' loop. Using syntactic sugar makes your code simpler. The quick-fix replaces the manual range with the corresponding construction. Example: 'fun main(args: Array<String>) {\n for (index in 0..args.size - 1) {\n println(args[index])\n }\n }' After the quick-fix is applied: 'fun main(args: Array<String>) {\n for (element in args) {\n println(element)\n }\n }'",
"markdown": "Reports `until` and `rangeTo` operators that can be replaced with `Collection.indices` or iteration over collection inside `for` loop.\n\nUsing syntactic sugar makes your code simpler.\n\nThe quick-fix replaces the manual range with the corresponding construction.\n\n**Example:**\n\n\n fun main(args: Array<String>) {\n for (index in 0..args.size - 1) {\n println(args[index])\n }\n }\n\nAfter the quick-fix is applied:\n\n\n fun main(args: Array<String>) {\n for (element in args) {\n println(element)\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceManualRangeWithIndicesCalls",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KotlinLoggerInitializedWithForeignClass",
"shortDescription": {
"text": "Logger initialized with foreign class"
},
"fullDescription": {
"text": "Reports 'Logger' instances initialized with a class literal other than the class the 'Logger' resides in. This can happen when copy-pasting from another class. It may result in logging events under an unexpected category and incorrect filtering. Use the inspection options to specify the logger factory classes and methods recognized by this inspection. Example: 'class AnotherService\nclass MyService {\n private val logger = LoggerFactory.getLogger(AnotherService::class.java)\n}' After the quick-fix is applied: 'class MyService {\n private val logger = LoggerFactory.getLogger(MyService::class.java)\n}'",
"markdown": "Reports `Logger` instances initialized with a class literal other than the class the `Logger` resides in.\n\n\nThis can happen when copy-pasting from another class.\nIt may result in logging events under an unexpected category and incorrect filtering.\n\n\nUse the inspection options to specify the logger factory classes and methods recognized by this inspection.\n\n**Example:**\n\n\n class AnotherService\n class MyService {\n private val logger = LoggerFactory.getLogger(AnotherService::class.java)\n }\n\nAfter the quick-fix is applied:\n\n\n class MyService {\n private val logger = LoggerFactory.getLogger(MyService::class.java)\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "KotlinLoggerInitializedWithForeignClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Logging",
"index": 229,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RemoveToStringInStringTemplate",
"shortDescription": {
"text": "Redundant call to 'toString()' in string template"
},
"fullDescription": {
"text": "Reports calls to 'toString()' in string templates that can be safely removed. Example: 'fun foo(a: Int, b: Int) = a + b\n\n fun test(): String {\n return \"Foo: ${foo(0, 4).toString()}\" // 'toString()' is redundant\n }' After the quick-fix is applied: 'fun foo(a: Int, b: Int) = a + b\n\n fun test(): String {\n return \"Foo: ${foo(0, 4)}\"\n }'",
"markdown": "Reports calls to `toString()` in string templates that can be safely removed.\n\n**Example:**\n\n fun foo(a: Int, b: Int) = a + b\n\n fun test(): String {\n return \"Foo: ${foo(0, 4).toString()}\" // 'toString()' is redundant\n }\n\nAfter the quick-fix is applied:\n\n fun foo(a: Int, b: Int) = a + b\n\n fun test(): String {\n return \"Foo: ${foo(0, 4)}\"\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RemoveToStringInStringTemplate",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CanBePrimaryConstructorProperty",
"shortDescription": {
"text": "Property is explicitly assigned to constructor parameter"
},
"fullDescription": {
"text": "Reports properties that are explicitly assigned to primary constructor parameters. Properties can be declared directly in the primary constructor, reducing the amount of code and increasing code readability. Example: 'class User(name: String) {\n val name = name\n }' The quick-fix joins the parameter and property declaration into a primary constructor parameter: 'class User(val name: String) {\n }'",
"markdown": "Reports properties that are explicitly assigned to primary constructor parameters.\n\nProperties can be declared directly in the primary constructor, reducing the amount of code and increasing code readability.\n\n**Example:**\n\n\n class User(name: String) {\n val name = name\n }\n\nThe quick-fix joins the parameter and property declaration into a primary constructor parameter:\n\n\n class User(val name: String) {\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CanBePrimaryConstructorProperty",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaMapForEach",
"shortDescription": {
"text": "Java Map.forEach method call should be replaced with Kotlin's forEach"
},
"fullDescription": {
"text": "Reports a Java Map.'forEach' method call that can be replaced with Kotlin's forEach. Example: 'fun test(map: HashMap<Int, String>) {\n map.forEach { key, value ->\n foo(key, value)\n }\n }\n\n fun foo(i: Int, s: String) {}' The quick-fix adds parentheses: 'fun test(map: HashMap<Int, String>) {\n map.forEach { (key, value) ->\n foo(key, value)\n }\n }\n\n fun foo(i: Int, s: String) {}'",
"markdown": "Reports a Java Map.`forEach` method call that can be replaced with Kotlin's **forEach** .\n\n**Example:**\n\n\n fun test(map: HashMap<Int, String>) {\n map.forEach { key, value ->\n foo(key, value)\n }\n }\n\n fun foo(i: Int, s: String) {}\n\nThe quick-fix adds parentheses:\n\n\n fun test(map: HashMap<Int, String>) {\n map.forEach { (key, value) ->\n foo(key, value)\n }\n }\n\n fun foo(i: Int, s: String) {}\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "JavaMapForEach",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ImplicitNullableNothingType",
"shortDescription": {
"text": "Implicit 'Nothing?' type"
},
"fullDescription": {
"text": "Reports variables and functions with the implicit Nothing? type. Example: 'fun foo() = null' The quick fix specifies the return type explicitly: 'fun foo(): Nothing? = null'",
"markdown": "Reports variables and functions with the implicit **Nothing?** type.\n\n**Example:**\n\n\n fun foo() = null\n\nThe quick fix specifies the return type explicitly:\n\n\n fun foo(): Nothing? = null\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "ImplicitNullableNothingType",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceAssociateFunction",
"shortDescription": {
"text": "'associate' can be replaced with 'associateBy' or 'associateWith'"
},
"fullDescription": {
"text": "Reports calls to 'associate()' and 'associateTo()' that can be replaced with 'associateBy()' or 'associateWith()'. Both functions accept a transformer function applied to elements of a given sequence or collection (as a receiver). The pairs are then used to build the resulting 'Map'. Given the transformer refers to 'it', the 'associate[To]()' call can be replaced with more performant 'associateBy()' or 'associateWith()'. Examples: 'fun getKey(i: Int) = 1L\n fun getValue(i: Int) = 1L\n\n fun test() {\n arrayOf(1).associate { getKey(it) to it } // replaceable 'associate()'\n listOf(1).associate { it to getValue(it) } // replaceable 'associate()'\n }' After the quick-fix is applied: 'fun getKey(i: Int) = 1L\n fun getValue(i: Int) = 1L\n\n fun test() {\n arrayOf(1).associateBy { getKey(it) }\n listOf(1).associateWith { getValue(it) }\n }'",
"markdown": "Reports calls to `associate()` and `associateTo()` that can be replaced with `associateBy()` or `associateWith()`.\n\n\nBoth functions accept a transformer function applied to elements of a given sequence or collection (as a receiver).\nThe pairs are then used to build the resulting `Map`.\n\n\nGiven the transformer refers to `it`, the `associate[To]()` call can be replaced with more performant `associateBy()`\nor `associateWith()`.\n\n**Examples:**\n\n fun getKey(i: Int) = 1L\n fun getValue(i: Int) = 1L\n\n fun test() {\n arrayOf(1).associate { getKey(it) to it } // replaceable 'associate()'\n listOf(1).associate { it to getValue(it) } // replaceable 'associate()'\n }\n\nAfter the quick-fix is applied:\n\n fun getKey(i: Int) = 1L\n fun getValue(i: Int) = 1L\n\n fun test() {\n arrayOf(1).associateBy { getKey(it) }\n listOf(1).associateWith { getValue(it) }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceAssociateFunction",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ObsoleteExperimentalCoroutines",
"shortDescription": {
"text": "Experimental coroutines usages are deprecated since 1.3"
},
"fullDescription": {
"text": "Reports code that uses experimental coroutines. Such usages are incompatible with Kotlin 1.3+ and should be updated.",
"markdown": "Reports code that uses experimental coroutines.\n\nSuch usages are incompatible with Kotlin 1.3+ and should be updated."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "ObsoleteExperimentalCoroutines",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Migration",
"index": 86,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SimplifyWhenWithBooleanConstantCondition",
"shortDescription": {
"text": "Simplifiable 'when'"
},
"fullDescription": {
"text": "Reports 'when' expressions with the constant 'true' or 'false' branches. Simplify \"when\" quick-fix can be used to amend the code automatically. Examples: 'fun redundant() {\n when { // <== redundant, quick-fix simplifies the when expression to \"println(\"true\")\"\n true -> println(\"true\")\n else -> println(\"false\")\n }\n }'",
"markdown": "Reports `when` expressions with the constant `true` or `false` branches.\n\n**Simplify \"when\"** quick-fix can be used to amend the code automatically.\n\nExamples:\n\n\n fun redundant() {\n when { // <== redundant, quick-fix simplifies the when expression to \"println(\"true\")\"\n true -> println(\"true\")\n else -> println(\"false\")\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "SimplifyWhenWithBooleanConstantCondition",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KotlinConstantConditions",
"shortDescription": {
"text": "Constant conditions"
},
"fullDescription": {
"text": "Reports non-trivial conditions and values that are statically known to be always true, false, null or zero. While sometimes intended, often this is a sign of logical error in the program. Additionally, reports never reachable 'when' branches and some expressions that are statically known to fail always. Examples: 'fun process(x: Int?) {\n val isNull = x == null\n if (!isNull) {\n if (x != null) {} // condition is always true\n require(x!! < 0 && x > 10) // condition is always false\n } else {\n println(x!!) // !! operator will always fail\n }\n}\nfun process(v: Any) {\n when(v) {\n is CharSequence -> println(v as Int) // cast will always fail\n is String -> println(v) // branch is unreachable\n }\n}' Uncheck the \"Warn when constant is stored in variable\" option to avoid reporting of variables having constant values not in conditions. New in 2021.3",
"markdown": "Reports non-trivial conditions and values that are statically known to be always true, false, null or zero. While sometimes intended, often this is a sign of logical error in the program. Additionally, reports never reachable `when` branches and some expressions that are statically known to fail always.\n\nExamples:\n\n\n fun process(x: Int?) {\n val isNull = x == null\n if (!isNull) {\n if (x != null) {} // condition is always true\n require(x!! < 0 && x > 10) // condition is always false\n } else {\n println(x!!) // !! operator will always fail\n }\n }\n fun process(v: Any) {\n when(v) {\n is CharSequence -> println(v as Int) // cast will always fail\n is String -> println(v) // branch is unreachable\n }\n }\n\n\nUncheck the \"Warn when constant is stored in variable\" option to avoid reporting of variables having constant values not in conditions.\n\nNew in 2021.3"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "KotlinConstantConditions",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RemoveForLoopIndices",
"shortDescription": {
"text": "Unused loop index"
},
"fullDescription": {
"text": "Reports 'for' loops iterating over a collection using the 'withIndex()' function and not using the index variable. Use the \"Remove indices in 'for' loop\" quick-fix to clean up the code. Examples: 'fun foo(bar: List<String>) {\n for ((index : Int, value: String) in bar.withIndex()) { // <== 'index' is unused\n println(value)\n }\n }' After the quick-fix is applied: 'fun foo(bar: List<String>) {\n for (value: String in bar) { // <== '.withIndex()' and 'index' are removed\n println(value)\n }\n }'",
"markdown": "Reports `for` loops iterating over a collection using the `withIndex()` function and not using the index variable.\n\nUse the \"Remove indices in 'for' loop\" quick-fix to clean up the code.\n\n**Examples:**\n\n\n fun foo(bar: List<String>) {\n for ((index : Int, value: String) in bar.withIndex()) { // <== 'index' is unused\n println(value)\n }\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo(bar: List<String>) {\n for (value: String in bar) { // <== '.withIndex()' and 'index' are removed\n println(value)\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RemoveForLoopIndices",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FromClosedRangeMigration",
"shortDescription": {
"text": "MIN_VALUE step in fromClosedRange() since 1.3"
},
"fullDescription": {
"text": "Reports 'IntProgression.fromClosedRange()' and 'LongProgression.fromClosedRange()' with 'MIN_VALUE' step. It is prohibited to call 'IntProgression.fromClosedRange()' and 'LongProgression.fromClosedRange()' with 'MIN_VALUE' step. All such calls should be checked during migration to Kotlin 1.3+. Example: 'IntProgression.fromClosedRange(12, 143, Int.MIN_VALUE)' To fix the problem change the step of the progression.",
"markdown": "Reports `IntProgression.fromClosedRange()` and `LongProgression.fromClosedRange()` with `MIN_VALUE` step.\n\n\nIt is prohibited to call `IntProgression.fromClosedRange()` and `LongProgression.fromClosedRange()` with\n`MIN_VALUE` step. All such calls should be checked during migration to Kotlin 1.3+.\n\n**Example:**\n\n\n IntProgression.fromClosedRange(12, 143, Int.MIN_VALUE)\n\nTo fix the problem change the step of the progression."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "FromClosedRangeMigration",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Migration",
"index": 86,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RemoveRedundantBackticks",
"shortDescription": {
"text": "Redundant backticks"
},
"fullDescription": {
"text": "Reports redundant backticks in references. Some of the Kotlin keywords are valid identifiers in Java, for example: 'in', 'object', 'is'. If a Java library uses a Kotlin keyword for a method, you can still call the method escaping it with the backtick character ('`'), for example, 'foo.`is`(bar)'. Sometimes this escaping is redundant and can be safely omitted. The inspection discovers and reports such cases and is paired with the 'Remove redundant backticks' quick-fix, which allows you to amend the highlighted code. Examples: 'fun `is`(x: String) {}\n fun foo() {\n `is`(\"bar\") // 'is' is a keyword, backticks are required\n }\n\n fun `test that smth works as designed`() {} // OK, complex identifier for readability improvement\n\n val `a` = 1 // no need for backticks'",
"markdown": "Reports redundant backticks in references.\n\n\nSome of the Kotlin keywords are valid identifiers in Java, for example: `in`, `object`, `is`.\nIf a Java library uses a Kotlin keyword for a method, you can still call the method escaping it\nwith the backtick character (`````), for example, ``foo.`is`(bar)``.\nSometimes this escaping is redundant and can be safely omitted. The inspection discovers and reports such cases and is\npaired with the 'Remove redundant backticks' quick-fix, which allows you to amend the highlighted code.\n\n**Examples:**\n\n\n fun `is`(x: String) {}\n fun foo() {\n `is`(\"bar\") // 'is' is a keyword, backticks are required\n }\n\n fun `test that smth works as designed`() {} // OK, complex identifier for readability improvement\n\n val `a` = 1 // no need for backticks\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RemoveRedundantBackticks",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SimplifyNestedEachInScopeFunction",
"shortDescription": {
"text": "Scope function with nested forEach can be simplified"
},
"fullDescription": {
"text": "Reports 'forEach' functions in the scope functions such as 'also' or 'apply' that can be simplified. Convert forEach call to onEach quick-fix can be used to amend the code automatically. Examples: 'fun test(list: List<Int>) {\n val x = list.also { it.forEach { it + 4 } }.toString()\n val y = list.apply { forEach { println(it) } }\n }' After the quick-fix is applied: 'fun test(list: List<Int>) {\n val x = list.onEach { it + 4 }.toString()\n val y = list.onEach { println(it) }\n }'",
"markdown": "Reports `forEach` functions in the scope functions such as `also` or `apply` that can be simplified.\n\n**Convert forEach call to onEach** quick-fix can be used to amend the code automatically.\n\nExamples:\n\n\n fun test(list: List<Int>) {\n val x = list.also { it.forEach { it + 4 } }.toString()\n val y = list.apply { forEach { println(it) } }\n }\n\nAfter the quick-fix is applied:\n\n\n fun test(list: List<Int>) {\n val x = list.onEach { it + 4 }.toString()\n val y = list.onEach { println(it) }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "SimplifyNestedEachInScopeFunction",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnsafeCastFromDynamic",
"shortDescription": {
"text": "Implicit (unsafe) cast from dynamic type"
},
"fullDescription": {
"text": "Reports expressions with a dynamic type in the specified inspection scope that are implicitly cast to another type.",
"markdown": "Reports expressions with a dynamic type in the specified inspection scope that are implicitly cast to another type."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "UnsafeCastFromDynamic",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PublicApiImplicitType",
"shortDescription": {
"text": "Public API declaration with implicit return type"
},
"fullDescription": {
"text": "Reports 'public' and 'protected' functions and properties that have an implicit return type. For API stability reasons, it's recommended to specify such types explicitly. Example: 'fun publicFunctionWhichAbusesTypeInference() =\n otherFunctionWithNotObviousReturnType() ?: yetAnotherFunctionWithNotObviousReturnType()' After the quick-fix is applied: 'fun publicFunctionWhichAbusesTypeInference(): Api =\n otherFunctionWithNotObviousReturnType() ?: yetAnotherFunctionWithNotObviousReturnType()'",
"markdown": "Reports `public` and `protected` functions and properties that have an implicit return type.\nFor API stability reasons, it's recommended to specify such types explicitly.\n\n**Example:**\n\n\n fun publicFunctionWhichAbusesTypeInference() =\n otherFunctionWithNotObviousReturnType() ?: yetAnotherFunctionWithNotObviousReturnType()\n\nAfter the quick-fix is applied:\n\n\n fun publicFunctionWhichAbusesTypeInference(): Api =\n otherFunctionWithNotObviousReturnType() ?: yetAnotherFunctionWithNotObviousReturnType()\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PublicApiImplicitType",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Other problems",
"index": 56,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LoopToCallChain",
"shortDescription": {
"text": "Loop can be replaced with stdlib operations"
},
"fullDescription": {
"text": "Reports 'for' loops that can be replaced with a sequence of stdlib operations (like 'map', 'filter', and so on). Example: 'fun foo(list: List<String>): List<Int> {\n val result = ArrayList<Int>()\n for (s in list) {\n if (s.length > 0)\n result.add(s.hashCode())\n }\n return result\n}' After the quick-fix is applied: 'fun foo(list: List<String>): List<Int> {\n val result = list\n .filter { it.length > 0 }\n .map { it.hashCode() }\n return result\n}'",
"markdown": "Reports `for` loops that can be replaced with a sequence of stdlib operations (like `map`, `filter`, and so on).\n\n**Example:**\n\n\n fun foo(list: List<String>): List<Int> {\n val result = ArrayList<Int>()\n for (s in list) {\n if (s.length > 0)\n result.add(s.hashCode())\n }\n return result\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo(list: List<String>): List<Int> {\n val result = list\n .filter { it.length > 0 }\n .map { it.hashCode() }\n return result\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "LoopToCallChain",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CanBeParameter",
"shortDescription": {
"text": "Constructor parameter is never used as a property"
},
"fullDescription": {
"text": "Reports primary constructor parameters that can have 'val' or 'var' removed. Class properties declared in the constructor increase memory consumption. If the parameter value is only used in the constructor, you can omit them. Note that the referenced object might be garbage-collected earlier. Example: 'class Task(val name: String) {\n init {\n print(\"Task created: $name\")\n }\n }' The quick-fix removes the extra 'val' or 'var' keyword: 'class Task(name: String) {\n init {\n print(\"Task created: $name\")\n }\n }'",
"markdown": "Reports primary constructor parameters that can have `val` or `var` removed.\n\n\nClass properties declared in the constructor increase memory consumption.\nIf the parameter value is only used in the constructor, you can omit them.\n\nNote that the referenced object might be garbage-collected earlier.\n\n**Example:**\n\n\n class Task(val name: String) {\n init {\n print(\"Task created: $name\")\n }\n }\n\nThe quick-fix removes the extra `val` or `var` keyword:\n\n\n class Task(name: String) {\n init {\n print(\"Task created: $name\")\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CanBeParameter",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantReturnLabel",
"shortDescription": {
"text": "Redundant 'return' label"
},
"fullDescription": {
"text": "Reports redundant return labels outside of lambda expressions. Example: 'fun test() {\n return@test\n }' After the quick-fix is applied: 'fun test() {\n return\n }'",
"markdown": "Reports redundant return labels outside of lambda expressions.\n\n**Example:**\n\n\n fun test() {\n return@test\n }\n\nAfter the quick-fix is applied:\n\n\n fun test() {\n return\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RedundantReturnLabel",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PackageName",
"shortDescription": {
"text": "Package naming convention"
},
"fullDescription": {
"text": "Reports package names that do not follow the naming conventions. You can specify the required pattern in the inspection options. Recommended naming conventions: names of packages are always lowercase and should not contain underscores. Example: 'org.example.project' Using multi-word names is generally discouraged, but if you do need to use multiple words, you can either just concatenate them together or use camel case Example: 'org.example.myProject'",
"markdown": "Reports package names that do not follow the naming conventions.\n\nYou can specify the required pattern in the inspection options.\n\n[Recommended naming conventions](https://kotlinlang.org/docs/coding-conventions.html#naming-rules): names of packages are always lowercase and should not contain underscores.\n\n**Example:**\n`org.example.project`\n\nUsing multi-word names is generally discouraged, but if you do need to use multiple words, you can either just concatenate them together or use camel case\n\n**Example:**\n`org.example.myProject`"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PackageName",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Naming conventions",
"index": 71,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceWithEnumMap",
"shortDescription": {
"text": "'HashMap' can be replaced with 'EnumMap'"
},
"fullDescription": {
"text": "Reports 'hashMapOf' function or 'HashMap' constructor calls that can be replaced with an 'EnumMap' constructor call. Using 'EnumMap' constructor makes your code simpler. The quick-fix replaces the function call with the 'EnumMap' constructor call. Example: 'enum class E {\n A, B\n }\n\n fun getMap(): Map<E, String> = hashMapOf()' After the quick-fix is applied: 'enum class E {\n A, B\n }\n\n fun getMap(): Map<E, String> = EnumMap(E::class.java)'",
"markdown": "Reports `hashMapOf` function or `HashMap` constructor calls that can be replaced with an `EnumMap` constructor call.\n\nUsing `EnumMap` constructor makes your code simpler.\n\nThe quick-fix replaces the function call with the `EnumMap` constructor call.\n\n**Example:**\n\n\n enum class E {\n A, B\n }\n\n fun getMap(): Map<E, String> = hashMapOf()\n\nAfter the quick-fix is applied:\n\n\n enum class E {\n A, B\n }\n\n fun getMap(): Map<E, String> = EnumMap(E::class.java)\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ReplaceWithEnumMap",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Other problems",
"index": 56,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EnumValuesSoftDeprecate",
"shortDescription": {
"text": "'Enum.values()' is recommended to be replaced by 'Enum.entries' since 1.9"
},
"fullDescription": {
"text": "Reports calls from Kotlin to 'values()' method in enum classes that can be replaced with 'entries' property read. Use of 'Enum.entries' may improve performance of your code. The quick-fix replaces 'values()' with 'entries'. More details: KT-48872 Provide modern and performant replacement for Enum.values() Note: 'entries' property type is different from the return type of 'values()' method ('EnumEntries<T>' which inherits from 'List<T>' instead of 'Array<T>'). Due to this in some cases quick fix inserts extra '.toTypedArray()' conversion to not break the code, but for most common cases replacement will be done without it (e.g. in 'for' loop). Example: 'enum class Version {\n V1, V2\n }\n\n Version.values().forEach { /* .. */ }\n val firstVersion = Version.values()[0]\n functionExpectingArray(Version.values())' After the quick-fix is applied: 'enum class Version {\n V1, V2\n }\n\n Version.entries.forEach { /* .. */ }\n val firstVersion = Version.entries[0]\n functionExpectingArray(Version.entries.toTypedArray())'",
"markdown": "Reports calls from Kotlin to `values()` method in enum classes that can be replaced with `entries` property read.\n\n\nUse of `Enum.entries` may improve performance of your code.\n\n\nThe quick-fix replaces `values()` with `entries`.\n\n\n**More details:** [KT-48872 Provide modern and performant replacement for Enum.values()](https://youtrack.jetbrains.com/issue/KT-48872)\n\n\n**Note:** `entries` property type is different from the return type of `values()` method\n(`EnumEntries<T>` which inherits from `List<T>` instead of `Array<T>`).\nDue to this in some cases quick fix inserts extra `.toTypedArray()` conversion to not break the code, but\nfor most common cases replacement will be done without it (e.g. in `for` loop).\n\n**Example:**\n\n\n enum class Version {\n V1, V2\n }\n\n Version.values().forEach { /* .. */ }\n val firstVersion = Version.values()[0]\n functionExpectingArray(Version.values())\n\nAfter the quick-fix is applied:\n\n\n enum class Version {\n V1, V2\n }\n\n Version.entries.forEach { /* .. */ }\n val firstVersion = Version.entries[0]\n functionExpectingArray(Version.entries.toTypedArray())\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "EnumValuesSoftDeprecate",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Other problems",
"index": 56,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantElvisReturnNull",
"shortDescription": {
"text": "Redundant '?: return null'"
},
"fullDescription": {
"text": "Reports redundant '?: return null' Example: 'fun foo(): Int? {\n ...\n }\n\n fun test() : Int? {\n return foo() ?: return null\n }' After the quick-fix is applied: 'fun foo(): Int? {\n ...\n }\n\n fun test() : Int? {\n return foo()\n }'",
"markdown": "Reports redundant `?: return null`\n\n**Example:**\n\n\n fun foo(): Int? {\n ...\n }\n\n fun test() : Int? {\n return foo() ?: return null\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo(): Int? {\n ...\n }\n\n fun test() : Int? {\n return foo()\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantElvisReturnNull",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KotlinJvmAnnotationInJava",
"shortDescription": {
"text": "Kotlin JVM annotation in Java"
},
"fullDescription": {
"text": "Reports useless Kotlin JVM annotations in Java code. Example: 'import kotlin.jvm.Volatile;\n\n public class Test {\n @Volatile\n public int i;\n }'",
"markdown": "Reports useless Kotlin JVM annotations in Java code.\n\n**Example:**\n\n\n import kotlin.jvm.Volatile;\n\n public class Test {\n @Volatile\n public int i;\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "KotlinJvmAnnotationInJava",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Java interop issues",
"index": 186,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ObsoleteKotlinJsPackages",
"shortDescription": {
"text": "'kotlin.browser' and 'kotlin.dom' packages are deprecated since 1.4"
},
"fullDescription": {
"text": "Reports usages of 'kotlin.dom' and 'kotlin.browser' packages. These packages were moved to 'kotlinx.dom' and 'kotlinx.browser' respectively in Kotlin 1.4+.",
"markdown": "Reports usages of `kotlin.dom` and `kotlin.browser` packages.\n\nThese packages were moved to `kotlinx.dom` and `kotlinx.browser`\nrespectively in Kotlin 1.4+."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "ObsoleteKotlinJsPackages",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Migration",
"index": 86,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CascadeIf",
"shortDescription": {
"text": "Cascade if can be replaced with when"
},
"fullDescription": {
"text": "Reports 'if' statements with three or more branches that can be replaced with the 'when' expression. Example: 'fun checkIdentifier(id: String) {\n fun Char.isIdentifierStart() = this in 'A'..'z'\n fun Char.isIdentifierPart() = isIdentifierStart() || this in '0'..'9'\n\n if (id.isEmpty()) {\n print(\"Identifier is empty\")\n } else if (!id.first().isIdentifierStart()) {\n print(\"Identifier should start with a letter\")\n } else if (!id.subSequence(1, id.length).all(Char::isIdentifierPart)) {\n print(\"Identifier should contain only letters and numbers\")\n }\n }' The quick-fix converts the 'if' expression to 'when': 'fun checkIdentifier(id: String) {\n fun Char.isIdentifierStart() = this in 'A'..'z'\n fun Char.isIdentifierPart() = isIdentifierStart() || this in '0'..'9'\n\n when {\n id.isEmpty() -> {\n print(\"Identifier is empty\")\n }\n !id.first().isIdentifierStart() -> {\n print(\"Identifier should start with a letter\")\n }\n !id.subSequence(1, id.length).all(Char::isIdentifierPart) -> {\n print(\"Identifier should contain only letters and numbers\")\n }\n }\n }'",
"markdown": "Reports `if` statements with three or more branches that can be replaced with the `when` expression.\n\n**Example:**\n\n\n fun checkIdentifier(id: String) {\n fun Char.isIdentifierStart() = this in 'A'..'z'\n fun Char.isIdentifierPart() = isIdentifierStart() || this in '0'..'9'\n\n if (id.isEmpty()) {\n print(\"Identifier is empty\")\n } else if (!id.first().isIdentifierStart()) {\n print(\"Identifier should start with a letter\")\n } else if (!id.subSequence(1, id.length).all(Char::isIdentifierPart)) {\n print(\"Identifier should contain only letters and numbers\")\n }\n }\n\nThe quick-fix converts the `if` expression to `when`:\n\n\n fun checkIdentifier(id: String) {\n fun Char.isIdentifierStart() = this in 'A'..'z'\n fun Char.isIdentifierPart() = isIdentifierStart() || this in '0'..'9'\n\n when {\n id.isEmpty() -> {\n print(\"Identifier is empty\")\n }\n !id.first().isIdentifierStart() -> {\n print(\"Identifier should start with a letter\")\n }\n !id.subSequence(1, id.length).all(Char::isIdentifierPart) -> {\n print(\"Identifier should contain only letters and numbers\")\n }\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CascadeIf",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OptionalExpectation",
"shortDescription": {
"text": "Optionally expected annotation has no actual annotation"
},
"fullDescription": {
"text": "Reports optionally expected annotations without actual annotation in some platform modules. Example: '// common code\n@OptionalExpectation\nexpect annotation class JvmName(val name: String)\n\n@JvmName(name = \"JvmFoo\")\nfun foo() { }\n\n// jvm code\nactual annotation class JvmName(val name: String)' The inspection also reports cases when 'actual annotation class JvmName' is omitted for non-JVM platforms (for example, Native).",
"markdown": "Reports optionally expected annotations without actual annotation in some platform modules.\n\n**Example:**\n\n // common code\n @OptionalExpectation\n expect annotation class JvmName(val name: String)\n\n @JvmName(name = \"JvmFoo\")\n fun foo() { }\n\n // jvm code\n actual annotation class JvmName(val name: String)\n\nThe inspection also reports cases when `actual annotation class JvmName` is omitted for non-JVM platforms (for example, Native)."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "OptionalExpectation",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DestructuringWrongName",
"shortDescription": {
"text": "Variable in destructuring declaration uses name of a wrong data class property"
},
"fullDescription": {
"text": "Reports entries of destructuring declarations that match the name of a different property of the destructured data class. Example: 'data class Foo(val a: String, val b: Int, val c: String)\n\n fun bar(f: Foo) {\n val (a, c) = f\n }' The quick-fix changes variable's name to match the name of the corresponding class field: 'data class Foo(val a: String, val b: Int, val c: String)\n\n fun bar(f: Foo) {\n val (a, b) = f\n }'",
"markdown": "Reports entries of destructuring declarations that match the name of a different property of the destructured data class.\n\n**Example:**\n\n\n data class Foo(val a: String, val b: Int, val c: String)\n\n fun bar(f: Foo) {\n val (a, c) = f\n }\n\nThe quick-fix changes variable's name to match the name of the corresponding class field:\n\n\n data class Foo(val a: String, val b: Int, val c: String)\n\n fun bar(f: Foo) {\n val (a, b) = f\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "DestructuringWrongName",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RestrictReturnStatementTargetMigration",
"shortDescription": {
"text": "Target label does not denote a function since 1.4"
},
"fullDescription": {
"text": "Reports labels that don't points to a functions. It's forbidden to declare a target label that does not denote a function. The quick-fix removes the label. Example: 'fun testValLabelInReturn() {\n L@ val fn = { return@L }\n fn()\n }' After the quick-fix is applied: 'fun testValLabelInReturn() {\n L@ val fn = { return }\n fn()\n }' This inspection only reports if the language level of the project or module is 1.4 or higher.",
"markdown": "Reports labels that don't points to a functions.\n\nIt's forbidden to declare a target label that does not denote a function.\n\nThe quick-fix removes the label.\n\n**Example:**\n\n\n fun testValLabelInReturn() {\n L@ val fn = { return@L }\n fn()\n }\n\nAfter the quick-fix is applied:\n\n\n fun testValLabelInReturn() {\n L@ val fn = { return }\n fn()\n }\n\nThis inspection only reports if the language level of the project or module is 1.4 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "RestrictReturnStatementTargetMigration",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Migration",
"index": 86,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MigrateDiagnosticSuppression",
"shortDescription": {
"text": "Diagnostic name should be replaced"
},
"fullDescription": {
"text": "Reports suppressions with old diagnostic names, for example '@Suppress(\"HEADER_WITHOUT_IMPLEMENTATION\")'. Some of diagnostics from Kotlin 1.2 and earlier are now obsolete, making such suppressions redundant. Example: '@Suppress(\"HEADER_DECLARATION_WITH_BODY\")\nexpect fun connection() {\n // ...\n}' After the quick-fix is applied: '@Suppress(\"EXPECTED_DECLARATION_WITH_BODY\")\nexpect fun connection() {\n // ...\n}'",
"markdown": "Reports suppressions with old diagnostic names, for example `@Suppress(\"HEADER_WITHOUT_IMPLEMENTATION\")`.\n\n\nSome of diagnostics from Kotlin 1.2 and earlier are now obsolete, making such suppressions redundant.\n\n**Example:**\n\n\n @Suppress(\"HEADER_DECLARATION_WITH_BODY\")\n expect fun connection() {\n // ...\n }\n\nAfter the quick-fix is applied:\n\n\n @Suppress(\"EXPECTED_DECLARATION_WITH_BODY\")\n expect fun connection() {\n // ...\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "MigrateDiagnosticSuppression",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Other problems",
"index": 56,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonNullableBooleanPropertyInExternalInterface",
"shortDescription": {
"text": "External interface contains non-nullable boolean property"
},
"fullDescription": {
"text": "Reports non-nullable boolean properties in external interface. Read more in the migration guide.",
"markdown": "Reports non-nullable boolean properties in external interface. Read more in the [migration guide](https://kotlinlang.org/docs/js-ir-migration.html#make-boolean-properties-nullable-in-external-interfaces)."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonNullableBooleanPropertyInExternalInterface",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DeferredResultUnused",
"shortDescription": {
"text": "'@Deferred' result is unused"
},
"fullDescription": {
"text": "Reports function calls with the 'Deferred' result type if the return value is not used. If the 'Deferred' return value is not used, the call site would not wait to complete this function. Example: 'fun calcEverythingAsync() = CompletableDeferred(42)\n\n fun usage() {\n calcEverythingAsync()\n }' The quick-fix provides a variable with the 'Deferred' initializer: 'fun calcEverythingAsync() = CompletableDeferred(42)\n\n fun usage() {\n val answer = calcEverythingAsync()\n }'",
"markdown": "Reports function calls with the `Deferred` result type if the return value is not used.\n\nIf the `Deferred` return value is not used, the call site would not wait to complete this function.\n\n**Example:**\n\n\n fun calcEverythingAsync() = CompletableDeferred(42)\n\n fun usage() {\n calcEverythingAsync()\n }\n\nThe quick-fix provides a variable with the `Deferred` initializer:\n\n\n fun calcEverythingAsync() = CompletableDeferred(42)\n\n fun usage() {\n val answer = calcEverythingAsync()\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "DeferredResultUnused",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SelfReferenceConstructorParameter",
"shortDescription": {
"text": "Constructor can never be complete"
},
"fullDescription": {
"text": "Reports constructors with a non-null self-reference parameter. Such constructors never instantiate a class. The quick-fix converts the parameter type to nullable. Example: 'class SelfRef(val ref: SelfRef)' After the quick-fix is applied: 'class SelfRef(val ref: SelfRef?)'",
"markdown": "Reports constructors with a non-null self-reference parameter.\n\nSuch constructors never instantiate a class.\n\nThe quick-fix converts the parameter type to nullable.\n\n**Example:**\n\n\n class SelfRef(val ref: SelfRef)\n\nAfter the quick-fix is applied:\n\n\n class SelfRef(val ref: SelfRef?)\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SelfReferenceConstructorParameter",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MainFunctionReturnUnit",
"shortDescription": {
"text": "Main function should return 'Unit'"
},
"fullDescription": {
"text": "Reports when a main function does not have a return type of 'Unit'. Example: 'fun main() = \"Hello world!\"'",
"markdown": "Reports when a main function does not have a return type of `Unit`.\n\n**Example:**\n`fun main() = \"Hello world!\"`"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "MainFunctionReturnUnit",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SuspiciousCallableReferenceInLambda",
"shortDescription": {
"text": "Suspicious callable reference used as lambda result"
},
"fullDescription": {
"text": "Reports lambda expressions with one callable reference. It is a common error to replace a lambda with a callable reference without changing curly braces to parentheses. Example: 'listOf(1,2,3).map { it::toString }' After the quick-fix is applied: 'listOf(1,2,3).map(Int::toString)'",
"markdown": "Reports lambda expressions with one callable reference.\n\nIt is a common error to replace a lambda with a callable reference without changing curly braces to parentheses.\n\n**Example:**\n\n listOf(1,2,3).map { it::toString }\n\nAfter the quick-fix is applied:\n\n listOf(1,2,3).map(Int::toString)\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "SuspiciousCallableReferenceInLambda",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConvertSecondaryConstructorToPrimary",
"shortDescription": {
"text": "Convert to primary constructor"
},
"fullDescription": {
"text": "Reports a secondary constructor that can be replaced with a more concise primary constructor. Example: 'class User {\n val name: String\n\n constructor(name: String) {\n this.name = name\n }\n }' The quick-fix converts code automatically: 'class User(val name: String) {\n }'",
"markdown": "Reports a secondary constructor that can be replaced with a more concise primary constructor.\n\n**Example:**\n\n\n class User {\n val name: String\n\n constructor(name: String) {\n this.name = name\n }\n }\n\nThe quick-fix converts code automatically:\n\n\n class User(val name: String) {\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ConvertSecondaryConstructorToPrimary",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ProhibitRepeatedUseSiteTargetAnnotationsMigration",
"shortDescription": {
"text": "Repeated annotation which is not marked as '@Repeatable'"
},
"fullDescription": {
"text": "Reports the repeated use of a non-'@Repeatable' annotation on property accessors. As a result of using non-'@Repeatable' annotation multiple times, both annotation usages will appear in the bytecode leading to an ambiguity in reflection calls. Since Kotlin 1.4 it's mandatory to either mark annotation as '@Repeatable' or not repeat the annotation, otherwise it will lead to compilation error. Example: 'annotation class Foo(val x: Int)\n\n @get:Foo(10)\n val a: String\n @Foo(20) get() = \"foo\" // annotation repeated twice but not marked as @Repeatable' This inspection only reports if the Kotlin language level of the project or module is 1.4 or higher.",
"markdown": "Reports the repeated use of a non-`@Repeatable` annotation on property accessors.\n\n\nAs a result of using non-`@Repeatable` annotation multiple times, both annotation usages\nwill appear in the bytecode leading to an ambiguity in reflection calls.\n\n\nSince Kotlin 1.4 it's mandatory to either mark annotation as `@Repeatable` or not\nrepeat the annotation, otherwise it will lead to compilation error.\n\n**Example:**\n\n\n annotation class Foo(val x: Int)\n\n @get:Foo(10)\n val a: String\n @Foo(20) get() = \"foo\" // annotation repeated twice but not marked as @Repeatable\n\nThis inspection only reports if the Kotlin language level of the project or module is 1.4 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "ProhibitRepeatedUseSiteTargetAnnotationsMigration",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Migration",
"index": 86,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnusedReceiverParameter",
"shortDescription": {
"text": "Unused receiver parameter"
},
"fullDescription": {
"text": "Reports receiver parameter of extension functions and properties that is not used. Remove redundant receiver parameter can be used to amend the code automatically.",
"markdown": "Reports receiver parameter of extension functions and properties that is not used.\n\n**Remove redundant receiver parameter** can be used to amend the code automatically."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnusedReceiverParameter",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceArrayOfWithLiteral",
"shortDescription": {
"text": "'arrayOf' call can be replaced with array literal [...]"
},
"fullDescription": {
"text": "Reports 'arrayOf' calls that can be replaced with array literals '[...]'. Examples: 'annotation class MyAnnotation(val strings: Array<String>)\n\n @MyAnnotation(arrayOf(\"alpha\", \"beta\", \"omega\")) // replaceable 'arrayOf()'\n class MyClass' After the quick-fix is applied: 'annotation class MyAnnotation(val strings: Array<String>)\n\n @MyAnnotation([\"alpha\", \"beta\", \"omega\"])\n class MyClass'",
"markdown": "Reports `arrayOf` calls that can be replaced with array literals `[...]`.\n\n**Examples:**\n\n annotation class MyAnnotation(val strings: Array<String>)\n\n @MyAnnotation(arrayOf(\"alpha\", \"beta\", \"omega\")) // replaceable 'arrayOf()'\n class MyClass\n\nAfter the quick-fix is applied:\n\n annotation class MyAnnotation(val strings: Array<String>)\n\n @MyAnnotation([\"alpha\", \"beta\", \"omega\"])\n class MyClass\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceArrayOfWithLiteral",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceToWithInfixForm",
"shortDescription": {
"text": "'to' call should be replaced with infix form"
},
"fullDescription": {
"text": "Reports 'to' function calls that can be replaced with the infix form. Using the infix form makes your code simpler. The quick-fix replaces 'to' with the infix form. Example: 'fun foo(a: Int, b: Int) {\n val pair = a.to(b)\n }' After the quick-fix is applied: 'fun foo(a: Int, b: Int) {\n val pair = a to b\n }'",
"markdown": "Reports `to` function calls that can be replaced with the infix form.\n\nUsing the infix form makes your code simpler.\n\nThe quick-fix replaces `to` with the infix form.\n\n**Example:**\n\n\n fun foo(a: Int, b: Int) {\n val pair = a.to(b)\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo(a: Int, b: Int) {\n val pair = a to b\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceToWithInfixForm",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConstPropertyName",
"shortDescription": {
"text": "Const property naming convention"
},
"fullDescription": {
"text": "Reports 'const' property names that do not follow the recommended naming conventions. Consistent naming allows for easier code reading and understanding. According to the Kotlin official style guide, 'const' properties should use uppercase underscore-separated names. Example: 'const val Planck: Double = 6.62607015E-34' The quick-fix renames the property: 'const val PLANCK: Double = 6.62607015E-34'",
"markdown": "Reports `const` property names that do not follow the recommended naming conventions.\n\n\nConsistent naming allows for easier code reading and understanding.\nAccording to the [Kotlin official style guide](https://kotlinlang.org/docs/coding-conventions.html#property-names),\n`const` properties should use uppercase underscore-separated names.\n\n**Example:**\n\n\n const val Planck: Double = 6.62607015E-34\n\nThe quick-fix renames the property:\n\n\n const val PLANCK: Double = 6.62607015E-34\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ConstPropertyName",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Naming conventions",
"index": 71,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EqualsOrHashCode",
"shortDescription": {
"text": "'equals()' and 'hashCode()' not paired"
},
"fullDescription": {
"text": "Reports classes that override 'equals()' but do not override 'hashCode()', or vice versa. It also reports object declarations that override either 'equals()' or 'hashCode()'. This can lead to undesired behavior when a class is added to a 'Collection' Example: 'class C1 {\n override fun equals(other: Any?) = true\n }\n\n class C2 {\n override fun hashCode() = 0\n }\n\n object O1 {\n override fun equals(other: Any?) = true\n }\n\n object O2 {\n override fun hashCode() = 0\n }' The quick-fix overrides 'equals()' or 'hashCode()' for classes and deletes these methods for objects: 'class C1 {\n override fun equals(other: Any?) = true\n override fun hashCode(): Int {\n return javaClass.hashCode()\n }\n }\n\n class C2 {\n override fun hashCode() = 0\n override fun equals(other: Any?): Boolean {\n if (this === other) return true\n if (javaClass != other?.javaClass) return false\n return true\n }\n }\n\n object O1 {\n }\n\n object O2 {\n }'",
"markdown": "Reports classes that override `equals()` but do not override `hashCode()`, or vice versa. It also reports object declarations that override either `equals()` or `hashCode()`.\n\nThis can lead to undesired behavior when a class is added to a `Collection`\n\n**Example:**\n\n\n class C1 {\n override fun equals(other: Any?) = true\n }\n\n class C2 {\n override fun hashCode() = 0\n }\n\n object O1 {\n override fun equals(other: Any?) = true\n }\n\n object O2 {\n override fun hashCode() = 0\n }\n\nThe quick-fix overrides `equals()` or `hashCode()` for classes and deletes these methods for objects:\n\n\n class C1 {\n override fun equals(other: Any?) = true\n override fun hashCode(): Int {\n return javaClass.hashCode()\n }\n }\n\n class C2 {\n override fun hashCode() = 0\n override fun equals(other: Any?): Boolean {\n if (this === other) return true\n if (javaClass != other?.javaClass) return false\n return true\n }\n }\n\n object O1 {\n }\n\n object O2 {\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "EqualsOrHashCode",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantRunCatching",
"shortDescription": {
"text": "Redundant 'runCatching' call"
},
"fullDescription": {
"text": "Reports 'runCatching' calls that are immediately followed by 'getOrThrow'. Such calls can be replaced with just 'run'. Example: 'fun foo() = runCatching { doSomething() }.getOrThrow()' After the quick-fix is applied: 'fun foo() = run { doSomething() }'",
"markdown": "Reports `runCatching` calls that are immediately followed by `getOrThrow`. Such calls can be replaced with just `run`.\n\n**Example:**\n\n\n fun foo() = runCatching { doSomething() }.getOrThrow()\n\nAfter the quick-fix is applied:\n\n\n fun foo() = run { doSomething() }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RedundantRunCatching",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SimpleRedundantLet",
"shortDescription": {
"text": "Redundant receiver-based 'let' call"
},
"fullDescription": {
"text": "Reports redundant receiver-based 'let' calls. The quick-fix removes the redundant 'let' call. Example: 'fun test(s: String?): Int? = s?.let { it.length }' After the quick-fix is applied: 'fun test(s: String?): Int? = s?.length'",
"markdown": "Reports redundant receiver-based `let` calls.\n\nThe quick-fix removes the redundant `let` call.\n\n**Example:**\n\n\n fun test(s: String?): Int? = s?.let { it.length }\n\nAfter the quick-fix is applied:\n\n\n fun test(s: String?): Int? = s?.length\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SimpleRedundantLet",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonExhaustiveWhenStatementMigration",
"shortDescription": {
"text": "Non-exhaustive 'when' statements will be prohibited since 1.7"
},
"fullDescription": {
"text": "Reports a non-exhaustive 'when' statements that will lead to compilation error since 1.7. Motivation types: Problematic/meaningless usage patterns need to be discouraged/blocked (e.g. counterintuitive behaviors) Code is error-prone Inconsistency in the design (things are done differently in different contexts) Impact types: Compilation. Some code that used to compile won't compile any more There were cases when such code worked with no exceptions Some such code could compile without any warnings More details: KT-47709: Make when statements with enum, sealed, and Boolean subjects exhaustive by default The quick-fix adds the missing 'else -> {}' branch. Example: 'sealed class Base {\n class A : Base()\n class B : Base()\n }\n\n fun test(base: Base) {\n when (base) {\n is Base.A -> \"\"\n }\n }' After the quick-fix is applied: 'sealed class Base {\n class A : Base()\n class B : Base()\n }\n\n fun test(base: Base) {\n when (base) {\n is Base.A -> \"\"\n else -> {}\n }\n }' This inspection only reports if the Kotlin language level of the project or module is 1.6 or higher.",
"markdown": "Reports a non-exhaustive `when` statements that will lead to compilation error since 1.7.\n\nMotivation types:\n\n* Problematic/meaningless usage patterns need to be discouraged/blocked (e.g. counterintuitive behaviors)\n * Code is error-prone\n* Inconsistency in the design (things are done differently in different contexts)\n\nImpact types:\n\n* Compilation. Some code that used to compile won't compile any more\n * There were cases when such code worked with no exceptions\n * Some such code could compile without any warnings\n\n**More details:** [KT-47709: Make when statements with enum, sealed, and Boolean subjects exhaustive by default](https://youtrack.jetbrains.com/issue/KT-47709)\n\nThe quick-fix adds the missing `else -> {}` branch.\n\n**Example:**\n\n\n sealed class Base {\n class A : Base()\n class B : Base()\n }\n\n fun test(base: Base) {\n when (base) {\n is Base.A -> \"\"\n }\n }\n\nAfter the quick-fix is applied:\n\n\n sealed class Base {\n class A : Base()\n class B : Base()\n }\n\n fun test(base: Base) {\n when (base) {\n is Base.A -> \"\"\n else -> {}\n }\n }\n\nThis inspection only reports if the Kotlin language level of the project or module is 1.6 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonExhaustiveWhenStatementMigration",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Migration",
"index": 86,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ScopeFunctionConversion",
"shortDescription": {
"text": "Scope function can be converted to another one"
},
"fullDescription": {
"text": "Reports scope functions ('let', 'run', 'apply', 'also') that can be converted between each other. Using corresponding functions makes your code simpler. The quick-fix replaces the scope function to another one. Example: 'val x = \"\".let {\n it.length\n }' After the quick-fix is applied: 'val x = \"\".run {\n length\n }'",
"markdown": "Reports scope functions (`let`, `run`, `apply`, `also`) that can be converted between each other.\n\nUsing corresponding functions makes your code simpler.\n\nThe quick-fix replaces the scope function to another one.\n\n**Example:**\n\n\n val x = \"\".let {\n it.length\n }\n\nAfter the quick-fix is applied:\n\n\n val x = \"\".run {\n length\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ScopeFunctionConversion",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FoldInitializerAndIfToElvis",
"shortDescription": {
"text": "If-Null return/break/... foldable to '?:'"
},
"fullDescription": {
"text": "Reports an 'if' expression that checks variable being null or not right after initializing it that can be converted into an elvis operator in the initializer. Example: 'fun test(foo: Int?, bar: Int): Int {\n var i = foo\n if (i == null) {\n return bar\n }\n return i\n }' The quick-fix converts the 'if' expression with an initializer into an elvis expression: 'fun test(foo: Int?, bar: Int): Int {\n var i = foo ?: return bar\n return i\n }'",
"markdown": "Reports an `if` expression that checks variable being null or not right after initializing it that can be converted into an elvis operator in the initializer.\n\n**Example:**\n\n\n fun test(foo: Int?, bar: Int): Int {\n var i = foo\n if (i == null) {\n return bar\n }\n return i\n }\n\nThe quick-fix converts the `if` expression with an initializer into an elvis expression:\n\n\n fun test(foo: Int?, bar: Int): Int {\n var i = foo ?: return bar\n return i\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "FoldInitializerAndIfToElvis",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UselessCallOnCollection",
"shortDescription": {
"text": "Useless call on collection type"
},
"fullDescription": {
"text": "Reports 'filter…' calls from the standard library on already filtered collections. Several functions from the standard library such as 'filterNotNull()' or 'filterIsInstance' have sense only when they are called on receivers that have types distinct from the resulting one. Otherwise, such calls can be omitted as the result will be the same. Remove redundant call quick-fix can be used to amend the code automatically. Example: 'fun test(list: List<String>) {\n val x = list.filterNotNull() // quick-fix simplifies to 'list'\n val y = list.filterIsInstance<String>() // quick-fix simplifies to 'list'\n }'",
"markdown": "Reports `filter...` calls from the standard library on already filtered collections.\n\nSeveral functions from the standard library such as `filterNotNull()` or `filterIsInstance`\nhave sense only when they are called on receivers that have types distinct from the resulting one. Otherwise,\nsuch calls can be omitted as the result will be the same.\n\n**Remove redundant call** quick-fix can be used to amend the code automatically.\n\nExample:\n\n\n fun test(list: List<String>) {\n val x = list.filterNotNull() // quick-fix simplifies to 'list'\n val y = list.filterIsInstance<String>() // quick-fix simplifies to 'list'\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "UselessCallOnCollection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantRequireNotNullCall",
"shortDescription": {
"text": "Redundant 'requireNotNull' or 'checkNotNull' call"
},
"fullDescription": {
"text": "Reports redundant 'requireNotNull' or 'checkNotNull' call on non-nullable expressions. Example: 'fun foo(i: Int) {\n requireNotNull(i) // This 'i' is always not null, so this 'requireNotNull' call is redundant.\n ...\n }' After the quick-fix is applied: 'fun foo(i: Int) {\n ...\n }'",
"markdown": "Reports redundant `requireNotNull` or `checkNotNull` call on non-nullable expressions.\n\n**Example:**\n\n\n fun foo(i: Int) {\n requireNotNull(i) // This 'i' is always not null, so this 'requireNotNull' call is redundant.\n ...\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo(i: Int) {\n ...\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RedundantRequireNotNullCall",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PackageDirectoryMismatch",
"shortDescription": {
"text": "Package name does not match containing directory"
},
"fullDescription": {
"text": "Reports 'package' directives that do not match the location of the file. When applying fixes, \"Move refactoring\" defaults are used to update usages of changed declarations, namely: \"Search in comments and strings\" \"Search for text occurrences\"",
"markdown": "Reports `package` directives that do not match the location of the file.\n\n\nWhen applying fixes, \"Move refactoring\" defaults are used to update usages of changed declarations, namely:\n\n* \"Search in comments and strings\"\n* \"Search for text occurrences\""
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PackageDirectoryMismatch",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Java interop issues",
"index": 186,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantEnumConstructorInvocation",
"shortDescription": {
"text": "Redundant enum constructor invocation"
},
"fullDescription": {
"text": "Reports redundant constructor invocation on an enum entry. Example: 'enum class Baz(i: Int = 0) {\n A(1),\n B(),\n C(),\n }' After the quick-fix is applied: 'enum class Baz(i: Int = 0) {\n A(1),\n B,\n C,\n }'",
"markdown": "Reports redundant constructor invocation on an enum entry.\n\n**Example:**\n\n\n enum class Baz(i: Int = 0) {\n A(1),\n B(),\n C(),\n }\n\nAfter the quick-fix is applied:\n\n\n enum class Baz(i: Int = 0) {\n A(1),\n B,\n C,\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RedundantEnumConstructorInvocation",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FakeJvmFieldConstant",
"shortDescription": {
"text": "Kotlin non-const property used as Java constant"
},
"fullDescription": {
"text": "Reports Kotlin properties that are not 'const' and used as Java annotation arguments. For example, a property with the '@JvmField' annotation has an initializer that can be evaluated at compile-time, and it has a primitive or 'String' type. Such properties have a 'ConstantValue' attribute in bytecode in Kotlin 1.1-1.2. This attribute allows javac to fold usages of the corresponding field and use that field in annotations. This can lead to incorrect behavior in the case of separate or incremental compilation in mixed Java/Kotlin code. This behavior is subject to change in Kotlin 1.3 (no 'ConstantValue' attribute any more). Example: Kotlin code in foo.kt file: 'annotation class Ann(val s: String)\n @JvmField val importantString = \"important\"' Java code: 'public class JavaUser {\n // This is dangerous\n @Ann(s = FooKt.importantString)\n public void foo() {}\n }' To fix the problem replace the '@JvmField' annotation with the 'const' modifier on a relevant Kotlin property or inline it.",
"markdown": "Reports Kotlin properties that are not `const` and used as Java annotation arguments.\n\n\nFor example, a property with the `@JvmField` annotation has an initializer that can be evaluated at compile-time,\nand it has a primitive or `String` type.\n\n\nSuch properties have a `ConstantValue` attribute in bytecode in Kotlin 1.1-1.2.\nThis attribute allows javac to fold usages of the corresponding field and use that field in annotations.\nThis can lead to incorrect behavior in the case of separate or incremental compilation in mixed Java/Kotlin code.\nThis behavior is subject to change in Kotlin 1.3 (no `ConstantValue` attribute any more).\n\n**Example:**\n\nKotlin code in foo.kt file:\n\n\n annotation class Ann(val s: String)\n @JvmField val importantString = \"important\"\n\nJava code:\n\n\n public class JavaUser {\n // This is dangerous\n @Ann(s = FooKt.importantString)\n public void foo() {}\n }\n\nTo fix the problem replace the `@JvmField` annotation with the `const` modifier on a relevant Kotlin property or inline it."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "FakeJvmFieldConstant",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Java interop issues",
"index": 186,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "WhenWithOnlyElse",
"shortDescription": {
"text": "'when' has only 'else' branch and can be simplified"
},
"fullDescription": {
"text": "Reports 'when' expressions with only an 'else' branch that can be simplified. Simplify expression quick-fix can be used to amend the code automatically. Example: 'fun redundant() {\n val x = when { // <== redundant, the quick-fix simplifies the when expression to \"val x = 1\"\n else -> 1\n }\n }'",
"markdown": "Reports `when` expressions with only an `else` branch that can be simplified.\n\n**Simplify expression** quick-fix can be used to amend the code automatically.\n\nExample:\n\n\n fun redundant() {\n val x = when { // <== redundant, the quick-fix simplifies the when expression to \"val x = 1\"\n else -> 1\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "WhenWithOnlyElse",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SafeCastWithReturn",
"shortDescription": {
"text": "Safe cast with 'return' should be replaced with 'if' type check"
},
"fullDescription": {
"text": "Reports safe cast with 'return' that can be replaced with 'if' type check. Using corresponding functions makes your code simpler. The quick-fix replaces the safe cast with 'if' type check. Example: 'fun test(x: Any) {\n x as? String ?: return\n }' After the quick-fix is applied: 'fun test(x: Any) {\n if (x !is String) return\n }'",
"markdown": "Reports safe cast with `return` that can be replaced with `if` type check.\n\nUsing corresponding functions makes your code simpler.\n\nThe quick-fix replaces the safe cast with `if` type check.\n\n**Example:**\n\n\n fun test(x: Any) {\n x as? String ?: return\n }\n\nAfter the quick-fix is applied:\n\n\n fun test(x: Any) {\n if (x !is String) return\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "SafeCastWithReturn",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceAssertBooleanWithAssertEquality",
"shortDescription": {
"text": "Assert boolean could be replaced with assert equality"
},
"fullDescription": {
"text": "Reports calls to 'assertTrue()' and 'assertFalse()' that can be replaced with assert equality functions. 'assertEquals()', 'assertSame()', and their negating counterparts (-Not-) provide more informative messages on failure. Example: 'assertTrue(a == b)' After the quick-fix is applied: 'assertEquals(a, b)'",
"markdown": "Reports calls to `assertTrue()` and `assertFalse()` that can be replaced with assert equality functions.\n\n\n`assertEquals()`, `assertSame()`, and their negating counterparts (-Not-) provide more informative messages on\nfailure.\n\n**Example:**\n\n assertTrue(a == b)\n\nAfter the quick-fix is applied:\n\n assertEquals(a, b)\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceAssertBooleanWithAssertEquality",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryOptInAnnotation",
"shortDescription": {
"text": "Unnecessary '@OptIn' annotation"
},
"fullDescription": {
"text": "Reports unnecessary opt-in annotations that can be safely removed. '@OptIn' annotation is required for the code using experimental APIs that can change any time in the future. This annotation becomes useless and possibly misleading if no such API is used (e.g., when the experimental API becomes stable and does not require opting in its usage anymore). Remove annotation quick-fix can be used to remove the unnecessary '@OptIn' annotation. Example: '@OptIn(ExperimentalApi::class)\n fun foo(x: Bar) {\n x.baz()\n }' After the quick-fix is applied: 'fun foo(x: Bar) {\n x.baz()\n }'",
"markdown": "Reports unnecessary opt-in annotations that can be safely removed.\n\n`@OptIn` annotation is required for the code using experimental APIs that can change\nany time in the future. This annotation becomes useless and possibly misleading if no such API is used\n(e.g., when the experimental API becomes stable and does not require opting in its usage anymore).\n\n\n**Remove annotation** quick-fix can be used to remove the unnecessary `@OptIn` annotation.\n\nExample:\n\n\n @OptIn(ExperimentalApi::class)\n fun foo(x: Bar) {\n x.baz()\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo(x: Bar) {\n x.baz()\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "UnnecessaryOptInAnnotation",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonVarPropertyInExternalInterface",
"shortDescription": {
"text": "External interface contains val property"
},
"fullDescription": {
"text": "Reports not var properties in external interface. Read more in the migration guide.",
"markdown": "Reports not var properties in external interface. Read more in the [migration guide](https://kotlinlang.org/docs/js-ir-migration.html#convert-properties-of-external-interfaces-to-var)."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "NonVarPropertyInExternalInterface",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceSubstringWithSubstringBefore",
"shortDescription": {
"text": "'substring' call should be replaced with 'substringBefore'"
},
"fullDescription": {
"text": "Reports calls like 's.substring(0, s.indexOf(x))' that can be replaced with 's.substringBefore(x)'. Using 'substringBefore()' makes your code simpler. The quick-fix replaces the 'substring' call with 'substringBefore'. Example: 'fun foo(s: String) {\n s.substring(0, s.indexOf('x'))\n }' After the quick-fix is applied: 'fun foo(s: String) {\n s.substringBefore('x')\n }'",
"markdown": "Reports calls like `s.substring(0, s.indexOf(x))` that can be replaced with `s.substringBefore(x)`.\n\nUsing `substringBefore()` makes your code simpler.\n\nThe quick-fix replaces the `substring` call with `substringBefore`.\n\n**Example:**\n\n\n fun foo(s: String) {\n s.substring(0, s.indexOf('x'))\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo(s: String) {\n s.substringBefore('x')\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceSubstringWithSubstringBefore",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceCollectionCountWithSize",
"shortDescription": {
"text": "Collection count can be converted to size"
},
"fullDescription": {
"text": "Reports calls to 'Collection<T>.count()'. This function call can be replaced with '.size'. '.size' form ensures that the operation is O(1) and won't allocate extra objects, whereas 'count()' could be confused with 'Iterable<T>.count()', which is O(n) and allocating. Example: 'fun foo() {\n var list = listOf(1,2,3)\n list.count() // replaceable 'count()'\n }' After the quick-fix is applied: 'fun foo() {\n var list = listOf(1,2,3)\n list.size\n }'",
"markdown": "Reports calls to `Collection<T>.count()`.\n\n\nThis function call can be replaced with `.size`.\n\n\n`.size` form ensures that the operation is O(1) and won't allocate extra objects, whereas\n`count()` could be confused with `Iterable<T>.count()`, which is O(n) and allocating.\n\n\n**Example:**\n\n fun foo() {\n var list = listOf(1,2,3)\n list.count() // replaceable 'count()'\n }\n\nAfter the quick-fix is applied:\n\n fun foo() {\n var list = listOf(1,2,3)\n list.size\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceCollectionCountWithSize",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DeprecatedGradleDependency",
"shortDescription": {
"text": "Deprecated library is used in Gradle"
},
"fullDescription": {
"text": "Reports deprecated dependencies in Gradle build scripts. Example: 'dependencies {\n compile \"org.jetbrains.kotlin:kotlin-stdlib-jre7:1.2.0\"\n }' After the quick-fix applied: 'dependencies {\n compile \"org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.0\"\n }'",
"markdown": "Reports deprecated dependencies in Gradle build scripts.\n\n**Example:**\n\n\n dependencies {\n compile \"org.jetbrains.kotlin:kotlin-stdlib-jre7:1.2.0\"\n }\n\nAfter the quick-fix applied:\n\n\n dependencies {\n compile \"org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.0\"\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "DeprecatedGradleDependency",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin",
"index": 11,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CastDueToProgressionResolutionChangeMigration",
"shortDescription": {
"text": "Progression resolution change since 1.9"
},
"fullDescription": {
"text": "Reports overloaded function calls where an argument requires an explicit cast to resolve to a proper declaration. The current compiler warning (available since Kotlin 1.6.20) will become an error in Kotlin 1.8. Progressions and ranges types ('kotlin.ranges') will start implementing the 'Collection' interface in Kotlin 1.9 and later. This update will cause a change in resolution for overloaded functions. For instance, in the example below, the 'test(1..5)' call will be resolved to 'test(t: Any)' in Kotlin 1.8 and earlier and to 'test(t: Collection<*>)' in Kotlin 1.9 and later. 'fun test(t: Any) { }\n fun test(t: Collection<*>) { }\n fun invoke() {\n test(1..5) // IntRange becomes Collection in 1.9\n }' The provided quick-fix captures the behaviour specific to the compiler of version 1.8 and earlier: 'fun test(t: Any) { }\n fun test(t: Collection<*>) { }\n\n fun invoke() {\n test(1..5) // resolved to 'test(t: T)' before Kotlin 1.9\n }' After the quick-fix is applied: 'fun test(t: Any) { }\n fun test(t: Collection<*>) { }\n\n fun invoke() {\n test((1..5) as Iterable<Int>) // resolved to 'test(t: T)' in Kotlin 1.9\n }' Inspection is available for the Kotlin language level starting from 1.6.",
"markdown": "Reports overloaded function calls where an argument requires an explicit cast to resolve to a proper declaration.\nThe current compiler warning (available since Kotlin 1.6.20) will become an error in Kotlin 1.8.\n\n\nProgressions and ranges types (`kotlin.ranges`) will start implementing the `Collection` interface in Kotlin\n1.9 and later. This update will cause a change in resolution for overloaded functions. For instance, in the example below, the\n`test(1..5)` call will be resolved to `test(t: Any)` in Kotlin 1.8 and earlier and to\n`test(t: Collection<*>)` in Kotlin 1.9 and later.\n\n\n fun test(t: Any) { }\n fun test(t: Collection<*>) { }\n fun invoke() {\n test(1..5) // IntRange becomes Collection in 1.9\n }\n\nThe provided quick-fix captures the behaviour specific to the compiler of version 1.8 and earlier:\n\n\n fun test(t: Any) { }\n fun test(t: Collection<*>) { }\n\n fun invoke() {\n test(1..5) // resolved to 'test(t: T)' before Kotlin 1.9\n }\n\nAfter the quick-fix is applied:\n\n\n fun test(t: Any) { }\n fun test(t: Collection<*>) { }\n\n fun invoke() {\n test((1..5) as Iterable<Int>) // resolved to 'test(t: T)' in Kotlin 1.9\n }\n\nInspection is available for the Kotlin language level starting from 1.6."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CastDueToProgressionResolutionChangeMigration",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Migration",
"index": 86,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConvertReferenceToLambda",
"shortDescription": {
"text": "Can be replaced with lambda"
},
"fullDescription": {
"text": "Reports a function reference expression that can be replaced with a function literal (lambda). Sometimes, passing a lambda looks more straightforward and more consistent with the rest of the code. Also, the fix might be handy if you need to replace a simple call with something more complex. Example: 'fun Int.isEven() = this % 2 == 0\n\n fun example() {\n val numbers = listOf(1, 2, 4, 7, 9, 10)\n val evenNumbers = numbers.filter(Int::isEven)\n }' After the quick-fix is applied: 'fun Int.isEven() = this % 2 == 0\n\n fun example() {\n val numbers = listOf(1, 2, 4, 7, 9, 10)\n val evenNumbers = numbers.filter { it.isEven() }\n }'",
"markdown": "Reports a function reference expression that can be replaced with a function literal (lambda).\n\n\nSometimes, passing a lambda looks more straightforward and more consistent with the rest of the code.\nAlso, the fix might be handy if you need to replace a simple call with something more complex.\n\n**Example:**\n\n\n fun Int.isEven() = this % 2 == 0\n\n fun example() {\n val numbers = listOf(1, 2, 4, 7, 9, 10)\n val evenNumbers = numbers.filter(Int::isEven)\n }\n\nAfter the quick-fix is applied:\n\n\n fun Int.isEven() = this % 2 == 0\n\n fun example() {\n val numbers = listOf(1, 2, 4, 7, 9, 10)\n val evenNumbers = numbers.filter { it.isEven() }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ConvertReferenceToLambda",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AddConversionCallMigration",
"shortDescription": {
"text": "Explicit conversion from `Int` needed since 1.9"
},
"fullDescription": {
"text": "Reports expressions that will be of type 'Int', thus causing compilation errors in Kotlin 1.9 and later. Example: 'fun takeByte(x: Byte) {}\n\n fun foo() {\n takeByte(1 + 1) // will be resolved to Int in 1.9\n }' After the quick-fix is applied: 'fun takeByte(x: Byte) {}\n\n fun foo() {\n takeByte((1 + 1).toByte()) // will be resolved to Int in 1.9\n }' Inspection is available for Kotlin language level starting from 1.7.",
"markdown": "Reports expressions that will be of type `Int`, thus causing compilation errors in Kotlin 1.9 and later.\n\nExample:\n\n\n fun takeByte(x: Byte) {}\n\n fun foo() {\n takeByte(1 + 1) // will be resolved to Int in 1.9\n }\n\nAfter the quick-fix is applied:\n\n\n fun takeByte(x: Byte) {}\n\n fun foo() {\n takeByte((1 + 1).toByte()) // will be resolved to Int in 1.9\n }\n\nInspection is available for Kotlin language level starting from 1.7."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AddConversionCallMigration",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Migration",
"index": 86,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KotlinEqualsBetweenInconvertibleTypes",
"shortDescription": {
"text": "'equals()' between objects of inconvertible types"
},
"fullDescription": {
"text": "Reports calls to 'equals()' where the receiver and the argument are of incompatible primitive, enum, or string types. While such a call might theoretically be useful, most likely it represents a bug. Example: '5.equals(\"\");'",
"markdown": "Reports calls to `equals()` where the receiver and the argument are of incompatible primitive, enum, or string types.\n\nWhile such a call might theoretically be useful, most likely it represents a bug.\n\n**Example:**\n\n 5.equals(\"\");\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "EqualsBetweenInconvertibleTypes",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JoinDeclarationAndAssignment",
"shortDescription": {
"text": "Join declaration and assignment"
},
"fullDescription": {
"text": "Reports property declarations that can be joined with the following assignment. Example: 'val x: String\n x = System.getProperty(\"\")' The quick fix joins the declaration with the assignment: 'val x = System.getProperty(\"\")'",
"markdown": "Reports property declarations that can be joined with the following assignment.\n\n**Example:**\n\n\n val x: String\n x = System.getProperty(\"\")\n\nThe quick fix joins the declaration with the assignment:\n\n\n val x = System.getProperty(\"\")\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "JoinDeclarationAndAssignment",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HasPlatformType",
"shortDescription": {
"text": "Function or property has platform type"
},
"fullDescription": {
"text": "Reports functions and properties that have a platform type. To prevent unexpected errors, the type should be declared explicitly. Example: 'fun foo() = java.lang.String.valueOf(1)' The quick fix allows you to specify the return type: 'fun foo(): String = java.lang.String.valueOf(1)'",
"markdown": "Reports functions and properties that have a platform type.\n\nTo prevent unexpected errors, the type should be declared explicitly.\n\n**Example:**\n\n\n fun foo() = java.lang.String.valueOf(1)\n\nThe quick fix allows you to specify the return type:\n\n\n fun foo(): String = java.lang.String.valueOf(1)\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "HasPlatformType",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Java interop issues",
"index": 186,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DataClassPrivateConstructor",
"shortDescription": {
"text": "Private data class constructor is exposed via the 'copy' method"
},
"fullDescription": {
"text": "Reports the 'private' primary constructor in data classes. 'data' classes have a 'copy()' factory method that can be used similarly to a constructor. A constructor should not be marked as 'private' to provide enough safety. Example: 'data class User private constructor(val name: String)' The quick-fix changes the constructor visibility modifier to 'public': 'data class User(val name: String)'",
"markdown": "Reports the `private` primary constructor in data classes.\n\n\n`data` classes have a `copy()` factory method that can be used similarly to a constructor.\nA constructor should not be marked as `private` to provide enough safety.\n\n**Example:**\n\n\n data class User private constructor(val name: String)\n\nThe quick-fix changes the constructor visibility modifier to `public`:\n\n\n data class User(val name: String)\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "DataClassPrivateConstructor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaCollectionsStaticMethodOnImmutableList",
"shortDescription": {
"text": "Call of Java mutator method on immutable Kotlin collection"
},
"fullDescription": {
"text": "Reports Java mutator methods calls (like 'fill', 'reverse', 'shuffle', 'sort') on an immutable Kotlin collection. This can lead to 'UnsupportedOperationException' at runtime. Example: 'import java.util.Collections\n\n fun test() {\n val immutableList = listOf(1, 2)\n Collections.reverse(immutableList)\n }' To fix the problem make the list mutable.",
"markdown": "Reports Java mutator methods calls (like `fill`, `reverse`, `shuffle`, `sort`) on an immutable Kotlin collection.\n\nThis can lead to `UnsupportedOperationException` at runtime.\n\n**Example:**\n\n\n import java.util.Collections\n\n fun test() {\n val immutableList = listOf(1, 2)\n Collections.reverse(immutableList)\n }\n\nTo fix the problem make the list mutable."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "JavaCollectionsStaticMethodOnImmutableList",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Java interop issues",
"index": 186,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NullableBooleanElvis",
"shortDescription": {
"text": "Equality check can be used instead of elvis for nullable boolean check"
},
"fullDescription": {
"text": "Reports cases when an equality check should be used instead of the elvis operator. Example: 'fun check(a: Boolean? == null) {\n if (a ?: false) throw IllegalStateException()\n}' After the quick-fix is applied: 'fun check(a: Boolean? == null) {\n if (a == true) throw IllegalStateException()\n}'",
"markdown": "Reports cases when an equality check should be used instead of the elvis operator.\n\n**Example:**\n\n\n fun check(a: Boolean? == null) {\n if (a ?: false) throw IllegalStateException()\n }\n\nAfter the quick-fix is applied:\n\n\n fun check(a: Boolean? == null) {\n if (a == true) throw IllegalStateException()\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "NullableBooleanElvis",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DeprecatedMavenDependency",
"shortDescription": {
"text": "Deprecated library is used in Maven"
},
"fullDescription": {
"text": "Reports deprecated maven dependency. Example: '<dependencies>\n <dependency>\n <groupId>org.jetbrains.kotlin</groupId>\n <artifactId>kotlin-stdlib-jre7</artifactId>\n <version>${kotlin.version}</version>\n </dependency>\n </dependencies>' The quick fix changes the deprecated dependency to a maintained one: '<dependencies>\n <dependency>\n <groupId>org.jetbrains.kotlin</groupId>\n <artifactId>kotlin-stdlib-jdk7</artifactId>\n <version>${kotlin.version}</version>\n </dependency>\n </dependencies>'",
"markdown": "Reports deprecated maven dependency.\n\n**Example:**\n\n\n <dependencies>\n <dependency>\n <groupId>org.jetbrains.kotlin</groupId>\n <artifactId>kotlin-stdlib-jre7</artifactId>\n <version>${kotlin.version}</version>\n </dependency>\n </dependencies>\n\nThe quick fix changes the deprecated dependency to a maintained one:\n\n\n <dependencies>\n <dependency>\n <groupId>org.jetbrains.kotlin</groupId>\n <artifactId>kotlin-stdlib-jdk7</artifactId>\n <version>${kotlin.version}</version>\n </dependency>\n </dependencies>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "DeprecatedMavenDependency",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin",
"index": 11,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryVariable",
"shortDescription": {
"text": "Unnecessary local variable"
},
"fullDescription": {
"text": "Reports local variables that are used only in the very next 'return' statement or are exact copies of other variables. Such variables can be safely inlined to make the code more clear.",
"markdown": "Reports local variables that are used only in the very next `return` statement or are exact copies of other variables.\n\nSuch variables can be safely inlined to make the code more clear."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "UnnecessaryVariable",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantEmptyInitializerBlock",
"shortDescription": {
"text": "Redundant empty initializer block"
},
"fullDescription": {
"text": "Reports redundant empty initializer blocks. Example: 'class Foo {\n init {\n // Empty init block\n }\n }' After the quick-fix is applied: 'class Foo {\n }'",
"markdown": "Reports redundant empty initializer blocks.\n\n**Example:**\n\n\n class Foo {\n init {\n // Empty init block\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class Foo {\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "RedundantEmptyInitializerBlock",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Other problems",
"index": 56,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantWith",
"shortDescription": {
"text": "Redundant 'with' call"
},
"fullDescription": {
"text": "Reports redundant 'with' function calls that don't access anything from the receiver. Examples: 'class MyClass {\n fun f(): String = \"\"\n }\n\n fun testRedundant() {\n with(c) { // <== 'with' is redundant since 'c' isn't used\n println(\"1\")\n }\n }\n\n fun testOk() {\n val c = MyClass()\n with(c) { // <== OK because 'f()' is effectively 'c.f()'\n println(f())\n }\n }'",
"markdown": "Reports redundant `with` function calls that don't access anything from the receiver.\n\n**Examples:**\n\n\n class MyClass {\n fun f(): String = \"\"\n }\n\n fun testRedundant() {\n with(c) { // <== 'with' is redundant since 'c' isn't used\n println(\"1\")\n }\n }\n\n fun testOk() {\n val c = MyClass()\n with(c) { // <== OK because 'f()' is effectively 'c.f()'\n println(f())\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RedundantWith",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantLabelMigration",
"shortDescription": {
"text": "Redundant label"
},
"fullDescription": {
"text": "Reports redundant labels which cause compilation errors since Kotlin 1.4. Since Kotlin 1.0, one can mark any statement with a label: 'fun foo() {\n L1@ val x = L2@bar()\n }' However, these labels can be referenced only in a limited number of ways: break / continue from a loop non-local return from an inline lambda or inline anonymous function sssss Such labels are prohibited since Kotlin 1.4. This inspection only reports if the Kotlin language level of the project or module is 1.4 or higher.",
"markdown": "Reports redundant labels which cause compilation errors since Kotlin 1.4.\n\nSince Kotlin 1.0, one can mark any statement with a label:\n\n\n fun foo() {\n L1@ val x = L2@bar()\n }\n\nHowever, these labels can be referenced only in a limited number of ways:\n\n* break / continue from a loop\n* non-local return from an inline lambda or inline anonymous function\nsssss\n\nSuch labels are prohibited since Kotlin 1.4.\n\nThis inspection only reports if the Kotlin language level of the project or module is 1.4 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RedundantLabelMigration",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Migration",
"index": 86,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KotlinRedundantDiagnosticSuppress",
"shortDescription": {
"text": "Redundant diagnostic suppression"
},
"fullDescription": {
"text": "Reports usages of '@Suppress' annotations that can be safely removed because the compiler diagnostic they affect is no longer applicable in this context. Example: 'fun doSmth(@Suppress(\"UNUSED_PARAMETER\") used: Int) {\n println(used)\n }' After the quick-fix is applied: 'fun doSmth(used: Int) {\n println(used)\n }'",
"markdown": "Reports usages of `@Suppress` annotations that can be safely removed because the compiler diagnostic they affect is no longer applicable in this context.\n\n**Example:**\n\n\n fun doSmth(@Suppress(\"UNUSED_PARAMETER\") used: Int) {\n println(used)\n }\n\nAfter the quick-fix is applied:\n\n\n fun doSmth(used: Int) {\n println(used)\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "KotlinRedundantDiagnosticSuppress",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceNegatedIsEmptyWithIsNotEmpty",
"shortDescription": {
"text": "Negated call can be simplified"
},
"fullDescription": {
"text": "Reports negation 'isEmpty()' and 'isNotEmpty()' for collections and 'String', or 'isBlank()' and 'isNotBlank()' for 'String'. Using corresponding functions makes your code simpler. The quick-fix replaces the negation call with the corresponding call from the Standard Library. Example: 'fun main() {\n val list = listOf(1,2,3)\n if (!list.isEmpty()) {\n // do smth\n }\n }' After the quick-fix is applied: 'fun main() {\n val list = listOf(1,2,3)\n if (list.isNotEmpty()) {\n // do smth\n }\n }'",
"markdown": "Reports negation `isEmpty()` and `isNotEmpty()` for collections and `String`, or `isBlank()` and `isNotBlank()` for `String`.\n\nUsing corresponding functions makes your code simpler.\n\nThe quick-fix replaces the negation call with the corresponding call from the Standard Library.\n\n**Example:**\n\n\n fun main() {\n val list = listOf(1,2,3)\n if (!list.isEmpty()) {\n // do smth\n }\n }\n\nAfter the quick-fix is applied:\n\n\n fun main() {\n val list = listOf(1,2,3)\n if (list.isNotEmpty()) {\n // do smth\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceNegatedIsEmptyWithIsNotEmpty",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DelegationToVarProperty",
"shortDescription": {
"text": "Delegating to 'var' property"
},
"fullDescription": {
"text": "Reports interface delegation to a 'var' property. Only initial value of a property is used for delegation, any later assignments do not affect it. Example: 'class Example(var text: CharSequence): CharSequence by text' The quick-fix replaces a property with immutable one: 'class Example(val text: CharSequence): CharSequence by text' Alternative way, if you rely on mutability for some reason: 'class Example(text: CharSequence): CharSequence by text {\n var text = text\n }'",
"markdown": "Reports interface delegation to a `var` property.\n\nOnly initial value of a property is used for delegation, any later assignments do not affect it.\n\n**Example:**\n\n\n class Example(var text: CharSequence): CharSequence by text\n\nThe quick-fix replaces a property with immutable one:\n\n\n class Example(val text: CharSequence): CharSequence by text\n\nAlternative way, if you rely on mutability for some reason:\n\n\n class Example(text: CharSequence): CharSequence by text {\n var text = text\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "DelegationToVarProperty",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantLambdaArrow",
"shortDescription": {
"text": "Redundant lambda arrow"
},
"fullDescription": {
"text": "Reports redundant lambda arrows in lambdas without parameters. Example: 'fun foo(f: () -> Unit) = f()\n\n fun bar() {\n foo { -> println(\"Hi!\") }\n }' After the quick-fix is applied: 'fun foo(f: () -> Unit) = f()\n\n fun bar() {\n foo { println(\"Hi!\") }\n }'",
"markdown": "Reports redundant lambda arrows in lambdas without parameters.\n\n**Example:**\n\n\n fun foo(f: () -> Unit) = f()\n\n fun bar() {\n foo { -> println(\"Hi!\") }\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo(f: () -> Unit) = f()\n\n fun bar() {\n foo { println(\"Hi!\") }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RedundantLambdaArrow",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KotlinInternalInJava",
"shortDescription": {
"text": "Usage of Kotlin internal declarations from Java"
},
"fullDescription": {
"text": "Reports usages of Kotlin 'internal' declarations in Java code that is located in a different module. The 'internal' keyword is designed to restrict access to a class, function, or property from other modules. Due to JVM limitations, 'internal' classes, functions, and properties can still be accessed from outside Kotlin, which may later lead to compatibility problems.",
"markdown": "Reports usages of Kotlin `internal` declarations in Java code that is located in a different module.\n\n\nThe `internal` keyword is designed to restrict access to a class, function, or property from other modules.\nDue to JVM limitations, `internal` classes, functions, and properties can still be\naccessed from outside Kotlin, which may later lead to compatibility problems."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "KotlinInternalInJava",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Java interop issues",
"index": 186,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantValueArgument",
"shortDescription": {
"text": "Redundant value argument"
},
"fullDescription": {
"text": "Reports arguments that are equal to the default values of the corresponding parameters. Example: 'fun foo(x: Int, y: Int = 2) {}\n\nfun bar() {\n foo(1, 2)\n}' After the quick-fix is applied: 'fun bar() {\n foo(1)\n}'",
"markdown": "Reports arguments that are equal to the default values of the corresponding parameters.\n\n**Example:**\n\n\n fun foo(x: Int, y: Int = 2) {}\n\n fun bar() {\n foo(1, 2)\n }\n\nAfter the quick-fix is applied:\n\n\n fun bar() {\n foo(1)\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RedundantValueArgument",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UseWithIndex",
"shortDescription": {
"text": "Manually incremented index variable can be replaced with use of 'withIndex()'"
},
"fullDescription": {
"text": "Reports 'for' loops with a manually incremented index variable. 'for' loops with a manually incremented index variable can be simplified with the 'withIndex()' function. Use withIndex() instead of manual index increment quick-fix can be used to amend the code automatically. Example: 'fun foo(list: List<String>): Int? {\n var index = 0\n for (s in list) { <== can be simplified\n val x = s.length * index\n index++\n if (x > 0) return x\n }\n return null\n }' After the quick-fix is applied: 'fun foo(list: List<String>): Int? {\n for ((index, s) in list.withIndex()) {\n val x = s.length * index\n if (x > 0) return x\n }\n return null\n }'",
"markdown": "Reports `for` loops with a manually incremented index variable.\n\n`for` loops with a manually incremented index variable can be simplified with the `withIndex()` function.\n\n**Use withIndex() instead of manual index increment** quick-fix can be used to amend the code automatically.\n\nExample:\n\n\n fun foo(list: List<String>): Int? {\n var index = 0\n for (s in list) { <== can be simplified\n val x = s.length * index\n index++\n if (x > 0) return x\n }\n return null\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo(list: List<String>): Int? {\n for ((index, s) in list.withIndex()) {\n val x = s.length * index\n if (x > 0) return x\n }\n return null\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "UseWithIndex",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KotlinCatchMayIgnoreException",
"shortDescription": {
"text": "'catch' block may ignore exception"
},
"fullDescription": {
"text": "Reports 'catch' blocks that are empty or may ignore an exception. While occasionally intended, empty 'catch' blocks may complicate debugging. Also, ignoring a 'catch' parameter might be wrong. The inspection won't report any 'catch' parameters named 'ignore', 'ignored', or '_'. You can use the quick-fix to change the exception name to '_'. Example: 'try {\n throwingMethod()\n } catch (ex: IOException) {\n\n }' After the quick-fix is applied: 'try {\n throwingMethod()\n } catch (_: IOException) {\n\n }' Use the Do not warn when 'catch' block contains a comment option to ignore 'catch' blocks with comments.",
"markdown": "Reports `catch` blocks that are empty or may ignore an exception.\n\nWhile occasionally intended, empty `catch` blocks may complicate debugging.\nAlso, ignoring a `catch` parameter might be wrong.\n\n\nThe inspection won't report any `catch` parameters named `ignore`, `ignored`, or `_`.\n\n\nYou can use the quick-fix to change the exception name to `_`.\n\n**Example:**\n\n\n try {\n throwingMethod()\n } catch (ex: IOException) {\n\n }\n\nAfter the quick-fix is applied:\n\n\n try {\n throwingMethod()\n } catch (_: IOException) {\n\n }\n\nUse the **Do not warn when 'catch' block contains a comment** option to ignore `catch` blocks with comments."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "CatchMayIgnoreException",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CanBeVal",
"shortDescription": {
"text": "Local 'var' is never modified and can be declared as 'val'"
},
"fullDescription": {
"text": "Reports local variables declared with the 'var' keyword that are never modified. Kotlin encourages to declare practically immutable variables using the 'val' keyword, ensuring that their value will never change. Example: 'fun example() {\n var primeNumbers = listOf(1, 2, 3, 5, 7, 11, 13)\n var fibonacciNumbers = listOf(1, 1, 2, 3, 5, 8, 13)\n print(\"Same numbers: \" + primeNumbers.intersect(fibonacciNumbers))\n }' The quick-fix replaces the 'var' keyword with 'val': 'fun example() {\n val primeNumbers = listOf(1, 2, 3, 5, 7, 11, 13)\n val fibonacciNumbers = listOf(1, 1, 2, 3, 5, 8, 13)\n print(\"Same numbers: \" + primeNumbers.intersect(fibonacciNumbers))\n }'",
"markdown": "Reports local variables declared with the `var` keyword that are never modified.\n\nKotlin encourages to declare practically immutable variables using the `val` keyword, ensuring that their value will never change.\n\n**Example:**\n\n\n fun example() {\n var primeNumbers = listOf(1, 2, 3, 5, 7, 11, 13)\n var fibonacciNumbers = listOf(1, 1, 2, 3, 5, 8, 13)\n print(\"Same numbers: \" + primeNumbers.intersect(fibonacciNumbers))\n }\n\nThe quick-fix replaces the `var` keyword with `val`:\n\n\n fun example() {\n val primeNumbers = listOf(1, 2, 3, 5, 7, 11, 13)\n val fibonacciNumbers = listOf(1, 1, 2, 3, 5, 8, 13)\n print(\"Same numbers: \" + primeNumbers.intersect(fibonacciNumbers))\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CanBeVal",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceWithIgnoreCaseEquals",
"shortDescription": {
"text": "Should be replaced with 'equals(..., ignoreCase = true)'"
},
"fullDescription": {
"text": "Reports case-insensitive comparisons that can be replaced with 'equals(..., ignoreCase = true)'. By using 'equals()' you don't have to allocate extra strings with 'toLowerCase()' or 'toUpperCase()' to compare strings. The quick-fix replaces the case-insensitive comparison that uses 'toLowerCase()' or 'toUpperCase()' with 'equals(..., ignoreCase = true)'. Note: May change semantics for some locales. Example: 'fun main() {\n val a = \"KoTliN\"\n val b = \"KOTLIN\"\n println(a.toLowerCase() == b.toLowerCase())\n }' After the quick-fix is applied: 'fun main() {\n val a = \"KoTliN\"\n val b = \"KOTLIN\"\n println(a.equals(b, ignoreCase = true))\n }'",
"markdown": "Reports case-insensitive comparisons that can be replaced with `equals(..., ignoreCase = true)`.\n\nBy using `equals()` you don't have to allocate extra strings with `toLowerCase()` or `toUpperCase()` to compare strings.\n\nThe quick-fix replaces the case-insensitive comparison that uses `toLowerCase()` or `toUpperCase()` with `equals(..., ignoreCase = true)`.\n\n**Note:** May change semantics for some locales.\n\n**Example:**\n\n\n fun main() {\n val a = \"KoTliN\"\n val b = \"KOTLIN\"\n println(a.toLowerCase() == b.toLowerCase())\n }\n\nAfter the quick-fix is applied:\n\n\n fun main() {\n val a = \"KoTliN\"\n val b = \"KOTLIN\"\n println(a.equals(b, ignoreCase = true))\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceWithIgnoreCaseEquals",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceSubstringWithSubstringAfter",
"shortDescription": {
"text": "'substring' call should be replaced with 'substringAfter'"
},
"fullDescription": {
"text": "Reports calls like 's.substring(s.indexOf(x))' that can be replaced with 's.substringAfter(x)'. Using 's.substringAfter(x)' makes your code simpler. The quick-fix replaces the 'substring' call with 'substringAfter'. Example: 'fun foo(s: String) {\n s.substring(s.indexOf('x'))\n }' After the quick-fix is applied: 'fun foo(s: String) {\n s.substringAfter('x')\n }'",
"markdown": "Reports calls like `s.substring(s.indexOf(x))` that can be replaced with `s.substringAfter(x)`.\n\nUsing `s.substringAfter(x)` makes your code simpler.\n\nThe quick-fix replaces the `substring` call with `substringAfter`.\n\n**Example:**\n\n\n fun foo(s: String) {\n s.substring(s.indexOf('x'))\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo(s: String) {\n s.substringAfter('x')\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceSubstringWithSubstringAfter",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InconsistentCommentForJavaParameter",
"shortDescription": {
"text": "Inconsistent comment for Java parameter"
},
"fullDescription": {
"text": "Reports inconsistent parameter names for Java method calls specified in a comment block. Examples: '// Java\n public class JavaService {\n public void invoke(String command) {}\n }' '// Kotlin\n fun main() {\n JavaService().invoke(/* name = */ \"fix\")\n }' The quick fix corrects the parameter name in the comment block: 'fun main() {\n JavaService().invoke(/* command = */ \"fix\")\n }'",
"markdown": "Reports inconsistent parameter names for **Java** method calls specified in a comment block.\n\n**Examples:**\n\n\n // Java\n public class JavaService {\n public void invoke(String command) {}\n }\n\n\n // Kotlin\n fun main() {\n JavaService().invoke(/* name = */ \"fix\")\n }\n\nThe quick fix corrects the parameter name in the comment block:\n\n\n fun main() {\n JavaService().invoke(/* command = */ \"fix\")\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "InconsistentCommentForJavaParameter",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Naming conventions",
"index": 71,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RemoveRedundantCallsOfConversionMethods",
"shortDescription": {
"text": "Redundant call of conversion method"
},
"fullDescription": {
"text": "Reports redundant calls to conversion methods (for example, 'toString()' on a 'String' or 'toDouble()' on a 'Double'). Use the 'Remove redundant calls of the conversion method' quick-fix to clean up the code.",
"markdown": "Reports redundant calls to conversion methods (for example, `toString()` on a `String` or `toDouble()` on a `Double`).\n\nUse the 'Remove redundant calls of the conversion method' quick-fix to clean up the code."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RemoveRedundantCallsOfConversionMethods",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KotlinThrowableNotThrown",
"shortDescription": {
"text": "Throwable not thrown"
},
"fullDescription": {
"text": "Reports instantiations of 'Throwable' or its subclasses, when the created 'Throwable' is never actually thrown. The reported code indicates mistakes that are hard to catch in tests. Also, this inspection reports method calls that return instances of 'Throwable' or its subclasses, when the resulting 'Throwable' instance is not thrown. Example: 'fun check(condition: Boolean) {\n if (!condition) /* throw is missing here */ IllegalArgumentException(\"condition is not met\");\n }\n\n fun createError() = RuntimeException()\n\n fun foo() {\n /* throw is missing here */ createError()\n }'",
"markdown": "Reports instantiations of `Throwable` or its subclasses, when the created `Throwable` is never actually thrown.\n\nThe reported code indicates mistakes that are hard to catch in tests.\n\n\nAlso, this inspection reports method calls that return instances of `Throwable` or its subclasses,\nwhen the resulting `Throwable` instance is not thrown.\n\n**Example:**\n\n\n fun check(condition: Boolean) {\n if (!condition) /* throw is missing here */ IllegalArgumentException(\"condition is not met\");\n }\n\n fun createError() = RuntimeException()\n\n fun foo() {\n /* throw is missing here */ createError()\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ThrowableNotThrown",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SimplifyNegatedBinaryExpression",
"shortDescription": {
"text": "Negated boolean expression can be simplified"
},
"fullDescription": {
"text": "Reports negated boolean expressions that can be simplified. The quick-fix simplifies the boolean expression. Example: 'fun test(n: Int) {\n !(0 == 1)\n }' After the quick-fix is applied: 'fun test(n: Int) {\n 0 != 1\n }' Please note that this action may change code semantics if IEEE-754 NaN values are involved: 'fun main() {\n println(!(Double.NaN >= 0)) // true\n }' After the quick-fix is applied: 'fun main() {\n println(Double.NaN < 0) // false\n }'",
"markdown": "Reports negated boolean expressions that can be simplified.\n\nThe quick-fix simplifies the boolean expression.\n\n**Example:**\n\n\n fun test(n: Int) {\n !(0 == 1)\n }\n\nAfter the quick-fix is applied:\n\n\n fun test(n: Int) {\n 0 != 1\n }\n\nPlease note that this action may change code semantics if IEEE-754 NaN values are involved:\n\n\n fun main() {\n println(!(Double.NaN >= 0)) // true\n }\n\nAfter the quick-fix is applied:\n\n\n fun main() {\n println(Double.NaN < 0) // false\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "SimplifyNegatedBinaryExpression",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SelfAssignment",
"shortDescription": {
"text": "Redundant assignment"
},
"fullDescription": {
"text": "Reports assignments of a variable to itself. The quick-fix removes the redundant assignment. Example: 'fun test() {\n var bar = 1\n bar = bar\n }' After the quick-fix is applied: 'fun test() {\n var bar = 1\n }'",
"markdown": "Reports assignments of a variable to itself.\n\nThe quick-fix removes the redundant assignment.\n\n**Example:**\n\n\n fun test() {\n var bar = 1\n bar = bar\n }\n\nAfter the quick-fix is applied:\n\n\n fun test() {\n var bar = 1\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SelfAssignment",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RecursiveEqualsCall",
"shortDescription": {
"text": "Recursive equals call"
},
"fullDescription": {
"text": "Reports recursive 'equals'('==') calls. In Kotlin, '==' compares object values by calling 'equals' method under the hood. '===', on the other hand, compares objects by reference. '===' is commonly used in 'equals' method implementation. But '===' may be mistakenly mixed up with '==' leading to infinite recursion. Example: 'class X {\n override fun equals(other: Any?): Boolean {\n if (this == other) return true\n return false\n }\n }' After the quick-fix is applied: 'class X {\n override fun equals(other: Any?): Boolean {\n if (this === other) return true\n return false\n }\n }'",
"markdown": "Reports recursive `equals`(`==`) calls.\n\n\nIn Kotlin, `==` compares object values by calling `equals` method under the hood.\n`===`, on the other hand, compares objects by reference.\n\n\n`===` is commonly used in `equals` method implementation.\nBut `===` may be mistakenly mixed up with `==` leading to infinite recursion.\n\n**Example:**\n\n\n class X {\n override fun equals(other: Any?): Boolean {\n if (this == other) return true\n return false\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class X {\n override fun equals(other: Any?): Boolean {\n if (this === other) return true\n return false\n }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "RecursiveEqualsCall",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ExplicitThis",
"shortDescription": {
"text": "Redundant explicit 'this'"
},
"fullDescription": {
"text": "Reports an explicit 'this' when it can be omitted. Example: 'class C {\n private val i = 1\n fun f() = this.i\n }' The quick-fix removes the redundant 'this': 'class C {\n private val i = 1\n fun f() = i\n }'",
"markdown": "Reports an explicit `this` when it can be omitted.\n\n**Example:**\n\n\n class C {\n private val i = 1\n fun f() = this.i\n }\n\nThe quick-fix removes the redundant `this`:\n\n\n class C {\n private val i = 1\n fun f() = i\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ExplicitThis",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnusedMainParameter",
"shortDescription": {
"text": "Main parameter is not necessary"
},
"fullDescription": {
"text": "Reports 'main' function with an unused single parameter.",
"markdown": "Reports `main` function with an unused single parameter."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "UnusedMainParameter",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FunctionWithLambdaExpressionBody",
"shortDescription": {
"text": "Function with '= { ... }' and inferred return type"
},
"fullDescription": {
"text": "Reports functions with '= { ... }' and inferred return type. Example: 'fun sum(a: Int, b: Int) = { a + b } // The return type of this function is '() -> Int'.' The quick fix removes braces: 'fun sum(a: Int, b: Int) = a + b'",
"markdown": "Reports functions with `= { ... }` and inferred return type.\n\n**Example:**\n\n\n fun sum(a: Int, b: Int) = { a + b } // The return type of this function is '() -> Int'.\n\nThe quick fix removes braces:\n\n\n fun sum(a: Int, b: Int) = a + b\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "FunctionWithLambdaExpressionBody",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConvertTwoComparisonsToRangeCheck",
"shortDescription": {
"text": "Two comparisons should be converted to a range check"
},
"fullDescription": {
"text": "Reports two consecutive comparisons that can be converted to a range check. Checking against a range makes code simpler by removing test subject duplication. Example: 'fun checkMonth(month: Int): Boolean {\n return month >= 1 && month <= 12\n }' The quick-fix replaces the comparison-based check with a range one: 'fun checkMonth(month: Int): Boolean {\n return month in 1..12\n }'",
"markdown": "Reports two consecutive comparisons that can be converted to a range check.\n\nChecking against a range makes code simpler by removing test subject duplication.\n\n**Example:**\n\n\n fun checkMonth(month: Int): Boolean {\n return month >= 1 && month <= 12\n }\n\nThe quick-fix replaces the comparison-based check with a range one:\n\n\n fun checkMonth(month: Int): Boolean {\n return month in 1..12\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ConvertTwoComparisonsToRangeCheck",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ProhibitTypeParametersForLocalVariablesMigration",
"shortDescription": {
"text": "Local variable with type parameters"
},
"fullDescription": {
"text": "Reports local variables with type parameters. A type parameter for a local variable doesn't make sense because it can't be specialized. Example: 'fun main() {\n val <T> x = \"\"\n }' After the quick-fix is applied: 'fun main() {\n val x = \"\"\n }' This inspection only reports if the Kotlin language level of the project or module is 1.4 or higher.",
"markdown": "Reports local variables with type parameters.\n\nA type parameter for a local variable doesn't make sense because it can't be specialized.\n\n**Example:**\n\n\n fun main() {\n val <T> x = \"\"\n }\n\nAfter the quick-fix is applied:\n\n\n fun main() {\n val x = \"\"\n }\n\nThis inspection only reports if the Kotlin language level of the project or module is 1.4 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "ProhibitTypeParametersForLocalVariablesMigration",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Migration",
"index": 86,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TestFunctionName",
"shortDescription": {
"text": "Test function naming convention"
},
"fullDescription": {
"text": "Reports test function names that do not follow the recommended naming conventions.",
"markdown": "Reports test function names that do not follow the [recommended naming conventions](https://kotlinlang.org/docs/coding-conventions.html#names-for-test-methods)."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "TestFunctionName",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Naming conventions",
"index": 71,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RecursivePropertyAccessor",
"shortDescription": {
"text": "Recursive property accessor"
},
"fullDescription": {
"text": "Reports recursive property accessor calls which can end up with a 'StackOverflowError'. Such calls are usually confused with backing field access. Example: 'var counter: Int = 0\n set(value) {\n counter = if (value < 0) 0 else value\n }' After the quick-fix is applied: 'var counter: Int = 0\n set(value) {\n field = if (value < 0) 0 else value\n }'",
"markdown": "Reports recursive property accessor calls which can end up with a `StackOverflowError`.\nSuch calls are usually confused with backing field access.\n\n**Example:**\n\n\n var counter: Int = 0\n set(value) {\n counter = if (value < 0) 0 else value\n }\n\nAfter the quick-fix is applied:\n\n\n var counter: Int = 0\n set(value) {\n field = if (value < 0) 0 else value\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "RecursivePropertyAccessor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplacePutWithAssignment",
"shortDescription": {
"text": "'map.put()' can be converted to assignment"
},
"fullDescription": {
"text": "Reports 'map.put' function calls that can be replaced with indexing operator ('[]'). Using syntactic sugar makes your code simpler. The quick-fix replaces 'put' call with the assignment. Example: 'fun foo(map: MutableMap<Int, String>) {\n map.put(42, \"foo\")\n }' After the quick-fix is applied: 'fun foo(map: MutableMap<Int, String>) {\n map[42] = \"foo\"\n }'",
"markdown": "Reports `map.put` function calls that can be replaced with indexing operator (`[]`).\n\nUsing syntactic sugar makes your code simpler.\n\nThe quick-fix replaces `put` call with the assignment.\n\n**Example:**\n\n\n fun foo(map: MutableMap<Int, String>) {\n map.put(42, \"foo\")\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo(map: MutableMap<Int, String>) {\n map[42] = \"foo\"\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplacePutWithAssignment",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KotlinDoubleNegation",
"shortDescription": {
"text": "Redundant double negation"
},
"fullDescription": {
"text": "Reports redundant double negations. Example: 'val truth = !!true'",
"markdown": "Reports redundant double negations.\n\n**Example:**\n\n val truth = !!true\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "DoubleNegation",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FunctionName",
"shortDescription": {
"text": "Function naming convention"
},
"fullDescription": {
"text": "Reports function names that do not follow the recommended naming conventions. Example: 'fun Foo() {}' To fix the problem change the name of the function to match the recommended naming conventions.",
"markdown": "Reports function names that do not follow the recommended naming conventions.\n\n**Example:**\n\n\n fun Foo() {}\n\nTo fix the problem change the name of the function to match the recommended naming conventions."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "FunctionName",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Naming conventions",
"index": 71,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DifferentKotlinMavenVersion",
"shortDescription": {
"text": "Maven and IDE plugins versions are different"
},
"fullDescription": {
"text": "Reports that Maven plugin version isn't properly supported in the current IDE plugin. This inconsistency may lead to different error reporting behavior in the IDE and the compiler",
"markdown": "Reports that Maven plugin version isn't properly supported in the current IDE plugin.\n\nThis inconsistency may lead to different error reporting behavior in the IDE and the compiler"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "DifferentKotlinMavenVersion",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin",
"index": 11,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceRangeToWithUntil",
"shortDescription": {
"text": "'rangeTo' or the '..' call should be replaced with 'until'"
},
"fullDescription": {
"text": "Reports calls to 'rangeTo' or the '..' operator instead of calls to 'until'. Using corresponding functions makes your code simpler. The quick-fix replaces 'rangeTo' or the '..' call with 'until'. Example: 'fun foo(a: Int) {\n for (i in 0..a - 1) {\n\n }\n }' After the quick-fix is applied: 'fun foo(a: Int) {\n for (i in 0 until a) {\n\n }\n }'",
"markdown": "Reports calls to `rangeTo` or the `..` operator instead of calls to `until`.\n\nUsing corresponding functions makes your code simpler.\n\nThe quick-fix replaces `rangeTo` or the `..` call with `until`.\n\n**Example:**\n\n\n fun foo(a: Int) {\n for (i in 0..a - 1) {\n\n }\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo(a: Int) {\n for (i in 0 until a) {\n\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceRangeToWithUntil",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnclearPrecedenceOfBinaryExpression",
"shortDescription": {
"text": "Multiple operators with different precedence"
},
"fullDescription": {
"text": "Reports binary expressions that consist of different operators without parentheses. Such expressions can be less readable due to different precedence rules of operators. Example: fun foo(b: Boolean?, i: Int?) {\n val x = b ?: i == null // evaluated as `(b ?: i) == null`\n val y = i ?: 0 + 1 // evaluated as `i ?: (0 + 1)`\n }",
"markdown": "Reports binary expressions that consist of different operators without parentheses.\n\nSuch expressions can be less readable due to different [precedence rules](https://kotlinlang.org/docs/reference/grammar.html#expressions) of operators.\n\nExample:\n\n```\n fun foo(b: Boolean?, i: Int?) {\n val x = b ?: i == null // evaluated as `(b ?: i) == null`\n val y = i ?: 0 + 1 // evaluated as `i ?: (0 + 1)`\n }\n```"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnclearPrecedenceOfBinaryExpression",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnusedLambdaExpressionBody",
"shortDescription": {
"text": "Unused return value of a function with lambda expression body"
},
"fullDescription": {
"text": "Reports calls with an unused return value when the called function returns a lambda from an expression body. If there is '=' between function header and body block, code from the function will not be evaluated which can lead to incorrect behavior. Remove = token from function declaration can be used to amend the code automatically. Example: 'fun printHello() = { println(\"Hello\") }\n\n fun main() {\n printHello() // This function doesn't print anything\n }' After the quick-fix is applied: 'fun printHello() { println(\"Hello\") }\n\n fun main() {\n printHello()\n }'",
"markdown": "Reports calls with an unused return value when the called function returns a lambda from an expression body.\n\n\nIf there is `=` between function header and body block,\ncode from the function will not be evaluated which can lead to incorrect behavior.\n\n**Remove = token from function declaration** can be used to amend the code automatically.\n\nExample:\n\n\n fun printHello() = { println(\"Hello\") }\n\n fun main() {\n printHello() // This function doesn't print anything\n }\n\nAfter the quick-fix is applied:\n\n\n fun printHello() { println(\"Hello\") }\n\n fun main() {\n printHello()\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "UnusedLambdaExpressionBody",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CanSealedSubClassBeObject",
"shortDescription": {
"text": "Sealed subclass without state and overridden equals"
},
"fullDescription": {
"text": "Reports direct inheritors of 'sealed' classes that have no state and overridden 'equals()' method. It's highly recommended to override 'equals()' to provide comparison stability, or convert the 'class' to an 'object' to reach the same effect. Example: 'sealed class Receiver {\n class Everyone : Receiver()\n class User(val id: Int) : Receiver()\n }' The quick-fix converts a 'class' into an 'object': 'sealed class Receiver {\n object Everyone : Receiver()\n class User(val id: Int) : Receiver()\n }'",
"markdown": "Reports direct inheritors of `sealed` classes that have no state and overridden `equals()` method.\n\nIt's highly recommended to override `equals()` to provide comparison stability, or convert the `class` to an `object` to reach the same effect.\n\n**Example:**\n\n\n sealed class Receiver {\n class Everyone : Receiver()\n class User(val id: Int) : Receiver()\n }\n\nThe quick-fix converts a `class` into an `object`:\n\n\n sealed class Receiver {\n object Everyone : Receiver()\n class User(val id: Int) : Receiver()\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "CanSealedSubClassBeObject",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PropertyName",
"shortDescription": {
"text": "Property naming convention"
},
"fullDescription": {
"text": "Reports property names that do not follow the recommended naming conventions. Consistent naming allows for easier code reading and understanding. According to the Kotlin official style guide, property names should start with a lowercase letter and use camel case. It is possible to introduce other naming rules by changing the \"Pattern\" regular expression. Example: 'val My_Cool_Property = \"\"' The quick-fix renames the class according to the Kotlin naming conventions: 'val myCoolProperty = \"\"'",
"markdown": "Reports property names that do not follow the recommended naming conventions.\n\n\nConsistent naming allows for easier code reading and understanding.\nAccording to the [Kotlin official style guide](https://kotlinlang.org/docs/coding-conventions.html#naming-rules),\nproperty names should start with a lowercase letter and use camel case.\n\nIt is possible to introduce other naming rules by changing the \"Pattern\" regular expression.\n\n**Example:**\n\n\n val My_Cool_Property = \"\"\n\nThe quick-fix renames the class according to the Kotlin naming conventions:\n\n\n val myCoolProperty = \"\"\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PropertyName",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Naming conventions",
"index": 71,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SimplifiableCall",
"shortDescription": {
"text": "Library function call could be simplified"
},
"fullDescription": {
"text": "Reports library function calls which could be replaced by simplified one. Using corresponding functions makes your code simpler. The quick-fix replaces the function calls with another one. Example: 'fun test(list: List<Any>) {\n list.filter { it is String }\n }' After the quick-fix is applied: 'fun test(list: List<Any>) {\n list.filterIsInstance<String>()\n }'",
"markdown": "Reports library function calls which could be replaced by simplified one.\n\nUsing corresponding functions makes your code simpler.\n\nThe quick-fix replaces the function calls with another one.\n\n**Example:**\n\n\n fun test(list: List<Any>) {\n list.filter { it is String }\n }\n\nAfter the quick-fix is applied:\n\n\n fun test(list: List<Any>) {\n list.filterIsInstance<String>()\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "SimplifiableCall",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ObjectLiteralToLambda",
"shortDescription": {
"text": "Object literal can be converted to lambda"
},
"fullDescription": {
"text": "Reports anonymous object literals implementing a Java interface with a single abstract method that can be converted into a call with a lambda expression. Example: 'class SomeService {\n val threadPool = Executors.newCachedThreadPool()\n \n fun foo() {\n threadPool.submit(object : Runnable {\n override fun run() {\n println(\"hello\")\n }\n })\n }\n}' After the quick-fix is applied: 'fun foo() {\n threadPool.submit { println(\"hello\") }\n }'",
"markdown": "Reports anonymous object literals implementing a Java interface with a single abstract method that can be converted into a call with a lambda expression.\n\n**Example:**\n\n\n class SomeService {\n val threadPool = Executors.newCachedThreadPool()\n \n fun foo() {\n threadPool.submit(object : Runnable {\n override fun run() {\n println(\"hello\")\n }\n })\n }\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo() {\n threadPool.submit { println(\"hello\") }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ObjectLiteralToLambda",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConvertObjectToDataObject",
"shortDescription": {
"text": "Convert 'object' to 'data object'"
},
"fullDescription": {
"text": "Reports 'object' that can be converted to 'data object' 'data object' auto-generates 'toString', 'equals' and 'hashCode' The inspection suggests to convert 'object' to 'data object' in 2 cases: When custom 'toString' returns name of the class When 'object' inherits sealed 'class'/'interface' Example: 'object Foo {\n override fun toString(): String = \"Foo\"\n }' After the quick-fix is applied: 'data object Foo' This inspection only reports if the Kotlin language level of the project or module is 1.9 or higher",
"markdown": "Reports `object` that can be converted to `data object`\n\n`data object` auto-generates `toString`, `equals` and `hashCode`\n\nThe inspection suggests to convert `object` to `data object` in 2 cases:\n\n* When custom `toString` returns name of the class\n* When `object` inherits sealed `class`/`interface`\n\n**Example:**\n\n\n object Foo {\n override fun toString(): String = \"Foo\"\n }\n\nAfter the quick-fix is applied:\n\n\n data object Foo\n\nThis inspection only reports if the Kotlin language level of the project or module is 1.9 or higher"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "ConvertObjectToDataObject",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BooleanLiteralArgument",
"shortDescription": {
"text": "Boolean literal argument without parameter name"
},
"fullDescription": {
"text": "Reports call arguments with 'Boolean' type without explicit parameter names specified. When multiple boolean literals are passed sequentially, it's easy to forget parameter ordering that could lead to mistakes. Explicit parameter names allow for easier code reading and understanding. Example: 'fun check(checkName: Boolean, checkAddress: Boolean, checkPhone: Boolean) {}\n\n fun usage() {\n check(true, false, true) // What does this mean?\n }' The quick-fix adds missing parameter names: 'fun check(checkName: Boolean, checkAddress: Boolean, checkPhone: Boolean) {}\n\n fun usage() {\n check(checkName = true, checkAddress = false, checkPhone = true)\n }'",
"markdown": "Reports call arguments with `Boolean` type without explicit parameter names specified.\n\n\nWhen multiple boolean literals are passed sequentially, it's easy to forget parameter ordering that could lead to mistakes.\nExplicit parameter names allow for easier code reading and understanding.\n\n**Example:**\n\n\n fun check(checkName: Boolean, checkAddress: Boolean, checkPhone: Boolean) {}\n\n fun usage() {\n check(true, false, true) // What does this mean?\n }\n\nThe quick-fix adds missing parameter names:\n\n\n fun check(checkName: Boolean, checkAddress: Boolean, checkPhone: Boolean) {}\n\n fun usage() {\n check(checkName = true, checkAddress = false, checkPhone = true)\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "BooleanLiteralArgument",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConvertArgumentToSet",
"shortDescription": {
"text": "Argument could be converted to 'Set' to improve performance"
},
"fullDescription": {
"text": "Detects the function calls that could work faster with an argument converted to 'Set'. Operations like 'minus' or 'intersect' are more effective when their argument is a set. An explicit conversion of an 'Iterable<T>' or an 'Array<T>' into a 'Set<T>' can often make code more effective. The quick-fix adds an explicit conversion to the function call. Example: 'fun <T> f(a: Iterable<T>, b: Iterable<T>): Int =\n a.intersect(b).size' After the quick-fix is applied: 'fun <T> f(a: Iterable<T>, b: Iterable<T>): Int =\n a.intersect(b.toSet()).size'",
"markdown": "Detects the function calls that could work faster with an argument converted to `Set`.\n\n\nOperations like 'minus' or 'intersect' are more effective when their argument is a set.\nAn explicit conversion of an `Iterable<T>` or an `Array<T>`\ninto a `Set<T>` can often make code more effective.\n\n\nThe quick-fix adds an explicit conversion to the function call.\n\n**Example:**\n\n\n fun <T> f(a: Iterable<T>, b: Iterable<T>): Int =\n a.intersect(b).size\n\nAfter the quick-fix is applied:\n\n\n fun <T> f(a: Iterable<T>, b: Iterable<T>): Int =\n a.intersect(b.toSet()).size\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "ConvertArgumentToSet",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Other problems",
"index": 56,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ProtectedInFinal",
"shortDescription": {
"text": "'protected' visibility is effectively 'private' in a final class"
},
"fullDescription": {
"text": "Reports 'protected' visibility used inside of a 'final' class. In such cases 'protected' members are accessible only in the class itself, so they are effectively 'private'. Example: 'class FinalClass {\n protected fun foo() {}\n }' After the quick-fix is applied: 'class FinalClass {\n private fun foo() {}\n }'",
"markdown": "Reports `protected` visibility used inside of a `final` class. In such cases `protected` members are accessible only in the class itself, so they are effectively `private`.\n\n**Example:**\n\n\n class FinalClass {\n protected fun foo() {}\n }\n\nAfter the quick-fix is applied:\n\n\n class FinalClass {\n private fun foo() {}\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ProtectedInFinal",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceRangeStartEndInclusiveWithFirstLast",
"shortDescription": {
"text": "Boxed properties should be replaced with unboxed"
},
"fullDescription": {
"text": "Reports boxed 'Range.start' and 'Range.endInclusive' properties. These properties can be replaced with unboxed 'first' and 'last' properties to avoid redundant calls. The quick-fix replaces 'start' and 'endInclusive' properties with the corresponding 'first' and 'last'. Example: 'fun foo(range: CharRange) {\n val lastElement = range.endInclusive\n }' After the quick-fix is applied: 'fun foo(range: CharRange) {\n val lastElement = range.last\n }'",
"markdown": "Reports **boxed** `Range.start` and `Range.endInclusive` properties.\n\nThese properties can be replaced with **unboxed** `first` and `last` properties to avoid redundant calls.\n\nThe quick-fix replaces `start` and `endInclusive` properties with the corresponding `first` and `last`.\n\n**Example:**\n\n\n fun foo(range: CharRange) {\n val lastElement = range.endInclusive\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo(range: CharRange) {\n val lastElement = range.last\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceRangeStartEndInclusiveWithFirstLast",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceSizeCheckWithIsNotEmpty",
"shortDescription": {
"text": "Size check can be replaced with 'isNotEmpty()'"
},
"fullDescription": {
"text": "Reports size checks of 'Collections/Array/String' that should be replaced with 'isNotEmpty()'. Using 'isNotEmpty()' makes your code simpler. The quick-fix replaces the size check with 'isNotEmpty()'. Example: 'fun foo() {\n val arrayOf = arrayOf(1, 2, 3)\n arrayOf.size > 0\n }' After the quick-fix is applied: 'fun foo() {\n val arrayOf = arrayOf(1, 2, 3)\n arrayOf.isNotEmpty()\n }'",
"markdown": "Reports size checks of `Collections/Array/String` that should be replaced with `isNotEmpty()`.\n\nUsing `isNotEmpty()` makes your code simpler.\n\nThe quick-fix replaces the size check with `isNotEmpty()`.\n\n**Example:**\n\n\n fun foo() {\n val arrayOf = arrayOf(1, 2, 3)\n arrayOf.size > 0\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo() {\n val arrayOf = arrayOf(1, 2, 3)\n arrayOf.isNotEmpty()\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceSizeCheckWithIsNotEmpty",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IntroduceWhenSubject",
"shortDescription": {
"text": "'when' that can be simplified by introducing an argument"
},
"fullDescription": {
"text": "Reports a 'when' expression that can be simplified by introducing a subject argument. Example: 'fun test(obj: Any): String {\n return when {\n obj is String -> \"string\"\n obj is Int -> \"int\"\n else -> \"unknown\"\n }\n }' The quick fix introduces a subject argument: 'fun test(obj: Any): String {\n return when (obj) {\n is String -> \"string\"\n is Int -> \"int\"\n else -> \"unknown\"\n }\n }'",
"markdown": "Reports a `when` expression that can be simplified by introducing a subject argument.\n\n**Example:**\n\n\n fun test(obj: Any): String {\n return when {\n obj is String -> \"string\"\n obj is Int -> \"int\"\n else -> \"unknown\"\n }\n }\n\nThe quick fix introduces a subject argument:\n\n\n fun test(obj: Any): String {\n return when (obj) {\n is String -> \"string\"\n is Int -> \"int\"\n else -> \"unknown\"\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "IntroduceWhenSubject",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DeprecatedCallableAddReplaceWith",
"shortDescription": {
"text": "@Deprecated annotation without 'replaceWith' argument"
},
"fullDescription": {
"text": "Reports deprecated functions and properties that do not have the 'kotlin.ReplaceWith' argument in its 'kotlin.deprecated' annotation and suggests to add one based on their body. Kotlin provides the 'ReplaceWith' argument to replace deprecated declarations automatically. It is recommended to use the argument to fix deprecation issues in code. Example: '@Deprecated(\"Use refined() instead.\")\n fun deprecated() = refined()\n\n fun refined() = 42' The quick-fix adds the 'ReplaceWith()' argument: '@Deprecated(\"Use refined() instead.\", ReplaceWith(\"refined()\"))\n fun deprecated() = refined()\n\n fun refined() = 42'",
"markdown": "Reports deprecated functions and properties that do not have the `kotlin.ReplaceWith` argument in its `kotlin.deprecated` annotation and suggests to add one based on their body.\n\n\nKotlin provides the `ReplaceWith` argument to replace deprecated declarations automatically.\nIt is recommended to use the argument to fix deprecation issues in code.\n\n**Example:**\n\n\n @Deprecated(\"Use refined() instead.\")\n fun deprecated() = refined()\n\n fun refined() = 42\n\nThe quick-fix adds the `ReplaceWith()` argument:\n\n\n @Deprecated(\"Use refined() instead.\", ReplaceWith(\"refined()\"))\n fun deprecated() = refined()\n\n fun refined() = 42\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "DeprecatedCallableAddReplaceWith",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Other problems",
"index": 56,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RemoveRedundantSpreadOperator",
"shortDescription": {
"text": "Redundant spread operator"
},
"fullDescription": {
"text": "Reports the use of a redundant spread operator for a family of 'arrayOf' function calls. Use the 'Remove redundant spread operator' quick-fix to clean up the code. Examples: 'fun foo(vararg s: String) { }\n\n fun bar(ss: Array<String>) {\n foo(*arrayOf(\"abc\")) // for the both calls of 'foo', array creation\n foo(*arrayOf(*ss, \"zzz\")) // and its subsequent \"spreading\" is redundant\n }' After the quick-fix is applied: 'fun foo(vararg s: String) { }\n\n fun bar(ss: Array<String>) {\n foo(\"abc\")\n foo(*ss, \"zzz\")\n }'",
"markdown": "Reports the use of a redundant spread operator for a family of `arrayOf` function calls.\n\nUse the 'Remove redundant spread operator' quick-fix to clean up the code.\n\n**Examples:**\n\n\n fun foo(vararg s: String) { }\n\n fun bar(ss: Array<String>) {\n foo(*arrayOf(\"abc\")) // for the both calls of 'foo', array creation\n foo(*arrayOf(*ss, \"zzz\")) // and its subsequent \"spreading\" is redundant\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo(vararg s: String) { }\n\n fun bar(ss: Array<String>) {\n foo(\"abc\")\n foo(*ss, \"zzz\")\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RemoveRedundantSpreadOperator",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ProhibitJvmOverloadsOnConstructorsOfAnnotationClassesMigration",
"shortDescription": {
"text": "'@JvmOverloads' annotation cannot be used on constructors of annotation classes since 1.4"
},
"fullDescription": {
"text": "Reports '@JvmOverloads' on constructors of annotation classes because it's meaningless. There is no footprint of '@JvmOverloads' in the generated bytecode and Kotlin metadata, so '@JvmOverloads' doesn't affect the generated bytecode and the code behavior. '@JvmOverloads' on constructors of annotation classes causes a compilation error since Kotlin 1.4. Example: 'annotation class A @JvmOverloads constructor(val x: Int = 1)' After the quick-fix is applied: 'annotation class A constructor(val x: Int = 1)'",
"markdown": "Reports `@JvmOverloads` on constructors of annotation classes because it's meaningless.\n\n\nThere is no footprint of `@JvmOverloads` in the generated bytecode and Kotlin metadata,\nso `@JvmOverloads` doesn't affect the generated bytecode and the code behavior.\n\n`@JvmOverloads` on constructors of annotation classes causes a compilation error since Kotlin 1.4.\n\n**Example:**\n\n\n annotation class A @JvmOverloads constructor(val x: Int = 1)\n\nAfter the quick-fix is applied:\n\n\n annotation class A constructor(val x: Int = 1)\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "ProhibitJvmOverloadsOnConstructorsOfAnnotationClassesMigration",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Migration",
"index": 86,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RemoveSetterParameterType",
"shortDescription": {
"text": "Redundant setter parameter type"
},
"fullDescription": {
"text": "Reports explicitly specified parameter types in property setters. Setter parameter type always matches the property type, so it's not required to be explicit. The 'Remove explicit type specification' quick-fix allows amending the code accordingly. Examples: 'fun process(x: Int) {}\n\n var x: Int = 0\n set(value: Int) = process(value) // <== 'Int' specification can be safely omitted' After the quick-fix is applied: 'fun process(x: Int) {}\n\n var x: Int = 0\n set(value) = process(value)'",
"markdown": "Reports explicitly specified parameter types in property setters.\n\n\nSetter parameter type always matches the property type, so it's not required to be explicit.\nThe 'Remove explicit type specification' quick-fix allows amending the code accordingly.\n\n**Examples:**\n\n\n fun process(x: Int) {}\n\n var x: Int = 0\n set(value: Int) = process(value) // <== 'Int' specification can be safely omitted\n\nAfter the quick-fix is applied:\n\n\n fun process(x: Int) {}\n\n var x: Int = 0\n set(value) = process(value)\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RemoveSetterParameterType",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ObjectPrivatePropertyName",
"shortDescription": {
"text": "Object private property naming convention"
},
"fullDescription": {
"text": "Reports properties that do not follow the naming conventions. The following properties are reported: Private properties in objects and companion objects You can specify the required pattern in the inspection options. Recommended naming conventions: it has to start with an underscore or an uppercase letter, use camel case. Example: 'class Person {\n companion object {\n // property in companion object\n private val NO_NAME = Person()\n }\n }'",
"markdown": "Reports properties that do not follow the naming conventions.\n\nThe following properties are reported:\n\n* Private properties in objects and companion objects\n\nYou can specify the required pattern in the inspection options.\n\n[Recommended naming conventions](https://kotlinlang.org/docs/coding-conventions.html#naming-rules): it has to start with an underscore or an uppercase letter, use camel case.\n\n**Example:**\n\n\n class Person {\n companion object {\n // property in companion object\n private val NO_NAME = Person()\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ObjectPrivatePropertyName",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Naming conventions",
"index": 71,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConflictingExtensionProperty",
"shortDescription": {
"text": "Extension property conflicting with synthetic one"
},
"fullDescription": {
"text": "Reports extension properties that conflict with synthetic ones that have been automatically produced from Java 'get' or 'set' methods. Such properties should be either removed or renamed to avoid breaking code by future changes in the compiler. The quick-fix deletes an extention property. Example: 'val File.name: String\n get() = getName()' The quick-fix adds the '@Deprecated' annotation: '@Deprecated(\"Is replaced with automatic synthetic extension\", ReplaceWith(\"name\"), level = DeprecationLevel.HIDDEN)\n val File.name: String\n get() = getName()'",
"markdown": "Reports extension properties that conflict with synthetic ones that have been automatically produced from Java `get` or `set` methods.\n\nSuch properties should be either removed or renamed to avoid breaking code by future changes in the compiler.\n\nThe quick-fix deletes an extention property.\n\n**Example:**\n\n\n val File.name: String\n get() = getName()\n\nThe quick-fix adds the `@Deprecated` annotation:\n\n\n @Deprecated(\"Is replaced with automatic synthetic extension\", ReplaceWith(\"name\"), level = DeprecationLevel.HIDDEN)\n val File.name: String\n get() = getName()\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ConflictingExtensionProperty",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceJavaStaticMethodWithKotlinAnalog",
"shortDescription": {
"text": "Java methods should be replaced with Kotlin analog"
},
"fullDescription": {
"text": "Reports a Java method call that can be replaced with a Kotlin function, for example, 'System.out.println()'. Replacing the code gets rid of the dependency to Java and makes the idiomatic Kotlin code. The quick-fix replaces the Java method calls on the same Kotlin call. Example: 'import java.util.Arrays\n\n fun main() {\n val a = Arrays.asList(1, 3, null)\n }' After the quick-fix is applied: 'fun main() {\n val a = listOf(1, 3, null)\n }'",
"markdown": "Reports a Java method call that can be replaced with a Kotlin function, for example, `System.out.println()`.\n\nReplacing the code gets rid of the dependency to Java and makes the idiomatic Kotlin code.\n\nThe quick-fix replaces the Java method calls on the same Kotlin call.\n\n**Example:**\n\n\n import java.util.Arrays\n\n fun main() {\n val a = Arrays.asList(1, 3, null)\n }\n\nAfter the quick-fix is applied:\n\n\n fun main() {\n val a = listOf(1, 3, null)\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceJavaStaticMethodWithKotlinAnalog",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RemoveEmptyParenthesesFromLambdaCall",
"shortDescription": {
"text": "Unnecessary parentheses in function call with lambda"
},
"fullDescription": {
"text": "Reports redundant empty parentheses of function calls where the only parameter is a lambda that's outside the parentheses. Use the 'Remove unnecessary parentheses from function call with lambda' quick-fix to clean up the code. Examples: 'fun foo() {\n listOf(1).forEach() { }\n }' After the quick-fix is applied: 'fun foo() {\n listOf(1).forEach { }\n }'",
"markdown": "Reports redundant empty parentheses of function calls where the only parameter is a lambda that's outside the parentheses.\n\nUse the 'Remove unnecessary parentheses from function call with lambda' quick-fix to clean up the code.\n\n**Examples:**\n\n\n fun foo() {\n listOf(1).forEach() { }\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo() {\n listOf(1).forEach { }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RemoveEmptyParenthesesFromLambdaCall",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaCollectionsStaticMethod",
"shortDescription": {
"text": "Java Collections static method call can be replaced with Kotlin stdlib"
},
"fullDescription": {
"text": "Reports a Java 'Collections' static method call that can be replaced with Kotlin stdlib. Example: 'import java.util.Collections\n\n fun test() {\n val mutableList = mutableListOf(1, 2)\n Collections.fill(mutableList, 3)\n }' The quick fix replaces Java 'Collections' static method call with the corresponding Kotlin stdlib method call: 'import java.util.Collections\n\n fun test() {\n val mutableList = mutableListOf(1, 2)\n mutableList.fill(3)\n }'",
"markdown": "Reports a Java `Collections` static method call that can be replaced with Kotlin stdlib.\n\n**Example:**\n\n\n import java.util.Collections\n\n fun test() {\n val mutableList = mutableListOf(1, 2)\n Collections.fill(mutableList, 3)\n }\n\nThe quick fix replaces Java `Collections` static method call with the corresponding Kotlin stdlib method call:\n\n\n import java.util.Collections\n\n fun test() {\n val mutableList = mutableListOf(1, 2)\n mutableList.fill(3)\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "JavaCollectionsStaticMethod",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceCallWithBinaryOperator",
"shortDescription": {
"text": "Can be replaced with binary operator"
},
"fullDescription": {
"text": "Reports function calls that can be replaced with binary operators, in particular comparison-related ones. Example: 'fun test(): Boolean {\n return 2.compareTo(1) > 0 // replaceable 'compareTo()'\n }' After the quick-fix is applied: 'fun test(): Boolean {\n return 2 > 1\n }'",
"markdown": "Reports function calls that can be replaced with binary operators, in particular comparison-related ones.\n\n**Example:**\n\n fun test(): Boolean {\n return 2.compareTo(1) > 0 // replaceable 'compareTo()'\n }\n\nAfter the quick-fix is applied:\n\n fun test(): Boolean {\n return 2 > 1\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceCallWithBinaryOperator",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FloatingPointLiteralPrecision",
"shortDescription": {
"text": "Floating-point literal exceeds the available precision"
},
"fullDescription": {
"text": "Reports floating-point literals that cannot be represented with the required precision using IEEE 754 'Float' and 'Double' types. For example, '1.9999999999999999999' has too many significant digits, so its representation as a 'Double' will be rounded to '2.0'. Specifying excess digits may be misleading as it hides the fact that computations use rounded values instead. The quick-fix replaces the literal with a rounded value that matches the actual representation of the constant. Example: 'val x: Float = 3.14159265359f' After the quick-fix is applied: 'val x: Float = 3.1415927f'",
"markdown": "Reports floating-point literals that cannot be represented with the required precision using [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754) `Float` and `Double` types.\n\n\nFor example, `1.9999999999999999999` has too many significant digits,\nso its representation as a `Double` will be rounded to `2.0`.\nSpecifying excess digits may be misleading as it hides the fact that computations\nuse rounded values instead.\n\n\nThe quick-fix replaces the literal with a rounded value that matches the actual representation\nof the constant.\n\n**Example:**\n\n\n val x: Float = 3.14159265359f\n\nAfter the quick-fix is applied:\n\n\n val x: Float = 3.1415927f\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "FloatingPointLiteralPrecision",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Other problems",
"index": 56,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantGetter",
"shortDescription": {
"text": "Redundant property getter"
},
"fullDescription": {
"text": "Reports redundant property getters. Example: 'class Test {\n val a = 1\n get\n val b = 1\n get() = field\n }' After the quick-fix is applied: 'class Test {\n val a = 1\n val b = 1\n }'",
"markdown": "Reports redundant property getters.\n\n**Example:**\n\n\n class Test {\n val a = 1\n get\n val b = 1\n get() = field\n }\n\nAfter the quick-fix is applied:\n\n\n class Test {\n val a = 1\n val b = 1\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RedundantGetter",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantIf",
"shortDescription": {
"text": "Redundant 'if' statement"
},
"fullDescription": {
"text": "Reports 'if' statements which can be simplified to a single statement. Example: 'fun test(): Boolean {\n if (foo()) {\n return true\n } else {\n return false\n }\n }' After the quick-fix is applied: 'fun test(): Boolean {\n return foo()\n }'",
"markdown": "Reports `if` statements which can be simplified to a single statement.\n\n**Example:**\n\n\n fun test(): Boolean {\n if (foo()) {\n return true\n } else {\n return false\n }\n }\n\nAfter the quick-fix is applied:\n\n\n fun test(): Boolean {\n return foo()\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RedundantIf",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KDocMissingDocumentation",
"shortDescription": {
"text": "Missing KDoc comments for public declarations"
},
"fullDescription": {
"text": "Reports public declarations that do not have KDoc comments. Example: 'class A' The quick fix generates the comment block above the declaration: '/**\n *\n */\n class A'",
"markdown": "Reports public declarations that do not have KDoc comments.\n\n**Example:**\n\n\n class A\n\nThe quick fix generates the comment block above the declaration:\n\n\n /**\n *\n */\n class A\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "KDocMissingDocumentation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Other problems",
"index": 56,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RemoveExplicitTypeArguments",
"shortDescription": {
"text": "Unnecessary type argument"
},
"fullDescription": {
"text": "Reports function calls with type arguments that can be automatically inferred. Such type arguments are redundant and can be safely omitted. Use the 'Remove explicit type arguments' quick-fix to clean up the code. Examples: '// 'String' type can be inferred here\n fun foo(): MutableList<String> = mutableListOf<String>()\n\n // Here 'String' cannot be inferred, type argument is required.\n fun bar() = mutableListOf<String>()' After the quick-fix is applied: 'fun foo(): MutableList<String> = mutableListOf() <== Updated\n\n fun bar() = mutableListOf<String>()'",
"markdown": "Reports function calls with type arguments that can be automatically inferred. Such type arguments are redundant and can be safely omitted.\n\nUse the 'Remove explicit type arguments' quick-fix to clean up the code.\n\n**Examples:**\n\n\n // 'String' type can be inferred here\n fun foo(): MutableList<String> = mutableListOf<String>()\n\n // Here 'String' cannot be inferred, type argument is required.\n fun bar() = mutableListOf<String>()\n\nAfter the quick-fix is applied:\n\n\n fun foo(): MutableList<String> = mutableListOf() <== Updated\n\n fun bar() = mutableListOf<String>()\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RemoveExplicitTypeArguments",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EnumEntryName",
"shortDescription": {
"text": "Enum entry naming convention"
},
"fullDescription": {
"text": "Reports enum entry names that do not follow the recommended naming conventions. Example: 'enum class Foo {\n _Foo,\n foo\n }' To fix the problem rename enum entries to match the recommended naming conventions.",
"markdown": "Reports enum entry names that do not follow the recommended naming conventions.\n\n**Example:**\n\n\n enum class Foo {\n _Foo,\n foo\n }\n\nTo fix the problem rename enum entries to match the recommended naming conventions."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "EnumEntryName",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Naming conventions",
"index": 71,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceSubstringWithDropLast",
"shortDescription": {
"text": "'substring' call should be replaced with 'dropLast' call"
},
"fullDescription": {
"text": "Reports calls like 's.substring(0, s.length - x)' that can be replaced with 's.dropLast(x)'. Using corresponding functions makes your code simpler. The quick-fix replaces the 'substring' call with 'dropLast'. Example: 'fun foo(s: String) {\n s.substring(0, s.length - 5)\n }' After the quick-fix is applied: 'fun foo(s: String) {\n s.dropLast(5)\n }'",
"markdown": "Reports calls like `s.substring(0, s.length - x)` that can be replaced with `s.dropLast(x)`.\n\nUsing corresponding functions makes your code simpler.\n\nThe quick-fix replaces the `substring` call with `dropLast`.\n\n**Example:**\n\n\n fun foo(s: String) {\n s.substring(0, s.length - 5)\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo(s: String) {\n s.dropLast(5)\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceSubstringWithDropLast",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SetterBackingFieldAssignment",
"shortDescription": {
"text": "Existing backing field without assignment"
},
"fullDescription": {
"text": "Reports property setters that don't update the backing field. The quick-fix adds an assignment to the backing field. Example: 'class Test {\n var foo: Int = 1\n set(value) {\n }\n }' After the quick-fix is applied: 'class Test {\n var foo: Int = 1\n set(value) {\n field = value\n }\n }'",
"markdown": "Reports property setters that don't update the backing field.\n\nThe quick-fix adds an assignment to the backing field.\n\n**Example:**\n\n\n class Test {\n var foo: Int = 1\n set(value) {\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class Test {\n var foo: Int = 1\n set(value) {\n field = value\n }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SetterBackingFieldAssignment",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantConstructorKeyword",
"shortDescription": {
"text": "Redundant 'constructor' keyword"
},
"fullDescription": {
"text": "Reports redundant constructor keywords on primary constructors. Example: 'class Foo constructor(x: Int, y: Int)' After the quick-fix is applied: 'class Foo(x: Int, y: Int)'",
"markdown": "Reports redundant constructor keywords on primary constructors.\n\n**Example:**\n\n\n class Foo constructor(x: Int, y: Int)\n\nAfter the quick-fix is applied:\n\n\n class Foo(x: Int, y: Int)\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RedundantConstructorKeyword",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KotlinDeprecation",
"shortDescription": {
"text": "Usage of redundant or deprecated syntax or deprecated symbols"
},
"fullDescription": {
"text": "Reports obsolete language features and unnecessarily verbose code constructs during the code cleanup operation (Code | Code Cleanup). The quick-fix automatically replaces usages of obsolete language features or unnecessarily verbose code constructs with compact and up-to-date syntax. It also replaces deprecated symbols with their proposed substitutions.",
"markdown": "Reports obsolete language features and unnecessarily verbose code constructs during the code cleanup operation (**Code \\| Code Cleanup** ).\n\n\nThe quick-fix automatically replaces usages of obsolete language features or unnecessarily verbose code constructs with compact and up-to-date syntax.\n\n\nIt also replaces deprecated symbols with their proposed substitutions."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "KotlinDeprecation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Migration",
"index": 86,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceSubstringWithTake",
"shortDescription": {
"text": "'substring' call should be replaced with 'take' call"
},
"fullDescription": {
"text": "Reports calls like 's.substring(0, x)' that can be replaced with 's.take(x)'. Using 'take()' makes your code simpler. The quick-fix replaces the 'substring' call with 'take()'. Example: 'fun foo(s: String) {\n s.substring(0, 10)\n }' After the quick-fix is applied: 'fun foo(s: String) {\n s.take(10)\n }'",
"markdown": "Reports calls like `s.substring(0, x)` that can be replaced with `s.take(x)`.\n\nUsing `take()` makes your code simpler.\n\nThe quick-fix replaces the `substring` call with `take()`.\n\n**Example:**\n\n\n fun foo(s: String) {\n s.substring(0, 10)\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo(s: String) {\n s.take(10)\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceSubstringWithTake",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AddOperatorModifier",
"shortDescription": {
"text": "Function should have 'operator' modifier"
},
"fullDescription": {
"text": "Reports a function that matches one of the operator conventions but lacks the 'operator' keyword. By adding the 'operator' modifier, you might allow function consumers to write idiomatic Kotlin code. Example: 'class Complex(val real: Double, val imaginary: Double) {\n fun plus(other: Complex) =\n Complex(real + other.real, imaginary + other.imaginary)\n }\n\n fun usage(a: Complex, b: Complex) {\n a.plus(b)\n }' The quick-fix adds the 'operator' modifier keyword: 'class Complex(val real: Double, val imaginary: Double) {\n operator fun plus(other: Complex) =\n Complex(real + other.real, imaginary + other.imaginary)\n }\n\n fun usage(a: Complex, b: Complex) {\n a + b\n }'",
"markdown": "Reports a function that matches one of the operator conventions but lacks the `operator` keyword.\n\nBy adding the `operator` modifier, you might allow function consumers to write idiomatic Kotlin code.\n\n**Example:**\n\n\n class Complex(val real: Double, val imaginary: Double) {\n fun plus(other: Complex) =\n Complex(real + other.real, imaginary + other.imaginary)\n }\n\n fun usage(a: Complex, b: Complex) {\n a.plus(b)\n }\n\nThe quick-fix adds the `operator` modifier keyword:\n\n\n class Complex(val real: Double, val imaginary: Double) {\n operator fun plus(other: Complex) =\n Complex(real + other.real, imaginary + other.imaginary)\n }\n\n fun usage(a: Complex, b: Complex) {\n a + b\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "AddOperatorModifier",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MayBeConstant",
"shortDescription": {
"text": "Might be 'const'"
},
"fullDescription": {
"text": "Reports top-level 'val' properties in objects that might be declared as 'const' for better performance and Java interoperability. Example: 'object A {\n val foo = 1\n }' After the quick-fix is applied: 'object A {\n const val foo = 1\n }'",
"markdown": "Reports top-level `val` properties in objects that might be declared as `const` for better performance and Java interoperability.\n\n**Example:**\n\n\n object A {\n val foo = 1\n }\n\nAfter the quick-fix is applied:\n\n\n object A {\n const val foo = 1\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "MayBeConstant",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceIsEmptyWithIfEmpty",
"shortDescription": {
"text": "'if' condition can be replaced with lambda call"
},
"fullDescription": {
"text": "Reports 'isEmpty', 'isBlank', 'isNotEmpty', or 'isNotBlank' calls in an 'if' statement to assign a default value. The quick-fix replaces the 'if' condition with 'ifEmpty' or 'ifBlank' calls. Example: 'fun test(list: List<Int>): List<Int> {\n return if (list.isEmpty()) {\n println()\n foo()\n } else {\n list\n }\n }' After the quick-fix is applied: 'fun test(list: List<Int>): List<Int> {\n return list.ifEmpty {\n println()\n foo()\n }\n }' This inspection only reports if the Kotlin language version of the project or module is 1.3 or higher.",
"markdown": "Reports `isEmpty`, `isBlank`, `isNotEmpty`, or `isNotBlank` calls in an `if` statement to assign a default value.\n\nThe quick-fix replaces the `if` condition with `ifEmpty` or `ifBlank` calls.\n\n**Example:**\n\n\n fun test(list: List<Int>): List<Int> {\n return if (list.isEmpty()) {\n println()\n foo()\n } else {\n list\n }\n }\n\nAfter the quick-fix is applied:\n\n\n fun test(list: List<Int>): List<Int> {\n return list.ifEmpty {\n println()\n foo()\n }\n }\n\nThis inspection only reports if the Kotlin language version of the project or module is 1.3 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceIsEmptyWithIfEmpty",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SimplifyBooleanWithConstants",
"shortDescription": {
"text": "Boolean expression can be simplified"
},
"fullDescription": {
"text": "Reports boolean expression parts that can be reduced to constants. The quick-fix simplifies the condition. Example: 'fun use(arg: Boolean) {\n if (false == arg) {\n\n }\n }' After the quick-fix is applied: 'fun use(arg: Boolean) {\n if (!arg) {\n\n }\n }'",
"markdown": "Reports boolean expression parts that can be reduced to constants.\n\nThe quick-fix simplifies the condition.\n\n**Example:**\n\n\n fun use(arg: Boolean) {\n if (false == arg) {\n\n }\n }\n\nAfter the quick-fix is applied:\n\n\n fun use(arg: Boolean) {\n if (!arg) {\n\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "SimplifyBooleanWithConstants",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OverrideDeprecatedMigration",
"shortDescription": {
"text": "Do not propagate method deprecation through overrides since 1.9"
},
"fullDescription": {
"text": "Reports a declarations that are propagated by '@Deprecated' annotation that will lead to compilation error since 1.9. Motivation types: Implementation changes are required for implementation design/architectural reasons Inconsistency in the design (things are done differently in different contexts) More details: KT-47902: Do not propagate method deprecation through overrides The quick-fix copies '@Deprecated' annotation from the parent declaration. Example: 'open class Base {\n @Deprecated(\"Don't use\")\n open fun foo() {}\n }\n\n class Derived : Base() {\n override fun foo() {}\n }' After the quick-fix is applied: 'open class Base {\n @Deprecated(\"Don't use\")\n open fun foo() {}\n }\n\n class Derived : Base() {\n @Deprecated(\"Don't use\")\n override fun foo() {}\n }' This inspection only reports if the Kotlin language level of the project or module is 1.6 or higher.",
"markdown": "Reports a declarations that are propagated by `@Deprecated` annotation that will lead to compilation error since 1.9.\n\nMotivation types:\n\n* Implementation changes are required for implementation design/architectural reasons\n* Inconsistency in the design (things are done differently in different contexts)\n\n**More details:** [KT-47902: Do not propagate method deprecation through overrides](https://youtrack.jetbrains.com/issue/KT-47902)\n\nThe quick-fix copies `@Deprecated` annotation from the parent declaration.\n\n**Example:**\n\n\n open class Base {\n @Deprecated(\"Don't use\")\n open fun foo() {}\n }\n\n class Derived : Base() {\n override fun foo() {}\n }\n\nAfter the quick-fix is applied:\n\n\n open class Base {\n @Deprecated(\"Don't use\")\n open fun foo() {}\n }\n\n class Derived : Base() {\n @Deprecated(\"Don't use\")\n override fun foo() {}\n }\n\nThis inspection only reports if the Kotlin language level of the project or module is 1.6 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "OverrideDeprecatedMigration",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Migration",
"index": 86,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantModalityModifier",
"shortDescription": {
"text": "Redundant modality modifier"
},
"fullDescription": {
"text": "Reports the modality modifiers that match the default modality of an element ('final' for most elements, 'open' for members with an 'override'). Example: 'final class Foo\n\n open class Bar : Comparable<Bar> {\n open override fun compareTo(other: Bar): Int = 0\n }' After the quick-fix is applied: 'class Foo\n\n open class Bar : Comparable<Bar> {\n override fun compareTo(other: Bar): Int = 0\n }'",
"markdown": "Reports the modality modifiers that match the default modality of an element (`final` for most elements, `open` for members with an `override`).\n\n**Example:**\n\n\n final class Foo\n\n open class Bar : Comparable<Bar> {\n open override fun compareTo(other: Bar): Int = 0\n }\n\nAfter the quick-fix is applied:\n\n\n class Foo\n\n open class Bar : Comparable<Bar> {\n override fun compareTo(other: Bar): Int = 0\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantModalityModifier",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SimplifyAssertNotNull",
"shortDescription": {
"text": "'assert' call can be replaced with '!!' or '?:'"
},
"fullDescription": {
"text": "Reports 'assert' calls that check a not null value of the declared variable. Using '!!' or '?:' makes your code simpler. The quick-fix replaces 'assert' with '!!' or '?:' operator in the variable initializer. Example: 'fun foo(p: Array<String?>) {\n val v = p[0]\n assert(v != null, { \"Should be not null\" })\n }' After the quick-fix is applied: 'fun foo(p: Array<String?>) {\n val v = p[0] ?: error(\"Should be not null\")\n }'",
"markdown": "Reports `assert` calls that check a not null value of the declared variable.\n\nUsing `!!` or `?:` makes your code simpler.\n\nThe quick-fix replaces `assert` with `!!` or `?:` operator in the variable initializer.\n\n**Example:**\n\n\n fun foo(p: Array<String?>) {\n val v = p[0]\n assert(v != null, { \"Should be not null\" })\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo(p: Array<String?>) {\n val v = p[0] ?: error(\"Should be not null\")\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "SimplifyAssertNotNull",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantAsSequence",
"shortDescription": {
"text": "Redundant 'asSequence' call"
},
"fullDescription": {
"text": "Reports redundant 'asSequence()' call that can never have a positive performance effect. 'asSequence()' speeds up collection processing that includes multiple operations because it performs operations lazily and doesn't create intermediate collections. However, if a terminal operation (such as 'toList()') is used right after 'asSequence()', this doesn't give you any positive performance effect. Example: 'fun test(list: List<String>) {\n list.asSequence().last()\n }' After the quick-fix is applied: 'fun test(list: List<String>) {\n list.last()\n }'",
"markdown": "Reports redundant `asSequence()` call that can never have a positive performance effect.\n\n\n`asSequence()` speeds up collection processing that includes multiple operations because it performs operations lazily\nand doesn't create intermediate collections.\n\n\nHowever, if a terminal operation (such as `toList()`) is used right after `asSequence()`, this doesn't give\nyou any positive performance effect.\n\n**Example:**\n\n\n fun test(list: List<String>) {\n list.asSequence().last()\n }\n\nAfter the quick-fix is applied:\n\n\n fun test(list: List<String>) {\n list.last()\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RedundantAsSequence",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KotlinUnusedImport",
"shortDescription": {
"text": "Unused import directive"
},
"fullDescription": {
"text": "Reports redundant 'import' statements. Default and unused imports can be safely removed. Example: 'import kotlin.*\n import kotlin.collections.*\n import kotlin.comparisons.*\n import kotlin.io.*\n import kotlin.ranges.*\n import kotlin.sequences.*\n import kotlin.text.*\n\n // jvm specific\n import java.lang.*\n import kotlin.jvm.*\n\n // js specific\n import kotlin.js.*\n\n import java.io.* // this import is unused and could be removed\n import java.util.*\n\n fun foo(list: ArrayList<String>) {\n list.add(\"\")\n }'",
"markdown": "Reports redundant `import` statements.\n\nDefault and unused imports can be safely removed.\n\n**Example:**\n\n\n import kotlin.*\n import kotlin.collections.*\n import kotlin.comparisons.*\n import kotlin.io.*\n import kotlin.ranges.*\n import kotlin.sequences.*\n import kotlin.text.*\n\n // jvm specific\n import java.lang.*\n import kotlin.jvm.*\n\n // js specific\n import kotlin.js.*\n\n import java.io.* // this import is unused and could be removed\n import java.util.*\n\n fun foo(list: ArrayList<String>) {\n list.add(\"\")\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnusedImport",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantObjectTypeCheck",
"shortDescription": {
"text": "Non-idiomatic 'is' type check for an object"
},
"fullDescription": {
"text": "Reports non-idiomatic 'is' type checks for an object. It's recommended to replace such checks with reference comparison. Example: 'object Foo\n\n fun foo(arg: Any) = when {\n arg is Foo -> ...\n arg !is Foo -> ...\n }' After the quick-fix is applied: 'object Foo\n\n fun foo(arg: Any) = when {\n arg === Foo -> ...\n arg !== Foo -> ...\n }'",
"markdown": "Reports non-idiomatic `is` type checks for an object.\n\nIt's recommended to replace such checks with reference comparison.\n\n**Example:**\n\n\n object Foo\n\n fun foo(arg: Any) = when {\n arg is Foo -> ...\n arg !is Foo -> ...\n }\n\nAfter the quick-fix is applied:\n\n\n object Foo\n\n fun foo(arg: Any) = when {\n arg === Foo -> ...\n arg !== Foo -> ...\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RedundantObjectTypeCheck",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SuspendFunctionOnCoroutineScope",
"shortDescription": {
"text": "Ambiguous coroutineContext due to CoroutineScope receiver of suspend function"
},
"fullDescription": {
"text": "Reports calls and accesses of 'CoroutineScope' extensions or members inside suspend functions with 'CoroutineScope' receiver. When a function is 'suspend' and has 'CoroutineScope' receiver, it has ambiguous access to 'CoroutineContext' via 'kotlin.coroutines.coroutineContext' and via 'CoroutineScope.coroutineContext', and two these contexts are different in general. To improve this situation, one can wrap suspicious call inside 'coroutineScope { ... }' or get rid of 'CoroutineScope' function receiver.",
"markdown": "Reports calls and accesses of `CoroutineScope` extensions or members inside suspend functions with `CoroutineScope` receiver.\n\nWhen a function is `suspend` and has `CoroutineScope` receiver,\nit has ambiguous access to `CoroutineContext` via `kotlin.coroutines.coroutineContext` and via `CoroutineScope.coroutineContext`,\nand two these contexts are different in general.\n\n\nTo improve this situation, one can wrap suspicious call inside `coroutineScope { ... }` or\nget rid of `CoroutineScope` function receiver."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SuspendFunctionOnCoroutineScope",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DifferentMavenStdlibVersion",
"shortDescription": {
"text": "Library and maven plugin versions are different"
},
"fullDescription": {
"text": "Reports different Kotlin stdlib and compiler versions. Using different versions of the Kotlin compiler and the standard library can lead to unpredictable runtime problems and should be avoided.",
"markdown": "Reports different Kotlin stdlib and compiler versions.\n\nUsing different versions of the Kotlin compiler and the standard library can lead to unpredictable\nruntime problems and should be avoided."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "DifferentMavenStdlibVersion",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin",
"index": 11,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LiftReturnOrAssignment",
"shortDescription": {
"text": "Return or assignment can be lifted out"
},
"fullDescription": {
"text": "Reports 'if', 'when', and 'try' statements that can be converted to expressions by lifting the 'return' statement or an assignment out. Example: 'fun foo(arg: Int): String {\n when (arg) {\n 0 -> return \"Zero\"\n 1 -> return \"One\"\n else -> return \"Multiple\"\n }\n }' After the quick-fix is applied: 'fun foo(arg: Int): String {\n return when (arg) {\n 0 -> \"Zero\"\n 1 -> \"One\"\n else -> \"Multiple\"\n }\n }'",
"markdown": "Reports `if`, `when`, and `try` statements that can be converted to expressions by lifting the `return` statement or an assignment out.\n\n**Example:**\n\n\n fun foo(arg: Int): String {\n when (arg) {\n 0 -> return \"Zero\"\n 1 -> return \"One\"\n else -> return \"Multiple\"\n }\n }\n\nAfter the quick-fix is applied:\n\n\n fun foo(arg: Int): String {\n return when (arg) {\n 0 -> \"Zero\"\n 1 -> \"One\"\n else -> \"Multiple\"\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LiftReturnOrAssignment",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ForEachParameterNotUsed",
"shortDescription": {
"text": "Iterated elements are not used in forEach"
},
"fullDescription": {
"text": "Reports 'forEach' loops that do not use iterable values. Example: 'listOf(1, 2, 3).forEach { }' The quick fix introduces anonymous parameter in the 'forEach' section: 'listOf(1, 2, 3).forEach { _ -> }'",
"markdown": "Reports `forEach` loops that do not use iterable values.\n\n**Example:**\n\n\n listOf(1, 2, 3).forEach { }\n\nThe quick fix introduces anonymous parameter in the `forEach` section:\n\n\n listOf(1, 2, 3).forEach { _ -> }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "ForEachParameterNotUsed",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LeakingThis",
"shortDescription": {
"text": "Leaking 'this' in constructor"
},
"fullDescription": {
"text": "Reports unsafe operations with 'this' during object construction including: Accessing a non-final property during class initialization: from a constructor or property initialization Calling a non-final function during class initialization Using 'this' as a function argument in a constructor of a non-final class If other classes inherit from the given class, they may not be fully initialized at the moment when an unsafe operation is carried out. Example: 'abstract class Base {\n val code = calculate()\n abstract fun calculate(): Int\n }\n\n class Derived(private val x: Int) : Base() {\n override fun calculate() = x\n }\n\n fun testIt() {\n println(Derived(42).code) // Expected: 42, actual: 0\n }'",
"markdown": "Reports unsafe operations with `this` during object construction including:\n\n* Accessing a non-final property during class initialization: from a constructor or property initialization\n* Calling a non-final function during class initialization\n* Using `this` as a function argument in a constructor of a non-final class\n\n\nIf other classes inherit from the given class,\nthey may not be fully initialized at the moment when an unsafe operation is carried out.\n\n**Example:**\n\n\n abstract class Base {\n val code = calculate()\n abstract fun calculate(): Int\n }\n\n class Derived(private val x: Int) : Base() {\n override fun calculate() = x\n }\n\n fun testIt() {\n println(Derived(42).code) // Expected: 42, actual: 0\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "LeakingThis",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AddVarianceModifier",
"shortDescription": {
"text": "Type parameter can have 'in' or 'out' variance"
},
"fullDescription": {
"text": "Reports type parameters that can have 'in' or 'out' variance. Using 'in' and 'out' variance provides more precise type inference in Kotlin and clearer code semantics. Example: 'class Box<T>(val obj: T)\n\n fun consumeString(box: Box<String>) {}\n fun consumeCharSequence(box: Box<CharSequence>) {}\n\n fun usage(box: Box<String>) {\n consumeString(box)\n consumeCharSequence(box) // Compilation error\n }' The quick-fix adds the matching variance modifier: 'class Box<out T>(val obj: T)\n\n fun consumeString(box: Box<String>) {}\n fun consumeCharSequence(box: Box<CharSequence>) {}\n\n fun usage(box: Box<String>) ++{\n consumeString(box)\n consumeCharSequence(box) // OK\n }'",
"markdown": "Reports type parameters that can have `in` or `out` variance.\n\nUsing `in` and `out` variance provides more precise type inference in Kotlin and clearer code semantics.\n\n**Example:**\n\n\n class Box<T>(val obj: T)\n\n fun consumeString(box: Box<String>) {}\n fun consumeCharSequence(box: Box<CharSequence>) {}\n\n fun usage(box: Box<String>) {\n consumeString(box)\n consumeCharSequence(box) // Compilation error\n }\n\nThe quick-fix adds the matching variance modifier:\n\n\n class Box<out T>(val obj: T)\n\n fun consumeString(box: Box<String>) {}\n fun consumeCharSequence(box: Box<CharSequence>) {}\n\n fun usage(box: Box<String>) ++{\n consumeString(box)\n consumeCharSequence(box) // OK\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "AddVarianceModifier",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantSuspendModifier",
"shortDescription": {
"text": "Redundant 'suspend' modifier"
},
"fullDescription": {
"text": "Reports 'suspend' modifier as redundant if no other suspending functions are called inside.",
"markdown": "Reports `suspend` modifier as redundant if no other suspending functions are called inside."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantSuspendModifier",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SuspiciousAsDynamic",
"shortDescription": {
"text": "Suspicious 'asDynamic' member invocation"
},
"fullDescription": {
"text": "Reports usages of 'asDynamic' function on a receiver of dynamic type. 'asDynamic' function has no effect for expressions of dynamic type. 'asDynamic' function on a receiver of dynamic type can lead to runtime problems because 'asDynamic' will be executed in JavaScript environment, and such function may not be present at runtime. The intended way is to use this function on usual Kotlin type. Remove \"asDynamic\" invocation quick-fix can be used to amend the code automatically. Example: 'fun wrongUsage(d: Dynamic) {\n d.asDynamic().foo() // <== redundant, quick-fix simplifies the call expression to \"d.foo()\"\n }'",
"markdown": "Reports usages of `asDynamic` function on a receiver of dynamic type.\n\n`asDynamic` function has no effect for expressions of dynamic type.\n\n`asDynamic` function on a receiver of dynamic type can lead to runtime problems because `asDynamic`\nwill be executed in JavaScript environment, and such function may not be present at runtime.\nThe intended way is to use this function on usual Kotlin type.\n\n**Remove \"asDynamic\" invocation** quick-fix can be used to amend the code automatically.\n\nExample:\n\n\n fun wrongUsage(d: Dynamic) {\n d.asDynamic().foo() // <== redundant, quick-fix simplifies the call expression to \"d.foo()\"\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "SuspiciousAsDynamic",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceReadLineWithReadln",
"shortDescription": {
"text": "'readLine' can be replaced with 'readln' or 'readlnOrNull'"
},
"fullDescription": {
"text": "Reports calls to 'readLine()' that can be replaced with 'readln()' or 'readlnOrNull()'. Using corresponding functions makes your code simpler. The quick-fix replaces 'readLine()!!' with 'readln()' and 'readLine()' with 'readlnOrNull()'. Examples: 'val x = readLine()!!\n val y = readLine()?.length' After the quick-fix is applied: 'val x = readln()\n val y = readlnOrNull()?.length'",
"markdown": "Reports calls to `readLine()` that can be replaced with `readln()` or `readlnOrNull()`.\n\n\nUsing corresponding functions makes your code simpler.\n\n\nThe quick-fix replaces `readLine()!!` with `readln()` and `readLine()` with `readlnOrNull()`.\n\n**Examples:**\n\n\n val x = readLine()!!\n val y = readLine()?.length\n\nAfter the quick-fix is applied:\n\n\n val x = readln()\n val y = readlnOrNull()?.length\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceReadLineWithReadln",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DeclaringClassMigration",
"shortDescription": {
"text": "Deprecated 'Enum.declaringClass' property"
},
"fullDescription": {
"text": "Reports 'declaringClass' property calls on Enum that will lead to compilation error since 1.9. 'Enum.getDeclaringClass' is among \"hidden\" Java functions which aren't normally visible by resolve. However, it's visible via synthetic property that is a front-end bug. More details: KT-49653 Deprecate and remove Enum.declaringClass synthetic property The quick-fix replaces a call with 'declaringJavaClass'. Example: 'fun <E: Enum<E>> foo(values: Array<E>) {\n EnumSet.noneOf(values.first().declaringClass)\n }' After the quick-fix is applied: 'fun <E: Enum<E>> foo(values: Array<E>) {\n EnumSet.noneOf(values.first().declaringJavaClass)\n }' This inspection only reports if the Kotlin language level of the project or module is 1.7 or higher.",
"markdown": "Reports 'declaringClass' property calls on Enum that will lead to compilation error since 1.9.\n\n'Enum.getDeclaringClass' is among \"hidden\" Java functions which aren't normally visible by resolve. However, it's visible via synthetic\nproperty that is a front-end bug.\n\n**More details:** [KT-49653 Deprecate and remove Enum.declaringClass synthetic\nproperty](https://youtrack.jetbrains.com/issue/KT-49653)\n\nThe quick-fix replaces a call with 'declaringJavaClass'.\n\n**Example:**\n\n\n fun <E: Enum<E>> foo(values: Array<E>) {\n EnumSet.noneOf(values.first().declaringClass)\n }\n\nAfter the quick-fix is applied:\n\n\n fun <E: Enum<E>> foo(values: Array<E>) {\n EnumSet.noneOf(values.first().declaringJavaClass)\n }\n\nThis inspection only reports if the Kotlin language level of the project or module is 1.7 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DeclaringClassMigration",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Migration",
"index": 86,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceMapIndexedWithListGenerator",
"shortDescription": {
"text": "Replace 'mapIndexed' with List generator"
},
"fullDescription": {
"text": "Reports a 'mapIndexed' call that can be replaced by 'List' generator. Example: 'val a = listOf(1, 2, 3).mapIndexed { i, _ ->\n i + 42\n }' After the quick-fix is applied: 'val a = List(listOf(1, 2, 3).size) { i ->\n i + 42\n }'",
"markdown": "Reports a `mapIndexed` call that can be replaced by `List` generator.\n\n**Example:**\n\n\n val a = listOf(1, 2, 3).mapIndexed { i, _ ->\n i + 42\n }\n\nAfter the quick-fix is applied:\n\n\n val a = List(listOf(1, 2, 3).size) { i ->\n i + 42\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceMapIndexedWithListGenerator",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ControlFlowWithEmptyBody",
"shortDescription": {
"text": "Control flow with empty body"
},
"fullDescription": {
"text": "Reports 'if', 'while', 'do' or 'for' statements with empty bodies. While occasionally intended, this construction is confusing and often the result of a typo. The quick-fix removes a statement. Example: 'if (a > b) {}'",
"markdown": "Reports `if`, `while`, `do` or `for` statements with empty bodies.\n\nWhile occasionally intended, this construction is confusing and often the result of a typo.\n\nThe quick-fix removes a statement.\n\n**Example:**\n\n\n if (a > b) {}\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ControlFlowWithEmptyBody",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RemoveEmptyClassBody",
"shortDescription": {
"text": "Replace empty class body"
},
"fullDescription": {
"text": "Reports declarations of classes and objects with an empty body. Use the 'Remove redundant empty class body' quick-fix to clean up the code. Examples: 'class EmptyA() {} // <== empty body\n\n class EmptyB {\n companion object {} // <== empty body\n }\n\n fun emptyC() {\n object {} // <== anonymous object, it's ok (not reported)\n }' After the quick fix is applied: 'class EmptyA()\n\n class EmptyB {\n companion object\n }\n\n fun emptyC() {\n object {}\n }'",
"markdown": "Reports declarations of classes and objects with an empty body.\n\nUse the 'Remove redundant empty class body' quick-fix to clean up the code.\n\n**Examples:**\n\n\n class EmptyA() {} // <== empty body\n\n class EmptyB {\n companion object {} // <== empty body\n }\n\n fun emptyC() {\n object {} // <== anonymous object, it's ok (not reported)\n }\n\nAfter the quick fix is applied:\n\n\n class EmptyA()\n\n class EmptyB {\n companion object\n }\n\n fun emptyC() {\n object {}\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RemoveEmptyClassBody",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ProhibitUseSiteTargetAnnotationsOnSuperTypesMigration",
"shortDescription": {
"text": "Meaningless annotations targets on superclass"
},
"fullDescription": {
"text": "Reports meaningless annotation targets on superclasses since Kotlin 1.4. Annotation targets such as '@get:' are meaningless on superclasses and are prohibited. Example: 'interface Foo\n\n annotation class Ann\n\n class E : @field:Ann @get:Ann @set:Ann @setparam:Ann Foo' After the quick-fix is applied: 'interface Foo\n\n annotation class Ann\n\n class E : Foo' This inspection only reports if the Kotlin language level of the project or module is 1.4 or higher.",
"markdown": "Reports meaningless annotation targets on superclasses since Kotlin 1.4.\n\nAnnotation targets such as `@get:` are meaningless on superclasses and are prohibited.\n\n**Example:**\n\n\n interface Foo\n\n annotation class Ann\n\n class E : @field:Ann @get:Ann @set:Ann @setparam:Ann Foo\n\nAfter the quick-fix is applied:\n\n\n interface Foo\n\n annotation class Ann\n\n class E : Foo\n\nThis inspection only reports if the Kotlin language level of the project or module is 1.4 or higher."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "ProhibitUseSiteTargetAnnotationsOnSuperTypesMigration",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Migration",
"index": 86,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SuspiciousCollectionReassignment",
"shortDescription": {
"text": "Augmented assignment creates a new collection under the hood"
},
"fullDescription": {
"text": "Reports augmented assignment ('+=') expressions on a read-only 'Collection'. Augmented assignment ('+=') expression on a read-only 'Collection' temporarily allocates a new collection, which may hurt performance. Change type to mutable quick-fix can be used to amend the code automatically. Example: 'fun test() {\n var list = listOf(0)\n list += 42 // A new list is allocated here, equivalent to list = list + 42\n }' After the quick-fix is applied: 'fun test() {\n val list = mutableListOf(0)\n list += 42\n }'",
"markdown": "Reports augmented assignment (`+=`) expressions on a read-only `Collection`.\n\nAugmented assignment (`+=`) expression on a read-only `Collection` temporarily allocates a new collection,\nwhich may hurt performance.\n\n**Change type to mutable** quick-fix can be used to amend the code automatically.\n\nExample:\n\n\n fun test() {\n var list = listOf(0)\n list += 42 // A new list is allocated here, equivalent to list = list + 42\n }\n\nAfter the quick-fix is applied:\n\n\n fun test() {\n val list = mutableListOf(0)\n list += 42\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "SuspiciousCollectionReassignment",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantNotNullExtensionReceiverOfInline",
"shortDescription": {
"text": "'inline fun' extension receiver can be explicitly nullable until Kotlin 1.2"
},
"fullDescription": {
"text": "Reports inline functions with non-nullable extension receivers which don't use the fact that extension receiver is not nullable. Before Kotlin 1.2, calls of 'inline fun' with flexible nullable extension receiver (a platform type with an unknown nullability) did not include nullability checks in bytecode. Since Kotlin 1.2, nullability checks are included into the bytecode (see KT-12899). Thus functions which do not use the fact that extension receiver is not nullable are dangerous in Kotlin until 1.2 and it's recommended to make such functions to have nullable receiver. Example: 'inline fun String.greet() {\n println(\"Hello, $this!\")\n }\n\n fun main() {\n // `System.getProperty` returns not denotable `String!` type\n val user = System.getProperty(\"user.name\")\n user.greet()\n }' After the quick-fix is applied: 'inline fun String.greet() {\n println(\"Hello, $this!\")\n }\n\n fun main() {\n // `System.getProperty` returns not denotable `String!` type\n val user = System.getProperty(\"user.name\")\n user.greet()\n }' This inspection only reports if the Kotlin language level of the project or module is lower than 1.2.",
"markdown": "Reports inline functions with non-nullable extension receivers which don't use the fact that extension receiver is not nullable.\n\n\nBefore Kotlin 1.2, calls of `inline fun` with flexible nullable extension receiver (a platform type with an unknown\nnullability) did not include nullability checks in bytecode. Since Kotlin 1.2, nullability checks are included into the bytecode\n(see [KT-12899](https://youtrack.jetbrains.com/issue/KT-12899)).\n\n\nThus functions which do not use the fact that extension receiver is not nullable are dangerous in Kotlin until 1.2 and it's\nrecommended to make such functions to have nullable receiver.\n\n**Example:**\n\n\n inline fun String.greet() {\n println(\"Hello, $this!\")\n }\n\n fun main() {\n // `System.getProperty` returns not denotable `String!` type\n val user = System.getProperty(\"user.name\")\n user.greet()\n }\n\nAfter the quick-fix is applied:\n\n\n inline fun String.greet() {\n println(\"Hello, $this!\")\n }\n\n fun main() {\n // `System.getProperty` returns not denotable `String!` type\n val user = System.getProperty(\"user.name\")\n user.greet()\n }\n\nThis inspection only reports if the Kotlin language level of the project or module is lower than 1.2."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RedundantNotNullExtensionReceiverOfInline",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Java interop issues",
"index": 186,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PrivatePropertyName",
"shortDescription": {
"text": "Private property naming convention"
},
"fullDescription": {
"text": "Reports private property names that do not follow the recommended naming conventions. Consistent naming allows for easier code reading and understanding. According to the Kotlin official style guide, private property names should start with a lowercase letter and use camel case. Optionally, underscore prefix is allowed but only for private properties. It is possible to introduce other naming rules by changing the \"Pattern\" regular expression. Example: 'val _My_Cool_Property = \"\"' The quick-fix renames the class according to the Kotlin naming conventions: 'val _myCoolProperty = \"\"'",
"markdown": "Reports private property names that do not follow the recommended naming conventions.\n\n\nConsistent naming allows for easier code reading and understanding.\nAccording to the [Kotlin official style guide](https://kotlinlang.org/docs/coding-conventions.html#naming-rules),\nprivate property names should start with a lowercase letter and use camel case.\nOptionally, underscore prefix is allowed but only for **private** properties.\n\nIt is possible to introduce other naming rules by changing the \"Pattern\" regular expression.\n\n**Example:**\n\n\n val _My_Cool_Property = \"\"\n\nThe quick-fix renames the class according to the Kotlin naming conventions:\n\n\n val _myCoolProperty = \"\"\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PrivatePropertyName",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Naming conventions",
"index": 71,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EmptyRange",
"shortDescription": {
"text": "Range with start greater than endInclusive is empty"
},
"fullDescription": {
"text": "Reports ranges that are empty because the 'start' value is greater than the 'endInclusive' value. Example: 'val range = 2..1' The quick-fix changes the '..' operator to 'downTo': 'val range = 2 downTo 1'",
"markdown": "Reports ranges that are empty because the `start` value is greater than the `endInclusive` value.\n\n**Example:**\n\n\n val range = 2..1\n\nThe quick-fix changes the `..` operator to `downTo`:\n\n\n val range = 2 downTo 1\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "EmptyRange",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonExternalClassifierExtendingStateOrProps",
"shortDescription": {
"text": "Non-external classifier extending State or Props"
},
"fullDescription": {
"text": "Reports non-external classifier extending State or Props. Read more in the migration guide.",
"markdown": "Reports non-external classifier extending State or Props. Read more in the [migration guide](https://kotlinlang.org/docs/js-ir-migration.html#convert-js-and-react-related-classes-and-interfaces-to-external-interfaces)."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "NonExternalClassifierExtendingStateOrProps",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/React/Probable bugs",
"index": 266,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IfThenToSafeAccess",
"shortDescription": {
"text": "If-Then foldable to '?.'"
},
"fullDescription": {
"text": "Reports 'if-then' expressions that can be folded into safe-access ('?.') expressions. Example: 'fun bar(x: String) = \"\"\n\n fun foo(a: String?) {\n if (a != null) bar(a) else null\n }' The quick fix converts the 'if-then' expression into a safe-access ('?.') expression: 'fun bar(x: String) = \"\"\n\n fun foo(a: String?) {\n a?.let { bar(it) }\n }'",
"markdown": "Reports `if-then` expressions that can be folded into safe-access (`?.`) expressions.\n\n**Example:**\n\n\n fun bar(x: String) = \"\"\n\n fun foo(a: String?) {\n if (a != null) bar(a) else null\n }\n\nThe quick fix converts the `if-then` expression into a safe-access (`?.`) expression:\n\n\n fun bar(x: String) = \"\"\n\n fun foo(a: String?) {\n a?.let { bar(it) }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "IfThenToSafeAccess",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceGetOrSet",
"shortDescription": {
"text": "Explicit 'get' or 'set' call"
},
"fullDescription": {
"text": "Reports explicit calls to 'get' or 'set' functions which can be replaced by an indexing operator '[]'. Kotlin allows custom implementations for the predefined set of operators on types. To overload an operator, you can mark the corresponding function with the 'operator' modifier: 'operator fun get(index: Int) {}\n operator fun set(index: Int, value: Int) {}' The functions above correspond to the indexing operator. Example: 'class Test {\n operator fun get(i: Int): Int = 0\n }\n\n fun test() {\n Test().get(0) // replaceable 'get()'\n }' After the quick-fix is applied: 'class Test {\n operator fun get(i: Int): Int = 0\n }\n\n fun test() {\n Test()[0]\n }'",
"markdown": "Reports explicit calls to `get` or `set` functions which can be replaced by an indexing operator `[]`.\n\n\nKotlin allows custom implementations for the predefined set of operators on types.\nTo overload an operator, you can mark the corresponding function with the `operator` modifier:\n\n\n operator fun get(index: Int) {}\n operator fun set(index: Int, value: Int) {}\n \nThe functions above correspond to the indexing operator.\n\n**Example:**\n\n class Test {\n operator fun get(i: Int): Int = 0\n }\n\n fun test() {\n Test().get(0) // replaceable 'get()'\n }\n\nAfter the quick-fix is applied:\n\n class Test {\n operator fun get(i: Int): Int = 0\n }\n\n fun test() {\n Test()[0]\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ReplaceGetOrSet",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Destructure",
"shortDescription": {
"text": "Use destructuring declaration"
},
"fullDescription": {
"text": "Reports declarations that can be destructured. Example: 'data class My(val first: String, val second: Int, val third: Boolean)\n\n fun foo(list: List<My>) {\n list.forEach { my ->\n println(my.second)\n println(my.third)\n }\n }' The quick-fix destructures the declaration and introduces new variables with names from the corresponding class: 'data class My(val first: String, val second: Int, val third: Boolean)\n\n fun foo(list: List<My>) {\n list.forEach { (_, second, third) ->\n println(second)\n println(third)\n }\n }'",
"markdown": "Reports declarations that can be destructured.\n\n**Example:**\n\n\n data class My(val first: String, val second: Int, val third: Boolean)\n\n fun foo(list: List<My>) {\n list.forEach { my ->\n println(my.second)\n println(my.third)\n }\n }\n\nThe quick-fix destructures the declaration and introduces new variables with names from the corresponding class:\n\n\n data class My(val first: String, val second: Int, val third: Boolean)\n\n fun foo(list: List<My>) {\n list.forEach { (_, second, third) ->\n println(second)\n println(third)\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "Destructure",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConvertTryFinallyToUseCall",
"shortDescription": {
"text": "Convert try / finally to use() call"
},
"fullDescription": {
"text": "Reports a 'try-finally' block with 'resource.close()' in 'finally' which can be converted to a 'resource.use()' call. 'use()' is easier to read and less error-prone as there is no need in explicit 'close()' call. Example: 'fun example() {\n val reader = File(\"file.txt\").bufferedReader()\n try {\n reader.lineSequence().forEach(::print)\n } finally {\n reader.close()\n }\n }' After the quick-fix applied: 'fun example() {\n File(\"file.txt\").bufferedReader().use { reader ->\n reader.lineSequence().forEach(::print)\n }\n }'",
"markdown": "Reports a `try-finally` block with `resource.close()` in `finally` which can be converted to a `resource.use()` call.\n\n`use()` is easier to read and less error-prone as there is no need in explicit `close()` call.\n\n**Example:**\n\n\n fun example() {\n val reader = File(\"file.txt\").bufferedReader()\n try {\n reader.lineSequence().forEach(::print)\n } finally {\n reader.close()\n }\n }\n\nAfter the quick-fix applied:\n\n\n fun example() {\n File(\"file.txt\").bufferedReader().use { reader ->\n reader.lineSequence().forEach(::print)\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ConvertTryFinallyToUseCall",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Style issues",
"index": 35,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KotlinRedundantOverride",
"shortDescription": {
"text": "Redundant overriding method"
},
"fullDescription": {
"text": "Reports redundant overriding declarations. An override can be omitted if it does not modify the inherited signature semantics, for example, by changing visibility. Example: 'open class Foo {\n open fun singleExpression() {\n }\n }\n\n class Bar : Foo() {\n override fun singleExpression() = super.singleExpression()\n }' After the quick-fix is applied: 'class Bar : Foo() {\n }'",
"markdown": "Reports redundant overriding declarations.\n\n\nAn override can be omitted if it does not modify the inherited signature semantics, for example, by changing visibility.\n\n**Example:**\n\n\n open class Foo {\n open fun singleExpression() {\n }\n }\n\n class Bar : Foo() {\n override fun singleExpression() = super.singleExpression()\n }\n\nAfter the quick-fix is applied:\n\n\n class Bar : Foo() {\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RedundantOverride",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantNullableReturnType",
"shortDescription": {
"text": "Redundant nullable return type"
},
"fullDescription": {
"text": "Reports functions and variables with nullable return type which never return or become 'null'. Example: 'fun greeting(user: String): String? = \"Hello, $user!\"' After the quick-fix is applied: 'fun greeting(user: String): String = \"Hello, $user!\"'",
"markdown": "Reports functions and variables with nullable return type which never return or become `null`.\n\n**Example:**\n\n\n fun greeting(user: String): String? = \"Hello, $user!\"\n\nAfter the quick-fix is applied:\n\n\n fun greeting(user: String): String = \"Hello, $user!\"\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantNullableReturnType",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Redundant constructs",
"index": 12,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UselessCallOnNotNull",
"shortDescription": {
"text": "Useless call on not-null type"
},
"fullDescription": {
"text": "Reports calls on not-null receiver that make sense only for nullable receiver. Several functions from the standard library such as 'orEmpty()' or 'isNullOrEmpty' have sense only when they are called on receivers of nullable types. Otherwise, they can be omitted or simplified as the result will be the same. Remove redundant call and Change call to … quick-fixes can be used to amend the code automatically. Examples: 'fun test(s: String) {\n val x = s.orEmpty() // quick-fix simplifies to 's'\n val y = s.isNullOrEmpty() // quick-fix simplifies to 's.isEmpty()'\n }'",
"markdown": "Reports calls on not-null receiver that make sense only for nullable receiver.\n\nSeveral functions from the standard library such as `orEmpty()` or `isNullOrEmpty`\nhave sense only when they are called on receivers of nullable types. Otherwise, they can be omitted or simplified as the result will be the same.\n\n**Remove redundant call** and **Change call to ...** quick-fixes can be used to amend the code automatically.\n\nExamples:\n\n\n fun test(s: String) {\n val x = s.orEmpty() // quick-fix simplifies to 's'\n val y = s.isNullOrEmpty() // quick-fix simplifies to 's.isEmpty()'\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "UselessCallOnNotNull",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kotlin/Probable bugs",
"index": 20,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "org.jetbrains.android",
"version": "2022.3.1 Beta 2.232.8660.185",
"rules": [
{
"id": "AndroidLintNotifyDataSetChanged",
"shortDescription": {
"text": "Invalidating All RecyclerView Data"
},
"fullDescription": {
"text": "Invalidating All RecyclerView Data The 'RecyclerView' adapter's 'onNotifyDataSetChanged' method does not specify what about the data set has changed, forcing any observers to assume that all existing items and structure may no longer be valid. `LayoutManager`s will be forced to fully rebind and relayout all visible views. Issue id: NotifyDataSetChanged",
"markdown": "Invalidating All RecyclerView Data \n\nThe `RecyclerView` adapter's `onNotifyDataSetChanged` method does not specify what about the data set has changed, forcing any observers to assume that all existing items and structure may no longer be valid. \\`LayoutManager\\`s will be forced to fully rebind and relayout all visible views. \n\nIssue id: NotifyDataSetChanged"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintNotifyDataSetChanged",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintWrongViewCast",
"shortDescription": {
"text": "Mismatched view type"
},
"fullDescription": {
"text": "Mismatched view type Keeps track of the view types associated with ids and if it finds a usage of the id in the Java code it ensures that it is treated as the same type. Issue id: WrongViewCast",
"markdown": "Mismatched view type \n\nKeeps track of the view types associated with ids and if it finds a usage of the id in the Java code it ensures that it is treated as the same type. \n\nIssue id: WrongViewCast"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintWrongViewCast",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintDiscouragedPrivateApi",
"shortDescription": {
"text": "Using Discouraged Private API"
},
"fullDescription": {
"text": "Using Discouraged Private API Usage of restricted non-SDK interface may throw an exception at runtime. Accessing non-SDK methods or fields through reflection has a high likelihood to break your app between versions, and is being restricted to facilitate future app compatibility. Issue id: DiscouragedPrivateApi https://developer.android.com/preview/restrictions-non-sdk-interfaces",
"markdown": "Using Discouraged Private API \n\nUsage of restricted non-SDK interface may throw an exception at runtime. Accessing non-SDK methods or fields through reflection has a high likelihood to break your app between versions, and is being restricted to facilitate future app compatibility. \n\nIssue id: DiscouragedPrivateApi \n\n<https://developer.android.com/preview/restrictions-non-sdk-interfaces>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintDiscouragedPrivateApi",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintKotlincFE10",
"shortDescription": {
"text": "Avoid using kotlinc old frontend"
},
"fullDescription": {
"text": "Avoid using old K1 Kotlin compiler APIs K2, the new version of Kotlin compiler, which encompasses the new frontend, is coming. Try to avoid using internal APIs from the old frontend if possible. Issue id: KotlincFE10",
"markdown": "Avoid using old K1 Kotlin compiler APIs \n\nK2, the new version of Kotlin compiler, which encompasses the new frontend, is coming. Try to avoid using internal APIs from the old frontend if possible. \n\nIssue id: KotlincFE10"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintKotlincFE10",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Interoperability",
"index": 53,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintPermissionNamingConvention",
"shortDescription": {
"text": "Permission name does not follow recommended convention"
},
"fullDescription": {
"text": "Permission name does not follow recommended convention Permissions should be prefixed with an app's package name, using reverse-domain-style naming. This prefix should be followed by '.permission.', and then a description of the capability that the permission represents, in upper SNAKE_CASE. For example, 'com.example.myapp.permission.ENGAGE_HYPERSPACE'. Following this recommendation avoids naming collisions, and helps clearly identify the owner and intention of a custom permission. Issue id: PermissionNamingConvention",
"markdown": "Permission name does not follow recommended convention \n\nPermissions should be prefixed with an app's package name, using reverse-domain-style naming. This prefix should be followed by `.permission.`, and then a description of the capability that the permission represents, in upper SNAKE_CASE. For example, `com.example.myapp.permission.ENGAGE_HYPERSPACE`. \n\nFollowing this recommendation avoids naming collisions, and helps clearly identify the owner and intention of a custom permission. \n\nIssue id: PermissionNamingConvention"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintPermissionNamingConvention",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintNotificationIconCompatibility",
"shortDescription": {
"text": "Notification Icon Compatibility"
},
"fullDescription": {
"text": "Notification Icon Compatibility Notification icons should define a raster image to support Android versions below 5.0 (API 21). Note that the way Lint decides whether an icon is a notification icon is based on the filename prefix 'ic_stat_'. This corresponds to the naming convention documented in https://material.io/design/iconography/ Issue id: NotificationIconCompatibility",
"markdown": "Notification Icon Compatibility \n\nNotification icons should define a raster image to support Android versions below 5.0 (API 21). Note that the way Lint decides whether an icon is a notification icon is based on the filename prefix `ic_stat_`. This corresponds to the naming convention documented in <https://material.io/design/iconography/> \n\nIssue id: NotificationIconCompatibility"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintNotificationIconCompatibility",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintGradleOverrides",
"shortDescription": {
"text": "Value overridden by Gradle build script"
},
"fullDescription": {
"text": "Value overridden by Gradle build script The value of (for example) 'minSdkVersion' is only used if it is not specified in the 'build.gradle' build scripts. When specified in the Gradle build scripts, the manifest value is ignored and can be misleading, so should be removed to avoid ambiguity. Issue id: GradleOverrides",
"markdown": "Value overridden by Gradle build script \n\nThe value of (for example) `minSdkVersion` is only used if it is not specified in the `build.gradle` build scripts. When specified in the Gradle build scripts, the manifest value is ignored and can be misleading, so should be removed to avoid ambiguity. \n\nIssue id: GradleOverrides"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintGradleOverrides",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintSmallSp",
"shortDescription": {
"text": "Text size is too small"
},
"fullDescription": {
"text": "Text size is too small Avoid using sizes smaller than 11sp. Issue id: SmallSp",
"markdown": "Text size is too small \n\nAvoid using sizes smaller than 11sp. \n\nIssue id: SmallSp"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintSmallSp",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintCustomViewStyleable",
"shortDescription": {
"text": "Mismatched Styleable/Custom View Name"
},
"fullDescription": {
"text": "Mismatched Styleable/Custom View Name The convention for custom views is to use a 'declare-styleable' whose name matches the custom view class name. The IDE relies on this convention such that for example code completion can be offered for attributes in a custom view in layout XML resource files. (Similarly, layout parameter classes should use the suffix '_Layout'.) Issue id: CustomViewStyleable",
"markdown": "Mismatched Styleable/Custom View Name \n\nThe convention for custom views is to use a `declare-styleable` whose name matches the custom view class name. The IDE relies on this convention such that for example code completion can be offered for attributes in a custom view in layout XML resource files. \n\n(Similarly, layout parameter classes should use the suffix `_Layout`.) \n\nIssue id: CustomViewStyleable"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintCustomViewStyleable",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUnusedIds",
"shortDescription": {
"text": "Unused id"
},
"fullDescription": {
"text": "Unused id This resource id definition appears not to be needed since it is not referenced from anywhere. Having id definitions, even if unused, is not necessarily a bad idea since they make working on layouts and menus easier, so there is not a strong reason to delete these. The unused resource check can ignore tests. If you want to include resources that are only referenced from tests, consider packaging them in a test source set instead. You can include test sources in the unused resource check by setting the system property lint.unused-resources.include-tests =true, and to exclude them (usually for performance reasons), use lint.unused-resources.exclude-tests =true. Issue id: UnusedIds",
"markdown": "Unused id \n\nThis resource id definition appears not to be needed since it is not referenced from anywhere. Having id definitions, even if unused, is not necessarily a bad idea since they make working on layouts and menus easier, so there is not a strong reason to delete these. \n\n<br />\n\nThe unused resource check can ignore tests. If you want to include resources that are only referenced from tests, consider packaging them in a test source set instead. \n\nYou can include test sources in the unused resource check by setting the system property lint.unused-resources.include-tests =true, and to exclude them (usually for performance reasons), use lint.unused-resources.exclude-tests =true. \n\n<br />\n\nIssue id: UnusedIds"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintUnusedIds",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintPackagedPrivateKey",
"shortDescription": {
"text": "Packaged private key"
},
"fullDescription": {
"text": "Packaged private key In general, you should not package private key files inside your app. Issue id: PackagedPrivateKey https://goo.gle/PackagedPrivateKey",
"markdown": "Packaged private key \n\nIn general, you should not package private key files inside your app. \n\nIssue id: PackagedPrivateKey \n\n<https://goo.gle/PackagedPrivateKey>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintPackagedPrivateKey",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintScheduleExactAlarm",
"shortDescription": {
"text": "Scheduling Exact Alarms Without Required Permission"
},
"fullDescription": {
"text": "Scheduling Exact Alarms Without Required Permission Applications looking to schedule exact alarms should ensure that the 'SCHEDULE_EXACT_ALARM' permission is granted by calling the 'AlarmManager#canScheduleExactAlarms' API before attempting to set an exact alarm. If the permission is not granted to your application, please consider requesting it from the user by starting the 'ACTION_REQUEST_SCHEDULE_EXACT_ALARM' intent or gracefully falling back to another option. Issue id: ScheduleExactAlarm https://developer.android.com/training/scheduling/alarms#exact",
"markdown": "Scheduling Exact Alarms Without Required Permission \n\nApplications looking to schedule exact alarms should ensure that the `SCHEDULE_EXACT_ALARM` permission is granted by calling the `AlarmManager#canScheduleExactAlarms` API before attempting to set an exact alarm. If the permission is not granted to your application, please consider requesting it from the user by starting the `ACTION_REQUEST_SCHEDULE_EXACT_ALARM` intent or gracefully falling back to another option. \n\nIssue id: ScheduleExactAlarm \n\n<https://developer.android.com/training/scheduling/alarms#exact>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintScheduleExactAlarm",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintGetInstance",
"shortDescription": {
"text": "Cipher.getInstance with ECB"
},
"fullDescription": {
"text": "Cipher.getInstance with ECB 'Cipher#getInstance' should not be called with ECB as the cipher mode or without setting the cipher mode because the default mode on android is ECB, which is insecure. Issue id: GetInstance https://goo.gle/GetInstance",
"markdown": "Cipher.getInstance with ECB \n\n`Cipher#getInstance` should not be called with ECB as the cipher mode or without setting the cipher mode because the default mode on android is ECB, which is insecure. \n\nIssue id: GetInstance \n\n<https://goo.gle/GetInstance>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintGetInstance",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMissingVersion",
"shortDescription": {
"text": "Missing application name/version"
},
"fullDescription": {
"text": "Missing application name/version You should define the version information for your application. 'android:versionCode': An integer value that represents the version of the application code, relative to other versions. 'android:versionName': A string value that represents the release version of the application code, as it should be shown to users. Issue id: MissingVersion https://developer.android.com/studio/publish/versioning#appversioning",
"markdown": "Missing application name/version \n\nYou should define the version information for your application. \n\n`android:versionCode`: An integer value that represents the version of the application code, relative to other versions. \n\n`android:versionName`: A string value that represents the release version of the application code, as it should be shown to users. \n\nIssue id: MissingVersion \n\n<https://developer.android.com/studio/publish/versioning#appversioning>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintMissingVersion",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintAppLinksAutoVerify",
"shortDescription": {
"text": "App Links Auto Verification Failure"
},
"fullDescription": {
"text": "App Links Auto Verification Failure Ensures that app links are correctly set and associated with website. Issue id: AppLinksAutoVerify https://g.co/appindexing/applinks",
"markdown": "App Links Auto Verification Failure \n\nEnsures that app links are correctly set and associated with website. \n\nIssue id: AppLinksAutoVerify \n\n<https://g.co/appindexing/applinks>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintAppLinksAutoVerify",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintDeprecated",
"shortDescription": {
"text": "Using deprecated resources"
},
"fullDescription": {
"text": "Using deprecated resources Deprecated views, attributes and so on are deprecated because there is a better way to do something. Do it that new way. You've been warned. Issue id: Deprecated",
"markdown": "Using deprecated resources \n\nDeprecated views, attributes and so on are deprecated because there is a better way to do something. Do it that new way. You've been warned. \n\nIssue id: Deprecated"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintDeprecated",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintStringShouldBeInt",
"shortDescription": {
"text": "String should be int"
},
"fullDescription": {
"text": "String should be int The properties 'compileSdkVersion', 'minSdkVersion' and 'targetSdkVersion' are usually numbers, but can be strings when you are using an add-on (in the case of 'compileSdkVersion') or a preview platform (for the other two properties). However, you can not use a number as a string (e.g. \"19\" instead of 19); that will result in a platform not found error message at build/sync time. Issue id: StringShouldBeInt",
"markdown": "String should be int \n\nThe properties `compileSdkVersion`, `minSdkVersion` and `targetSdkVersion` are usually numbers, but can be strings when you are using an add-on (in the case of `compileSdkVersion`) or a preview platform (for the other two properties). \n\nHowever, you can not use a number as a string (e.g. \"19\" instead of 19); that will result in a platform not found error message at build/sync time. \n\nIssue id: StringShouldBeInt"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintStringShouldBeInt",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUntranslatable",
"shortDescription": {
"text": "Translated Untranslatable"
},
"fullDescription": {
"text": "Translated Untranslatable Strings can be marked with 'translatable=false' to indicate that they are not intended to be translated, but are present in the resource file for other purposes (for example for non-display strings that should vary by some other configuration qualifier such as screen size or API level). There are cases where translators accidentally translate these strings anyway, and lint will flag these occurrences with this lint check. Issue id: Untranslatable",
"markdown": "Translated Untranslatable \n\nStrings can be marked with `translatable=false` to indicate that they are not intended to be translated, but are present in the resource file for other purposes (for example for non-display strings that should vary by some other configuration qualifier such as screen size or API level). \n\nThere are cases where translators accidentally translate these strings anyway, and lint will flag these occurrences with this lint check. \n\nIssue id: Untranslatable"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintUntranslatable",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintRemoteViewLayout",
"shortDescription": {
"text": "Unsupported View in RemoteView"
},
"fullDescription": {
"text": "Unsupported View in RemoteView In a 'RemoteView', only some layouts and views are allowed. Issue id: RemoteViewLayout https://developer.android.com/reference/android/widget/RemoteViews",
"markdown": "Unsupported View in RemoteView \n\nIn a `RemoteView`, only some layouts and views are allowed. \n\nIssue id: RemoteViewLayout \n\n<https://developer.android.com/reference/android/widget/RemoteViews>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintRemoteViewLayout",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintTypographyDashes",
"shortDescription": {
"text": "Hyphen can be replaced with dash"
},
"fullDescription": {
"text": "Hyphen can be replaced with dash The \"n dash\" (u2013, &#8211;) and the \"m dash\" (u2014, &#8212;) characters are used for ranges (n dash) and breaks (m dash). Using these instead of plain hyphens can make text easier to read and your application will look more polished. Issue id: TypographyDashes https://en.wikipedia.org/wiki/Dash",
"markdown": "Hyphen can be replaced with dash \n\nThe \"n dash\" (u2013, \\&#8211;) and the \"m dash\" (u2014, \\&#8212;) characters are used for ranges (n dash) and breaks (m dash). Using these instead of plain hyphens can make text easier to read and your application will look more polished. \n\nIssue id: TypographyDashes \n\n<https://en.wikipedia.org/wiki/Dash>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintTypographyDashes",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintCanvasSize",
"shortDescription": {
"text": "Wrong Canvas Size"
},
"fullDescription": {
"text": "Wrong Canvas Size In a custom view's draw implementation, you should normally call 'getWidth' and 'getHeight' on the custom view itself, not on the 'canvas' instance. Canvas width and height are the width and height of the 'Canvas', which is not always the same as size of the view. In the hardware accelerated path the width and height of the canvas typically always match that of the 'View' because every view goes to its own recorded 'DisplayList'. But in software rendering there's just one canvas that is clipped and transformed as it makes its way through the 'View' tree, and otherwise remains the same 'Canvas' object for every View's draw method. You should only use Canvas state to adjust how much you draw, such as a quick-reject for early work avoidance if it's going to be clipped away, but not what you draw. Issue id: CanvasSize",
"markdown": "Wrong Canvas Size \n\nIn a custom view's draw implementation, you should normally call `getWidth` and `getHeight` on the custom view itself, not on the `canvas` instance. \n\nCanvas width and height are the width and height of the `Canvas`, which is not always the same as size of the view. \n\nIn the hardware accelerated path the width and height of the canvas typically always match that of the `View` because every view goes to its own recorded `DisplayList`. But in software rendering there's just one canvas that is clipped and transformed as it makes its way through the `View` tree, and otherwise remains the same `Canvas` object for every View's draw method. \n\nYou should only use Canvas state to adjust how much you draw, such as a quick-reject for early work avoidance if it's going to be clipped away, but not what you draw. \n\nIssue id: CanvasSize"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintCanvasSize",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintManifestResource",
"shortDescription": {
"text": "Manifest Resource References"
},
"fullDescription": {
"text": "Manifest Resource References Elements in the manifest can reference resources, but those resources cannot vary across configurations (except as a special case, by version, and except for a few specific package attributes such as the application title and icon). Issue id: ManifestResource",
"markdown": "Manifest Resource References \n\nElements in the manifest can reference resources, but those resources cannot vary across configurations (except as a special case, by version, and except for a few specific package attributes such as the application title and icon). \n\nIssue id: ManifestResource"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintManifestResource",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintNamespaceTypo",
"shortDescription": {
"text": "Misspelled namespace declaration"
},
"fullDescription": {
"text": "Misspelled namespace declaration Accidental misspellings in namespace declarations can lead to some very obscure error messages. This check looks for potential misspellings to help track these down. Issue id: NamespaceTypo",
"markdown": "Misspelled namespace declaration \n\nAccidental misspellings in namespace declarations can lead to some very obscure error messages. This check looks for potential misspellings to help track these down. \n\nIssue id: NamespaceTypo"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintNamespaceTypo",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintSlices",
"shortDescription": {
"text": "Slices"
},
"fullDescription": {
"text": "Slices This check analyzes usages of the Slices API and offers suggestions based on best practices. Issue id: Slices",
"markdown": "Slices \n\nThis check analyzes usages of the Slices API and offers suggestions based on best practices. \n\nIssue id: Slices"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintSlices",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintSecureRandom",
"shortDescription": {
"text": "Using a fixed seed with SecureRandom"
},
"fullDescription": {
"text": "Using a fixed seed with 'SecureRandom' Specifying a fixed seed will cause the instance to return a predictable sequence of numbers. This may be useful for testing but it is not appropriate for secure use. Issue id: SecureRandom https://goo.gle/SecureRandom https://developer.android.com/reference/java/security/SecureRandom.html",
"markdown": "Using a fixed seed with `SecureRandom` \n\nSpecifying a fixed seed will cause the instance to return a predictable sequence of numbers. This may be useful for testing but it is not appropriate for secure use. \n\nIssue id: SecureRandom \n\n<https://goo.gle/SecureRandom> \n<https://developer.android.com/reference/java/security/SecureRandom.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintSecureRandom",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintAuthLeak",
"shortDescription": {
"text": "Code might contain an auth leak"
},
"fullDescription": {
"text": "Code might contain an auth leak Strings in java apps can be discovered by decompiling apps, this lint check looks for code which looks like it may contain an url with a username and password Issue id: AuthLeak",
"markdown": "Code might contain an auth leak \n\nStrings in java apps can be discovered by decompiling apps, this lint check looks for code which looks like it may contain an url with a username and password \n\nIssue id: AuthLeak"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintAuthLeak",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintObsoleteLayoutParam",
"shortDescription": {
"text": "Obsolete layout params"
},
"fullDescription": {
"text": "Obsolete layout params The given layout_param is not defined for the given layout, meaning it has no effect. This usually happens when you change the parent layout or move view code around without updating the layout params. This will cause useless attribute processing at runtime, and is misleading for others reading the layout so the parameter should be removed. Issue id: ObsoleteLayoutParam",
"markdown": "Obsolete layout params \n\nThe given layout_param is not defined for the given layout, meaning it has no effect. This usually happens when you change the parent layout or move view code around without updating the layout params. This will cause useless attribute processing at runtime, and is misleading for others reading the layout so the parameter should be removed. \n\nIssue id: ObsoleteLayoutParam"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintObsoleteLayoutParam",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintWebViewLayout",
"shortDescription": {
"text": "WebViews in wrap_content parents"
},
"fullDescription": {
"text": "WebViews in wrap_content parents The WebView implementation has certain performance optimizations which will not work correctly if the parent view is using 'wrap_content' rather than 'match_parent'. This can lead to subtle UI bugs. Issue id: WebViewLayout",
"markdown": "WebViews in wrap_content parents \n\nThe WebView implementation has certain performance optimizations which will not work correctly if the parent view is using `wrap_content` rather than `match_parent`. This can lead to subtle UI bugs. \n\nIssue id: WebViewLayout"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintWebViewLayout",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintProtectedPermissions",
"shortDescription": {
"text": "Using system app permission"
},
"fullDescription": {
"text": "Using system app permission Permissions with the protection level 'signature', 'privileged' or 'signatureOrSystem' are only granted to system apps. If an app is a regular non-system app, it will never be able to use these permissions. Issue id: ProtectedPermissions",
"markdown": "Using system app permission \n\nPermissions with the protection level `signature`, `privileged` or `signatureOrSystem` are only granted to system apps. If an app is a regular non-system app, it will never be able to use these permissions. \n\nIssue id: ProtectedPermissions"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintProtectedPermissions",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintResAuto",
"shortDescription": {
"text": "Hardcoded Package in Namespace"
},
"fullDescription": {
"text": "Hardcoded Package in Namespace In Gradle projects, the actual package used in the final APK can vary; for example,you can add a '.debug' package suffix in one version and not the other. Therefore, you should not hardcode the application package in the resource; instead, use the special namespace 'http://schemas.android.com/apk/res-auto' which will cause the tools to figure out the right namespace for the resource regardless of the actual package used during the build. Issue id: ResAuto",
"markdown": "Hardcoded Package in Namespace \n\nIn Gradle projects, the actual package used in the final APK can vary; for example,you can add a `.debug` package suffix in one version and not the other. Therefore, you should **not** hardcode the application package in the resource; instead, use the special namespace `http://schemas.android.com/apk/res-auto` which will cause the tools to figure out the right namespace for the resource regardless of the actual package used during the build. \n\nIssue id: ResAuto"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintResAuto",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintGifUsage",
"shortDescription": {
"text": "Using .gif format for bitmaps is discouraged"
},
"fullDescription": {
"text": "Using '.gif' format for bitmaps is discouraged The '.gif' file format is discouraged. Consider using '.png' (preferred) or '.jpg' (acceptable) instead. Issue id: GifUsage https://developer.android.com/guide/topics/resources/drawable-resource.html#Bitmap",
"markdown": "Using `.gif` format for bitmaps is discouraged \n\nThe `.gif` file format is discouraged. Consider using `.png` (preferred) or `.jpg` (acceptable) instead. \n\nIssue id: GifUsage \n\n<https://developer.android.com/guide/topics/resources/drawable-resource.html#Bitmap>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintGifUsage",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ShrinkerInnerClassSeparator",
"shortDescription": {
"text": "Invalid separator between class and inner class"
},
"fullDescription": {
"text": "Reports invalid separator between class and inner class in Shrinker config.",
"markdown": "Reports invalid separator between class and inner class in Shrinker config."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "ShrinkerInnerClassSeparator",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Shrinker",
"index": 127,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintWearableActionDuplicate",
"shortDescription": {
"text": "Duplicate watch face configuration activities found"
},
"fullDescription": {
"text": "Duplicate watch face configuration activities found If and only if a watch face service defines 'wearableConfigurationAction' metadata, with the value 'WATCH_FACE_EDITOR', there should be an activity in the same package, which has an intent filter for 'WATCH_FACE_EDITOR' (with com.google.android.wearable.watchface.category.WEARABLE_CONFIGURATION if minSdkVersion is less than 30). Issue id: WearableActionDuplicate https://developer.android.com/training/wearables/watch-faces/configuration",
"markdown": "Duplicate watch face configuration activities found \n\nIf and only if a watch face service defines `wearableConfigurationAction` metadata, with the value `WATCH_FACE_EDITOR`, there should be an activity in the same package, which has an intent filter for `WATCH_FACE_EDITOR` (with com.google.android.wearable.watchface.category.WEARABLE_CONFIGURATION if minSdkVersion is less than 30). \n\nIssue id: WearableActionDuplicate \n\n<https://developer.android.com/training/wearables/watch-faces/configuration>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintWearableActionDuplicate",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUseOfBundledGooglePlayServices",
"shortDescription": {
"text": "Use of bundled version of Google Play services"
},
"fullDescription": {
"text": "Use of bundled version of Google Play services Google Play services SDK's can be selectively included, which enables a smaller APK size. Consider declaring dependencies on individual Google Play services SDK's. If you are using Firebase API's (https://firebase.google.com/docs/android/setup), Android Studio's Tools → Firebase assistant window can automatically add just the dependencies needed for each feature. Issue id: UseOfBundledGooglePlayServices https://developers.google.com/android/guides/setup#split",
"markdown": "Use of bundled version of Google Play services \n\nGoogle Play services SDK's can be selectively included, which enables a smaller APK size. Consider declaring dependencies on individual Google Play services SDK's. If you are using Firebase API's (<https://firebase.google.com/docs/android/setup>), Android Studio's Tools → Firebase assistant window can automatically add just the dependencies needed for each feature. \n\nIssue id: UseOfBundledGooglePlayServices \n\n<https://developers.google.com/android/guides/setup#split>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintUseOfBundledGooglePlayServices",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintSuspiciousImport",
"shortDescription": {
"text": "'import android.R' statement"
},
"fullDescription": {
"text": "''import android.R'' statement Importing 'android.R' is usually not intentional; it sometimes happens when you use an IDE and ask it to automatically add imports at a time when your project's R class it not present. Once the import is there you might get a lot of \"confusing\" error messages because of course the fields available on 'android.R' are not the ones you'd expect from just looking at your own 'R' class. Issue id: SuspiciousImport",
"markdown": "'`import android.R`' statement \n\nImporting `android.R` is usually not intentional; it sometimes happens when you use an IDE and ask it to automatically add imports at a time when your project's R class it not present. \n\nOnce the import is there you might get a lot of \"confusing\" error messages because of course the fields available on `android.R` are not the ones you'd expect from just looking at your own `R` class. \n\nIssue id: SuspiciousImport"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintSuspiciousImport",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintWatchFaceForAndroidX",
"shortDescription": {
"text": "AndroidX watch faces must use action WATCH_FACE_EDITOR"
},
"fullDescription": {
"text": "AndroidX watch faces must use action 'WATCH_FACE_EDITOR' If the package depends on 'androidx.wear:wear-watchface', and an AndroidX watch face declares the 'wearableConfigurationAction' metadata, its value should be 'androidx.wear.watchface.editor.action.WATCH_FACE_EDITOR'. Issue id: WatchFaceForAndroidX https://developer.android.com/training/wearables/watch-faces/configuration",
"markdown": "AndroidX watch faces must use action `WATCH_FACE_EDITOR` \n\nIf the package depends on `androidx.wear:wear-watchface`, and an AndroidX watch face declares the `wearableConfigurationAction` metadata, its value should be `androidx.wear.watchface.editor.action.WATCH_FACE_EDITOR`. \n\nIssue id: WatchFaceForAndroidX \n\n<https://developer.android.com/training/wearables/watch-faces/configuration>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintWatchFaceForAndroidX",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintEditedTargetSdkVersion",
"shortDescription": {
"text": "Manually Edited TargetSdkVersion"
},
"fullDescription": {
"text": "Manually Edited TargetSdkVersion Updating the 'targetSdkVersion' of an app is seemingly easy: just increment the 'targetSdkVersion' number in the manifest file! But that's not actually safe. The 'targetSdkVersion' controls a wide range of behaviors that change from release to release, and to update, you should carefully consult the documentation to see what has changed, how your app may need to adjust, and then of course, carefully test everything. In new versions of Android Studio, there is a special migration assistant, available from the tools menu (and as a quickfix from this lint warning) which analyzes your specific app and filters the set of applicable migration steps to those needed for your app. This lint check does something very simple: it just detects whether it looks like you've manually edited the targetSdkVersion field in a build.gradle file. Obviously, as part of doing the above careful steps, you may end up editing the value, which would trigger the check -- and it's safe to ignore it; this lint check only runs in the IDE, not from the command line; it's sole purpose to bring awareness to the (many) developers who haven't been aware of this issue and have just bumped the targetSdkVersion, recompiled, and uploaded their updated app to the Google Play Store, sometimes leading to crashes or other problems on newer devices. Issue id: EditedTargetSdkVersion",
"markdown": "Manually Edited TargetSdkVersion \n\nUpdating the `targetSdkVersion` of an app is seemingly easy: just increment the `targetSdkVersion` number in the manifest file! \n\nBut that's not actually safe. The `targetSdkVersion` controls a wide range of behaviors that change from release to release, and to update, you should carefully consult the documentation to see what has changed, how your app may need to adjust, and then of course, carefully test everything. \n\nIn new versions of Android Studio, there is a special migration assistant, available from the tools menu (and as a quickfix from this lint warning) which analyzes your specific app and filters the set of applicable migration steps to those needed for your app. \n\nThis lint check does something very simple: it just detects whether it looks like you've manually edited the targetSdkVersion field in a build.gradle file. Obviously, as part of doing the above careful steps, you may end up editing the value, which would trigger the check -- and it's safe to ignore it; this lint check *only* runs in the IDE, not from the command line; it's sole purpose to bring *awareness* to the (many) developers who haven't been aware of this issue and have just bumped the targetSdkVersion, recompiled, and uploaded their updated app to the Google Play Store, sometimes leading to crashes or other problems on newer devices. \n\nIssue id: EditedTargetSdkVersion"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintEditedTargetSdkVersion",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintAcceptsUserCertificates",
"shortDescription": {
"text": "Allowing User Certificates"
},
"fullDescription": {
"text": "Allowing User Certificates Allowing user certificates could allow eavesdroppers to intercept data sent by your app, 'which could impact the privacy of your users. Consider nesting your app's 'trust-anchors' inside a '<debug-overrides>' element to make sure they are only available when 'android:debuggable' is set to '\"true\"'. Issue id: AcceptsUserCertificates https://goo.gle/AcceptsUserCertificates https://developer.android.com/training/articles/security-config#TrustingDebugCa",
"markdown": "Allowing User Certificates \n\nAllowing user certificates could allow eavesdroppers to intercept data sent by your app, 'which could impact the privacy of your users. Consider nesting your app's `trust-anchors` inside a `<debug-overrides>` element to make sure they are only available when `android:debuggable` is set to `\"true\"`. \n\nIssue id: AcceptsUserCertificates \n\n<https://goo.gle/AcceptsUserCertificates> \n<https://developer.android.com/training/articles/security-config#TrustingDebugCa>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintAcceptsUserCertificates",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMissingPermission",
"shortDescription": {
"text": "Missing Permissions"
},
"fullDescription": {
"text": "Missing Permissions This check scans through your code and libraries and looks at the APIs being used, and checks this against the set of permissions required to access those APIs. If the code using those APIs is called at runtime, then the program will crash. Furthermore, for permissions that are revocable (with 'targetSdkVersion' 23), client code must also be prepared to handle the calls throwing an exception if the user rejects the request for permission at runtime. Issue id: MissingPermission",
"markdown": "Missing Permissions \n\nThis check scans through your code and libraries and looks at the APIs being used, and checks this against the set of permissions required to access those APIs. If the code using those APIs is called at runtime, then the program will crash. \n\nFurthermore, for permissions that are revocable (with `targetSdkVersion` 23), client code must also be prepared to handle the calls throwing an exception if the user rejects the request for permission at runtime. \n\nIssue id: MissingPermission"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintMissingPermission",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMockLocation",
"shortDescription": {
"text": "Using mock location provider in production"
},
"fullDescription": {
"text": "Using mock location provider in production Using a mock location provider (by requiring the permission 'android.permission.ACCESS_MOCK_LOCATION') should only be done in debug builds (or from tests). In Gradle projects, that means you should only request this permission in a test or debug source set specific manifest file. To fix this, create a new manifest file in the debug folder and move the '<uses-permission>' element there. A typical path to a debug manifest override file in a Gradle project is src/debug/AndroidManifest.xml. Issue id: MockLocation",
"markdown": "Using mock location provider in production \n\nUsing a mock location provider (by requiring the permission `android.permission.ACCESS_MOCK_LOCATION`) should **only** be done in debug builds (or from tests). In Gradle projects, that means you should only request this permission in a test or debug source set specific manifest file. \n\nTo fix this, create a new manifest file in the debug folder and move the `<uses-permission>` element there. A typical path to a debug manifest override file in a Gradle project is src/debug/AndroidManifest.xml. \n\nIssue id: MockLocation"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintMockLocation",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidElementNotAllowed",
"shortDescription": {
"text": "Android XML element is not allowed"
},
"fullDescription": {
"text": "This inspection highlights unallowed XML tags in Android resource files and AndroidManifest.xml",
"markdown": "This inspection highlights unallowed XML tags in Android resource files and AndroidManifest.xml"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidElementNotAllowed",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android",
"index": 14,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintEnqueueWork",
"shortDescription": {
"text": "WorkManager Enqueue"
},
"fullDescription": {
"text": "WorkManager Enqueue 'WorkContinuations' cannot be enqueued automatically. You must call 'enqueue()' on a 'WorkContinuation' to have it and its parent continuations enqueued inside 'WorkManager'. Issue id: EnqueueWork",
"markdown": "WorkManager Enqueue \n\n`WorkContinuations` cannot be enqueued automatically. You must call `enqueue()` on a `WorkContinuation` to have it and its parent continuations enqueued inside `WorkManager`. \n\nIssue id: EnqueueWork"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintEnqueueWork",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintKtxExtensionAvailable",
"shortDescription": {
"text": "KTX Extension Available"
},
"fullDescription": {
"text": "KTX Extension Available Android KTX extensions augment some libraries with support for modern Kotlin language features like extension functions, extension properties, lambdas, named parameters, coroutines, and more. In Kotlin projects, use the KTX version of a library by replacing the dependency in your 'build.gradle' file. For example, you can replace 'androidx.fragment:fragment' with 'androidx.fragment:fragment-ktx'. Issue id: KtxExtensionAvailable https://developer.android.com/kotlin/ktx",
"markdown": "KTX Extension Available \n\nAndroid KTX extensions augment some libraries with support for modern Kotlin language features like extension functions, extension properties, lambdas, named parameters, coroutines, and more. \n\nIn Kotlin projects, use the KTX version of a library by replacing the dependency in your `build.gradle` file. For example, you can replace `androidx.fragment:fragment` with `androidx.fragment:fragment-ktx`. \n\nIssue id: KtxExtensionAvailable \n\n<https://developer.android.com/kotlin/ktx>"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "AndroidLintKtxExtensionAvailable",
"ideaSeverity": "INFO",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Productivity",
"index": 143,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidDomInspection",
"shortDescription": {
"text": "Android Resources Validation"
},
"fullDescription": {
"text": "Validates resource references inside Android XML files.",
"markdown": "Validates resource references inside Android XML files."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidDomInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android",
"index": 14,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintViewHolder",
"shortDescription": {
"text": "View Holder Candidates"
},
"fullDescription": {
"text": "View Holder Candidates When implementing a view Adapter, you should avoid unconditionally inflating a new layout; if an available item is passed in for reuse, you should try to use that one instead. This helps make for example 'ListView' scrolling much smoother. Issue id: ViewHolder https://developer.android.com/guide/topics/ui/layout/recyclerview#ViewHolder",
"markdown": "View Holder Candidates \n\nWhen implementing a view Adapter, you should avoid unconditionally inflating a new layout; if an available item is passed in for reuse, you should try to use that one instead. This helps make for example `ListView` scrolling much smoother. \n\nIssue id: ViewHolder \n\n<https://developer.android.com/guide/topics/ui/layout/recyclerview#ViewHolder>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintViewHolder",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidUnknownAttribute",
"shortDescription": {
"text": "Unknown Android XML attribute"
},
"fullDescription": {
"text": "This inspection highlights unknown XML attributes in Android resource files and AndroidManifest.xml",
"markdown": "This inspection highlights unknown XML attributes in Android resource files and AndroidManifest.xml"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidUnknownAttribute",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android",
"index": 14,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintOpenForTesting",
"shortDescription": {
"text": "Extending API only allowed from tests"
},
"fullDescription": {
"text": "Extending API only allowed from tests Classes or methods annotated with '@OpenForTesting' are only allowed to be subclassed or overridden from unit tests. Issue id: OpenForTesting",
"markdown": "Extending API only allowed from tests \n\nClasses or methods annotated with `@OpenForTesting` are only allowed to be subclassed or overridden from unit tests. \n\nIssue id: OpenForTesting"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintOpenForTesting",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintVectorDrawableCompat",
"shortDescription": {
"text": "Using VectorDrawableCompat"
},
"fullDescription": {
"text": "Using VectorDrawableCompat To use VectorDrawableCompat, you need to make two modifications to your project. First, set 'android.defaultConfig.vectorDrawables.useSupportLibrary = true' in your 'build.gradle' file, and second, use 'app:srcCompat' instead of 'android:src' to refer to vector drawables. Issue id: VectorDrawableCompat https://developer.android.com/guide/topics/graphics/vector-drawable-resources https://medium.com/androiddevelopers/using-vector-assets-in-android-apps-4318fd662eb9",
"markdown": "Using VectorDrawableCompat \n\nTo use VectorDrawableCompat, you need to make two modifications to your project. First, set `android.defaultConfig.vectorDrawables.useSupportLibrary = true` in your `build.gradle` file, and second, use `app:srcCompat` instead of `android:src` to refer to vector drawables. \n\nIssue id: VectorDrawableCompat \n\n<https://developer.android.com/guide/topics/graphics/vector-drawable-resources> \n<https://medium.com/androiddevelopers/using-vector-assets-in-android-apps-4318fd662eb9>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintVectorDrawableCompat",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintLogTagMismatch",
"shortDescription": {
"text": "Mismatched Log Tags"
},
"fullDescription": {
"text": "Mismatched Log Tags When guarding a 'Log.v(tag, ...)' call with 'Log.isLoggable(tag)', the tag passed to both calls should be the same. Similarly, the level passed in to 'Log.isLoggable' should typically match the type of 'Log' call, e.g. if checking level 'Log.DEBUG', the corresponding 'Log' call should be 'Log.d', not 'Log.i'. Issue id: LogTagMismatch",
"markdown": "Mismatched Log Tags \n\nWhen guarding a `Log.v(tag, ...)` call with `Log.isLoggable(tag)`, the tag passed to both calls should be the same. Similarly, the level passed in to `Log.isLoggable` should typically match the type of `Log` call, e.g. if checking level `Log.DEBUG`, the corresponding `Log` call should be `Log.d`, not `Log.i`. \n\nIssue id: LogTagMismatch"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintLogTagMismatch",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintGridLayout",
"shortDescription": {
"text": "GridLayout validation"
},
"fullDescription": {
"text": "GridLayout validation Declaring a layout_row or layout_column that falls outside the declared size of a GridLayout's 'rowCount' or 'columnCount' is usually an unintentional error. Issue id: GridLayout",
"markdown": "GridLayout validation \n\nDeclaring a layout_row or layout_column that falls outside the declared size of a GridLayout's `rowCount` or `columnCount` is usually an unintentional error. \n\nIssue id: GridLayout"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintGridLayout",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintStringFormatCount",
"shortDescription": {
"text": "Formatting argument types incomplete or inconsistent"
},
"fullDescription": {
"text": "Formatting argument types incomplete or inconsistent When a formatted string takes arguments, it usually needs to reference the same arguments in all translations (or all arguments if there are no translations. There are cases where this is not the case, so this issue is a warning rather than an error by default. However, this usually happens when a language is not translated or updated correctly. Issue id: StringFormatCount",
"markdown": "Formatting argument types incomplete or inconsistent \n\nWhen a formatted string takes arguments, it usually needs to reference the same arguments in all translations (or all arguments if there are no translations. \n\nThere are cases where this is not the case, so this issue is a warning rather than an error by default. However, this usually happens when a language is not translated or updated correctly. \n\nIssue id: StringFormatCount"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintStringFormatCount",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintExactAlarm",
"shortDescription": {
"text": "Invalid Usage of Exact Alarms"
},
"fullDescription": {
"text": "Invalid Usage of Exact Alarms The 'USE_EXACT_ALARM' permission is only available when targeting API level 33 and above. Also, note that this permission is only permitted for apps whose core functionality requires precisely-timed actions for user facing features. Issue id: ExactAlarm https://developer.android.com/training/scheduling/alarms",
"markdown": "Invalid Usage of Exact Alarms \n\nThe `USE_EXACT_ALARM` permission is only available when targeting API level 33 and above. Also, note that this permission is only permitted for apps whose core functionality requires precisely-timed actions for user facing features. \n\nIssue id: ExactAlarm \n\n<https://developer.android.com/training/scheduling/alarms>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintExactAlarm",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintGetLocales",
"shortDescription": {
"text": "Locale crash"
},
"fullDescription": {
"text": "Locale crash This check looks for usage of Lollipop-style locale folders (e.g. 3 letter language codes, or BCP 47 qualifiers) combined with an 'AssetManager#getLocales()' call. This leads to crashes Issue id: GetLocales",
"markdown": "Locale crash \n\nThis check looks for usage of Lollipop-style locale folders (e.g. 3 letter language codes, or BCP 47 qualifiers) combined with an `AssetManager#getLocales()` call. This leads to crashes \n\nIssue id: GetLocales"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintGetLocales",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintSourceLockedOrientationActivity",
"shortDescription": {
"text": "Incompatible setRequestedOrientation value"
},
"fullDescription": {
"text": "Incompatible setRequestedOrientation value The 'Activity' should not be locked to a portrait orientation so that users can take advantage of the multi-window environments and larger landscape-first screens that Android runs on such as ChromeOS, tablets, and foldables. To fix the issue, consider calling 'setRequestedOrientation' with the 'ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR' or 'ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED' options or removing the call all together. Issue id: SourceLockedOrientationActivity https://developer.android.com/guide/topics/large-screens/large-screen-cookbook#restricted_app_orientation",
"markdown": "Incompatible setRequestedOrientation value \n\nThe `Activity` should not be locked to a portrait orientation so that users can take advantage of the multi-window environments and larger landscape-first screens that Android runs on such as ChromeOS, tablets, and foldables. To fix the issue, consider calling `setRequestedOrientation` with the `ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR` or `ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED` options or removing the call all together. \n\nIssue id: SourceLockedOrientationActivity \n\n<https://developer.android.com/guide/topics/large-screens/large-screen-cookbook#restricted_app_orientation>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintSourceLockedOrientationActivity",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintExpensiveAssertion",
"shortDescription": {
"text": "Expensive Assertions"
},
"fullDescription": {
"text": "Expensive Assertions In Kotlin, assertions are not handled the same way as from the Java programming language. In particular, they're just implemented as a library call, and inside the library call the error is only thrown if assertions are enabled. This means that the arguments to the 'assert' call will always be evaluated. If you're doing any computation in the expression being asserted, that computation will unconditionally be performed whether or not assertions are turned on. This typically turns into wasted work in release builds. This check looks for cases where the assertion condition is nontrivial, e.g. it is performing method calls or doing more work than simple comparisons on local variables or fields. You can work around this by writing your own inline assert method instead: @Suppress(\"INVISIBLE_REFERENCE\", \"INVISIBLE_MEMBER\")\ninline fun assert(condition: () -> Boolean) {\n if (_Assertions.ENABLED && !condition()) {\n throw AssertionError()\n }\n}\n In Android, because assertions are not enforced at runtime, instead use this: inline fun assert(condition: () -> Boolean) {\n if (BuildConfig.DEBUG && !condition()) {\n throw AssertionError()\n }\n}\n Issue id: ExpensiveAssertion",
"markdown": "Expensive Assertions \n\nIn Kotlin, assertions are not handled the same way as from the Java programming language. In particular, they're just implemented as a library call, and inside the library call the error is only thrown if assertions are enabled. \n\nThis means that the arguments to the `assert` call will **always** be evaluated. If you're doing any computation in the expression being asserted, that computation will unconditionally be performed whether or not assertions are turned on. This typically turns into wasted work in release builds. \n\nThis check looks for cases where the assertion condition is nontrivial, e.g. it is performing method calls or doing more work than simple comparisons on local variables or fields. \n\nYou can work around this by writing your own inline assert method instead: \n\n```\n@Suppress(\"INVISIBLE_REFERENCE\", \"INVISIBLE_MEMBER\")\ninline fun assert(condition: () -> Boolean) {\n if (_Assertions.ENABLED && !condition()) {\n throw AssertionError()\n }\n}\n```\n\n<br />\n\nIn Android, because assertions are not enforced at runtime, instead use this: \n\n```\ninline fun assert(condition: () -> Boolean) {\n if (BuildConfig.DEBUG && !condition()) {\n throw AssertionError()\n }\n}\n```\n\n<br />\n\n<br />\n\nIssue id: ExpensiveAssertion"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintExpensiveAssertion",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintWorldWriteableFiles",
"shortDescription": {
"text": "openFileOutput() with MODE_WORLD_WRITEABLE"
},
"fullDescription": {
"text": "'openFileOutput()' with 'MODE_WORLD_WRITEABLE' There are cases where it is appropriate for an application to write world writeable files, but these should be reviewed carefully to ensure that they contain no private data, and that if the file is modified by a malicious application it does not trick or compromise your application. Issue id: WorldWriteableFiles https://goo.gle/WorldWriteableFiles",
"markdown": "`openFileOutput()` with `MODE_WORLD_WRITEABLE` \n\nThere are cases where it is appropriate for an application to write world writeable files, but these should be reviewed carefully to ensure that they contain no private data, and that if the file is modified by a malicious application it does not trick or compromise your application. \n\nIssue id: WorldWriteableFiles \n\n<https://goo.gle/WorldWriteableFiles>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintWorldWriteableFiles",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintInvalidImeActionId",
"shortDescription": {
"text": "Invalid imeActionId declaration"
},
"fullDescription": {
"text": "Invalid imeActionId declaration 'android:imeActionId' should not be a resource ID such as '@+id/resName'. It must be an integer constant, or an integer resource reference, as defined in 'EditorInfo'. Issue id: InvalidImeActionId https://developer.android.com/reference/android/view/inputmethod/EditorInfo.html",
"markdown": "Invalid imeActionId declaration \n\n`android:imeActionId` should not be a resource ID such as `@+id/resName`. It must be an integer constant, or an integer resource reference, as defined in `EditorInfo`. \n\nIssue id: InvalidImeActionId \n\n<https://developer.android.com/reference/android/view/inputmethod/EditorInfo.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintInvalidImeActionId",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintDeviceAdmin",
"shortDescription": {
"text": "Malformed Device Admin"
},
"fullDescription": {
"text": "Malformed Device Admin If you register a broadcast receiver which acts as a device admin, you must also register an '<intent-filter>' for the action 'android.app.action.DEVICE_ADMIN_ENABLED', without any '<data>', such that the device admin can be activated/deactivated. To do this, add `<intent-filter>`\n `<action android:name=\"android.app.action.DEVICE_ADMIN_ENABLED\" />`\n`</intent-filter>`\n to your '<receiver>'. Issue id: DeviceAdmin",
"markdown": "Malformed Device Admin \n\nIf you register a broadcast receiver which acts as a device admin, you must also register an `<intent-filter>` for the action `android.app.action.DEVICE_ADMIN_ENABLED`, without any `<data>`, such that the device admin can be activated/deactivated. \n\nTo do this, add\n\n```\n`<intent-filter>`\n `<action android:name=\"android.app.action.DEVICE_ADMIN_ENABLED\" />`\n`</intent-filter>`\n```\n\nto your `<receiver>`. \n\nIssue id: DeviceAdmin"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintDeviceAdmin",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintKeyboardInaccessibleWidget",
"shortDescription": {
"text": "Keyboard inaccessible widget"
},
"fullDescription": {
"text": "Keyboard inaccessible widget A widget that is declared to be clickable but not declared to be focusable is not accessible via the keyboard. Please add the 'focusable' attribute as well. Issue id: KeyboardInaccessibleWidget",
"markdown": "Keyboard inaccessible widget \n\nA widget that is declared to be clickable but not declared to be focusable is not accessible via the keyboard. Please add the `focusable` attribute as well. \n\nIssue id: KeyboardInaccessibleWidget"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintKeyboardInaccessibleWidget",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Accessibility",
"index": 167,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintDataBindingWithoutKapt",
"shortDescription": {
"text": "Data Binding without Annotation Processing"
},
"fullDescription": {
"text": "Data Binding without Annotation Processing Apps that use Kotlin and data binding should also apply the kotlin-kapt plugin. Issue id: DataBindingWithoutKapt https://kotlinlang.org/docs/reference/kapt.html",
"markdown": "Data Binding without Annotation Processing \n\nApps that use Kotlin and data binding should also apply the kotlin-kapt plugin. \n\nIssue id: DataBindingWithoutKapt \n\n<https://kotlinlang.org/docs/reference/kapt.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintDataBindingWithoutKapt",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintNoOp",
"shortDescription": {
"text": "NoOp Code"
},
"fullDescription": {
"text": "NoOp Code This check looks for code which looks like it's a no-op -- usually leftover expressions from interactive debugging, but in some cases bugs where you had intended to do something with the expression such as assign it to a field. Issue id: NoOp Available options: pure-getters (default is false): Whether to assume methods with getter-names have no side effects. Getter methods (where names start with 'get' or 'is', and have non-void return types, and no arguments) should not have side effects. With this option turned on, lint will assume that is the case and will list any getter calls whose results are ignored as suspicious code. To configure this option, use a 'lint.xml' file with an <option> like this: <lint>\n <issue id=\"NoOp\">\n <option name=\"pure-getters\" value=\"false\" />\n </issue>\n</lint>",
"markdown": "NoOp Code \n\nThis check looks for code which looks like it's a no-op -- usually leftover expressions from interactive debugging, but in some cases bugs where you had intended to do something with the expression such as assign it to a field. \n\nIssue id: NoOp \n\nAvailable options: \n\n**pure-getters** (default is false): \nWhether to assume methods with getter-names have no side effects. \n\nGetter methods (where names start with `get` or `is`, and have non-void return types, and no arguments) should not have side effects. With this option turned on, lint will assume that is the case and will list any getter calls whose results are ignored as suspicious code. \n\nTo configure this option, use a `lint.xml` file with an \\<option\\> like this: \n\n```\n<lint>\n <issue id=\"NoOp\">\n <option name=\"pure-getters\" value=\"false\" />\n </issue>\n</lint>\n```"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintNoOp",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintEmptySuperCall",
"shortDescription": {
"text": "Calling an empty super method"
},
"fullDescription": {
"text": "Calling an empty super method For methods annotated with '@EmptySuper', overriding methods should not also call the super implementation, either because it is empty, or perhaps it contains code not intended to be run when the method is overridden. Issue id: EmptySuperCall",
"markdown": "Calling an empty super method \n\nFor methods annotated with `@EmptySuper`, overriding methods should not also call the super implementation, either because it is empty, or perhaps it contains code not intended to be run when the method is overridden. \n\nIssue id: EmptySuperCall"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintEmptySuperCall",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintDuplicatePlatformClasses",
"shortDescription": {
"text": "Duplicate Platform Classes"
},
"fullDescription": {
"text": "Duplicate Platform Classes There are a number of libraries that duplicate not just functionality of the Android platform but using the exact same class names as the ones provided in Android -- for example the apache http classes. This can lead to unexpected crashes. To solve this, you need to either find a newer version of the library which no longer has this problem, or to repackage the library (and all of its dependencies) using something like the 'jarjar' tool, or finally, rewriting the code to use different APIs (for example, for http code, consider using 'HttpUrlConnection' or a library like 'okhttp'). Issue id: DuplicatePlatformClasses",
"markdown": "Duplicate Platform Classes \n\nThere are a number of libraries that duplicate not just functionality of the Android platform but using the exact same class names as the ones provided in Android -- for example the apache http classes. This can lead to unexpected crashes. \n\nTo solve this, you need to either find a newer version of the library which no longer has this problem, or to repackage the library (and all of its dependencies) using something like the `jarjar` tool, or finally, rewriting the code to use different APIs (for example, for http code, consider using `HttpUrlConnection` or a library like `okhttp`). \n\nIssue id: DuplicatePlatformClasses"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintDuplicatePlatformClasses",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintPluralsCandidate",
"shortDescription": {
"text": "Potential Plurals"
},
"fullDescription": {
"text": "Potential Plurals This lint check looks for potential errors in internationalization where you have translated a message which involves a quantity and it looks like other parts of the string may need grammatical changes. For example, rather than something like this: <string name=\"try_again\">Try again in %d seconds.</string>\n you should be using a plural: <plurals name=\"try_again\">\n <item quantity=\"one\">Try again in %d second</item>\n <item quantity=\"other\">Try again in %d seconds</item>\n </plurals>\n This will ensure that in other languages the right set of translations are provided for the different quantity classes. (This check depends on some heuristics, so it may not accurately determine whether a string really should be a quantity. You can use tools:ignore to filter out false positives. Issue id: PluralsCandidate https://developer.android.com/guide/topics/resources/string-resource.html#Plurals",
"markdown": "Potential Plurals \n\nThis lint check looks for potential errors in internationalization where you have translated a message which involves a quantity and it looks like other parts of the string may need grammatical changes. \n\nFor example, rather than something like this:\n\n```\n <string name=\"try_again\">Try again in %d seconds.</string>\n```\n\nyou should be using a plural:\n\n```\n <plurals name=\"try_again\">\n <item quantity=\"one\">Try again in %d second</item>\n <item quantity=\"other\">Try again in %d seconds</item>\n </plurals>\n```\n\nThis will ensure that in other languages the right set of translations are provided for the different quantity classes. \n\n(This check depends on some heuristics, so it may not accurately determine whether a string really should be a quantity. You can use tools:ignore to filter out false positives. \n\nIssue id: PluralsCandidate \n\n<https://developer.android.com/guide/topics/resources/string-resource.html#Plurals>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintPluralsCandidate",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUnknownIdInLayout",
"shortDescription": {
"text": "Reference to an id that is not in the current layout"
},
"fullDescription": {
"text": "Reference to an id that is not in the current layout The '@+id/' syntax refers to an existing id, or creates a new one if it has not already been defined elsewhere. However, this means that if you have a typo in your reference, or if the referred view no longer exists, you do not get a warning since the id will be created on demand. This is sometimes intentional, for example where you are referring to a view which is provided in a different layout via an include. However, it is usually an accident where you have a typo or you have renamed a view without updating all the references to it. Issue id: UnknownIdInLayout",
"markdown": "Reference to an id that is not in the current layout \n\nThe `@+id/` syntax refers to an existing id, or creates a new one if it has not already been defined elsewhere. However, this means that if you have a typo in your reference, or if the referred view no longer exists, you do not get a warning since the id will be created on demand. \n\nThis is sometimes intentional, for example where you are referring to a view which is provided in a different layout via an include. However, it is usually an accident where you have a typo or you have renamed a view without updating all the references to it. \n\nIssue id: UnknownIdInLayout"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintUnknownIdInLayout",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintWifiManagerPotentialLeak",
"shortDescription": {
"text": "WifiManager Potential Leak"
},
"fullDescription": {
"text": "WifiManager Potential Leak On versions prior to Android N (24), initializing the 'WifiManager' via 'Context#getSystemService' can cause a memory leak if the context is not the application context. In many cases, it's not obvious from the code where the 'Context' is coming from (e.g. it might be a parameter to a method, or a field initialized from various method calls). It's possible that the context being passed in is the application context, but to be on the safe side, you should consider changing 'context.getSystemService(...)' to 'context.getApplicationContext().getSystemService(...)'. Issue id: WifiManagerPotentialLeak",
"markdown": "WifiManager Potential Leak \n\nOn versions prior to Android N (24), initializing the `WifiManager` via `Context#getSystemService` can cause a memory leak if the context is not the application context. \n\nIn many cases, it's not obvious from the code where the `Context` is coming from (e.g. it might be a parameter to a method, or a field initialized from various method calls). It's possible that the context being passed in is the application context, but to be on the safe side, you should consider changing `context.getSystemService(...)` to `context.getApplicationContext().getSystemService(...)`. \n\nIssue id: WifiManagerPotentialLeak"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintWifiManagerPotentialLeak",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintDuplicateIds",
"shortDescription": {
"text": "Duplicate ids within a single layout"
},
"fullDescription": {
"text": "Duplicate ids within a single layout Within a layout, id's should be unique since otherwise 'findViewById()' can return an unexpected view. Issue id: DuplicateIds",
"markdown": "Duplicate ids within a single layout \n\nWithin a layout, id's should be unique since otherwise `findViewById()` can return an unexpected view. \n\nIssue id: DuplicateIds"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintDuplicateIds",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintRequiredSize",
"shortDescription": {
"text": "Missing layout_width or layout_height attributes"
},
"fullDescription": {
"text": "Missing 'layout_width' or 'layout_height' attributes All views must specify an explicit 'layout_width' and 'layout_height' attribute. There is a runtime check for this, so if you fail to specify a size, an exception is thrown at runtime. It's possible to specify these widths via styles as well. GridLayout, as a special case, does not require you to specify a size. Issue id: RequiredSize",
"markdown": "Missing `layout_width` or `layout_height` attributes \n\nAll views must specify an explicit `layout_width` and `layout_height` attribute. There is a runtime check for this, so if you fail to specify a size, an exception is thrown at runtime. \n\nIt's possible to specify these widths via styles as well. GridLayout, as a special case, does not require you to specify a size. \n\nIssue id: RequiredSize"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintRequiredSize",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintBadHostnameVerifier",
"shortDescription": {
"text": "Insecure HostnameVerifier"
},
"fullDescription": {
"text": "Insecure HostnameVerifier This check looks for implementations of 'HostnameVerifier' whose 'verify' method always returns true (thus trusting any hostname) which could result in insecure network traffic caused by trusting arbitrary hostnames in TLS/SSL certificates presented by peers. Issue id: BadHostnameVerifier https://goo.gle/BadHostnameVerifier",
"markdown": "Insecure HostnameVerifier \n\nThis check looks for implementations of `HostnameVerifier` whose `verify` method always returns true (thus trusting any hostname) which could result in insecure network traffic caused by trusting arbitrary hostnames in TLS/SSL certificates presented by peers. \n\nIssue id: BadHostnameVerifier \n\n<https://goo.gle/BadHostnameVerifier>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintBadHostnameVerifier",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintIncompatibleMediaBrowserServiceCompatVersion",
"shortDescription": {
"text": "Obsolete version of MediaBrowserServiceCompat"
},
"fullDescription": {
"text": "Obsolete version of MediaBrowserServiceCompat 'MediaBrowserServiceCompat' from version 23.2.0 to 23.4.0 of the Support v4 Library used private APIs and will not be compatible with future versions of Android beyond Android N. Please upgrade to version 24.0.0 or higher of the Support Library. Issue id: IncompatibleMediaBrowserServiceCompatVersion",
"markdown": "Obsolete version of MediaBrowserServiceCompat \n\n`MediaBrowserServiceCompat` from version 23.2.0 to 23.4.0 of the Support v4 Library used private APIs and will not be compatible with future versions of Android beyond Android N. Please upgrade to version 24.0.0 or higher of the Support Library. \n\nIssue id: IncompatibleMediaBrowserServiceCompatVersion"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintIncompatibleMediaBrowserServiceCompatVersion",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintDevModeObsolete",
"shortDescription": {
"text": "Dev Mode Obsolete"
},
"fullDescription": {
"text": "Dev Mode Obsolete In the past, our documentation recommended creating a 'dev' product flavor with has a minSdkVersion of 21, in order to enable multidexing to speed up builds significantly during development. That workaround is no longer necessary, and it has some serious downsides, such as breaking API access checking (since the true 'minSdkVersion' is no longer known). In recent versions of the IDE and the Gradle plugin, the IDE automatically passes the API level of the connected device used for deployment, and if that device is at least API 21, then multidexing is automatically turned on, meaning that you get the same speed benefits as the 'dev' product flavor but without the downsides. Issue id: DevModeObsolete",
"markdown": "Dev Mode Obsolete \n\nIn the past, our documentation recommended creating a `dev` product flavor with has a minSdkVersion of 21, in order to enable multidexing to speed up builds significantly during development. \n\nThat workaround is no longer necessary, and it has some serious downsides, such as breaking API access checking (since the true `minSdkVersion` is no longer known). \n\nIn recent versions of the IDE and the Gradle plugin, the IDE automatically passes the API level of the connected device used for deployment, and if that device is at least API 21, then multidexing is automatically turned on, meaning that you get the same speed benefits as the `dev` product flavor but without the downsides. \n\nIssue id: DevModeObsolete"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintDevModeObsolete",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintIncludeLayoutParam",
"shortDescription": {
"text": "Ignored layout params on include"
},
"fullDescription": {
"text": "Ignored layout params on include Layout parameters specified on an '<include>' tag will only be used if you also override 'layout_width' and 'layout_height' on the '<include>' tag; otherwise they will be ignored. Issue id: IncludeLayoutParam https://stackoverflow.com/questions/2631614/does-android-xml-layouts-include-tag-really-work",
"markdown": "Ignored layout params on include \n\nLayout parameters specified on an `<include>` tag will only be used if you also override `layout_width` and `layout_height` on the `<include>` tag; otherwise they will be ignored. \n\nIssue id: IncludeLayoutParam \n\n<https://stackoverflow.com/questions/2631614/does-android-xml-layouts-include-tag-really-work>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintIncludeLayoutParam",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintGradlePath",
"shortDescription": {
"text": "Gradle Path Issues"
},
"fullDescription": {
"text": "Gradle Path Issues Gradle build scripts are meant to be cross platform, so file paths use Unix-style path separators (a forward slash) rather than Windows path separators (a backslash). Similarly, to keep projects portable and repeatable, avoid using absolute paths on the system; keep files within the project instead. To share code between projects, consider creating an android-library and an AAR dependency Issue id: GradlePath",
"markdown": "Gradle Path Issues \n\nGradle build scripts are meant to be cross platform, so file paths use Unix-style path separators (a forward slash) rather than Windows path separators (a backslash). Similarly, to keep projects portable and repeatable, avoid using absolute paths on the system; keep files within the project instead. To share code between projects, consider creating an android-library and an AAR dependency \n\nIssue id: GradlePath"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintGradlePath",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintGradleDeprecated",
"shortDescription": {
"text": "Deprecated Gradle Construct"
},
"fullDescription": {
"text": "Deprecated Gradle Construct This detector looks for deprecated Gradle constructs which currently work but will likely stop working in a future update. Issue id: GradleDeprecated",
"markdown": "Deprecated Gradle Construct \n\nThis detector looks for deprecated Gradle constructs which currently work but will likely stop working in a future update. \n\nIssue id: GradleDeprecated"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintGradleDeprecated",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintIconDuplicatesConfig",
"shortDescription": {
"text": "Identical bitmaps across various configurations"
},
"fullDescription": {
"text": "Identical bitmaps across various configurations If an icon is provided under different configuration parameters such as 'drawable-hdpi' or '-v11', they should typically be different. This detector catches cases where the same icon is provided in different configuration folder which is usually not intentional. Issue id: IconDuplicatesConfig",
"markdown": "Identical bitmaps across various configurations \n\nIf an icon is provided under different configuration parameters such as `drawable-hdpi` or `-v11`, they should typically be different. This detector catches cases where the same icon is provided in different configuration folder which is usually not intentional. \n\nIssue id: IconDuplicatesConfig"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintIconDuplicatesConfig",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintGrantAllUris",
"shortDescription": {
"text": "Content provider shares everything"
},
"fullDescription": {
"text": "Content provider shares everything The '<grant-uri-permission>' element allows specific paths to be shared. This detector checks for a path URL of just '/' (everything), which is probably not what you want; you should limit access to a subset. Issue id: GrantAllUris https://goo.gle/GrantAllUris",
"markdown": "Content provider shares everything \n\nThe `<grant-uri-permission>` element allows specific paths to be shared. This detector checks for a path URL of just '/' (everything), which is probably not what you want; you should limit access to a subset. \n\nIssue id: GrantAllUris \n\n<https://goo.gle/GrantAllUris>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintGrantAllUris",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintAssertionSideEffect",
"shortDescription": {
"text": "Assertions with Side Effects"
},
"fullDescription": {
"text": "Assertions with Side Effects Assertion conditions can have side effects. This is risky because the behavior depends on whether assertions are on or off. This is usually not intentional, and can lead to bugs where the production version differs from the version tested during development. Generally, you'll want to perform the operation with the side effect before the assertion, and then assert that the result was what you expected. Issue id: AssertionSideEffect",
"markdown": "Assertions with Side Effects \n\nAssertion conditions can have side effects. This is risky because the behavior depends on whether assertions are on or off. This is usually not intentional, and can lead to bugs where the production version differs from the version tested during development. \n\nGenerally, you'll want to perform the operation with the side effect before the assertion, and then assert that the result was what you expected. \n\nIssue id: AssertionSideEffect"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintAssertionSideEffect",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintProviderReadPermissionOnly",
"shortDescription": {
"text": "Provider with readPermission only and implemented write APIs"
},
"fullDescription": {
"text": "Provider with readPermission only and implemented write APIs This check looks for Content Providers that only have the 'readPermission' attribute but implement write APIs. If 'android:readPermission' is specified and both 'android:permission' and 'android:writePermission' are omitted, other apps can access any write operations that this provider exposes with no permission check. For a quick fix, changing the existing 'android:readPermission' to 'android:permission' will protect both read and write access with the same permission. Alternatively, declaring a separate 'android:writePermission' can protect write access with a different permission. Issue id: ProviderReadPermissionOnly",
"markdown": "Provider with readPermission only and implemented write APIs \n\nThis check looks for Content Providers that only have the `readPermission` attribute but implement write APIs. \n\nIf `android:readPermission` is specified and both `android:permission` and `android:writePermission` are omitted, other apps can access any write operations that this provider exposes with no permission check. For a quick fix, changing the existing `android:readPermission` to `android:permission` will protect both read and write access with the same permission. Alternatively, declaring a separate `android:writePermission` can protect write access with a different permission. \n\nIssue id: ProviderReadPermissionOnly"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintProviderReadPermissionOnly",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintWearStandaloneAppFlag",
"shortDescription": {
"text": "Invalid or missing Wear standalone app flag"
},
"fullDescription": {
"text": "Invalid or missing Wear standalone app flag Wearable apps should specify whether they can work standalone, without a phone app. Add a valid meta-data entry for 'com.google.android.wearable.standalone' to your application element and set the value to 'true' or 'false'. <meta-data android:name=\"com.google.android.wearable.standalone\"\n android:value=\"true\"/>`\n Issue id: WearStandaloneAppFlag https://developer.android.com/training/wearables/apps/packaging.html",
"markdown": "Invalid or missing Wear standalone app flag \n\nWearable apps should specify whether they can work standalone, without a phone app. Add a valid meta-data entry for `com.google.android.wearable.standalone` to your application element and set the value to `true` or `false`.\n\n```\n<meta-data android:name=\"com.google.android.wearable.standalone\"\n android:value=\"true\"/>`\n```\n\n<br />\n\n<br />\n\nIssue id: WearStandaloneAppFlag \n\n<https://developer.android.com/training/wearables/apps/packaging.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintWearStandaloneAppFlag",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintDeletedProvider",
"shortDescription": {
"text": "Using Deleted Provider"
},
"fullDescription": {
"text": "Using Deleted Provider The 'Crypto' provider has been completely removed in Android P (and was deprecated in an earlier release). This means that the code will throw a 'NoSuchProviderException' and the app will crash. Even if the code catches that exception at a higher level, this is not secure and should not be used. Issue id: DeletedProvider https://android-developers.googleblog.com/2018/03/cryptography-changes-in-android-p.html https://goo.gle/DeletedProvider",
"markdown": "Using Deleted Provider \n\nThe `Crypto` provider has been completely removed in Android P (and was deprecated in an earlier release). This means that the code will throw a `NoSuchProviderException` and the app will crash. Even if the code catches that exception at a higher level, this is not secure and should not be used. \n\nIssue id: DeletedProvider \n\n<https://android-developers.googleblog.com/2018/03/cryptography-changes-in-android-p.html> \n<https://goo.gle/DeletedProvider>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintDeletedProvider",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMissingPrefix",
"shortDescription": {
"text": "Missing Android XML namespace"
},
"fullDescription": {
"text": "Missing Android XML namespace Most Android views have attributes in the Android namespace. When referencing these attributes you must include the namespace prefix, or your attribute will be interpreted by 'aapt' as just a custom attribute. Similarly, in manifest files, nearly all attributes should be in the 'android:' namespace. Issue id: MissingPrefix",
"markdown": "Missing Android XML namespace \n\nMost Android views have attributes in the Android namespace. When referencing these attributes you **must** include the namespace prefix, or your attribute will be interpreted by `aapt` as just a custom attribute. \n\nSimilarly, in manifest files, nearly all attributes should be in the `android:` namespace. \n\nIssue id: MissingPrefix"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintMissingPrefix",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintDuplicateUsesFeature",
"shortDescription": {
"text": "Feature declared more than once"
},
"fullDescription": {
"text": "Feature declared more than once A given feature should only be declared once in the manifest. Issue id: DuplicateUsesFeature",
"markdown": "Feature declared more than once \n\nA given feature should only be declared once in the manifest. \n\nIssue id: DuplicateUsesFeature"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintDuplicateUsesFeature",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintValidRestrictions",
"shortDescription": {
"text": "Invalid Restrictions Descriptor"
},
"fullDescription": {
"text": "Invalid Restrictions Descriptor Ensures that an applications restrictions XML file is properly formed Issue id: ValidRestrictions https://developer.android.com/reference/android/content/RestrictionsManager.html",
"markdown": "Invalid Restrictions Descriptor \n\nEnsures that an applications restrictions XML file is properly formed \n\nIssue id: ValidRestrictions \n\n<https://developer.android.com/reference/android/content/RestrictionsManager.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintValidRestrictions",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUnlocalizedSms",
"shortDescription": {
"text": "SMS phone number missing country code"
},
"fullDescription": {
"text": "SMS phone number missing country code SMS destination numbers must start with a country code or the application code must ensure that the SMS is only sent when the user is in the same country as the receiver. Issue id: UnlocalizedSms",
"markdown": "SMS phone number missing country code \n\nSMS destination numbers must start with a country code or the application code must ensure that the SMS is only sent when the user is in the same country as the receiver. \n\nIssue id: UnlocalizedSms"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintUnlocalizedSms",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintIgnoreWithoutReason",
"shortDescription": {
"text": "@Ignore without Reason"
},
"fullDescription": {
"text": "@Ignore without Reason Ignoring a test without a reason makes it difficult to figure out the problem later. Please define an explicit reason why it is ignored, and when it can be resolved. Issue id: IgnoreWithoutReason Available options: allow-comments (default is true): Whether to allow a comment next to the @Ignore tag to be considered providing a reason. Normally you have to specify an annotation argument to the '@Ignore' annotation, but with this option you can configure whether it should also allow ignore reasons to specified by a comment adjacent to the ignore tag. To configure this option, use a 'lint.xml' file with an <option> like this: <lint>\n <issue id=\"IgnoreWithoutReason\">\n <option name=\"allow-comments\" value=\"true\" />\n </issue>\n</lint>",
"markdown": "@Ignore without Reason \n\nIgnoring a test without a reason makes it difficult to figure out the problem later. Please define an explicit reason why it is ignored, and when it can be resolved. \n\nIssue id: IgnoreWithoutReason \n\nAvailable options: \n\n**allow-comments** (default is true): \nWhether to allow a comment next to the @Ignore tag to be considered providing a reason. \n\nNormally you have to specify an annotation argument to the `@Ignore` annotation, but with this option you can configure whether it should also allow ignore reasons to specified by a comment adjacent to the ignore tag. \n\nTo configure this option, use a `lint.xml` file with an \\<option\\> like this: \n\n```\n<lint>\n <issue id=\"IgnoreWithoutReason\">\n <option name=\"allow-comments\" value=\"true\" />\n </issue>\n</lint>\n```"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintIgnoreWithoutReason",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Testing",
"index": 184,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUnsafeImplicitIntentLaunch",
"shortDescription": {
"text": "Implicit intent matches an internal non-exported component"
},
"fullDescription": {
"text": "Implicit intent matches an internal non-exported component This intent matches a non-exported component within the same app. In many cases, the app developer could instead use an explicit Intent to send messages to their internal components, ensuring that the messages are safely delivered without exposure to malicious apps on the device. Using such implicit intents will result in a crash in an upcoming version of Android. Issue id: UnsafeImplicitIntentLaunch https://goo.gle/ImplicitIntentHijack",
"markdown": "Implicit intent matches an internal non-exported component \n\nThis intent matches a non-exported component within the same app. In many cases, the app developer could instead use an explicit Intent to send messages to their internal components, ensuring that the messages are safely delivered without exposure to malicious apps on the device. Using such implicit intents will result in a crash in an upcoming version of Android. \n\nIssue id: UnsafeImplicitIntentLaunch \n\n<https://goo.gle/ImplicitIntentHijack>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintUnsafeImplicitIntentLaunch",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintSetTextI18n",
"shortDescription": {
"text": "TextView Internationalization"
},
"fullDescription": {
"text": "TextView Internationalization When calling 'TextView#setText' * Never call 'Number#toString()' to format numbers; it will not handle fraction separators and locale-specific digits properly. Consider using 'String#format' with proper format specifications ('%d' or '%f') instead. * Do not pass a string literal (e.g. \"Hello\") to display text. Hardcoded text can not be properly translated to other languages. Consider using Android resource strings instead. * Do not build messages by concatenating text chunks. Such messages can not be properly translated. Issue id: SetTextI18n https://developer.android.com/guide/topics/resources/localization.html",
"markdown": "TextView Internationalization \n\nWhen calling `TextView#setText` \n\\* Never call `Number#toString()` to format numbers; it will not handle fraction separators and locale-specific digits properly. Consider using `String#format` with proper format specifications (`%d` or `%f`) instead. \n\\* Do not pass a string literal (e.g. \"Hello\") to display text. Hardcoded text can not be properly translated to other languages. Consider using Android resource strings instead. \n\\* Do not build messages by concatenating text chunks. Such messages can not be properly translated. \n\nIssue id: SetTextI18n \n\n<https://developer.android.com/guide/topics/resources/localization.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintSetTextI18n",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Internationalization",
"index": 187,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintBlockedPrivateApi",
"shortDescription": {
"text": "Using Blocked Private API"
},
"fullDescription": {
"text": "Using Blocked Private API Usage of restricted non-SDK interface is forbidden for this targetSDK. Accessing non-SDK methods or fields through reflection has a high likelihood to break your app between versions, and is being restricted to facilitate future app compatibility. Issue id: BlockedPrivateApi https://developer.android.com/preview/restrictions-non-sdk-interfaces",
"markdown": "Using Blocked Private API \n\nUsage of restricted non-SDK interface is forbidden for this targetSDK. Accessing non-SDK methods or fields through reflection has a high likelihood to break your app between versions, and is being restricted to facilitate future app compatibility. \n\nIssue id: BlockedPrivateApi \n\n<https://developer.android.com/preview/restrictions-non-sdk-interfaces>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintBlockedPrivateApi",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUseSparseArrays",
"shortDescription": {
"text": "HashMap can be replaced with SparseArray"
},
"fullDescription": {
"text": "HashMap can be replaced with SparseArray For maps where the keys are of type integer, it's typically more efficient to use the Android 'SparseArray' API. This check identifies scenarios where you might want to consider using 'SparseArray' instead of 'HashMap' for better performance. This is particularly useful when the value types are primitives like ints, where you can use 'SparseIntArray' and avoid auto-boxing the values from 'int' to 'Integer'. If you need to construct a 'HashMap' because you need to call an API outside of your control which requires a 'Map', you can suppress this warning using for example the '@SuppressLint' annotation. Issue id: UseSparseArrays",
"markdown": "HashMap can be replaced with SparseArray \n\nFor maps where the keys are of type integer, it's typically more efficient to use the Android `SparseArray` API. This check identifies scenarios where you might want to consider using `SparseArray` instead of `HashMap` for better performance. \n\nThis is **particularly** useful when the value types are primitives like ints, where you can use `SparseIntArray` and avoid auto-boxing the values from `int` to `Integer`. \n\nIf you need to construct a `HashMap` because you need to call an API outside of your control which requires a `Map`, you can suppress this warning using for example the `@SuppressLint` annotation. \n\nIssue id: UseSparseArrays"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintUseSparseArrays",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintWrongFolder",
"shortDescription": {
"text": "Resource file in the wrong res folder"
},
"fullDescription": {
"text": "Resource file in the wrong 'res' folder Resource files are sometimes placed in the wrong folder, and it can lead to subtle bugs that are hard to understand. This check looks for problems in this area, such as attempting to place a layout \"alias\" file in a 'layout/' folder rather than the 'values/' folder where it belongs. Issue id: WrongFolder",
"markdown": "Resource file in the wrong `res` folder \n\nResource files are sometimes placed in the wrong folder, and it can lead to subtle bugs that are hard to understand. This check looks for problems in this area, such as attempting to place a layout \"alias\" file in a `layout/` folder rather than the `values/` folder where it belongs. \n\nIssue id: WrongFolder"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintWrongFolder",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUseCompoundDrawables",
"shortDescription": {
"text": "Node can be replaced by a TextView with compound drawables"
},
"fullDescription": {
"text": "Node can be replaced by a 'TextView' with compound drawables A 'LinearLayout' which contains an 'ImageView' and a 'TextView' can be more efficiently handled as a compound drawable (a single TextView, using the 'drawableTop', 'drawableLeft', 'drawableRight' and/or 'drawableBottom' attributes to draw one or more images adjacent to the text). If the two widgets are offset from each other with margins, this can be replaced with a 'drawablePadding' attribute. There's a lint quickfix to perform this conversion in the Eclipse plugin. Issue id: UseCompoundDrawables",
"markdown": "Node can be replaced by a `TextView` with compound drawables \n\nA `LinearLayout` which contains an `ImageView` and a `TextView` can be more efficiently handled as a compound drawable (a single TextView, using the `drawableTop`, `drawableLeft`, `drawableRight` and/or `drawableBottom` attributes to draw one or more images adjacent to the text). \n\nIf the two widgets are offset from each other with margins, this can be replaced with a `drawablePadding` attribute. \n\nThere's a lint quickfix to perform this conversion in the Eclipse plugin. \n\nIssue id: UseCompoundDrawables"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintUseCompoundDrawables",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintSSLCertificateSocketFactoryGetInsecure",
"shortDescription": {
"text": "Call to SSLCertificateSocketFactory.getInsecure()"
},
"fullDescription": {
"text": "Call to 'SSLCertificateSocketFactory.getInsecure()' The 'SSLCertificateSocketFactory.getInsecure()' method returns an SSLSocketFactory with all TLS/SSL security checks disabled, which could result in insecure network traffic caused by trusting arbitrary TLS/SSL certificates presented by peers. This method should be avoided unless needed for a special circumstance such as debugging. Instead, 'SSLCertificateSocketFactory.getDefault()' should be used. Issue id: SSLCertificateSocketFactoryGetInsecure https://goo.gle/SSLCertificateSocketFactoryGetInsecure",
"markdown": "Call to `SSLCertificateSocketFactory.getInsecure()` \n\nThe `SSLCertificateSocketFactory.getInsecure()` method returns an SSLSocketFactory with all TLS/SSL security checks disabled, which could result in insecure network traffic caused by trusting arbitrary TLS/SSL certificates presented by peers. This method should be avoided unless needed for a special circumstance such as debugging. Instead, `SSLCertificateSocketFactory.getDefault()` should be used. \n\nIssue id: SSLCertificateSocketFactoryGetInsecure \n\n<https://goo.gle/SSLCertificateSocketFactoryGetInsecure>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintSSLCertificateSocketFactoryGetInsecure",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintKotlinPropertyAccess",
"shortDescription": {
"text": "Kotlin Property Access"
},
"fullDescription": {
"text": "Kotlin Property Access For a method to be represented as a property in Kotlin, strict “bean”-style prefixing must be used. Accessor methods require a 'get' prefix or for boolean-returning methods an 'is' prefix can be used. Issue id: KotlinPropertyAccess https://android.github.io/kotlin-guides/interop.html#property-prefixes",
"markdown": "Kotlin Property Access \n\nFor a method to be represented as a property in Kotlin, strict \"bean\"-style prefixing must be used. \n\nAccessor methods require a `get` prefix or for boolean-returning methods an `is` prefix can be used. \n\nIssue id: KotlinPropertyAccess \n\n<https://android.github.io/kotlin-guides/interop.html#property-prefixes>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintKotlinPropertyAccess",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Interoperability",
"index": 53,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintWeekBasedYear",
"shortDescription": {
"text": "Week Based Year"
},
"fullDescription": {
"text": "Week Based Year The 'DateTimeFormatter' pattern 'YYYY' returns the week based year, not the era-based year. This means that 12/29/2019 will format to 2019, but 12/30/2019 will format to 2020! If you expected this to format as 2019, you should use the pattern 'yyyy' instead. Issue id: WeekBasedYear https://stackoverflow.com/questions/46847245/using-datetimeformatter-on-january-first-cause-an-invalid-year-value",
"markdown": "Week Based Year \n\nThe `DateTimeFormatter` pattern `YYYY` returns the *week* based year, not the era-based year. This means that 12/29/2019 will format to 2019, but 12/30/2019 will format to 2020! \n\nIf you expected this to format as 2019, you should use the pattern `yyyy` instead. \n\nIssue id: WeekBasedYear \n\n<https://stackoverflow.com/questions/46847245/using-datetimeformatter-on-january-first-cause-an-invalid-year-value>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintWeekBasedYear",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Internationalization",
"index": 187,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintSoonBlockedPrivateApi",
"shortDescription": {
"text": "Using Soon-to-Be Blocked Private API"
},
"fullDescription": {
"text": "Using Soon-to-Be Blocked Private API Usage of restricted non-SDK interface will throw an exception at runtime. Accessing non-SDK methods or fields through reflection has a high likelihood to break your app between versions, and is being restricted to facilitate future app compatibility. Issue id: SoonBlockedPrivateApi https://developer.android.com/preview/restrictions-non-sdk-interfaces",
"markdown": "Using Soon-to-Be Blocked Private API \n\nUsage of restricted non-SDK interface will throw an exception at runtime. Accessing non-SDK methods or fields through reflection has a high likelihood to break your app between versions, and is being restricted to facilitate future app compatibility. \n\nIssue id: SoonBlockedPrivateApi \n\n<https://developer.android.com/preview/restrictions-non-sdk-interfaces>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintSoonBlockedPrivateApi",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMissingLeanbackLauncher",
"shortDescription": {
"text": "Missing Leanback Launcher Intent Filter"
},
"fullDescription": {
"text": "Missing Leanback Launcher Intent Filter An application intended to run on TV devices must declare a launcher activity for TV in its manifest using a 'android.intent.category.LEANBACK_LAUNCHER' intent filter. Issue id: MissingLeanbackLauncher https://developer.android.com/training/tv/start/start.html#tv-activity",
"markdown": "Missing Leanback Launcher Intent Filter \n\nAn application intended to run on TV devices must declare a launcher activity for TV in its manifest using a `android.intent.category.LEANBACK_LAUNCHER` intent filter. \n\nIssue id: MissingLeanbackLauncher \n\n<https://developer.android.com/training/tv/start/start.html#tv-activity>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintMissingLeanbackLauncher",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintDeprecatedSinceApi",
"shortDescription": {
"text": "Using a method deprecated in earlier SDK"
},
"fullDescription": {
"text": "Using a method deprecated in earlier SDK Some backport methods are only necessary until a specific version of Android. These have been annotated with '@DeprecatedSinceApi', specifying the relevant API level and replacement suggestions. Calling these methods when the 'minSdkVersion' is already at the deprecated API level or above is unnecessary. Issue id: DeprecatedSinceApi",
"markdown": "Using a method deprecated in earlier SDK \n\nSome backport methods are only necessary until a specific version of Android. These have been annotated with `@DeprecatedSinceApi`, specifying the relevant API level and replacement suggestions. Calling these methods when the `minSdkVersion` is already at the deprecated API level or above is unnecessary. \n\nIssue id: DeprecatedSinceApi"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintDeprecatedSinceApi",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUnusedResources",
"shortDescription": {
"text": "Unused resources"
},
"fullDescription": {
"text": "Unused resources Unused resources make applications larger and slow down builds. The unused resource check can ignore tests. If you want to include resources that are only referenced from tests, consider packaging them in a test source set instead. You can include test sources in the unused resource check by setting the system property lint.unused-resources.include-tests =true, and to exclude them (usually for performance reasons), use lint.unused-resources.exclude-tests =true. , Issue id: UnusedResources",
"markdown": "Unused resources \n\nUnused resources make applications larger and slow down builds. \n\n<br />\n\nThe unused resource check can ignore tests. If you want to include resources that are only referenced from tests, consider packaging them in a test source set instead. \n\nYou can include test sources in the unused resource check by setting the system property lint.unused-resources.include-tests =true, and to exclude them (usually for performance reasons), use lint.unused-resources.exclude-tests =true. \n, \n\nIssue id: UnusedResources"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintUnusedResources",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintXmlEscapeNeeded",
"shortDescription": {
"text": "Missing XML Escape"
},
"fullDescription": {
"text": "Missing XML Escape When a string contains characters that have special usage in XML, you must escape the characters. Issue id: XmlEscapeNeeded",
"markdown": "Missing XML Escape \n\nWhen a string contains characters that have special usage in XML, you must escape the characters. \n\nIssue id: XmlEscapeNeeded"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintXmlEscapeNeeded",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMissingBackupPin",
"shortDescription": {
"text": "Missing Backup Pin"
},
"fullDescription": {
"text": "Missing Backup Pin It is highly recommended to declare a backup '<pin>' element. Not having a second pin defined can cause connection failures when the particular site certificate is rotated and the app has not yet been updated. Issue id: MissingBackupPin https://developer.android.com/preview/features/security-config.html",
"markdown": "Missing Backup Pin \n\nIt is highly recommended to declare a backup `<pin>` element. Not having a second pin defined can cause connection failures when the particular site certificate is rotated and the app has not yet been updated. \n\nIssue id: MissingBackupPin \n\n<https://developer.android.com/preview/features/security-config.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintMissingBackupPin",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidUnresolvableTag",
"shortDescription": {
"text": "Unresolvable tag"
},
"fullDescription": {
"text": "This inspection highlights unresolvable XML tag references in Android resource files",
"markdown": "This inspection highlights unresolvable XML tag references in Android resource files"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidUnresolvableTag",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android",
"index": 14,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintAppCompatResource",
"shortDescription": {
"text": "Menu namespace"
},
"fullDescription": {
"text": "Menu namespace When using the appcompat library, menu resources should refer to the 'showAsAction' (or 'actionViewClass', or 'actionProviderClass') in the 'app:' namespace, not the 'android:' namespace. Similarly, when not using the appcompat library, you should be using the 'android:showAsAction' (or 'actionViewClass', or 'actionProviderClass') attribute. Issue id: AppCompatResource",
"markdown": "Menu namespace \n\nWhen using the appcompat library, menu resources should refer to the `showAsAction` (or `actionViewClass`, or `actionProviderClass`) in the `app:` namespace, not the `android:` namespace. \n\nSimilarly, when **not** using the appcompat library, you should be using the `android:showAsAction` (or `actionViewClass`, or `actionProviderClass`) attribute. \n\nIssue id: AppCompatResource"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintAppCompatResource",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintHighAppVersionCode",
"shortDescription": {
"text": "VersionCode too high"
},
"fullDescription": {
"text": "VersionCode too high The declared 'versionCode' is an Integer. Ensure that the version number is not close to the limit. It is recommended to monotonically increase this number each minor or major release of the app. Note that updating an app with a versionCode over 'Integer.MAX_VALUE' is not possible. Issue id: HighAppVersionCode https://developer.android.com/studio/publish/versioning.html",
"markdown": "VersionCode too high \n\nThe declared `versionCode` is an Integer. Ensure that the version number is not close to the limit. It is recommended to monotonically increase this number each minor or major release of the app. Note that updating an app with a versionCode over `Integer.MAX_VALUE` is not possible. \n\nIssue id: HighAppVersionCode \n\n<https://developer.android.com/studio/publish/versioning.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintHighAppVersionCode",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintWatchFaceEditor",
"shortDescription": {
"text": "Watch face editor must use launchMode=\"standard\""
},
"fullDescription": {
"text": "Watch face editor must use launchMode=\"standard\" Watch face editor activities must be able to launch in the Wear OS companion app activity task in order to work correctly. Thus only 'launchMode=\"standard\"' is allowed. The watch face will not be shown on the watch if it does not satisfy this requirement. Issue id: WatchFaceEditor",
"markdown": "Watch face editor must use launchMode=\"standard\" \n\nWatch face editor activities must be able to launch in the Wear OS companion app activity task in order to work correctly. Thus only `launchMode=\"standard\"` is allowed. The watch face will not be shown on the watch if it does not satisfy this requirement. \n\nIssue id: WatchFaceEditor"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintWatchFaceEditor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintNoHardKeywords",
"shortDescription": {
"text": "No Hard Kotlin Keywords"
},
"fullDescription": {
"text": "No Hard Kotlin Keywords Do not use Kotlins hard keywords as the name of methods or fields. These require the use of backticks to escape when calling from Kotlin. Soft keywords, modifier keywords, and special identifiers are allowed. For example, ActionEvent's 'getWhen()' method requires backticks when used from Kotlin: val timestamp = event.`when`\n Issue id: NoHardKeywords https://android.github.io/kotlin-guides/interop.html#no-hard-keywords",
"markdown": "No Hard Kotlin Keywords \n\nDo not use Kotlin's hard keywords as the name of methods or fields. These require the use of backticks to escape when calling from Kotlin. Soft keywords, modifier keywords, and special identifiers are allowed. \n\nFor example, ActionEvent's `getWhen()` method requires backticks when used from Kotlin:\n\n```\nval timestamp = event.`when`\n```\n\n<br />\n\n<br />\n\nIssue id: NoHardKeywords \n\n<https://android.github.io/kotlin-guides/interop.html#no-hard-keywords>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintNoHardKeywords",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Interoperability",
"index": 53,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintPrivateResource",
"shortDescription": {
"text": "Using private resources"
},
"fullDescription": {
"text": "Using private resources Private resources should not be referenced; the may not be present everywhere, and even where they are they may disappear without notice. To fix this, copy the resource into your own project instead. Issue id: PrivateResource",
"markdown": "Using private resources \n\nPrivate resources should not be referenced; the may not be present everywhere, and even where they are they may disappear without notice. \n\nTo fix this, copy the resource into your own project instead. \n\nIssue id: PrivateResource"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintPrivateResource",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintExportedReceiver",
"shortDescription": {
"text": "Receiver does not require permission"
},
"fullDescription": {
"text": "Receiver does not require permission Exported receivers (receivers which either set 'exported=true' or contain an intent-filter and do not specify 'exported=false') should define a permission that an entity must have in order to launch the receiver or bind to it. Without this, any application can use this receiver. Issue id: ExportedReceiver https://goo.gle/ExportedReceiver",
"markdown": "Receiver does not require permission \n\nExported receivers (receivers which either set `exported=true` or contain an intent-filter and do not specify `exported=false`) should define a permission that an entity must have in order to launch the receiver or bind to it. Without this, any application can use this receiver. \n\nIssue id: ExportedReceiver \n\n<https://goo.gle/ExportedReceiver>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintExportedReceiver",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintRestrictedApi",
"shortDescription": {
"text": "Restricted API"
},
"fullDescription": {
"text": "Restricted API This API has been flagged with a restriction that has not been met. Examples of API restrictions: * Method can only be invoked by a subclass * Method can only be accessed from within the same library (defined by the Gradle library group id) * Method can only be accessed from tests. You can add your own API restrictions with the '@RestrictTo' annotation. Issue id: RestrictedApi",
"markdown": "Restricted API \n\nThis API has been flagged with a restriction that has not been met. \n\nExamples of API restrictions: \n\\* Method can only be invoked by a subclass \n\\* Method can only be accessed from within the same library (defined by the Gradle library group id) \n\\* Method can only be accessed from tests. \n\nYou can add your own API restrictions with the `@RestrictTo` annotation. \n\nIssue id: RestrictedApi"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintRestrictedApi",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintInternalInsetResource",
"shortDescription": {
"text": "Using internal inset dimension resource"
},
"fullDescription": {
"text": "Using internal inset dimension resource The internal inset dimension resources are not a supported way to retrieve the relevant insets for your application. The insets are dynamic values that can change while your app is visible, and your app's window may not intersect with the system UI. To get the relevant value for your app and listen to updates, use 'androidx.core.view.WindowInsetsCompat' and related APIs. Issue id: InternalInsetResource",
"markdown": "Using internal inset dimension resource \n\nThe internal inset dimension resources are not a supported way to retrieve the relevant insets for your application. The insets are dynamic values that can change while your app is visible, and your app's window may not intersect with the system UI. To get the relevant value for your app and listen to updates, use `androidx.core.view.WindowInsetsCompat` and related APIs. \n\nIssue id: InternalInsetResource"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintInternalInsetResource",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintAccidentalOctal",
"shortDescription": {
"text": "Accidental Octal"
},
"fullDescription": {
"text": "Accidental Octal In Groovy, an integer literal that starts with a leading 0 will be interpreted as an octal number. That is usually (always?) an accident and can lead to subtle bugs, for example when used in the 'versionCode' of an app. Issue id: AccidentalOctal",
"markdown": "Accidental Octal \n\nIn Groovy, an integer literal that starts with a leading 0 will be interpreted as an octal number. That is usually (always?) an accident and can lead to subtle bugs, for example when used in the `versionCode` of an app. \n\nIssue id: AccidentalOctal"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintAccidentalOctal",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintRedundantNamespace",
"shortDescription": {
"text": "Redundant namespace"
},
"fullDescription": {
"text": "Redundant namespace In Android XML documents, only specify the namespace on the root/document element. Namespace declarations elsewhere in the document are typically accidental leftovers from copy/pasting XML from other files or documentation. Issue id: RedundantNamespace",
"markdown": "Redundant namespace \n\nIn Android XML documents, only specify the namespace on the root/document element. Namespace declarations elsewhere in the document are typically accidental leftovers from copy/pasting XML from other files or documentation. \n\nIssue id: RedundantNamespace"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintRedundantNamespace",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintLongLogTag",
"shortDescription": {
"text": "Too Long Log Tags"
},
"fullDescription": {
"text": "Too Long Log Tags Log tags are only allowed to be at most 23 tag characters long. Issue id: LongLogTag",
"markdown": "Too Long Log Tags \n\nLog tags are only allowed to be at most 23 tag characters long. \n\nIssue id: LongLogTag"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintLongLogTag",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMonochromeLauncherIcon",
"shortDescription": {
"text": "Monochrome icon is not defined"
},
"fullDescription": {
"text": "Monochrome icon is not defined If 'android:roundIcon' and 'android:icon' are both in your manifest, you must either remove the reference to 'android:roundIcon' if it is not needed; or, supply the monochrome icon in the drawable defined by the 'android:roundIcon' and 'android:icon' attribute. For example, if 'android:roundIcon' and 'android:icon' are both in the manifest, a launcher might choose to use 'android:roundIcon' over 'android:icon' to display the adaptive app icon. Therefore, your themed application iconwill not show if your monochrome attribute is not also specified in 'android:roundIcon'. Issue id: MonochromeLauncherIcon",
"markdown": "Monochrome icon is not defined \n\nIf `android:roundIcon` and `android:icon` are both in your manifest, you must either remove the reference to `android:roundIcon` if it is not needed; or, supply the monochrome icon in the drawable defined by the `android:roundIcon` and `android:icon` attribute. \n\nFor example, if `android:roundIcon` and `android:icon` are both in the manifest, a launcher might choose to use `android:roundIcon` over `android:icon` to display the adaptive app icon. Therefore, your themed application iconwill not show if your monochrome attribute is not also specified in `android:roundIcon`. \n\nIssue id: MonochromeLauncherIcon"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintMonochromeLauncherIcon",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintTypographyEllipsis",
"shortDescription": {
"text": "Ellipsis string can be replaced with ellipsis character"
},
"fullDescription": {
"text": "Ellipsis string can be replaced with ellipsis character You can replace the string \"...\" with a dedicated ellipsis character, ellipsis character (u2026, &#8230;). This can help make the text more readable. Issue id: TypographyEllipsis https://en.wikipedia.org/wiki/Ellipsis",
"markdown": "Ellipsis string can be replaced with ellipsis character \n\nYou can replace the string \"...\" with a dedicated ellipsis character, ellipsis character (u2026, \\&#8230;). This can help make the text more readable. \n\nIssue id: TypographyEllipsis \n\n<https://en.wikipedia.org/wiki/Ellipsis>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintTypographyEllipsis",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintExpiredTargetSdkVersion",
"shortDescription": {
"text": "TargetSdkVersion No Longer Supported"
},
"fullDescription": {
"text": "TargetSdkVersion No Longer Supported As of the second half of 2018, Google Play requires that new apps and app updates target API level 26 or higher. Configuring your app to target a recent API level ensures that users benefit from significant security and performance improvements, while still allowing your app to run on older Android versions (down to the 'minSdkVersion'). To update your 'targetSdkVersion', follow the steps from \"Meeting Google Play requirements for target API level\", https://developer.android.com/distribute/best-practices/develop/target-sdk.html Issue id: ExpiredTargetSdkVersion https://support.google.com/googleplay/android-developer/answer/113469#targetsdk",
"markdown": "TargetSdkVersion No Longer Supported \n\nAs of the second half of 2018, Google Play requires that new apps and app updates target API level 26 or higher. \n\nConfiguring your app to target a recent API level ensures that users benefit from significant security and performance improvements, while still allowing your app to run on older Android versions (down to the `minSdkVersion`). \n\nTo update your `targetSdkVersion`, follow the steps from \"Meeting Google Play requirements for target API level\", <https://developer.android.com/distribute/best-practices/develop/target-sdk.html> \n\nIssue id: ExpiredTargetSdkVersion \n\n<https://support.google.com/googleplay/android-developer/answer/113469#targetsdk>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintExpiredTargetSdkVersion",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Compliance",
"index": 203,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintRegistered",
"shortDescription": {
"text": "Class is not registered in the manifest"
},
"fullDescription": {
"text": "Class is not registered in the manifest Activities, services and content providers should be registered in the 'AndroidManifest.xml' file using '<activity>', '<service>' and '<provider>' tags. If your activity is simply a parent class intended to be subclassed by other \"real\" activities, make it an abstract class. Issue id: Registered https://developer.android.com/guide/topics/manifest/manifest-intro.html",
"markdown": "Class is not registered in the manifest \n\nActivities, services and content providers should be registered in the `AndroidManifest.xml` file using `<activity>`, `<service>` and `<provider>` tags. \n\nIf your activity is simply a parent class intended to be subclassed by other \"real\" activities, make it an abstract class. \n\nIssue id: Registered \n\n<https://developer.android.com/guide/topics/manifest/manifest-intro.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintRegistered",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintChromeOsAbiSupport",
"shortDescription": {
"text": "Missing ABI Support for ChromeOS"
},
"fullDescription": {
"text": "Missing ABI Support for ChromeOS To properly support ChromeOS, your Android application should have an x86 and/or x86_64 binary as part of the build configuration. To fix the issue, ensure your files are properly optimized for ARM; the binary translator will then ensure compatibility with x86. Alternatively, add an 'abiSplit' for x86 within your 'build.gradle' file and create the required x86 dependencies. Issue id: ChromeOsAbiSupport https://developer.android.com/ndk/guides/abis",
"markdown": "Missing ABI Support for ChromeOS \n\nTo properly support ChromeOS, your Android application should have an x86 and/or x86_64 binary as part of the build configuration. To fix the issue, ensure your files are properly optimized for ARM; the binary translator will then ensure compatibility with x86. Alternatively, add an `abiSplit` for x86 within your `build.gradle` file and create the required x86 dependencies. \n\nIssue id: ChromeOsAbiSupport \n\n<https://developer.android.com/ndk/guides/abis>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintChromeOsAbiSupport",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintProguard",
"shortDescription": {
"text": "Using obsolete ProGuard configuration"
},
"fullDescription": {
"text": "Using obsolete ProGuard configuration Using '-keepclasseswithmembernames' in a proguard config file is not correct; it can cause some symbols to be renamed which should not be. Earlier versions of ADT used to create proguard.cfg files with the wrong format. Instead of '-keepclasseswithmembernames' use '-keepclasseswithmembers', since the old flags also implies \"allow shrinking\" which means symbols only referred to from XML and not Java (such as possibly CustomViews) can get deleted. Issue id: Proguard https://issuetracker.google.com/36928077",
"markdown": "Using obsolete ProGuard configuration \n\nUsing `-keepclasseswithmembernames` in a proguard config file is not correct; it can cause some symbols to be renamed which should not be. \n\nEarlier versions of ADT used to create proguard.cfg files with the wrong format. Instead of `-keepclasseswithmembernames` use `-keepclasseswithmembers`, since the old flags also implies \"allow shrinking\" which means symbols only referred to from XML and not Java (such as possibly CustomViews) can get deleted. \n\nIssue id: Proguard \n\n<https://issuetracker.google.com/36928077>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintProguard",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMissingClass",
"shortDescription": {
"text": "Missing registered class"
},
"fullDescription": {
"text": "Missing registered class If a class is referenced in the manifest or in a layout file, it must also exist in the project (or in one of the libraries included by the project. This check helps uncover typos in registration names, or attempts to rename or move classes without updating the XML references properly. Issue id: MissingClass https://developer.android.com/guide/topics/manifest/manifest-intro.html",
"markdown": "Missing registered class \n\nIf a class is referenced in the manifest or in a layout file, it must also exist in the project (or in one of the libraries included by the project. This check helps uncover typos in registration names, or attempts to rename or move classes without updating the XML references properly. \n\nIssue id: MissingClass \n\n<https://developer.android.com/guide/topics/manifest/manifest-intro.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintMissingClass",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintRtlSymmetry",
"shortDescription": {
"text": "Padding and margin symmetry"
},
"fullDescription": {
"text": "Padding and margin symmetry If you specify padding or margin on the left side of a layout, you should probably also specify padding on the right side (and vice versa) for right-to-left layout symmetry. Issue id: RtlSymmetry",
"markdown": "Padding and margin symmetry \n\nIf you specify padding or margin on the left side of a layout, you should probably also specify padding on the right side (and vice versa) for right-to-left layout symmetry. \n\nIssue id: RtlSymmetry"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintRtlSymmetry",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Internationalization",
"index": 187,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintSetAndClearCommunicationDevice",
"shortDescription": {
"text": "Clearing communication device"
},
"fullDescription": {
"text": "Clearing communication device After selecting the audio device for communication use cases using 'setCommunicationDevice(AudioDeviceInfo device)', the selection is active as long as the requesting application process lives, until 'clearCommunicationDevice()' is called or until the device is disconnected. It is therefore important to clear the request when a call ends or the requesting activity or service is stopped or destroyed. Issue id: SetAndClearCommunicationDevice",
"markdown": "Clearing communication device \n\nAfter selecting the audio device for communication use cases using `setCommunicationDevice(AudioDeviceInfo device)`, the selection is active as long as the requesting application process lives, until `clearCommunicationDevice()` is called or until the device is disconnected. It is therefore important to clear the request when a call ends or the requesting activity or service is stopped or destroyed. \n\nIssue id: SetAndClearCommunicationDevice"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintSetAndClearCommunicationDevice",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintDuplicateDefinition",
"shortDescription": {
"text": "Duplicate definitions of resources"
},
"fullDescription": {
"text": "Duplicate definitions of resources You can define a resource multiple times in different resource folders; that's how string translations are done, for example. However, defining the same resource more than once in the same resource folder is likely an error, for example attempting to add a new resource without realizing that the name is already used, and so on. Issue id: DuplicateDefinition",
"markdown": "Duplicate definitions of resources \n\nYou can define a resource multiple times in different resource folders; that's how string translations are done, for example. However, defining the same resource more than once in the same resource folder is likely an error, for example attempting to add a new resource without realizing that the name is already used, and so on. \n\nIssue id: DuplicateDefinition"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintDuplicateDefinition",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintSyntheticAccessor",
"shortDescription": {
"text": "Synthetic Accessor"
},
"fullDescription": {
"text": "Synthetic Accessor A private inner class which is accessed from the outer class will force the compiler to insert a synthetic accessor; this means that you are causing extra overhead. This is not important in small projects, but is important for large apps running up against the 64K method handle limit, and especially for libraries where you want to make sure your library is as small as possible for the cases where your library is used in an app running up against the 64K limit. Issue id: SyntheticAccessor",
"markdown": "Synthetic Accessor \n\nA private inner class which is accessed from the outer class will force the compiler to insert a synthetic accessor; this means that you are causing extra overhead. This is not important in small projects, but is important for large apps running up against the 64K method handle limit, and especially for **libraries** where you want to make sure your library is as small as possible for the cases where your library is used in an app running up against the 64K limit. \n\nIssue id: SyntheticAccessor"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintSyntheticAccessor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintNetworkSecurityConfig",
"shortDescription": {
"text": "Valid Network Security Config File"
},
"fullDescription": {
"text": "Valid Network Security Config File Ensures that a '<network-security-config>' file, which is pointed to by an 'android:networkSecurityConfig' attribute in the manifest file, is valid Issue id: NetworkSecurityConfig https://developer.android.com/preview/features/security-config.html",
"markdown": "Valid Network Security Config File \n\nEnsures that a `<network-security-config>` file, which is pointed to by an `android:networkSecurityConfig` attribute in the manifest file, is valid \n\nIssue id: NetworkSecurityConfig \n\n<https://developer.android.com/preview/features/security-config.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintNetworkSecurityConfig",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintDisableBaselineAlignment",
"shortDescription": {
"text": "Missing baselineAligned attribute"
},
"fullDescription": {
"text": "Missing 'baselineAligned' attribute When a 'LinearLayout' is used to distribute the space proportionally between nested layouts, the baseline alignment property should be turned off to make the layout computation faster. Issue id: DisableBaselineAlignment",
"markdown": "Missing `baselineAligned` attribute \n\nWhen a `LinearLayout` is used to distribute the space proportionally between nested layouts, the baseline alignment property should be turned off to make the layout computation faster. \n\nIssue id: DisableBaselineAlignment"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintDisableBaselineAlignment",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintHardcodedText",
"shortDescription": {
"text": "Hardcoded text"
},
"fullDescription": {
"text": "Hardcoded text Hardcoding text attributes directly in layout files is bad for several reasons: * When creating configuration variations (for example for landscape or portrait) you have to repeat the actual text (and keep it up to date when making changes) * The application cannot be translated to other languages by just adding new translations for existing string resources. There are quickfixes to automatically extract this hardcoded string into a resource lookup. Issue id: HardcodedText",
"markdown": "Hardcoded text \n\nHardcoding text attributes directly in layout files is bad for several reasons: \n\n\\* When creating configuration variations (for example for landscape or portrait) you have to repeat the actual text (and keep it up to date when making changes) \n\n\\* The application cannot be translated to other languages by just adding new translations for existing string resources. \n\nThere are quickfixes to automatically extract this hardcoded string into a resource lookup. \n\nIssue id: HardcodedText"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintHardcodedText",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Internationalization",
"index": 187,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintNestedScrolling",
"shortDescription": {
"text": "Nested scrolling widgets"
},
"fullDescription": {
"text": "Nested scrolling widgets A scrolling widget such as a 'ScrollView' should not contain any nested scrolling widgets since this has various usability issues Issue id: NestedScrolling",
"markdown": "Nested scrolling widgets \n\nA scrolling widget such as a `ScrollView` should not contain any nested scrolling widgets since this has various usability issues \n\nIssue id: NestedScrolling"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintNestedScrolling",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintInvalidAnalyticsName",
"shortDescription": {
"text": "Invalid Analytics Name"
},
"fullDescription": {
"text": "Invalid Analytics Name Event names and parameters must follow the naming conventions defined in the`FirebaseAnalytics#logEvent()` documentation. Issue id: InvalidAnalyticsName https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics#logEvent(java.lang.String,%20android.os.Bundle)",
"markdown": "Invalid Analytics Name \n\nEvent names and parameters must follow the naming conventions defined in the\\`FirebaseAnalytics#logEvent()\\` documentation. \n\nIssue id: InvalidAnalyticsName \n\n<https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics#logEvent(java.lang.String,%20android.os.Bundle)>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintInvalidAnalyticsName",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintHandlerLeak",
"shortDescription": {
"text": "Handler reference leaks"
},
"fullDescription": {
"text": "Handler reference leaks Since this Handler is declared as an inner class, it may prevent the outer class from being garbage collected. If the Handler is using a 'Looper' or 'MessageQueue' for a thread other than the main thread, then there is no issue. If the 'Handler' is using the 'Looper' or 'MessageQueue' of the main thread, you need to fix your 'Handler' declaration, as follows: Declare the 'Handler' as a static class; In the outer class, instantiate a 'WeakReference' to the outer class and pass this object to your 'Handler' when you instantiate the 'Handler'; Make all references to members of the outer class using the 'WeakReference' object. Issue id: HandlerLeak",
"markdown": "Handler reference leaks \n\nSince this Handler is declared as an inner class, it may prevent the outer class from being garbage collected. If the Handler is using a `Looper` or `MessageQueue` for a thread other than the main thread, then there is no issue. If the `Handler` is using the `Looper` or `MessageQueue` of the main thread, you need to fix your `Handler` declaration, as follows: Declare the `Handler` as a static class; In the outer class, instantiate a `WeakReference` to the outer class and pass this object to your `Handler` when you instantiate the `Handler`; Make all references to members of the outer class using the `WeakReference` object. \n\nIssue id: HandlerLeak"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintHandlerLeak",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMissingFirebaseInstanceTokenRefresh",
"shortDescription": {
"text": "Missing Firebase Messaging Callback"
},
"fullDescription": {
"text": "Missing Firebase Messaging Callback Apps that use Firebase Cloud Messaging should implement the 'FirebaseMessagingService#onNewToken()' callback in order to observe token changes. Issue id: MissingFirebaseInstanceTokenRefresh https://firebase.google.com/docs/cloud-messaging/android/client#monitor-token-generation",
"markdown": "Missing Firebase Messaging Callback \n\nApps that use Firebase Cloud Messaging should implement the `FirebaseMessagingService#onNewToken()` callback in order to observe token changes. \n\nIssue id: MissingFirebaseInstanceTokenRefresh \n\n<https://firebase.google.com/docs/cloud-messaging/android/client#monitor-token-generation>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintMissingFirebaseInstanceTokenRefresh",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintReservedSystemPermission",
"shortDescription": {
"text": "Permission name is a reserved Android permission"
},
"fullDescription": {
"text": "Permission name is a reserved Android permission This check looks for custom permission declarations whose names are reserved values for system or Android SDK permissions, or begin with the reserved string 'android.' Please double check the permission name you have supplied. Attempting to redeclare a system or Android SDK permission will be ignored. Using the prefix 'android.' is a violation of the Android Compatibility Definition Document. Issue id: ReservedSystemPermission",
"markdown": "Permission name is a reserved Android permission \n\nThis check looks for custom permission declarations whose names are reserved values for system or Android SDK permissions, or begin with the reserved string `android.` \n\nPlease double check the permission name you have supplied. Attempting to redeclare a system or Android SDK permission will be ignored. Using the prefix `android.` is a violation of the Android Compatibility Definition Document. \n\nIssue id: ReservedSystemPermission"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintReservedSystemPermission",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "XmlWrongFileType",
"shortDescription": {
"text": "Android XML root tag validation"
},
"fullDescription": {
"text": "This inspections checks whether XML resources are stored in resource folder which type is recommended by documentation",
"markdown": "This inspections checks whether XML resources are stored in resource folder which type is recommended by documentation"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "XmlWrongFileType",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android",
"index": 14,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintSelectableText",
"shortDescription": {
"text": "Dynamic text should probably be selectable"
},
"fullDescription": {
"text": "Dynamic text should probably be selectable If a '<TextView>' is used to display data, the user might want to copy that data and paste it elsewhere. To allow this, the '<TextView>' should specify 'android:textIsSelectable=\"true\"'. This lint check looks for TextViews which are likely to be displaying data: views whose text is set dynamically. Issue id: SelectableText",
"markdown": "Dynamic text should probably be selectable \n\nIf a `<TextView>` is used to display data, the user might want to copy that data and paste it elsewhere. To allow this, the `<TextView>` should specify `android:textIsSelectable=\"true\"`. \n\nThis lint check looks for TextViews which are likely to be displaying data: views whose text is set dynamically. \n\nIssue id: SelectableText"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintSelectableText",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintWebViewClientOnReceivedSslError",
"shortDescription": {
"text": "Proceeds with the HTTPS connection despite SSL errors"
},
"fullDescription": {
"text": "Proceeds with the HTTPS connection despite SSL errors This check looks for 'onReceivedSslError' implementations that invoke 'SslErrorHandler#proceed'. Issue id: WebViewClientOnReceivedSslError https://goo.gle/WebViewClientOnReceivedSslError",
"markdown": "Proceeds with the HTTPS connection despite SSL errors \n\nThis check looks for `onReceivedSslError` implementations that invoke `SslErrorHandler#proceed`. \n\nIssue id: WebViewClientOnReceivedSslError \n\n<https://goo.gle/WebViewClientOnReceivedSslError>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintWebViewClientOnReceivedSslError",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintInflateParams",
"shortDescription": {
"text": "Layout Inflation without a Parent"
},
"fullDescription": {
"text": "Layout Inflation without a Parent When inflating a layout, avoid passing in null as the parent view, since otherwise any layout parameters on the root of the inflated layout will be ignored. Issue id: InflateParams https://www.bignerdranch.com/blog/understanding-androids-layoutinflater-inflate/",
"markdown": "Layout Inflation without a Parent \n\nWhen inflating a layout, avoid passing in null as the parent view, since otherwise any layout parameters on the root of the inflated layout will be ignored. \n\nIssue id: InflateParams \n\n<https://www.bignerdranch.com/blog/understanding-androids-layoutinflater-inflate/>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintInflateParams",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUnspecifiedImmutableFlag",
"shortDescription": {
"text": "Missing PendingIntent mutability flag"
},
"fullDescription": {
"text": "Missing 'PendingIntent' mutability flag Apps targeting Android 12 and higher must specify either 'FLAG_IMMUTABLE' or 'FLAG_MUTABLE' when constructing a 'PendingIntent'. 'FLAG_IMMUTABLE' is available since target SDK 23, and is almost always the best choice. See https://developer.android.com/guide/components/intents-filters#CreateImmutablePendingIntents for a list of common exceptions to this rule. Issue id: UnspecifiedImmutableFlag https://developer.android.com/about/versions/12/behavior-changes-12#pending-intent-mutability https://goo.gle/UnspecifiedImmutableFlag",
"markdown": "Missing `PendingIntent` mutability flag \n\nApps targeting Android 12 and higher must specify either `FLAG_IMMUTABLE` or `FLAG_MUTABLE` when constructing a `PendingIntent`. \n\n`FLAG_IMMUTABLE` is available since target SDK 23, and is almost always the best choice. See <https://developer.android.com/guide/components/intents-filters#CreateImmutablePendingIntents> for a list of common exceptions to this rule. \n\nIssue id: UnspecifiedImmutableFlag \n\n<https://developer.android.com/about/versions/12/behavior-changes-12#pending-intent-mutability> \n<https://goo.gle/UnspecifiedImmutableFlag>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintUnspecifiedImmutableFlag",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintInvalidWearFeatureAttribute",
"shortDescription": {
"text": "Invalid attribute for Wear uses-feature"
},
"fullDescription": {
"text": "Invalid attribute for Wear uses-feature For the 'android.hardware.type.watch' uses-feature, android:required=\"false\" is disallowed. A single APK for Wear and non-Wear devices is not supported. Issue id: InvalidWearFeatureAttribute https://developer.android.com/training/wearables/apps/packaging.html",
"markdown": "Invalid attribute for Wear uses-feature \n\nFor the `android.hardware.type.watch` uses-feature, android:required=\"false\" is disallowed. A single APK for Wear and non-Wear devices is not supported. \n\nIssue id: InvalidWearFeatureAttribute \n\n<https://developer.android.com/training/wearables/apps/packaging.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintInvalidWearFeatureAttribute",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintNegativeMargin",
"shortDescription": {
"text": "Negative Margins"
},
"fullDescription": {
"text": "Negative Margins Margin values should be positive. Negative values are generally a sign that you are making assumptions about views surrounding the current one, or may be tempted to turn off child clipping to allow a view to escape its parent. Turning off child clipping to do this not only leads to poor graphical performance, it also results in wrong touch event handling since touch events are based strictly on a chain of parent-rect hit tests. Finally, making assumptions about the size of strings can lead to localization problems. Issue id: NegativeMargin",
"markdown": "Negative Margins \n\nMargin values should be positive. Negative values are generally a sign that you are making assumptions about views surrounding the current one, or may be tempted to turn off child clipping to allow a view to escape its parent. Turning off child clipping to do this not only leads to poor graphical performance, it also results in wrong touch event handling since touch events are based strictly on a chain of parent-rect hit tests. Finally, making assumptions about the size of strings can lead to localization problems. \n\nIssue id: NegativeMargin"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintNegativeMargin",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintPendingBindings",
"shortDescription": {
"text": "Missing Pending Bindings"
},
"fullDescription": {
"text": "Missing Pending Bindings When using a 'ViewDataBinding' in a 'onBindViewHolder' method, you must call 'executePendingBindings()' before the method exits; otherwise the data binding runtime will update the UI in the next animation frame causing a delayed update and potential jumps if the item resizes. Issue id: PendingBindings",
"markdown": "Missing Pending Bindings \n\nWhen using a `ViewDataBinding` in a `onBindViewHolder` method, you **must** call `executePendingBindings()` before the method exits; otherwise the data binding runtime will update the UI in the next animation frame causing a delayed update and potential jumps if the item resizes. \n\nIssue id: PendingBindings"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintPendingBindings",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintScopedStorage",
"shortDescription": {
"text": "Affected by scoped storage"
},
"fullDescription": {
"text": "Affected by scoped storage Scoped storage is enforced on Android 10+ (or Android 11+ if using 'requestLegacyExternalStorage'). In particular, 'WRITE_EXTERNAL_STORAGE' will no longer provide write access to all files; it will provide the equivalent of 'READ_EXTERNAL_STORAGE' instead. As of Android 13, if you need to query or interact with MediaStore or media files on the shared storage, you should be using instead one or more new storage permissions: * 'android.permission.READ_MEDIA_IMAGES' * 'android.permission.READ_MEDIA_VIDEO' * 'android.permission.READ_MEDIA_AUDIO' and then add 'maxSdkVersion=\"33\"' to the older permission. See the developer guide for how to do this: https://developer.android.com/about/versions/13/behavior-changes-13#granular-media-permissions The 'MANAGE_EXTERNAL_STORAGE' permission can be used to manage all files, but it is rarely necessary and most apps on Google Play are not allowed to use it. Most apps should instead migrate to use scoped storage. To modify or delete files, apps should request write access from the user as described at https://goo.gle/android-mediastore-createwriterequest. To learn more, read these resources: Play policy: https://goo.gle/policy-storage-help Allowable use cases: https://goo.gle/policy-storage-usecases Issue id: ScopedStorage https://goo.gle/android-storage-usecases",
"markdown": "Affected by scoped storage \n\nScoped storage is enforced on Android 10+ (or Android 11+ if using `requestLegacyExternalStorage`). In particular, `WRITE_EXTERNAL_STORAGE` will no longer provide write access to all files; it will provide the equivalent of `READ_EXTERNAL_STORAGE` instead. \n\nAs of Android 13, if you need to query or interact with MediaStore or media files on the shared storage, you should be using instead one or more new storage permissions: \n\\* `android.permission.READ_MEDIA_IMAGES` \n\\* `android.permission.READ_MEDIA_VIDEO` \n\\* `android.permission.READ_MEDIA_AUDIO` \n\nand then add `maxSdkVersion=\"33\"` to the older permission. See the developer guide for how to do this: <https://developer.android.com/about/versions/13/behavior-changes-13#granular-media-permissions> \n\nThe `MANAGE_EXTERNAL_STORAGE` permission can be used to manage all files, but it is rarely necessary and most apps on Google Play are not allowed to use it. Most apps should instead migrate to use scoped storage. To modify or delete files, apps should request write access from the user as described at <https://goo.gle/android-mediastore-createwriterequest>. \n\nTo learn more, read these resources: Play policy: <https://goo.gle/policy-storage-help> Allowable use cases: <https://goo.gle/policy-storage-usecases> \n\nIssue id: ScopedStorage \n\n<https://goo.gle/android-storage-usecases>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintScopedStorage",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintStringFormatMatches",
"shortDescription": {
"text": "String.format string doesn't match the XML format string"
},
"fullDescription": {
"text": "'String.format' string doesn't match the XML format string This lint check ensures the following: (1) If there are multiple translations of the format string, then all translations use the same type for the same numbered arguments (2) The usage of the format string in Java is consistent with the format string, meaning that the parameter types passed to String.format matches those in the format string. Issue id: StringFormatMatches",
"markdown": "`String.format` string doesn't match the XML format string \n\nThis lint check ensures the following: \n(1) If there are multiple translations of the format string, then all translations use the same type for the same numbered arguments \n(2) The usage of the format string in Java is consistent with the format string, meaning that the parameter types passed to String.format matches those in the format string. \n\nIssue id: StringFormatMatches"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintStringFormatMatches",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintResourceAsColor",
"shortDescription": {
"text": "Should pass resolved color instead of resource id"
},
"fullDescription": {
"text": "Should pass resolved color instead of resource id Methods that take a color in the form of an integer should be passed an RGB triple, not the actual color resource id. You must call 'getResources().getColor(resource)' to resolve the actual color value first. Similarly, methods that take a dimension integer should be passed an actual dimension (call 'getResources().getDimension(resource)' Issue id: ResourceAsColor",
"markdown": "Should pass resolved color instead of resource id \n\nMethods that take a color in the form of an integer should be passed an RGB triple, not the actual color resource id. You must call `getResources().getColor(resource)` to resolve the actual color value first. \n\nSimilarly, methods that take a dimension integer should be passed an actual dimension (call `getResources().getDimension(resource)` \n\nIssue id: ResourceAsColor"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintResourceAsColor",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintGradleCompatible",
"shortDescription": {
"text": "Incompatible Gradle Versions"
},
"fullDescription": {
"text": "Incompatible Gradle Versions There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your 'targetSdkVersion'). Issue id: GradleCompatible",
"markdown": "Incompatible Gradle Versions \n\nThere are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your `targetSdkVersion`). \n\nIssue id: GradleCompatible"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintGradleCompatible",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintSSLCertificateSocketFactoryCreateSocket",
"shortDescription": {
"text": "Insecure call to SSLCertificateSocketFactory.createSocket()"
},
"fullDescription": {
"text": "Insecure call to 'SSLCertificateSocketFactory.createSocket()' When 'SSLCertificateSocketFactory.createSocket()' is called with an 'InetAddress' as the first parameter, TLS/SSL hostname verification is not performed, which could result in insecure network traffic caused by trusting arbitrary hostnames in TLS/SSL certificates presented by peers. In this case, developers must ensure that the 'InetAddress' is explicitly verified against the certificate through other means, such as by calling `SSLCertificateSocketFactory.getDefaultHostnameVerifier() to get a 'HostnameVerifier' and calling 'HostnameVerifier.verify()'. Issue id: SSLCertificateSocketFactoryCreateSocket https://goo.gle/SSLCertificateSocketFactoryCreateSocket",
"markdown": "Insecure call to `SSLCertificateSocketFactory.createSocket()` \n\nWhen `SSLCertificateSocketFactory.createSocket()` is called with an `InetAddress` as the first parameter, TLS/SSL hostname verification is not performed, which could result in insecure network traffic caused by trusting arbitrary hostnames in TLS/SSL certificates presented by peers. In this case, developers must ensure that the `InetAddress` is explicitly verified against the certificate through other means, such as by calling \\`SSLCertificateSocketFactory.getDefaultHostnameVerifier() to get a `HostnameVerifier` and calling `HostnameVerifier.verify()`. \n\nIssue id: SSLCertificateSocketFactoryCreateSocket \n\n<https://goo.gle/SSLCertificateSocketFactoryCreateSocket>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintSSLCertificateSocketFactoryCreateSocket",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintInvalidWakeLockTag",
"shortDescription": {
"text": "Invalid Wake Lock Tag"
},
"fullDescription": {
"text": "Invalid Wake Lock Tag Wake Lock tags must follow the naming conventions defined in the`PowerManager` documentation. Issue id: InvalidWakeLockTag https://developer.android.com/reference/android/os/PowerManager.html",
"markdown": "Invalid Wake Lock Tag \n\nWake Lock tags must follow the naming conventions defined in the\\`PowerManager\\` documentation. \n\nIssue id: InvalidWakeLockTag \n\n<https://developer.android.com/reference/android/os/PowerManager.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintInvalidWakeLockTag",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintGradlePluginVersion",
"shortDescription": {
"text": "Incompatible Android Gradle Plugin"
},
"fullDescription": {
"text": "Incompatible Android Gradle Plugin Not all versions of the Android Gradle plugin are compatible with all versions of the SDK. If you update your tools, or if you are trying to open a project that was built with an old version of the tools, you may need to update your plugin version number. Issue id: GradlePluginVersion",
"markdown": "Incompatible Android Gradle Plugin \n\nNot all versions of the Android Gradle plugin are compatible with all versions of the SDK. If you update your tools, or if you are trying to open a project that was built with an old version of the tools, you may need to update your plugin version number. \n\nIssue id: GradlePluginVersion"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintGradlePluginVersion",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintSquareAndRoundTilePreviews",
"shortDescription": {
"text": "TileProvider does not have round and square previews"
},
"fullDescription": {
"text": "TileProvider does not have round and square previews Tile projects should specify preview resources for different screen shapes. The preview resource is specified in the manifest under tile service. And you have to make sure they have resources for different screen shapes. Issue id: SquareAndRoundTilePreviews",
"markdown": "TileProvider does not have round and square previews \n\nTile projects should specify preview resources for different screen shapes. The preview resource is specified in the manifest under tile service. And you have to make sure they have resources for different screen shapes. \n\nIssue id: SquareAndRoundTilePreviews"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintSquareAndRoundTilePreviews",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintNewerVersionAvailable",
"shortDescription": {
"text": "Newer Library Versions Available"
},
"fullDescription": {
"text": "Newer Library Versions Available This detector checks with a central repository to see if there are newer versions available for the dependencies used by this project. This is similar to the 'GradleDependency' check, which checks for newer versions available in the Android SDK tools and libraries, but this works with any MavenCentral dependency, and connects to the library every time, which makes it more flexible but also much slower. Issue id: NewerVersionAvailable",
"markdown": "Newer Library Versions Available \n\nThis detector checks with a central repository to see if there are newer versions available for the dependencies used by this project. This is similar to the `GradleDependency` check, which checks for newer versions available in the Android SDK tools and libraries, but this works with any MavenCentral dependency, and connects to the library every time, which makes it more flexible but also **much** slower. \n\nIssue id: NewerVersionAvailable"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintNewerVersionAvailable",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMissingConstraints",
"shortDescription": {
"text": "Missing Constraints in ConstraintLayout"
},
"fullDescription": {
"text": "Missing Constraints in ConstraintLayout The layout editor allows you to place widgets anywhere on the canvas, and it records the current position with designtime attributes (such as 'layout_editor_absoluteX'). These attributes are not applied at runtime, so if you push your layout on a device, the widgets may appear in a different location than shown in the editor. To fix this, make sure a widget has both horizontal and vertical constraints by dragging from the edge connections. Issue id: MissingConstraints",
"markdown": "Missing Constraints in ConstraintLayout \n\nThe layout editor allows you to place widgets anywhere on the canvas, and it records the current position with designtime attributes (such as `layout_editor_absoluteX`). These attributes are **not** applied at runtime, so if you push your layout on a device, the widgets may appear in a different location than shown in the editor. To fix this, make sure a widget has both horizontal and vertical constraints by dragging from the edge connections. \n\nIssue id: MissingConstraints"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintMissingConstraints",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintRecyclerView",
"shortDescription": {
"text": "RecyclerView Problems"
},
"fullDescription": {
"text": "RecyclerView Problems 'RecyclerView' will not call 'onBindViewHolder' again when the position of the item changes in the data set unless the item itself is invalidated or the new position cannot be determined. For this reason, you should only use the position parameter while acquiring the related data item inside this method, and should not keep a copy of it. If you need the position of an item later on (e.g. in a click listener), use 'getAdapterPosition()' which will have the updated adapter position. Issue id: RecyclerView",
"markdown": "RecyclerView Problems \n\n`RecyclerView` will **not** call `onBindViewHolder` again when the position of the item changes in the data set unless the item itself is invalidated or the new position cannot be determined. \n\nFor this reason, you should **only** use the position parameter while acquiring the related data item inside this method, and should **not** keep a copy of it. \n\nIf you need the position of an item later on (e.g. in a click listener), use `getAdapterPosition()` which will have the updated adapter position. \n\nIssue id: RecyclerView"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintRecyclerView",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintBomWithoutPlatform",
"shortDescription": {
"text": "Using a BOM without platform call"
},
"fullDescription": {
"text": "Using a BOM without platform call When including a BOM, the dependency's coordinates must be wrapped in a call to 'platform()' for Gradle to interpret it correctly. Issue id: BomWithoutPlatform https://developer.android.com/r/tools/gradle-bom-docs",
"markdown": "Using a BOM without platform call \n\nWhen including a BOM, the dependency's coordinates must be wrapped in a call to `platform()` for Gradle to interpret it correctly. \n\nIssue id: BomWithoutPlatform \n\n<https://developer.android.com/r/tools/gradle-bom-docs>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintBomWithoutPlatform",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintTypographyQuotes",
"shortDescription": {
"text": "Straight quotes can be replaced with curvy quotes"
},
"fullDescription": {
"text": "Straight quotes can be replaced with curvy quotes Straight single quotes and double quotes, when used as a pair, can be replaced by \"curvy quotes\" (or directional quotes). This can make the text more readable. Note that you should never use grave accents and apostrophes to quote, `like this'. (Also note that you should not use curvy quotes for code fragments.) Issue id: TypographyQuotes https://en.wikipedia.org/wiki/Quotation_mark",
"markdown": "Straight quotes can be replaced with curvy quotes \n\nStraight single quotes and double quotes, when used as a pair, can be replaced by \"curvy quotes\" (or directional quotes). This can make the text more readable. Note that you should never use grave accents and apostrophes to quote, \\`like this'. (Also note that you should not use curvy quotes for code fragments.) \n\nIssue id: TypographyQuotes \n\n<https://en.wikipedia.org/wiki/Quotation_mark>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintTypographyQuotes",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintTooDeepLayout",
"shortDescription": {
"text": "Layout hierarchy is too deep"
},
"fullDescription": {
"text": "Layout hierarchy is too deep Layouts with too much nesting is bad for performance. Consider using a flatter layout (such as 'RelativeLayout' or 'GridLayout').The default maximum depth is 10 but can be configured with the environment variable 'ANDROID_LINT_MAX_DEPTH'. Issue id: TooDeepLayout",
"markdown": "Layout hierarchy is too deep \n\nLayouts with too much nesting is bad for performance. Consider using a flatter layout (such as `RelativeLayout` or `GridLayout`).The default maximum depth is 10 but can be configured with the environment variable `ANDROID_LINT_MAX_DEPTH`. \n\nIssue id: TooDeepLayout"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintTooDeepLayout",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintSupportAnnotationUsage",
"shortDescription": {
"text": "Incorrect support annotation usage"
},
"fullDescription": {
"text": "Incorrect support annotation usage This lint check makes sure that the support annotations (such as '@IntDef' and '@ColorInt') are used correctly. For example, it's an error to specify an '@IntRange' where the 'from' value is higher than the 'to' value. Issue id: SupportAnnotationUsage",
"markdown": "Incorrect support annotation usage \n\nThis lint check makes sure that the support annotations (such as `@IntDef` and `@ColorInt`) are used correctly. For example, it's an error to specify an `@IntRange` where the `from` value is higher than the `to` value. \n\nIssue id: SupportAnnotationUsage"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintSupportAnnotationUsage",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintObjectAnimatorBinding",
"shortDescription": {
"text": "Incorrect ObjectAnimator Property"
},
"fullDescription": {
"text": "Incorrect ObjectAnimator Property This check cross references properties referenced by String from 'ObjectAnimator' and 'PropertyValuesHolder' method calls and ensures that the corresponding setter methods exist and have the right signatures. Issue id: ObjectAnimatorBinding",
"markdown": "Incorrect ObjectAnimator Property \n\nThis check cross references properties referenced by String from `ObjectAnimator` and `PropertyValuesHolder` method calls and ensures that the corresponding setter methods exist and have the right signatures. \n\nIssue id: ObjectAnimatorBinding"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintObjectAnimatorBinding",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ShrinkerUnresolvedReference",
"shortDescription": {
"text": "Unresolved reference in Shrinker Config file"
},
"fullDescription": {
"text": "Reports unresolved references to class members in Shrinker config.",
"markdown": "Reports unresolved references to class members in Shrinker config."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "ShrinkerUnresolvedReference",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Shrinker",
"index": 127,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUseAlpha2",
"shortDescription": {
"text": "Using 3-letter Codes"
},
"fullDescription": {
"text": "Using 3-letter Codes For compatibility with earlier devices, you should only use 3-letter language and region codes when there is no corresponding 2 letter code. Issue id: UseAlpha2 https://tools.ietf.org/html/bcp47",
"markdown": "Using 3-letter Codes \n\nFor compatibility with earlier devices, you should only use 3-letter language and region codes when there is no corresponding 2 letter code. \n\nIssue id: UseAlpha2 \n\n<https://tools.ietf.org/html/bcp47>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintUseAlpha2",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintTextFields",
"shortDescription": {
"text": "Missing inputType"
},
"fullDescription": {
"text": "Missing 'inputType' Providing an 'inputType' attribute on a text field improves usability because depending on the data to be input, optimized keyboards can be shown to the user (such as just digits and parentheses for a phone number). The lint detector also looks at the 'id' of the view, and if the id offers a hint of the purpose of the field (for example, the 'id' contains the phrase 'phone' or 'email'), then lint will also ensure that the 'inputType' contains the corresponding type attributes. If you really want to keep the text field generic, you can suppress this warning by setting 'inputType=\"text\"'. Issue id: TextFields",
"markdown": "Missing `inputType` \n\nProviding an `inputType` attribute on a text field improves usability because depending on the data to be input, optimized keyboards can be shown to the user (such as just digits and parentheses for a phone number). \n\nThe lint detector also looks at the `id` of the view, and if the id offers a hint of the purpose of the field (for example, the `id` contains the phrase `phone` or `email`), then lint will also ensure that the `inputType` contains the corresponding type attributes. \n\nIf you really want to keep the text field generic, you can suppress this warning by setting `inputType=\"text\"`. \n\nIssue id: TextFields"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintTextFields",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUnsupportedTvHardware",
"shortDescription": {
"text": "Unsupported TV Hardware Feature"
},
"fullDescription": {
"text": "Unsupported TV Hardware Feature The '<uses-feature>' element should not require this unsupported TV hardware feature. Any uses-feature not explicitly marked with 'required=\"false\"' is necessary on the device to be installed on. Ensure that any features that might prevent it from being installed on a TV device are reviewed and marked as not required in the manifest. Issue id: UnsupportedTvHardware https://developer.android.com/training/tv/start/hardware.html#unsupported-features",
"markdown": "Unsupported TV Hardware Feature \n\nThe `<uses-feature>` element should not require this unsupported TV hardware feature. Any uses-feature not explicitly marked with `required=\"false\"` is necessary on the device to be installed on. Ensure that any features that might prevent it from being installed on a TV device are reviewed and marked as not required in the manifest. \n\nIssue id: UnsupportedTvHardware \n\n<https://developer.android.com/training/tv/start/hardware.html#unsupported-features>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintUnsupportedTvHardware",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintPxUsage",
"shortDescription": {
"text": "Using 'px' dimension"
},
"fullDescription": {
"text": "Using 'px' dimension For performance reasons and to keep the code simpler, the Android system uses pixels as the standard unit for expressing dimension or coordinate values. That means that the dimensions of a view are always expressed in the code using pixels, but always based on the current screen density. For instance, if 'myView.getWidth()' returns 10, the view is 10 pixels wide on the current screen, but on a device with a higher density screen, the value returned might be 15. If you use pixel values in your application code to work with bitmaps that are not pre-scaled for the current screen density, you might need to scale the pixel values that you use in your code to match the un-scaled bitmap source. Issue id: PxUsage https://developer.android.com/guide/practices/screens_support.html#screen-independence",
"markdown": "Using 'px' dimension \n\nFor performance reasons and to keep the code simpler, the Android system uses pixels as the standard unit for expressing dimension or coordinate values. That means that the dimensions of a view are always expressed in the code using pixels, but always based on the current screen density. For instance, if `myView.getWidth()` returns 10, the view is 10 pixels wide on the current screen, but on a device with a higher density screen, the value returned might be 15. If you use pixel values in your application code to work with bitmaps that are not pre-scaled for the current screen density, you might need to scale the pixel values that you use in your code to match the un-scaled bitmap source. \n\nIssue id: PxUsage \n\n<https://developer.android.com/guide/practices/screens_support.html#screen-independence>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintPxUsage",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintWearableConfigurationAction",
"shortDescription": {
"text": "Wear configuration action metadata must match an activity"
},
"fullDescription": {
"text": "Wear configuration action metadata must match an activity Only when a watch face service defines 'wearableConfigurationAction' metadata, with the value 'WATCH_FACE_EDITOR', there should be an activity in the same package, which has an intent filter for 'WATCH_FACE_EDITOR' (with 'com.google.android.wearable.watchface.category.WEARABLE_CONFIGURATION' if 'minSdkVersion' is less than 30). Issue id: WearableConfigurationAction https://developer.android.com/training/wearables/watch-faces/configuration",
"markdown": "Wear configuration action metadata must match an activity \n\nOnly when a watch face service defines `wearableConfigurationAction` metadata, with the value `WATCH_FACE_EDITOR`, there should be an activity in the same package, which has an intent filter for `WATCH_FACE_EDITOR` (with `com.google.android.wearable.watchface.category.WEARABLE_CONFIGURATION` if `minSdkVersion` is less than 30). \n\nIssue id: WearableConfigurationAction \n\n<https://developer.android.com/training/wearables/watch-faces/configuration>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintWearableConfigurationAction",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintOverdraw",
"shortDescription": {
"text": "Overdraw: Painting regions more than once"
},
"fullDescription": {
"text": "Overdraw: Painting regions more than once If you set a background drawable on a root view, then you should use a custom theme where the theme background is null. Otherwise, the theme background will be painted first, only to have your custom background completely cover it; this is called \"overdraw\". NOTE: This detector relies on figuring out which layouts are associated with which activities based on scanning the Java code, and it's currently doing that using an inexact pattern matching algorithm. Therefore, it can incorrectly conclude which activity the layout is associated with and then wrongly complain that a background-theme is hidden. If you want your custom background on multiple pages, then you should consider making a custom theme with your custom background and just using that theme instead of a root element background. Of course it's possible that your custom drawable is translucent and you want it to be mixed with the background. However, you will get better performance if you pre-mix the background with your drawable and use that resulting image or color as a custom theme background instead. Issue id: Overdraw",
"markdown": "Overdraw: Painting regions more than once \n\nIf you set a background drawable on a root view, then you should use a custom theme where the theme background is null. Otherwise, the theme background will be painted first, only to have your custom background completely cover it; this is called \"overdraw\". \n\nNOTE: This detector relies on figuring out which layouts are associated with which activities based on scanning the Java code, and it's currently doing that using an inexact pattern matching algorithm. Therefore, it can incorrectly conclude which activity the layout is associated with and then wrongly complain that a background-theme is hidden. \n\nIf you want your custom background on multiple pages, then you should consider making a custom theme with your custom background and just using that theme instead of a root element background. \n\nOf course it's possible that your custom drawable is translucent and you want it to be mixed with the background. However, you will get better performance if you pre-mix the background with your drawable and use that resulting image or color as a custom theme background instead. \n\nIssue id: Overdraw"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintOverdraw",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintButtonStyle",
"shortDescription": {
"text": "Button should be borderless"
},
"fullDescription": {
"text": "Button should be borderless Button bars typically use a borderless style for the buttons. Set the 'style=\"?android:attr/buttonBarButtonStyle\"' attribute on each of the buttons, and set 'style=\"?android:attr/buttonBarStyle\"' on the parent layout Issue id: ButtonStyle https://material.io/components/dialogs/",
"markdown": "Button should be borderless \n\nButton bars typically use a borderless style for the buttons. Set the `style=\"?android:attr/buttonBarButtonStyle\"` attribute on each of the buttons, and set `style=\"?android:attr/buttonBarStyle\"` on the parent layout \n\nIssue id: ButtonStyle \n\n<https://material.io/components/dialogs/>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintButtonStyle",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintNotificationPermission",
"shortDescription": {
"text": "Notifications Without Permission"
},
"fullDescription": {
"text": "Notifications Without Permission When targeting Android 13 and higher, posting permissions requires holding the runtime permission 'android.permission.POST_NOTIFICATIONS'. Issue id: NotificationPermission",
"markdown": "Notifications Without Permission \n\nWhen targeting Android 13 and higher, posting permissions requires holding the runtime permission `android.permission.POST_NOTIFICATIONS`. \n\nIssue id: NotificationPermission"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintNotificationPermission",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintGradleIdeError",
"shortDescription": {
"text": "Gradle IDE Support Issues"
},
"fullDescription": {
"text": "Gradle IDE Support Issues Gradle is highly flexible, and there are things you can do in Gradle files which can make it hard or impossible for IDEs to properly handle the project. This lint check looks for constructs that potentially break IDE support. Issue id: GradleIdeError",
"markdown": "Gradle IDE Support Issues \n\nGradle is highly flexible, and there are things you can do in Gradle files which can make it hard or impossible for IDEs to properly handle the project. This lint check looks for constructs that potentially break IDE support. \n\nIssue id: GradleIdeError"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintGradleIdeError",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintParcelClassLoader",
"shortDescription": {
"text": "Default Parcel Class Loader"
},
"fullDescription": {
"text": "Default Parcel Class Loader The documentation for 'Parcel#readParcelable(ClassLoader)' (and its variations) says that you can pass in 'null' to pick up the default class loader. However, that ClassLoader is a system class loader and is not able to find classes in your own application. If you are writing your own classes into the 'Parcel' (not just SDK classes like 'String' and so on), then you should supply a 'ClassLoader' for your application instead; a simple way to obtain one is to just call 'getClass().getClassLoader()' from your own class. Issue id: ParcelClassLoader https://developer.android.com/reference/android/os/Parcel.html",
"markdown": "Default Parcel Class Loader \n\nThe documentation for `Parcel#readParcelable(ClassLoader)` (and its variations) says that you can pass in `null` to pick up the default class loader. However, that ClassLoader is a system class loader and is not able to find classes in your own application. \n\nIf you are writing your own classes into the `Parcel` (not just SDK classes like `String` and so on), then you should supply a `ClassLoader` for your application instead; a simple way to obtain one is to just call `getClass().getClassLoader()` from your own class. \n\nIssue id: ParcelClassLoader \n\n<https://developer.android.com/reference/android/os/Parcel.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintParcelClassLoader",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintRecycle",
"shortDescription": {
"text": "Missing recycle() calls"
},
"fullDescription": {
"text": "Missing 'recycle()' calls Many resources, such as TypedArrays, VelocityTrackers, etc., should be recycled (with a 'recycle()' call) after use. This lint check looks for missing 'recycle()' calls. Issue id: Recycle",
"markdown": "Missing `recycle()` calls \n\nMany resources, such as TypedArrays, VelocityTrackers, etc., should be recycled (with a `recycle()` call) after use. This lint check looks for missing `recycle()` calls. \n\nIssue id: Recycle"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintRecycle",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintNestedWeights",
"shortDescription": {
"text": "Nested layout weights"
},
"fullDescription": {
"text": "Nested layout weights Layout weights require a widget to be measured twice. When a 'LinearLayout' with non-zero weights is nested inside another 'LinearLayout' with non-zero weights, then the number of measurements increase exponentially. Issue id: NestedWeights",
"markdown": "Nested layout weights \n\nLayout weights require a widget to be measured twice. When a `LinearLayout` with non-zero weights is nested inside another `LinearLayout` with non-zero weights, then the number of measurements increase exponentially. \n\nIssue id: NestedWeights"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintNestedWeights",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintSwitchIntDef",
"shortDescription": {
"text": "Missing @IntDef in Switch"
},
"fullDescription": {
"text": "Missing @IntDef in Switch This check warns if a 'switch' statement does not explicitly include all the values declared by the typedef '@IntDef' declaration. Issue id: SwitchIntDef",
"markdown": "Missing @IntDef in Switch \n\nThis check warns if a `switch` statement does not explicitly include all the values declared by the typedef `@IntDef` declaration. \n\nIssue id: SwitchIntDef"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintSwitchIntDef",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintScrollViewSize",
"shortDescription": {
"text": "ScrollView size validation"
},
"fullDescription": {
"text": "ScrollView size validation ScrollView children must set their 'layout_width' or 'layout_height' attributes to 'wrap_content' rather than 'fill_parent' or 'match_parent' in the scrolling dimension Issue id: ScrollViewSize",
"markdown": "ScrollView size validation \n\nScrollView children must set their `layout_width` or `layout_height` attributes to `wrap_content` rather than `fill_parent` or `match_parent` in the scrolling dimension \n\nIssue id: ScrollViewSize"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintScrollViewSize",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintDuplicateActivity",
"shortDescription": {
"text": "Activity registered more than once"
},
"fullDescription": {
"text": "Activity registered more than once An activity should only be registered once in the manifest. If it is accidentally registered more than once, then subtle errors can occur, since attribute declarations from the two elements are not merged, so you may accidentally remove previous declarations. Issue id: DuplicateActivity",
"markdown": "Activity registered more than once \n\nAn activity should only be registered once in the manifest. If it is accidentally registered more than once, then subtle errors can occur, since attribute declarations from the two elements are not merged, so you may accidentally remove previous declarations. \n\nIssue id: DuplicateActivity"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintDuplicateActivity",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintAppCompatCustomView",
"shortDescription": {
"text": "Appcompat Custom Widgets"
},
"fullDescription": {
"text": "Appcompat Custom Widgets In order to support features such as tinting, the appcompat library will automatically load special appcompat replacements for the builtin widgets. However, this does not work for your own custom views. Instead of extending the 'android.widget' classes directly, you should instead extend one of the delegate classes in 'androidx.appcompat.widget.AppCompatTextView'. Issue id: AppCompatCustomView",
"markdown": "Appcompat Custom Widgets \n\nIn order to support features such as tinting, the appcompat library will automatically load special appcompat replacements for the builtin widgets. However, this does not work for your own custom views. \n\nInstead of extending the `android.widget` classes directly, you should instead extend one of the delegate classes in `androidx.appcompat.widget.AppCompatTextView`. \n\nIssue id: AppCompatCustomView"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintAppCompatCustomView",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintHalfFloat",
"shortDescription": {
"text": "Incorrect Half Float"
},
"fullDescription": {
"text": "Incorrect Half Float Half-precision floating point are stored in a short data type, and should be manipulated using the 'android.util.Half' class. This check flags usages where it appears that these values are used incorrectly. Issue id: HalfFloat",
"markdown": "Incorrect Half Float \n\nHalf-precision floating point are stored in a short data type, and should be manipulated using the `android.util.Half` class. This check flags usages where it appears that these values are used incorrectly. \n\nIssue id: HalfFloat"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintHalfFloat",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUniqueConstants",
"shortDescription": {
"text": "Overlapping Enumeration Constants"
},
"fullDescription": {
"text": "Overlapping Enumeration Constants The '@IntDef' annotation allows you to create a light-weight \"enum\" or type definition. However, it's possible to accidentally specify the same value for two or more of the values, which can lead to hard-to-detect bugs. This check looks for this scenario and flags any repeated constants. In some cases, the repeated constant is intentional (for example, renaming a constant to a more intuitive name, and leaving the old name in place for compatibility purposes). In that case, simply suppress this check by adding a '@SuppressLint(\"UniqueConstants\")' annotation. Issue id: UniqueConstants",
"markdown": "Overlapping Enumeration Constants \n\nThe `@IntDef` annotation allows you to create a light-weight \"enum\" or type definition. However, it's possible to accidentally specify the same value for two or more of the values, which can lead to hard-to-detect bugs. This check looks for this scenario and flags any repeated constants. \n\nIn some cases, the repeated constant is intentional (for example, renaming a constant to a more intuitive name, and leaving the old name in place for compatibility purposes). In that case, simply suppress this check by adding a `@SuppressLint(\"UniqueConstants\")` annotation. \n\nIssue id: UniqueConstants"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintUniqueConstants",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUnusedQuantity",
"shortDescription": {
"text": "Unused quantity translations"
},
"fullDescription": {
"text": "Unused quantity translations Android defines a number of different quantity strings, such as 'zero', 'one', 'few' and 'many'. However, many languages do not distinguish grammatically between all these different quantities. This lint check looks at the quantity strings defined for each translation and flags any quantity strings that are unused (because the language does not make that quantity distinction, and Android will therefore not look it up). For example, in Chinese, only the 'other' quantity is used, so even if you provide translations for 'zero' and 'one', these strings will not be returned when 'getQuantityString()' is called, even with '0' or '1'. Issue id: UnusedQuantity https://developer.android.com/guide/topics/resources/string-resource.html#Plurals",
"markdown": "Unused quantity translations \n\nAndroid defines a number of different quantity strings, such as `zero`, `one`, `few` and `many`. However, many languages do not distinguish grammatically between all these different quantities. \n\nThis lint check looks at the quantity strings defined for each translation and flags any quantity strings that are unused (because the language does not make that quantity distinction, and Android will therefore not look it up). \n\nFor example, in Chinese, only the `other` quantity is used, so even if you provide translations for `zero` and `one`, these strings will **not** be returned when `getQuantityString()` is called, even with `0` or `1`. \n\nIssue id: UnusedQuantity \n\n<https://developer.android.com/guide/topics/resources/string-resource.html#Plurals>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintUnusedQuantity",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintTooManyViews",
"shortDescription": {
"text": "Layout has too many views"
},
"fullDescription": {
"text": "Layout has too many views Using too many views in a single layout is bad for performance. Consider using compound drawables or other tricks for reducing the number of views in this layout. The maximum view count defaults to 80 but can be configured with the environment variable 'ANDROID_LINT_MAX_VIEW_COUNT'. Issue id: TooManyViews",
"markdown": "Layout has too many views \n\nUsing too many views in a single layout is bad for performance. Consider using compound drawables or other tricks for reducing the number of views in this layout. \n\nThe maximum view count defaults to 80 but can be configured with the environment variable `ANDROID_LINT_MAX_VIEW_COUNT`. \n\nIssue id: TooManyViews"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintTooManyViews",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMissingTranslation",
"shortDescription": {
"text": "Incomplete translation"
},
"fullDescription": {
"text": "Incomplete translation If an application has more than one locale, then all the strings declared in one language should also be translated in all other languages. If the string should not be translated, you can add the attribute 'translatable=\"false\"' on the '<string>' element, or you can define all your non-translatable strings in a resource file called 'donottranslate.xml'. Or, you can ignore the issue with a 'tools:ignore=\"MissingTranslation\"' attribute. You can tell lint (and other tools) which language is the default language in your 'res/values/' folder by specifying 'tools:locale=\"languageCode\"' for the root '<resources>' element in your resource file. (The 'tools' prefix refers to the namespace declaration 'http://schemas.android.com/tools'.) Issue id: MissingTranslation",
"markdown": "Incomplete translation \n\nIf an application has more than one locale, then all the strings declared in one language should also be translated in all other languages. \n\nIf the string should **not** be translated, you can add the attribute `translatable=\"false\"` on the `<string>` element, or you can define all your non-translatable strings in a resource file called `donottranslate.xml`. Or, you can ignore the issue with a `tools:ignore=\"MissingTranslation\"` attribute. \n\nYou can tell lint (and other tools) which language is the default language in your `res/values/` folder by specifying `tools:locale=\"languageCode\"` for the root `<resources>` element in your resource file. (The `tools` prefix refers to the namespace declaration `http://schemas.android.com/tools`.) \n\nIssue id: MissingTranslation"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintMissingTranslation",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidNonConstantResIdsInSwitch",
"shortDescription": {
"text": "Non-constant resource ID in a switch statement"
},
"fullDescription": {
"text": "Validates using resource IDs in a switch statement in Android library module. Resource IDs are non final in the library projects since SDK tools r14, means that the library code cannot treat these IDs as constants.",
"markdown": "Validates using resource IDs in a switch statement in Android library module. \nResource IDs are non final in the library projects since SDK tools r14, means that the library code cannot treat these IDs as constants."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidNonConstantResIdsInSwitch",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android",
"index": 14,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintEllipsizeMaxLines",
"shortDescription": {
"text": "Combining Ellipsize and Maxlines"
},
"fullDescription": {
"text": "Combining Ellipsize and Maxlines Combining 'ellipsize' and 'maxLines=1' can lead to crashes on some devices. Earlier versions of lint recommended replacing 'singleLine=true' with 'maxLines=1' but that should not be done when using 'ellipsize'. Issue id: EllipsizeMaxLines https://issuetracker.google.com/issues/36950033",
"markdown": "Combining Ellipsize and Maxlines \n\nCombining `ellipsize` and `maxLines=1` can lead to crashes on some devices. Earlier versions of lint recommended replacing `singleLine=true` with `maxLines=1` but that should not be done when using `ellipsize`. \n\nIssue id: EllipsizeMaxLines \n\n<https://issuetracker.google.com/issues/36950033>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintEllipsizeMaxLines",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintAutofill",
"shortDescription": {
"text": "Use Autofill"
},
"fullDescription": {
"text": "Use Autofill Specify an 'autofillHints' attribute when targeting SDK version 26 or higher or explicitly specify that the view is not important for autofill. Your app can help an autofill service classify the data correctly by providing the meaning of each view that could be autofillable, such as views representing usernames, passwords, credit card fields, email addresses, etc. The hints can have any value, but it is recommended to use predefined values like 'username' for a username or 'creditCardNumber' for a credit card number. For a list of all predefined autofill hint constants, see the 'AUTOFILL_HINT_' constants in the 'View' reference at https://developer.android.com/reference/android/view/View.html. You can mark a view unimportant for autofill by specifying an 'importantForAutofill' attribute on that view or a parent view. See https://developer.android.com/reference/android/view/View.html#setImportantForAutofill(int). Issue id: Autofill https://developer.android.com/guide/topics/text/autofill.html",
"markdown": "Use Autofill \n\nSpecify an `autofillHints` attribute when targeting SDK version 26 or higher or explicitly specify that the view is not important for autofill. Your app can help an autofill service classify the data correctly by providing the meaning of each view that could be autofillable, such as views representing usernames, passwords, credit card fields, email addresses, etc. \n\nThe hints can have any value, but it is recommended to use predefined values like 'username' for a username or 'creditCardNumber' for a credit card number. For a list of all predefined autofill hint constants, see the `AUTOFILL_HINT_` constants in the `View` reference at <https://developer.android.com/reference/android/view/View.html>. \n\nYou can mark a view unimportant for autofill by specifying an `importantForAutofill` attribute on that view or a parent view. See <https://developer.android.com/reference/android/view/View.html#setImportantForAutofill(int)>. \n\nIssue id: Autofill \n\n<https://developer.android.com/guide/topics/text/autofill.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintAutofill",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUniquePermission",
"shortDescription": {
"text": "Permission names are not unique"
},
"fullDescription": {
"text": "Permission names are not unique The unqualified names or your permissions must be unique. The reason for this is that at build time, the 'aapt' tool will generate a class named 'Manifest' which contains a field for each of your permissions. These fields are named using your permission unqualified names (i.e. the name portion after the last dot). If more than one permission maps to the same field name, that field will arbitrarily name just one of them. Issue id: UniquePermission",
"markdown": "Permission names are not unique \n\nThe unqualified names or your permissions must be unique. The reason for this is that at build time, the `aapt` tool will generate a class named `Manifest` which contains a field for each of your permissions. These fields are named using your permission unqualified names (i.e. the name portion after the last dot). \n\nIf more than one permission maps to the same field name, that field will arbitrarily name just one of them. \n\nIssue id: UniquePermission"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintUniquePermission",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintKaptUsageInsteadOfKsp",
"shortDescription": {
"text": "Kapt usage should be replaced with KSP"
},
"fullDescription": {
"text": "Kapt usage should be replaced with KSP KSP is a more efficient replacement for kapt. For libraries that support both, KSP should be used to improve build times. Issue id: KaptUsageInsteadOfKsp https://developer.android.com/studio/build/migrate-to-ksp",
"markdown": "Kapt usage should be replaced with KSP \n\nKSP is a more efficient replacement for kapt. For libraries that support both, KSP should be used to improve build times. \n\nIssue id: KaptUsageInsteadOfKsp \n\n<https://developer.android.com/studio/build/migrate-to-ksp>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintKaptUsageInsteadOfKsp",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintCutPasteId",
"shortDescription": {
"text": "Likely cut & paste mistakes"
},
"fullDescription": {
"text": "Likely cut & paste mistakes This lint check looks for cases where you have cut & pasted calls to 'findViewById' but have forgotten to update the R.id field. It's possible that your code is simply (redundantly) looking up the field repeatedly, but lint cannot distinguish that from a case where you for example want to initialize fields 'prev' and 'next' and you cut & pasted 'findViewById(R.id.prev)' and forgot to update the second initialization to 'R.id.next'. Issue id: CutPasteId",
"markdown": "Likely cut \\& paste mistakes \n\nThis lint check looks for cases where you have cut \\& pasted calls to `findViewById` but have forgotten to update the R.id field. It's possible that your code is simply (redundantly) looking up the field repeatedly, but lint cannot distinguish that from a case where you for example want to initialize fields `prev` and `next` and you cut \\& pasted `findViewById(R.id.prev)` and forgot to update the second initialization to `R.id.next`. \n\nIssue id: CutPasteId"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintCutPasteId",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintWearableBindListener",
"shortDescription": {
"text": "Usage of Android Wear BIND_LISTENER is deprecated"
},
"fullDescription": {
"text": "Usage of Android Wear BIND_LISTENER is deprecated BIND_LISTENER receives all Android Wear events whether the application needs them or not. This can be inefficient and cause applications to wake up unnecessarily. With Google Play Services 8.2.0 or later it is recommended to use a more efficient combination of manifest listeners and api-based live listeners filtered by action, path and/or path prefix. Issue id: WearableBindListener https://android-developers.googleblog.com/2016/04/deprecation-of-bindlistener.html",
"markdown": "Usage of Android Wear BIND_LISTENER is deprecated \n\nBIND_LISTENER receives all Android Wear events whether the application needs them or not. This can be inefficient and cause applications to wake up unnecessarily. With Google Play Services 8.2.0 or later it is recommended to use a more efficient combination of manifest listeners and api-based live listeners filtered by action, path and/or path prefix. \n\nIssue id: WearableBindListener \n\n<https://android-developers.googleblog.com/2016/04/deprecation-of-bindlistener.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintWearableBindListener",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMissingApplicationIcon",
"shortDescription": {
"text": "Missing application icon"
},
"fullDescription": {
"text": "Missing application icon You should set an icon for the application as whole because there is no default. This attribute must be set as a reference to a drawable resource containing the image (for example '@drawable/icon'). Issue id: MissingApplicationIcon https://developer.android.com/studio/publish/preparing#publishing-configure",
"markdown": "Missing application icon \n\nYou should set an icon for the application as whole because there is no default. This attribute must be set as a reference to a drawable resource containing the image (for example `@drawable/icon`). \n\nIssue id: MissingApplicationIcon \n\n<https://developer.android.com/studio/publish/preparing#publishing-configure>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintMissingApplicationIcon",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintWebpUnsupported",
"shortDescription": {
"text": "WebP Unsupported"
},
"fullDescription": {
"text": "WebP Unsupported The WebP format requires Android 4.0 (API 15). Certain features, such as lossless encoding and transparency, requires Android 4.2.1 (API 18; API 17 is 4.2.0.) Issue id: WebpUnsupported",
"markdown": "WebP Unsupported \n\nThe WebP format requires Android 4.0 (API 15). Certain features, such as lossless encoding and transparency, requires Android 4.2.1 (API 18; API 17 is 4.2.0.) \n\nIssue id: WebpUnsupported"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintWebpUnsupported",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintResourceName",
"shortDescription": {
"text": "Resource with Wrong Prefix"
},
"fullDescription": {
"text": "Resource with Wrong Prefix In Gradle projects you can specify a resource prefix that all resources in the project must conform to. This makes it easier to ensure that you don't accidentally combine resources from different libraries, since they all end up in the same shared app namespace. Issue id: ResourceName",
"markdown": "Resource with Wrong Prefix \n\nIn Gradle projects you can specify a resource prefix that all resources in the project must conform to. This makes it easier to ensure that you don't accidentally combine resources from different libraries, since they all end up in the same shared app namespace. \n\nIssue id: ResourceName"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintResourceName",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMissingIntentFilterForMediaSearch",
"shortDescription": {
"text": "Missing MEDIA_PLAY_FROM_SEARCH intent-filter"
},
"fullDescription": {
"text": "Missing MEDIA_PLAY_FROM_SEARCH intent-filter To support voice searches on Android Auto, you should also register an 'intent-filter' for the action 'android.media.action.MEDIA_PLAY_FROM_SEARCH'. To do this, add `<intent-filter>`\n `<action android:name=\"android.media.action.MEDIA_PLAY_FROM_SEARCH\" />`\n`</intent-filter>`\n to your '<activity>' or '<service>'. Issue id: MissingIntentFilterForMediaSearch https://developer.android.com/training/auto/audio/index.html#support_voice",
"markdown": "Missing MEDIA_PLAY_FROM_SEARCH intent-filter \n\nTo support voice searches on Android Auto, you should also register an `intent-filter` for the action `android.media.action.MEDIA_PLAY_FROM_SEARCH`. \n\nTo do this, add\n\n```\n`<intent-filter>`\n `<action android:name=\"android.media.action.MEDIA_PLAY_FROM_SEARCH\" />`\n`</intent-filter>`\n```\n\nto your `<activity>` or `<service>`. \n\nIssue id: MissingIntentFilterForMediaSearch \n\n<https://developer.android.com/training/auto/audio/index.html#support_voice>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintMissingIntentFilterForMediaSearch",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintLockedOrientationActivity",
"shortDescription": {
"text": "Incompatible screenOrientation value"
},
"fullDescription": {
"text": "Incompatible screenOrientation value The '<activity>' element should not be locked to any orientation so that users can take advantage of the multi-window environments and larger screens available on Android. To fix the issue, consider declaring the corresponding activity element with `screenOrientation=\"unspecified\"'or'\"fullSensor\"` attribute. Issue id: LockedOrientationActivity https://developer.android.com/topic/arc/window-management",
"markdown": "Incompatible screenOrientation value \n\nThe `<activity>` element should not be locked to any orientation so that users can take advantage of the multi-window environments and larger screens available on Android. To fix the issue, consider declaring the corresponding activity element with \\`screenOrientation=\"unspecified\"`or `\"fullSensor\"\\` attribute. \n\nIssue id: LockedOrientationActivity \n\n<https://developer.android.com/topic/arc/window-management>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintLockedOrientationActivity",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintImpliedTouchscreenHardware",
"shortDescription": {
"text": "Touchscreen not optional"
},
"fullDescription": {
"text": "Touchscreen not optional Apps require the 'android.hardware.touchscreen' feature by default. If you want your app to be available on TV, you must also explicitly declare that a touchscreen is not required as follows: '<uses-feature android:name=\"android.hardware.touchscreen\" android:required=\"false\"/>' Issue id: ImpliedTouchscreenHardware https://developer.android.com/guide/topics/manifest/uses-feature-element.html",
"markdown": "Touchscreen not optional \n\nApps require the `android.hardware.touchscreen` feature by default. If you want your app to be available on TV, you must also explicitly declare that a touchscreen is not required as follows: \n`<uses-feature android:name=\"android.hardware.touchscreen\" android:required=\"false\"/>` \n\nIssue id: ImpliedTouchscreenHardware \n\n<https://developer.android.com/guide/topics/manifest/uses-feature-element.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintImpliedTouchscreenHardware",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintTestAppLink",
"shortDescription": {
"text": "Unmatched URLs"
},
"fullDescription": {
"text": "Unmatched URLs Using one or more 'tools:validation testUrl=\"some url\"/>' elements in your manifest allows the link attributes in your intent filter to be checked for matches. Issue id: TestAppLink",
"markdown": "Unmatched URLs \n\nUsing one or more `tools:validation testUrl=\"some url\"/>` elements in your manifest allows the link attributes in your intent filter to be checked for matches. \n\nIssue id: TestAppLink"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintTestAppLink",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintIconDipSize",
"shortDescription": {
"text": "Icon density-independent size validation"
},
"fullDescription": {
"text": "Icon density-independent size validation Checks the all icons which are provided in multiple densities, all compute to roughly the same density-independent pixel ('dip') size. This catches errors where images are either placed in the wrong folder, or icons are changed to new sizes but some folders are forgotten. Issue id: IconDipSize",
"markdown": "Icon density-independent size validation \n\nChecks the all icons which are provided in multiple densities, all compute to roughly the same density-independent pixel (`dip`) size. This catches errors where images are either placed in the wrong folder, or icons are changed to new sizes but some folders are forgotten. \n\nIssue id: IconDipSize"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintIconDipSize",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidMissingOnClickHandler",
"shortDescription": {
"text": "onClick handler is missing in the related activity"
},
"fullDescription": {
"text": "Checks if the method specified in onClick XML attribute is declared in related activity",
"markdown": "Checks if the method specified in onClick XML attribute is declared in related activity"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidMissingOnClickHandler",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android",
"index": 14,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintPinSetExpiry",
"shortDescription": {
"text": "Validate <pin-set> expiration attribute"
},
"fullDescription": {
"text": "Validate '<pin-set>' expiration attribute Ensures that the 'expiration' attribute of the '<pin-set>' element is valid and has not already expired or is expiring soon Issue id: PinSetExpiry https://developer.android.com/preview/features/security-config.html",
"markdown": "Validate `<pin-set>` expiration attribute \n\nEnsures that the `expiration` attribute of the `<pin-set>` element is valid and has not already expired or is expiring soon \n\nIssue id: PinSetExpiry \n\n<https://developer.android.com/preview/features/security-config.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintPinSetExpiry",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintAnnotationProcessorOnCompilePath",
"shortDescription": {
"text": "Annotation Processor on Compile Classpath"
},
"fullDescription": {
"text": "Annotation Processor on Compile Classpath This dependency is identified as an annotation processor. Consider adding it to the processor path using 'annotationProcessor' instead of including it to the compile path. Issue id: AnnotationProcessorOnCompilePath",
"markdown": "Annotation Processor on Compile Classpath \n\nThis dependency is identified as an annotation processor. Consider adding it to the processor path using `annotationProcessor` instead of including it to the compile path. \n\nIssue id: AnnotationProcessorOnCompilePath"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintAnnotationProcessorOnCompilePath",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintTileProviderPermissions",
"shortDescription": {
"text": "TileProvider does not set permission"
},
"fullDescription": {
"text": "TileProvider does not set permission TileProviders should require the 'com.google.android.wearable.permission.BIND_TILE_PROVIDER' permission to prevent arbitrary apps from binding to it. Issue id: TileProviderPermissions",
"markdown": "TileProvider does not set permission \n\nTileProviders should require the `com.google.android.wearable.permission.BIND_TILE_PROVIDER` permission to prevent arbitrary apps from binding to it. \n\nIssue id: TileProviderPermissions"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintTileProviderPermissions",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUselessParent",
"shortDescription": {
"text": "Unnecessary parent layout"
},
"fullDescription": {
"text": "Unnecessary parent layout A layout with children that has no siblings, is not a scrollview or a root layout, and does not have a background, can be removed and have its children moved directly into the parent for a flatter and more efficient layout hierarchy. Issue id: UselessParent",
"markdown": "Unnecessary parent layout \n\nA layout with children that has no siblings, is not a scrollview or a root layout, and does not have a background, can be removed and have its children moved directly into the parent for a flatter and more efficient layout hierarchy. \n\nIssue id: UselessParent"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintUselessParent",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUnknownId",
"shortDescription": {
"text": "Reference to an unknown id"
},
"fullDescription": {
"text": "Reference to an unknown id The '@+id/' syntax refers to an existing id, or creates a new one if it has not already been defined elsewhere. However, this means that if you have a typo in your reference, or if the referred view no longer exists, you do not get a warning since the id will be created on demand. This check catches errors where you have renamed an id without updating all of the references to it. Issue id: UnknownId",
"markdown": "Reference to an unknown id \n\nThe `@+id/` syntax refers to an existing id, or creates a new one if it has not already been defined elsewhere. However, this means that if you have a typo in your reference, or if the referred view no longer exists, you do not get a warning since the id will be created on demand. This check catches errors where you have renamed an id without updating all of the references to it. \n\nIssue id: UnknownId"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintUnknownId",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintGradleDynamicVersion",
"shortDescription": {
"text": "Gradle Dynamic Version"
},
"fullDescription": {
"text": "Gradle Dynamic Version Using '+' in dependencies lets you automatically pick up the latest available version rather than a specific, named version. However, this is not recommended; your builds are not repeatable; you may have tested with a slightly different version than what the build server used. (Using a dynamic version as the major version number is more problematic than using it in the minor version position.) Issue id: GradleDynamicVersion",
"markdown": "Gradle Dynamic Version \n\nUsing `+` in dependencies lets you automatically pick up the latest available version rather than a specific, named version. However, this is not recommended; your builds are not repeatable; you may have tested with a slightly different version than what the build server used. (Using a dynamic version as the major version number is more problematic than using it in the minor version position.) \n\nIssue id: GradleDynamicVersion"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintGradleDynamicVersion",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintBrokenIterator",
"shortDescription": {
"text": "Broken Iterator"
},
"fullDescription": {
"text": "Broken Iterator For LinkedHashMap: The spliterators returned by 'LinkedHashMap' in Android Nougat (API levels 24 and 25) use the wrong order (inconsistent with the iterators, which use the correct order), despite reporting 'Spliterator.ORDERED'. You may use the following code fragments to obtain a correctly ordered 'Spliterator' on API level 24 and 25: For a Collection view 'c = lhm.entrySet()', 'c = lhm.keySet()' or 'c = lhm.values()', use 'java.util.Spliterators.spliterator(c, c.spliterator().characteristics())' instead of 'c.spliterator()'. Instead of 'c.stream()' or 'c.parallelStream()', use 'java.util.stream.StreamSupport.stream(spliterator, false)' to construct a (nonparallel) Stream from such a 'Spliterator'. For Vector: The 'listIterator()' returned for a 'Vector' has a broken 'add()' implementation on Android N (API level 24). Consider switching to 'ArrayList' and if necessary adding synchronization. Issue id: BrokenIterator https://developer.android.com/reference/java/util/LinkedHashMap",
"markdown": "Broken Iterator \n\n**For LinkedHashMap:** \n\nThe spliterators returned by `LinkedHashMap` in Android Nougat (API levels 24 and 25) use the wrong order (inconsistent with the iterators, which use the correct order), despite reporting `Spliterator.ORDERED`. You may use the following code fragments to obtain a correctly ordered `Spliterator` on API level 24 and 25: \n\nFor a Collection view `c = lhm.entrySet()`, `c = lhm.keySet()` or `c = lhm.values()`, use `java.util.Spliterators.spliterator(c, c.spliterator().characteristics())` instead of `c.spliterator()`. \n\nInstead of `c.stream()` or `c.parallelStream()`, use `java.util.stream.StreamSupport.stream(spliterator, false)` to construct a (nonparallel) Stream from such a `Spliterator`. \n\n**For Vector:** \n\nThe `listIterator()` returned for a `Vector` has a broken `add()` implementation on Android N (API level 24). Consider switching to `ArrayList` and if necessary adding synchronization. \n\nIssue id: BrokenIterator \n\n<https://developer.android.com/reference/java/util/LinkedHashMap>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintBrokenIterator",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMissingId",
"shortDescription": {
"text": "Fragments should specify an id or tag"
},
"fullDescription": {
"text": "Fragments should specify an 'id' or 'tag' If you do not specify an 'android:id' or an 'android:tag' attribute on a '<fragment>' element, then if the activity is restarted (for example for an orientation rotation) you may lose state. From the fragment documentation: \"Each fragment requires a unique identifier that the system can use to restore the fragment if the activity is restarted (and which you can use to capture the fragment to perform transactions, such as remove it). * Supply the 'android:id' attribute with a unique ID. * Supply the 'android:tag' attribute with a unique string. If you provide neither of the previous two, the system uses the ID of the container view. Issue id: MissingId https://developer.android.com/guide/components/fragments.html",
"markdown": "Fragments should specify an `id` or `tag` \n\nIf you do not specify an `android:id` or an `android:tag` attribute on a `<fragment>` element, then if the activity is restarted (for example for an orientation rotation) you may lose state. From the fragment documentation: \n\n\"Each fragment requires a unique identifier that the system can use to restore the fragment if the activity is restarted (and which you can use to capture the fragment to perform transactions, such as remove it). \n\n\\* Supply the `android:id` attribute with a unique ID. \n\\* Supply the `android:tag` attribute with a unique string. \n\nIf you provide neither of the previous two, the system uses the ID of the container view. \n\nIssue id: MissingId \n\n<https://developer.android.com/guide/components/fragments.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintMissingId",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMultipleUsesSdk",
"shortDescription": {
"text": "Multiple <uses-sdk> elements in the manifest"
},
"fullDescription": {
"text": "Multiple '<uses-sdk>' elements in the manifest The '<uses-sdk>' element should appear just once; the tools will not merge the contents of all the elements so if you split up the attributes across multiple elements, only one of them will take effect. To fix this, just merge all the attributes from the various elements into a single <uses-sdk> element. Issue id: MultipleUsesSdk https://developer.android.com/guide/topics/manifest/uses-sdk-element.html",
"markdown": "Multiple `<uses-sdk>` elements in the manifest \n\nThe `<uses-sdk>` element should appear just once; the tools will **not** merge the contents of all the elements so if you split up the attributes across multiple elements, only one of them will take effect. To fix this, just merge all the attributes from the various elements into a single \\<uses-sdk\\> element. \n\nIssue id: MultipleUsesSdk \n\n<https://developer.android.com/guide/topics/manifest/uses-sdk-element.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintMultipleUsesSdk",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintIconDuplicates",
"shortDescription": {
"text": "Duplicated icons under different names"
},
"fullDescription": {
"text": "Duplicated icons under different names If an icon is repeated under different names, you can consolidate and just use one of the icons and delete the others to make your application smaller. However, duplicated icons usually are not intentional and can sometimes point to icons that were accidentally overwritten or accidentally not updated. Issue id: IconDuplicates",
"markdown": "Duplicated icons under different names \n\nIf an icon is repeated under different names, you can consolidate and just use one of the icons and delete the others to make your application smaller. However, duplicated icons usually are not intentional and can sometimes point to icons that were accidentally overwritten or accidentally not updated. \n\nIssue id: IconDuplicates"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintIconDuplicates",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintDiffUtilEquals",
"shortDescription": {
"text": "Suspicious DiffUtil Equality"
},
"fullDescription": {
"text": "Suspicious DiffUtil Equality 'areContentsTheSame' is used by 'DiffUtil' to produce diffs. If the method is implemented incorrectly, such as using identity equals instead of equals, or calling equals on a class that has not implemented it, weird visual artifacts can occur. Issue id: DiffUtilEquals https://issuetracker.google.com/116789824",
"markdown": "Suspicious DiffUtil Equality \n\n`areContentsTheSame` is used by `DiffUtil` to produce diffs. If the method is implemented incorrectly, such as using identity equals instead of equals, or calling equals on a class that has not implemented it, weird visual artifacts can occur. \n\nIssue id: DiffUtilEquals \n\n<https://issuetracker.google.com/116789824>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintDiffUtilEquals",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMangledCRLF",
"shortDescription": {
"text": "Mangled file line endings"
},
"fullDescription": {
"text": "Mangled file line endings On Windows, line endings are typically recorded as carriage return plus newline: \\r\\n. This detector looks for invalid line endings with repeated carriage return characters (without newlines). Previous versions of the ADT plugin could accidentally introduce these into the file, and when editing the file, the editor could produce confusing visual artifacts. Issue id: MangledCRLF https://bugs.eclipse.org/bugs/show_bug.cgi?id=375421",
"markdown": "Mangled file line endings \n\nOn Windows, line endings are typically recorded as carriage return plus newline: \\\\r\\\\n. \n\nThis detector looks for invalid line endings with repeated carriage return characters (without newlines). Previous versions of the ADT plugin could accidentally introduce these into the file, and when editing the file, the editor could produce confusing visual artifacts. \n\nIssue id: MangledCRLF \n\n<https://bugs.eclipse.org/bugs/show_bug.cgi?id=375421>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintMangledCRLF",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintNotConstructor",
"shortDescription": {
"text": "Not a Constructor"
},
"fullDescription": {
"text": "Not a Constructor This check catches methods that look like they were intended to be constructors, but aren't. Issue id: NotConstructor",
"markdown": "Not a Constructor \n\nThis check catches methods that look like they were intended to be constructors, but aren't. \n\nIssue id: NotConstructor"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintNotConstructor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintRequiresFeature",
"shortDescription": {
"text": "Requires Feature"
},
"fullDescription": {
"text": "Requires Feature Some APIs require optional features to be present. This check makes sure that calls to these APIs are surrounded by a check which enforces this. Issue id: RequiresFeature",
"markdown": "Requires Feature \n\nSome APIs require optional features to be present. This check makes sure that calls to these APIs are surrounded by a check which enforces this. \n\nIssue id: RequiresFeature"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintRequiresFeature",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMotionSceneFileValidationError",
"shortDescription": {
"text": "Validation errors in MotionScene files"
},
"fullDescription": {
"text": "Validation errors in 'MotionScene' files A motion scene file specifies the animations used in a 'MotionLayout'. This check performs various serious correctness checks in a motion scene file. Issue id: MotionSceneFileValidationError",
"markdown": "Validation errors in `MotionScene` files \n\nA motion scene file specifies the animations used in a `MotionLayout`. This check performs various serious correctness checks in a motion scene file. \n\nIssue id: MotionSceneFileValidationError"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintMotionSceneFileValidationError",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintAdapterViewChildren",
"shortDescription": {
"text": "AdapterView cannot have children in XML"
},
"fullDescription": {
"text": "'AdapterView' cannot have children in XML An 'AdapterView' such as a `ListView`s must be configured with data from Java code, such as a 'ListAdapter'. Issue id: AdapterViewChildren https://developer.android.com/reference/android/widget/AdapterView.html",
"markdown": "`AdapterView` cannot have children in XML \n\nAn `AdapterView` such as a \\`ListView\\`s must be configured with data from Java code, such as a `ListAdapter`. \n\nIssue id: AdapterViewChildren \n\n<https://developer.android.com/reference/android/widget/AdapterView.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintAdapterViewChildren",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintSQLiteString",
"shortDescription": {
"text": "Using STRING instead of TEXT"
},
"fullDescription": {
"text": "Using STRING instead of TEXT In SQLite, any column can store any data type; the declared type for a column is more of a hint as to what the data should be cast to when stored. There are many ways to store a string. 'TEXT', 'VARCHAR', 'CHARACTER' and 'CLOB' are string types, but `STRING` is not. Columns defined as STRING are actually numeric. If you try to store a value in a numeric column, SQLite will try to cast it to a float or an integer before storing. If it can't, it will just store it as a string. This can lead to some subtle bugs. For example, when SQLite encounters a string like '1234567e1234', it will parse it as a float, but the result will be out of range for floating point numbers, so 'Inf' will be stored! Similarly, strings that look like integers will lose leading zeroes. To fix this, you can change your schema to use a 'TEXT' type instead. Issue id: SQLiteString https://www.sqlite.org/datatype3.html",
"markdown": "Using STRING instead of TEXT \n\nIn SQLite, any column can store any data type; the declared type for a column is more of a hint as to what the data should be cast to when stored. \n\nThere are many ways to store a string. `TEXT`, `VARCHAR`, `CHARACTER` and `CLOB` are string types, **but \\`STRING\\` is not** . Columns defined as STRING are actually numeric. \n\nIf you try to store a value in a numeric column, SQLite will try to cast it to a float or an integer before storing. If it can't, it will just store it as a string. \n\nThis can lead to some subtle bugs. For example, when SQLite encounters a string like `1234567e1234`, it will parse it as a float, but the result will be out of range for floating point numbers, so `Inf` will be stored! Similarly, strings that look like integers will lose leading zeroes. \n\nTo fix this, you can change your schema to use a `TEXT` type instead. \n\nIssue id: SQLiteString \n\n<https://www.sqlite.org/datatype3.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintSQLiteString",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUseTomlInstead",
"shortDescription": {
"text": "Use TOML Version Catalog Instead"
},
"fullDescription": {
"text": "Use TOML Version Catalog Instead If your project is using a 'libs.versions.toml' file, you should place all Gradle dependencies in the TOML file. This lint check looks for version declarations outside of the TOML file and suggests moving them (and in the IDE, provides a quickfix to performing the operation automatically). Issue id: UseTomlInstead",
"markdown": "Use TOML Version Catalog Instead \n\nIf your project is using a `libs.versions.toml` file, you should place all Gradle dependencies in the TOML file. This lint check looks for version declarations outside of the TOML file and suggests moving them (and in the IDE, provides a quickfix to performing the operation automatically). \n\nIssue id: UseTomlInstead"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintUseTomlInstead",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Productivity",
"index": 143,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMotionLayoutMissingId",
"shortDescription": {
"text": "Views inside MotionLayout require an android:id"
},
"fullDescription": {
"text": "Views inside 'MotionLayout' require an 'android:id' Views inside 'MotionLayout' require an 'android:id'. Issue id: MotionLayoutMissingId",
"markdown": "Views inside `MotionLayout` require an `android:id` \n\nViews inside `MotionLayout` require an `android:id`. \n\nIssue id: MotionLayoutMissingId"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintMotionLayoutMissingId",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintSpUsage",
"shortDescription": {
"text": "Using dp instead of sp for text sizes"
},
"fullDescription": {
"text": "Using 'dp' instead of 'sp' for text sizes When setting text sizes, you should normally use 'sp', or \"scale-independent pixels\". This is like the 'dp' unit, but it is also scaled by the user's font size preference. It is recommend you use this unit when specifying font sizes, so they will be adjusted for both the screen density and the user's preference. There are cases where you might need to use 'dp'; typically this happens when the text is in a container with a specific dp-size. This will prevent the text from spilling outside the container. Note however that this means that the user's font size settings are not respected, so consider adjusting the layout itself to be more flexible. Issue id: SpUsage https://developer.android.com/training/multiscreen/screendensities.html",
"markdown": "Using `dp` instead of `sp` for text sizes \n\nWhen setting text sizes, you should normally use `sp`, or \"scale-independent pixels\". This is like the `dp` unit, but it is also scaled by the user's font size preference. It is recommend you use this unit when specifying font sizes, so they will be adjusted for both the screen density and the user's preference. \n\nThere **are** cases where you might need to use `dp`; typically this happens when the text is in a container with a specific dp-size. This will prevent the text from spilling outside the container. Note however that this means that the user's font size settings are not respected, so consider adjusting the layout itself to be more flexible. \n\nIssue id: SpUsage \n\n<https://developer.android.com/training/multiscreen/screendensities.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintSpUsage",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintValidFragment",
"shortDescription": {
"text": "Fragment not instantiatable"
},
"fullDescription": {
"text": "Fragment not instantiatable From the Fragment documentation: Every fragment must have an empty constructor, so it can be instantiated when restoring its activity's state. It is strongly recommended that subclasses do not have other constructors with parameters, since these constructors will not be called when the fragment is re-instantiated; instead, arguments can be supplied by the caller with 'setArguments(Bundle)' and later retrieved by the Fragment with 'getArguments()'. Note that this is no longer true when you are using 'androidx.fragment.app.Fragment'; with the 'FragmentFactory' you can supply any arguments you want (as of version androidx version 1.1). Issue id: ValidFragment https://developer.android.com/reference/android/app/Fragment.html#Fragment()",
"markdown": "Fragment not instantiatable \n\nFrom the Fragment documentation: \n**Every** fragment must have an empty constructor, so it can be instantiated when restoring its activity's state. It is strongly recommended that subclasses do not have other constructors with parameters, since these constructors will not be called when the fragment is re-instantiated; instead, arguments can be supplied by the caller with `setArguments(Bundle)` and later retrieved by the Fragment with `getArguments()`. \n\nNote that this is no longer true when you are using `androidx.fragment.app.Fragment`; with the `FragmentFactory` you can supply any arguments you want (as of version androidx version 1.1). \n\nIssue id: ValidFragment \n\n<https://developer.android.com/reference/android/app/Fragment.html#Fragment()>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintValidFragment",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintStringEscaping",
"shortDescription": {
"text": "Invalid string escapes"
},
"fullDescription": {
"text": "Invalid string escapes Apostrophes (') must always be escaped (with a \\\\), unless they appear in a string which is itself escaped in double quotes (\"). Issue id: StringEscaping",
"markdown": "Invalid string escapes \n\nApostrophes (') must always be escaped (with a \\\\\\\\), unless they appear in a string which is itself escaped in double quotes (\"). \n\nIssue id: StringEscaping"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintStringEscaping",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintIntentFilterExportedReceiver",
"shortDescription": {
"text": "Unspecified android:exported in manifest"
},
"fullDescription": {
"text": "Unspecified 'android:exported' in manifest Apps targeting Android 12 and higher are required to specify an explicit value for 'android:exported' when the corresponding component has an intent filter defined. Otherwise, installation will fail. Set it to 'true' to make this activity accessible to other apps, and 'false' to limit it to be used only by this app or the OS. For launch activities, this should be set to true; otherwise, the app will fail to launch. Previously, 'android:exported' for components without any intent filters present used to default to 'false', and when intent filters were present, the default was 'true'. Defaults which change value based on other values are confusing and lead to apps accidentally exporting components as a side-effect of adding intent filters. This is a security risk, and we have made this change to avoid introducing accidental vulnerabilities. While the default without intent filters remains unchanged, it is now required to explicitly specify a value when intent filters are present. Any app failing to meet this requirement will fail to install on any Android version after Android 11. We recommend setting 'android:exported' to false (even on previous versions of Android prior to this requirement) unless you have a good reason to export a particular component. Issue id: IntentFilterExportedReceiver https://goo.gle/IntentFilterExportedReceiver",
"markdown": "Unspecified `android:exported` in manifest \n\nApps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. Otherwise, installation will fail. Set it to `true` to make this activity accessible to other apps, and `false` to limit it to be used only by this app or the OS. For launch activities, this should be set to true; otherwise, the app will fail to launch. \n\nPreviously, `android:exported` for components without any intent filters present used to default to `false`, and when intent filters were present, the default was `true`. Defaults which change value based on other values are confusing and lead to apps accidentally exporting components as a side-effect of adding intent filters. This is a security risk, and we have made this change to avoid introducing accidental vulnerabilities. \n\nWhile the default without intent filters remains unchanged, it is now required to explicitly specify a value when intent filters are present. Any app failing to meet this requirement will fail to install on any Android version after Android 11. \n\nWe recommend setting `android:exported` to false (even on previous versions of Android prior to this requirement) unless you have a good reason to export a particular component. \n\nIssue id: IntentFilterExportedReceiver \n\n<https://goo.gle/IntentFilterExportedReceiver>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintIntentFilterExportedReceiver",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintStateListReachable",
"shortDescription": {
"text": "Unreachable state in a <selector>"
},
"fullDescription": {
"text": "Unreachable state in a '<selector>' In a selector, only the last child in the state list should omit a state qualifier. If not, all subsequent items in the list will be ignored since the given item will match all. Issue id: StateListReachable",
"markdown": "Unreachable state in a `<selector>` \n\nIn a selector, only the last child in the state list should omit a state qualifier. If not, all subsequent items in the list will be ignored since the given item will match all. \n\nIssue id: StateListReachable"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintStateListReachable",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintExportedPreferenceActivity",
"shortDescription": {
"text": "PreferenceActivity should not be exported"
},
"fullDescription": {
"text": "PreferenceActivity should not be exported Fragment injection gives anyone who can send your 'PreferenceActivity' an intent the ability to load any fragment, with any arguments, in your process. Issue id: ExportedPreferenceActivity http://securityintelligence.com/new-vulnerability-android-framework-fragment-injection https://goo.gle/ExportedPreferenceActivity",
"markdown": "PreferenceActivity should not be exported \n\nFragment injection gives anyone who can send your `PreferenceActivity` an intent the ability to load any fragment, with any arguments, in your process. \n\nIssue id: ExportedPreferenceActivity \n\n<http://securityintelligence.com/new-vulnerability-android-framework-fragment-injection> \n<https://goo.gle/ExportedPreferenceActivity>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintExportedPreferenceActivity",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintAddJavascriptInterface",
"shortDescription": {
"text": "addJavascriptInterface Called"
},
"fullDescription": {
"text": "'addJavascriptInterface' Called For applications built for API levels below 17, 'WebView#addJavascriptInterface' presents a security hazard as JavaScript on the target web page has the ability to use reflection to access the injected object's public fields and thus manipulate the host application in unintended ways. Issue id: AddJavascriptInterface https://developer.android.com/reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object,%20java.lang.String) https://support.google.com/faqs/answer/9095419?hl=en https://goo.gle/AddJavascriptInterface",
"markdown": "`addJavascriptInterface` Called \n\nFor applications built for API levels below 17, `WebView#addJavascriptInterface` presents a security hazard as JavaScript on the target web page has the ability to use reflection to access the injected object's public fields and thus manipulate the host application in unintended ways. \n\nIssue id: AddJavascriptInterface \n\n<https://developer.android.com/reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object,%20java.lang.String)> \n<https://support.google.com/faqs/answer/9095419?hl=en> \n<https://goo.gle/AddJavascriptInterface>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintAddJavascriptInterface",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintInnerclassSeparator",
"shortDescription": {
"text": "Inner classes should use $ rather than ."
},
"fullDescription": {
"text": "Inner classes should use '$' rather than '.' When you reference an inner class in a manifest file, you must use '$' instead of '.' as the separator character, i.e. Outer$Inner instead of Outer.Inner. (If you get this warning for a class which is not actually an inner class, it's because you are using uppercase characters in your package name, which is not conventional.) Issue id: InnerclassSeparator",
"markdown": "Inner classes should use `$` rather than `.` \n\nWhen you reference an inner class in a manifest file, you must use '$' instead of '.' as the separator character, i.e. Outer$Inner instead of Outer.Inner. \n\n(If you get this warning for a class which is not actually an inner class, it's because you are using uppercase characters in your package name, which is not conventional.) \n\nIssue id: InnerclassSeparator"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintInnerclassSeparator",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintFontValidation",
"shortDescription": {
"text": "Validation of font files"
},
"fullDescription": {
"text": "Validation of font files Look for problems in various font files. Issue id: FontValidation https://developer.android.com/guide/topics/text/downloadable-fonts.html",
"markdown": "Validation of font files \n\nLook for problems in various font files. \n\nIssue id: FontValidation \n\n<https://developer.android.com/guide/topics/text/downloadable-fonts.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintFontValidation",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintAaptCrash",
"shortDescription": {
"text": "Potential AAPT crash"
},
"fullDescription": {
"text": "Potential AAPT crash Defining a style which sets 'android:id' to a dynamically generated id can cause many versions of 'aapt', the resource packaging tool, to crash. To work around this, declare the id explicitly with '<item type=\"id\" name=\"...\" />' instead. Issue id: AaptCrash",
"markdown": "Potential AAPT crash \n\nDefining a style which sets `android:id` to a dynamically generated id can cause many versions of `aapt`, the resource packaging tool, to crash. To work around this, declare the id explicitly with `<item type=\"id\" name=\"...\" />` instead. \n\nIssue id: AaptCrash"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintAaptCrash",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintReferenceType",
"shortDescription": {
"text": "Incorrect reference types"
},
"fullDescription": {
"text": "Incorrect reference types When you generate a resource alias, the resource you are pointing to must be of the same type as the alias Issue id: ReferenceType",
"markdown": "Incorrect reference types \n\nWhen you generate a resource alias, the resource you are pointing to must be of the same type as the alias \n\nIssue id: ReferenceType"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintReferenceType",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintDiscouragedApi",
"shortDescription": {
"text": "Using discouraged APIs"
},
"fullDescription": {
"text": "Using discouraged APIs Discouraged APIs are allowed and are not deprecated, but they may be unfit for common use (e.g. due to slow performance or subtle behavior). Issue id: DiscouragedApi",
"markdown": "Using discouraged APIs \n\nDiscouraged APIs are allowed and are not deprecated, but they may be unfit for common use (e.g. due to slow performance or subtle behavior). \n\nIssue id: DiscouragedApi"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintDiscouragedApi",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintSuspiciousIndentation",
"shortDescription": {
"text": "Suspicious indentation"
},
"fullDescription": {
"text": "Suspicious indentation This check looks for cases where the indentation suggests a grouping that isn't actually there in the code. A common example of this would be something like if (column > width)\n line++\n column = 0\n Here, the 'column = 0' line will be executed every single time, not just if the condition is true. Issue id: SuspiciousIndentation Available options: always-run (default is false): Whether this check should be included while editing. While you're editing, it's common to have a temporary situation where you have suspicious indentation scenarios -- e.g. you start typing an 'if' statement on the line above something you want to make conditional, and you haven't indented it yet. It can be distracting and misleading to suddenly have both statements light up as errors. Therefore, lint will avoid including this check when running on the fly in the editor, unless it looks like the file has not been recently edited. With this option, you can turn it on in all cases. To configure this option, use a 'lint.xml' file with an <option> like this: <lint>\n <issue id=\"SuspiciousIndentation\">\n <option name=\"always-run\" value=\"false\" />\n </issue>\n</lint>",
"markdown": "Suspicious indentation \n\nThis check looks for cases where the indentation suggests a grouping that isn't actually there in the code. A common example of this would be something like\n\n```\nif (column > width)\n line++\n column = 0\n```\n\nHere, the `column = 0` line will be executed every single time, not just if the condition is true. \n\nIssue id: SuspiciousIndentation \n\nAvailable options: \n\n**always-run** (default is false): \nWhether this check should be included while editing. \n\nWhile you're editing, it's common to have a temporary situation where you have suspicious indentation scenarios -- e.g. you start typing an `if` statement on the line above something you want to make conditional, and you haven't indented it yet. It can be distracting and misleading to suddenly have both statements light up as errors. Therefore, lint will avoid including this check when running on the fly in the editor, unless it looks like the file has not been recently edited. With this option, you can turn it on in all cases. \n\nTo configure this option, use a `lint.xml` file with an \\<option\\> like this: \n\n```\n<lint>\n <issue id=\"SuspiciousIndentation\">\n <option name=\"always-run\" value=\"false\" />\n </issue>\n</lint>\n```"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintSuspiciousIndentation",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintDataExtractionRules",
"shortDescription": {
"text": "Missing data extraction rules"
},
"fullDescription": {
"text": "Missing data extraction rules Before Android 12, the attributes 'android:allowBackup' and 'android:fullBackupContent' were used to configure all forms of backup, including cloud backups, device-to-device transfers and adb backup. In Android 12 and higher, these attributes have been deprecated and will only apply to cloud backups. You should instead use the attribute 'android:dataExtractionRules', specifying an '@xml' resource that configures which files to back up, for cloud backups and for device-to-device transfers, separately. If your 'minSdkVersion' supports older versions, you'll still want to specify an 'android:fullBackupContent' resource if the default behavior is not right for your app. Issue id: DataExtractionRules https://developer.android.com/about/versions/12/backup-restore#xml-changes https://goo.gle/DataExtractionRules",
"markdown": "Missing data extraction rules \n\nBefore Android 12, the attributes `android:allowBackup` and `android:fullBackupContent` were used to configure all forms of backup, including cloud backups, device-to-device transfers and adb backup. \n\nIn Android 12 and higher, these attributes have been deprecated and will only apply to cloud backups. You should instead use the attribute `android:dataExtractionRules`, specifying an `@xml` resource that configures which files to back up, for cloud backups and for device-to-device transfers, separately. If your `minSdkVersion` supports older versions, you'll still want to specify an `android:fullBackupContent` resource if the default behavior is not right for your app. \n\nIssue id: DataExtractionRules \n\n<https://developer.android.com/about/versions/12/backup-restore#xml-changes> \n<https://goo.gle/DataExtractionRules>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintDataExtractionRules",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintOldTargetApi",
"shortDescription": {
"text": "Target SDK attribute is not targeting latest version"
},
"fullDescription": {
"text": "Target SDK attribute is not targeting latest version When your application runs on a version of Android that is more recent than your 'targetSdkVersion' specifies that it has been tested with, various compatibility modes kick in. This ensures that your application continues to work, but it may look out of place. For example, if the 'targetSdkVersion' is less than 14, your app may get an option button in the UI. To fix this issue, set the 'targetSdkVersion' to the highest available value. Then test your app to make sure everything works correctly. You may want to consult the compatibility notes to see what changes apply to each version you are adding support for: https://developer.android.com/reference/android/os/Build.VERSION_CODES.html as well as follow this guide: https://developer.android.com/distribute/best-practices/develop/target-sdk.html Issue id: OldTargetApi",
"markdown": "Target SDK attribute is not targeting latest version \n\nWhen your application runs on a version of Android that is more recent than your `targetSdkVersion` specifies that it has been tested with, various compatibility modes kick in. This ensures that your application continues to work, but it may look out of place. For example, if the `targetSdkVersion` is less than 14, your app may get an option button in the UI. \n\nTo fix this issue, set the `targetSdkVersion` to the highest available value. Then test your app to make sure everything works correctly. You may want to consult the compatibility notes to see what changes apply to each version you are adding support for: <https://developer.android.com/reference/android/os/Build.VERSION_CODES.html> as well as follow this guide: \n<https://developer.android.com/distribute/best-practices/develop/target-sdk.html> \n\nIssue id: OldTargetApi"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintOldTargetApi",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMipmapIcons",
"shortDescription": {
"text": "Use Mipmap Launcher Icons"
},
"fullDescription": {
"text": "Use Mipmap Launcher Icons Launcher icons should be provided in the 'mipmap' resource directory. This is the same as the 'drawable' resource directory, except resources in the 'mipmap' directory will not get stripped out when creating density-specific APKs. In certain cases, the Launcher app may use a higher resolution asset (than would normally be computed for the device) to display large app shortcuts. If drawables for densities other than the device's resolution have been stripped out, then the app shortcut could appear blurry. To fix this, move your launcher icons from `drawable-`dpi to `mipmap-`dpi and change references from @drawable/ and R.drawable to @mipmap/ and R.mipmap. In Android Studio this lint warning has a quickfix to perform this automatically. Issue id: MipmapIcons",
"markdown": "Use Mipmap Launcher Icons \n\nLauncher icons should be provided in the `mipmap` resource directory. This is the same as the `drawable` resource directory, except resources in the `mipmap` directory will not get stripped out when creating density-specific APKs. \n\nIn certain cases, the Launcher app may use a higher resolution asset (than would normally be computed for the device) to display large app shortcuts. If drawables for densities other than the device's resolution have been stripped out, then the app shortcut could appear blurry. \n\nTo fix this, move your launcher icons from \\`drawable-\\`dpi to \\`mipmap-\\`dpi and change references from @drawable/ and R.drawable to @mipmap/ and R.mipmap. \n\nIn Android Studio this lint warning has a quickfix to perform this automatically. \n\nIssue id: MipmapIcons"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintMipmapIcons",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintJcenterRepositoryObsolete",
"shortDescription": {
"text": "JCenter Maven repository is read-only"
},
"fullDescription": {
"text": "JCenter Maven repository is read-only The JCenter Maven repository is no longer accepting submissions of Maven artifacts since 31st March 2021. Ensure that the project is configured to search in repositories with the latest versions of its dependencies. Issue id: JcenterRepositoryObsolete https://developer.android.com/r/tools/jcenter-end-of-service",
"markdown": "JCenter Maven repository is read-only \n\nThe JCenter Maven repository is no longer accepting submissions of Maven artifacts since 31st March 2021. Ensure that the project is configured to search in repositories with the latest versions of its dependencies. \n\nIssue id: JcenterRepositoryObsolete \n\n<https://developer.android.com/r/tools/jcenter-end-of-service>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintJcenterRepositoryObsolete",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintNotificationId0",
"shortDescription": {
"text": "Notification Id is 0"
},
"fullDescription": {
"text": "Notification Id is 0 The notification id cannot be 0; using 0 here can make the service not run in the foreground. Issue id: NotificationId0",
"markdown": "Notification Id is 0 \n\nThe notification id **cannot** be 0; using 0 here can make the service not run in the foreground. \n\nIssue id: NotificationId0"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintNotificationId0",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintGradleDeprecatedConfiguration",
"shortDescription": {
"text": "Deprecated Gradle Configuration"
},
"fullDescription": {
"text": "Deprecated Gradle Configuration Some Gradle configurations have been deprecated since Android Gradle Plugin 3.0.0 and will be removed in a future version of the Android Gradle Plugin. Issue id: GradleDeprecatedConfiguration https://d.android.com/r/tools/update-dependency-configurations",
"markdown": "Deprecated Gradle Configuration \n\nSome Gradle configurations have been deprecated since Android Gradle Plugin 3.0.0 and will be removed in a future version of the Android Gradle Plugin. \n\nIssue id: GradleDeprecatedConfiguration \n\n<https://d.android.com/r/tools/update-dependency-configurations>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintGradleDeprecatedConfiguration",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintRange",
"shortDescription": {
"text": "Outside Range"
},
"fullDescription": {
"text": "Outside Range Some parameters are required to in a particular numerical range; this check makes sure that arguments passed fall within the range. For arrays, Strings and collections this refers to the size or length. Issue id: Range",
"markdown": "Outside Range \n\nSome parameters are required to in a particular numerical range; this check makes sure that arguments passed fall within the range. For arrays, Strings and collections this refers to the size or length. \n\nIssue id: Range"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintRange",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintExportedService",
"shortDescription": {
"text": "Exported service does not require permission"
},
"fullDescription": {
"text": "Exported service does not require permission Exported services (services which either set 'exported=true' or contain an intent-filter and do not specify 'exported=false') should define a permission that an entity must have in order to launch the service or bind to it. Without this, any application can use this service. Issue id: ExportedService https://goo.gle/ExportedService",
"markdown": "Exported service does not require permission \n\nExported services (services which either set `exported=true` or contain an intent-filter and do not specify `exported=false`) should define a permission that an entity must have in order to launch the service or bind to it. Without this, any application can use this service. \n\nIssue id: ExportedService \n\n<https://goo.gle/ExportedService>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintExportedService",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintSystemPermissionTypo",
"shortDescription": {
"text": "Permission appears to be a standard permission with a typo"
},
"fullDescription": {
"text": "Permission appears to be a standard permission with a typo This check looks for required permissions that look like well-known system permissions or permissions from the Android SDK, but aren't, and may be typos. Please double check the permission value you have supplied. Issue id: SystemPermissionTypo",
"markdown": "Permission appears to be a standard permission with a typo \n\nThis check looks for required permissions that *look* like well-known system permissions or permissions from the Android SDK, but aren't, and may be typos. \n\nPlease double check the permission value you have supplied. \n\nIssue id: SystemPermissionTypo"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintSystemPermissionTypo",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintFindViewByIdCast",
"shortDescription": {
"text": "Add Explicit Cast"
},
"fullDescription": {
"text": "Add Explicit Cast In Android O, the 'findViewById' signature switched to using generics, which means that most of the time you can leave out explicit casts and just assign the result of the 'findViewById' call to variables of specific view classes. However, due to language changes between Java 7 and 8, this change may cause code to not compile without explicit casts. This lint check looks for these scenarios and suggests casts to be added now such that the code will continue to compile if the language level is updated to 1.8. Issue id: FindViewByIdCast",
"markdown": "Add Explicit Cast \n\nIn Android O, the `findViewById` signature switched to using generics, which means that most of the time you can leave out explicit casts and just assign the result of the `findViewById` call to variables of specific view classes. \n\nHowever, due to language changes between Java 7 and 8, this change may cause code to not compile without explicit casts. This lint check looks for these scenarios and suggests casts to be added now such that the code will continue to compile if the language level is updated to 1.8. \n\nIssue id: FindViewByIdCast"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintFindViewByIdCast",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintDefaultLocale",
"shortDescription": {
"text": "Implied default locale in case conversion"
},
"fullDescription": {
"text": "Implied default locale in case conversion Calling 'String#toLowerCase()' or '#toUpperCase()' without specifying an explicit locale is a common source of bugs. The reason for that is that those methods will use the current locale on the user's device, and even though the code appears to work correctly when you are developing the app, it will fail in some locales. For example, in the Turkish locale, the uppercase replacement for 'i' is not 'I'. If you want the methods to just perform ASCII replacement, for example to convert an enum name, call 'String#toUpperCase(Locale.US)' instead. If you really want to use the current locale, call 'String#toUpperCase(Locale.getDefault())' instead. Issue id: DefaultLocale https://developer.android.com/reference/java/util/Locale.html#default_locale",
"markdown": "Implied default locale in case conversion \n\nCalling `String#toLowerCase()` or `#toUpperCase()` **without specifying an explicit locale** is a common source of bugs. The reason for that is that those methods will use the current locale on the user's device, and even though the code appears to work correctly when you are developing the app, it will fail in some locales. For example, in the Turkish locale, the uppercase replacement for `i` is **not** `I`. \n\nIf you want the methods to just perform ASCII replacement, for example to convert an enum name, call `String#toUpperCase(Locale.US)` instead. If you really want to use the current locale, call `String#toUpperCase(Locale.getDefault())` instead. \n\nIssue id: DefaultLocale \n\n<https://developer.android.com/reference/java/util/Locale.html#default_locale>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintDefaultLocale",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintReturnThis",
"shortDescription": {
"text": "Method must return this"
},
"fullDescription": {
"text": "Method must return 'this' Methods annotated with '@ReturnThis' (usually in the super method that this method is overriding) should also 'return this'. Issue id: ReturnThis",
"markdown": "Method must return `this` \n\nMethods annotated with `@ReturnThis` (usually in the super method that this method is overriding) should also `return this`. \n\nIssue id: ReturnThis"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintReturnThis",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintConvertToWebp",
"shortDescription": {
"text": "Convert to WebP"
},
"fullDescription": {
"text": "Convert to WebP The WebP format is typically more compact than PNG and JPEG. As of Android 4.2.1 it supports transparency and lossless conversion as well. Note that there is a quickfix in the IDE which lets you perform conversion. Previously, launcher icons were required to be in the PNG format but that restriction is no longer there, so lint now flags these. Issue id: ConvertToWebp",
"markdown": "Convert to WebP \n\nThe WebP format is typically more compact than PNG and JPEG. As of Android 4.2.1 it supports transparency and lossless conversion as well. Note that there is a quickfix in the IDE which lets you perform conversion. \n\nPreviously, launcher icons were required to be in the PNG format but that restriction is no longer there, so lint now flags these. \n\nIssue id: ConvertToWebp"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintConvertToWebp",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintAllowAllHostnameVerifier",
"shortDescription": {
"text": "Insecure HostnameVerifier"
},
"fullDescription": {
"text": "Insecure 'HostnameVerifier' This check looks for use of HostnameVerifier implementations whose 'verify' method always returns true (thus trusting any hostname) which could result in insecure network traffic caused by trusting arbitrary hostnames in TLS/SSL certificates presented by peers. Issue id: AllowAllHostnameVerifier https://goo.gle/AllowAllHostnameVerifier",
"markdown": "Insecure `HostnameVerifier` \n\nThis check looks for use of HostnameVerifier implementations whose `verify` method always returns true (thus trusting any hostname) which could result in insecure network traffic caused by trusting arbitrary hostnames in TLS/SSL certificates presented by peers. \n\nIssue id: AllowAllHostnameVerifier \n\n<https://goo.gle/AllowAllHostnameVerifier>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintAllowAllHostnameVerifier",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintExportedContentProvider",
"shortDescription": {
"text": "Content provider does not require permission"
},
"fullDescription": {
"text": "Content provider does not require permission Content providers are exported by default and any application on the system can potentially use them to read and write data. If the content provider provides access to sensitive data, it should be protected by specifying 'export=false' in the manifest or by protecting it with a permission that can be granted to other applications. Issue id: ExportedContentProvider https://goo.gle/ExportedContentProvider",
"markdown": "Content provider does not require permission \n\nContent providers are exported by default and any application on the system can potentially use them to read and write data. If the content provider provides access to sensitive data, it should be protected by specifying `export=false` in the manifest or by protecting it with a permission that can be granted to other applications. \n\nIssue id: ExportedContentProvider \n\n<https://goo.gle/ExportedContentProvider>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintExportedContentProvider",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintTypos",
"shortDescription": {
"text": "Spelling error"
},
"fullDescription": {
"text": "Spelling error This check looks through the string definitions, and if it finds any words that look like likely misspellings, they are flagged. Issue id: Typos",
"markdown": "Spelling error \n\nThis check looks through the string definitions, and if it finds any words that look like likely misspellings, they are flagged. \n\nIssue id: Typos"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintTypos",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintExtraText",
"shortDescription": {
"text": "Extraneous text in resource files"
},
"fullDescription": {
"text": "Extraneous text in resource files Non-value resource files should only contain elements and attributes. Any XML text content found in the file is likely accidental (and potentially dangerous if the text resembles XML and the developer believes the text to be functional). Issue id: ExtraText",
"markdown": "Extraneous text in resource files \n\nNon-value resource files should only contain elements and attributes. Any XML text content found in the file is likely accidental (and potentially dangerous if the text resembles XML and the developer believes the text to be functional). \n\nIssue id: ExtraText"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintExtraText",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintRtlHardcoded",
"shortDescription": {
"text": "Using left/right instead of start/end attributes"
},
"fullDescription": {
"text": "Using left/right instead of start/end attributes Using 'Gravity#LEFT' and 'Gravity#RIGHT' can lead to problems when a layout is rendered in locales where text flows from right to left. Use 'Gravity#START' and 'Gravity#END' instead. Similarly, in XML 'gravity' and 'layout_gravity' attributes, use 'start' rather than 'left'. For XML attributes such as paddingLeft and 'layout_marginLeft', use 'paddingStart' and 'layout_marginStart'. NOTE: If your 'minSdkVersion' is less than 17, you should add both the older left/right attributes as well as the new start/end attributes. On older platforms, where RTL is not supported and the start/end attributes are unknown and therefore ignored, you need the older left/right attributes. There is a separate lint check which catches that type of error. (Note: For 'Gravity#LEFT' and 'Gravity#START', you can use these constants even when targeting older platforms, because the 'start' bitmask is a superset of the 'left' bitmask. Therefore, you can use 'gravity=\"start\"' rather than 'gravity=\"left|start\"'.) Issue id: RtlHardcoded",
"markdown": "Using left/right instead of start/end attributes \n\nUsing `Gravity#LEFT` and `Gravity#RIGHT` can lead to problems when a layout is rendered in locales where text flows from right to left. Use `Gravity#START` and `Gravity#END` instead. Similarly, in XML `gravity` and `layout_gravity` attributes, use `start` rather than `left`. \n\nFor XML attributes such as paddingLeft and `layout_marginLeft`, use `paddingStart` and `layout_marginStart`. **NOTE** : If your `minSdkVersion` is less than 17, you should add **both** the older left/right attributes **as well as** the new start/end attributes. On older platforms, where RTL is not supported and the start/end attributes are unknown and therefore ignored, you need the older left/right attributes. There is a separate lint check which catches that type of error. \n\n(Note: For `Gravity#LEFT` and `Gravity#START`, you can use these constants even when targeting older platforms, because the `start` bitmask is a superset of the `left` bitmask. Therefore, you can use `gravity=\"start\"` rather than `gravity=\"left|start\"`.) \n\nIssue id: RtlHardcoded"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintRtlHardcoded",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Internationalization",
"index": 187,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintIconDensities",
"shortDescription": {
"text": "Icon densities validation"
},
"fullDescription": {
"text": "Icon densities validation Icons will look best if a custom version is provided for each of the major screen density classes (low, medium, high, extra high). This lint check identifies icons which do not have complete coverage across the densities. Low density is not really used much anymore, so this check ignores the ldpi density. To force lint to include it, set the environment variable 'ANDROID_LINT_INCLUDE_LDPI=true'. For more information on current density usage, see https://developer.android.com/about/dashboards Issue id: IconDensities https://developer.android.com/guide/practices/screens_support.html",
"markdown": "Icon densities validation \n\nIcons will look best if a custom version is provided for each of the major screen density classes (low, medium, high, extra high). This lint check identifies icons which do not have complete coverage across the densities. \n\nLow density is not really used much anymore, so this check ignores the ldpi density. To force lint to include it, set the environment variable `ANDROID_LINT_INCLUDE_LDPI=true`. For more information on current density usage, see <https://developer.android.com/about/dashboards> \n\nIssue id: IconDensities \n\n<https://developer.android.com/guide/practices/screens_support.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintIconDensities",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintSuspicious0dp",
"shortDescription": {
"text": "Suspicious 0dp dimension"
},
"fullDescription": {
"text": "Suspicious 0dp dimension Using 0dp as the width in a horizontal 'LinearLayout' with weights is a useful trick to ensure that only the weights (and not the intrinsic sizes) are used when sizing the children. However, if you use 0dp for the opposite dimension, the view will be invisible. This can happen if you change the orientation of a layout without also flipping the '0dp' dimension in all the children. Issue id: Suspicious0dp",
"markdown": "Suspicious 0dp dimension \n\nUsing 0dp as the width in a horizontal `LinearLayout` with weights is a useful trick to ensure that only the weights (and not the intrinsic sizes) are used when sizing the children. \n\nHowever, if you use 0dp for the opposite dimension, the view will be invisible. This can happen if you change the orientation of a layout without also flipping the `0dp` dimension in all the children. \n\nIssue id: Suspicious0dp"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintSuspicious0dp",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintProguardSplit",
"shortDescription": {
"text": "Proguard.cfg file contains generic Android rules"
},
"fullDescription": {
"text": "Proguard.cfg file contains generic Android rules Earlier versions of the Android tools bundled a single 'proguard.cfg' file containing a ProGuard configuration file suitable for Android shrinking and obfuscation. However, that version was copied into new projects, which means that it does not continue to get updated as we improve the default ProGuard rules for Android. In the new version of the tools, we have split the ProGuard configuration into two halves: * A simple configuration file containing only project-specific flags, in your project * A generic configuration file containing the recommended set of ProGuard options for Android projects. This generic file lives in the SDK install directory which means that it gets updated along with the tools. In order for this to work, the proguard.config property in the 'project.properties' file now refers to a path, so you can reference both the generic file as well as your own (and any additional files too). To migrate your project to the new setup, create a new 'proguard-project.txt' file in your project containing any project specific ProGuard flags as well as any customizations you have made, then update your project.properties file to contain: 'proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt' Issue id: ProguardSplit",
"markdown": "Proguard.cfg file contains generic Android rules \n\nEarlier versions of the Android tools bundled a single `proguard.cfg` file containing a ProGuard configuration file suitable for Android shrinking and obfuscation. However, that version was copied into new projects, which means that it does not continue to get updated as we improve the default ProGuard rules for Android. \n\nIn the new version of the tools, we have split the ProGuard configuration into two halves: \n\\* A simple configuration file containing only project-specific flags, in your project \n\\* A generic configuration file containing the recommended set of ProGuard options for Android projects. This generic file lives in the SDK install directory which means that it gets updated along with the tools. \n\nIn order for this to work, the proguard.config property in the `project.properties` file now refers to a path, so you can reference both the generic file as well as your own (and any additional files too). \n\nTo migrate your project to the new setup, create a new `proguard-project.txt` file in your project containing any project specific ProGuard flags as well as any customizations you have made, then update your project.properties file to contain: \n`proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt` \n\nIssue id: ProguardSplit"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintProguardSplit",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintHardwareIds",
"shortDescription": {
"text": "Hardware Id Usage"
},
"fullDescription": {
"text": "Hardware Id Usage Using these device identifiers is not recommended other than for high value fraud prevention and advanced telephony use-cases. For advertising use-cases, use 'AdvertisingIdClient$Info#getId' and for analytics, use 'InstanceId#getId'. Issue id: HardwareIds https://developer.android.com/training/articles/user-data-ids.html",
"markdown": "Hardware Id Usage \n\nUsing these device identifiers is not recommended other than for high value fraud prevention and advanced telephony use-cases. For advertising use-cases, use `AdvertisingIdClient$Info#getId` and for analytics, use `InstanceId#getId`. \n\nIssue id: HardwareIds \n\n<https://developer.android.com/training/articles/user-data-ids.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintHardwareIds",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUseCheckPermission",
"shortDescription": {
"text": "Using the result of check permission calls"
},
"fullDescription": {
"text": "Using the result of check permission calls You normally want to use the result of checking a permission; these methods return whether the permission is held; they do not throw an error if the permission is not granted. Code which does not do anything with the return value probably meant to be calling the enforce methods instead, e.g. rather than 'Context#checkCallingPermission' it should call 'Context#enforceCallingPermission'. Issue id: UseCheckPermission",
"markdown": "Using the result of check permission calls \n\nYou normally want to use the result of checking a permission; these methods return whether the permission is held; they do not throw an error if the permission is not granted. Code which does not do anything with the return value probably meant to be calling the enforce methods instead, e.g. rather than `Context#checkCallingPermission` it should call `Context#enforceCallingPermission`. \n\nIssue id: UseCheckPermission"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintUseCheckPermission",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintAllCaps",
"shortDescription": {
"text": "Combining textAllCaps and markup"
},
"fullDescription": {
"text": "Combining textAllCaps and markup The textAllCaps text transform will end up calling 'toString' on the 'CharSequence', which has the net effect of removing any markup such as '<b>'. This check looks for usages of strings containing markup that also specify 'textAllCaps=true'. Issue id: AllCaps",
"markdown": "Combining textAllCaps and markup \n\nThe textAllCaps text transform will end up calling `toString` on the `CharSequence`, which has the net effect of removing any markup such as `<b>`. This check looks for usages of strings containing markup that also specify `textAllCaps=true`. \n\nIssue id: AllCaps"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintAllCaps",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintShowToast",
"shortDescription": {
"text": "Toast created but not shown"
},
"fullDescription": {
"text": "Toast created but not shown 'Toast.makeText()' creates a 'Toast' but does not show it. You must call 'show()' on the resulting object to actually make the 'Toast' appear. Issue id: ShowToast",
"markdown": "Toast created but not shown \n\n`Toast.makeText()` creates a `Toast` but does **not** show it. You must call `show()` on the resulting object to actually make the `Toast` appear. \n\nIssue id: ShowToast"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintShowToast",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintInvalidNavigation",
"shortDescription": {
"text": "No start destination specified"
},
"fullDescription": {
"text": "No start destination specified All '<navigation>' elements must have a start destination specified, and it must be a direct child of that '<navigation>'. Issue id: InvalidNavigation",
"markdown": "No start destination specified \n\nAll `<navigation>` elements must have a start destination specified, and it must be a direct child of that `<navigation>`. \n\nIssue id: InvalidNavigation"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintInvalidNavigation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ShrinkerInvalidFlags",
"shortDescription": {
"text": "Invalid flag in shrinker config"
},
"fullDescription": {
"text": "Reports flags that are invalid in shrinker config.",
"markdown": "Reports flags that are invalid in shrinker config."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "ShrinkerInvalidFlags",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Shrinker",
"index": 127,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintViewConstructor",
"shortDescription": {
"text": "Missing View constructors for XML inflation"
},
"fullDescription": {
"text": "Missing View constructors for XML inflation Some layout tools (such as the Android layout editor) need to find a constructor with one of the following signatures: * 'View(Context context)' * 'View(Context context, AttributeSet attrs)' * 'View(Context context, AttributeSet attrs, int defStyle)' If your custom view needs to perform initialization which does not apply when used in a layout editor, you can surround the given code with a check to see if 'View#isInEditMode()' is false, since that method will return 'false' at runtime but true within a user interface editor. Issue id: ViewConstructor",
"markdown": "Missing View constructors for XML inflation \n\nSome layout tools (such as the Android layout editor) need to find a constructor with one of the following signatures: \n\\* `View(Context context)` \n\\* `View(Context context, AttributeSet attrs)` \n\\* `View(Context context, AttributeSet attrs, int defStyle)` \n\nIf your custom view needs to perform initialization which does not apply when used in a layout editor, you can surround the given code with a check to see if `View#isInEditMode()` is false, since that method will return `false` at runtime but true within a user interface editor. \n\nIssue id: ViewConstructor"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintViewConstructor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUsingC2DM",
"shortDescription": {
"text": "Using C2DM"
},
"fullDescription": {
"text": "Using C2DM The C2DM library does not work on Android P or newer devices; you should migrate to Firebase Cloud Messaging to ensure reliable message delivery. Issue id: UsingC2DM https://developers.google.com/cloud-messaging/c2dm",
"markdown": "Using C2DM \n\nThe C2DM library does not work on Android P or newer devices; you should migrate to Firebase Cloud Messaging to ensure reliable message delivery. \n\nIssue id: UsingC2DM \n\n<https://developers.google.com/cloud-messaging/c2dm>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintUsingC2DM",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintScrollViewCount",
"shortDescription": {
"text": "ScrollView can have only one child"
},
"fullDescription": {
"text": "'ScrollView' can have only one child A 'ScrollView' can only have one child widget. If you want more children, wrap them in a container layout. Issue id: ScrollViewCount",
"markdown": "`ScrollView` can have only one child \n\nA `ScrollView` can only have one child widget. If you want more children, wrap them in a container layout. \n\nIssue id: ScrollViewCount"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintScrollViewCount",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintRelativeOverlap",
"shortDescription": {
"text": "Overlapping items in RelativeLayout"
},
"fullDescription": {
"text": "Overlapping items in RelativeLayout If relative layout has text or button items aligned to left and right sides they can overlap each other due to localized text expansion unless they have mutual constraints like 'toEndOf'/'toStartOf'. Issue id: RelativeOverlap",
"markdown": "Overlapping items in RelativeLayout \n\nIf relative layout has text or button items aligned to left and right sides they can overlap each other due to localized text expansion unless they have mutual constraints like `toEndOf`/`toStartOf`. \n\nIssue id: RelativeOverlap"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintRelativeOverlap",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Internationalization",
"index": 187,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintAndroidGradlePluginVersion",
"shortDescription": {
"text": "Obsolete Android Gradle Plugin Version"
},
"fullDescription": {
"text": "Obsolete Android Gradle Plugin Version This detector looks for usage of the Android Gradle Plugin where the version you are using is not the current stable release. Using older versions is fine, and there are cases where you deliberately want to stick with an older version. However, you may simply not be aware that a more recent version is available, and that is what this lint check helps find. Issue id: AndroidGradlePluginVersion",
"markdown": "Obsolete Android Gradle Plugin Version \n\nThis detector looks for usage of the Android Gradle Plugin where the version you are using is not the current stable release. Using older versions is fine, and there are cases where you deliberately want to stick with an older version. However, you may simply not be aware that a more recent version is available, and that is what this lint check helps find. \n\nIssue id: AndroidGradlePluginVersion"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintAndroidGradlePluginVersion",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUnsafeDynamicallyLoadedCode",
"shortDescription": {
"text": "load used to dynamically load code"
},
"fullDescription": {
"text": "'load' used to dynamically load code Dynamically loading code from locations other than the application's library directory or the Android platform's built-in library directories is dangerous, as there is an increased risk that the code could have been tampered with. Applications should use 'loadLibrary' when possible, which provides increased assurance that libraries are loaded from one of these safer locations. Application developers should use the features of their development environment to place application native libraries into the lib directory of their compiled APKs. Issue id: UnsafeDynamicallyLoadedCode",
"markdown": "`load` used to dynamically load code \n\nDynamically loading code from locations other than the application's library directory or the Android platform's built-in library directories is dangerous, as there is an increased risk that the code could have been tampered with. Applications should use `loadLibrary` when possible, which provides increased assurance that libraries are loaded from one of these safer locations. Application developers should use the features of their development environment to place application native libraries into the lib directory of their compiled APKs. \n\nIssue id: UnsafeDynamicallyLoadedCode"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintUnsafeDynamicallyLoadedCode",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintPrivateApi",
"shortDescription": {
"text": "Using Private APIs"
},
"fullDescription": {
"text": "Using Private APIs Using reflection to access hidden/private Android APIs is not safe; it will often not work on devices from other vendors, and it may suddenly stop working (if the API is removed) or crash spectacularly (if the API behavior changes, since there are no guarantees for compatibility). Issue id: PrivateApi https://developer.android.com/preview/restrictions-non-sdk-interfaces",
"markdown": "Using Private APIs \n\nUsing reflection to access hidden/private Android APIs is not safe; it will often not work on devices from other vendors, and it may suddenly stop working (if the API is removed) or crash spectacularly (if the API behavior changes, since there are no guarantees for compatibility). \n\nIssue id: PrivateApi \n\n<https://developer.android.com/preview/restrictions-non-sdk-interfaces>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintPrivateApi",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUnsafeIntentLaunch",
"shortDescription": {
"text": "Launched Unsafe Intent"
},
"fullDescription": {
"text": "Launched Unsafe Intent Intent that potentially could come from an untrusted source should not be launched from an unprotected component without first being sanitized. See this support FAQ for details: https://support.google.com/faqs/answer/9267555 Issue id: UnsafeIntentLaunch",
"markdown": "Launched Unsafe Intent \n\nIntent that potentially could come from an untrusted source should not be launched from an unprotected component without first being sanitized. See this support FAQ for details: <https://support.google.com/faqs/answer/9267555> \n\nIssue id: UnsafeIntentLaunch"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintUnsafeIntentLaunch",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintPermissionImpliesUnsupportedChromeOsHardware",
"shortDescription": {
"text": "Permission Implies Unsupported Chrome OS Hardware"
},
"fullDescription": {
"text": "Permission Implies Unsupported Chrome OS Hardware The '<uses-permission>' element should not require a permission that implies an unsupported large screen hardware feature. Google Play assumes that certain hardware related permissions indicate that the underlying hardware features are required by default. To fix the issue, consider declaring the corresponding <uses-feature> element with 'required=\"false\"' attribute. Issue id: PermissionImpliesUnsupportedChromeOsHardware https://developer.android.com/topic/arc/manifest.html#implied-features",
"markdown": "Permission Implies Unsupported Chrome OS Hardware \n\nThe `<uses-permission>` element should not require a permission that implies an unsupported large screen hardware feature. Google Play assumes that certain hardware related permissions indicate that the underlying hardware features are required by default. To fix the issue, consider declaring the corresponding \\<uses-feature\\> element with `required=\"false\"` attribute. \n\nIssue id: PermissionImpliesUnsupportedChromeOsHardware \n\n<https://developer.android.com/topic/arc/manifest.html#implied-features>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintPermissionImpliesUnsupportedChromeOsHardware",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintSetWorldReadable",
"shortDescription": {
"text": "File.setReadable() used to make file world-readable"
},
"fullDescription": {
"text": "'File.setReadable()' used to make file world-readable Setting files world-readable is very dangerous, and likely to cause security holes in applications. It is strongly discouraged; instead, applications should use more formal mechanisms for interactions such as 'ContentProvider', 'BroadcastReceiver', and 'Service'. Issue id: SetWorldReadable https://goo.gle/SetWorldReadable",
"markdown": "`File.setReadable()` used to make file world-readable \n\nSetting files world-readable is very dangerous, and likely to cause security holes in applications. It is strongly discouraged; instead, applications should use more formal mechanisms for interactions such as `ContentProvider`, `BroadcastReceiver`, and `Service`. \n\nIssue id: SetWorldReadable \n\n<https://goo.gle/SetWorldReadable>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintSetWorldReadable",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintLocaleFolder",
"shortDescription": {
"text": "Wrong locale name"
},
"fullDescription": {
"text": "Wrong locale name From the 'java.util.Locale' documentation: \"Note that Java uses several deprecated two-letter codes. The Hebrew (\"he\") language code is rewritten as \"iw\", Indonesian (\"id\") as \"in\", and Yiddish (\"yi\") as \"ji\". This rewriting happens even if you construct your own Locale object, not just for instances returned by the various lookup methods. Because of this, if you add your localized resources in for example 'values-he' they will not be used, since the system will look for 'values-iw' instead. To work around this, place your resources in a 'values' folder using the deprecated language code instead. Issue id: LocaleFolder https://developer.android.com/reference/java/util/Locale.html",
"markdown": "Wrong locale name \n\nFrom the `java.util.Locale` documentation: \n\"Note that Java uses several deprecated two-letter codes. The Hebrew (\"he\") language code is rewritten as \"iw\", Indonesian (\"id\") as \"in\", and Yiddish (\"yi\") as \"ji\". This rewriting happens even if you construct your own Locale object, not just for instances returned by the various lookup methods. \n\nBecause of this, if you add your localized resources in for example `values-he` they will not be used, since the system will look for `values-iw` instead. \n\nTo work around this, place your resources in a `values` folder using the deprecated language code instead. \n\nIssue id: LocaleFolder \n\n<https://developer.android.com/reference/java/util/Locale.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintLocaleFolder",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintManifestOrder",
"shortDescription": {
"text": "Incorrect order of elements in manifest"
},
"fullDescription": {
"text": "Incorrect order of elements in manifest The '<application>' tag should appear after the elements which declare which version you need, which features you need, which libraries you need, and so on. In the past there have been subtle bugs (such as themes not getting applied correctly) when the '<application>' tag appears before some of these other elements, so it's best to order your manifest in the logical dependency order. Issue id: ManifestOrder",
"markdown": "Incorrect order of elements in manifest \n\nThe `<application>` tag should appear after the elements which declare which version you need, which features you need, which libraries you need, and so on. In the past there have been subtle bugs (such as themes not getting applied correctly) when the `<application>` tag appears before some of these other elements, so it's best to order your manifest in the logical dependency order. \n\nIssue id: ManifestOrder"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintManifestOrder",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintGradleDependency",
"shortDescription": {
"text": "Obsolete Gradle Dependency"
},
"fullDescription": {
"text": "Obsolete Gradle Dependency This detector looks for usages of libraries where the version you are using is not the current stable release. Using older versions is fine, and there are cases where you deliberately want to stick with an older version. However, you may simply not be aware that a more recent version is available, and that is what this lint check helps find. Issue id: GradleDependency",
"markdown": "Obsolete Gradle Dependency \n\nThis detector looks for usages of libraries where the version you are using is not the current stable release. Using older versions is fine, and there are cases where you deliberately want to stick with an older version. However, you may simply not be aware that a more recent version is available, and that is what this lint check helps find. \n\nIssue id: GradleDependency"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintGradleDependency",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintInsecureBaseConfiguration",
"shortDescription": {
"text": "Insecure Base Configuration"
},
"fullDescription": {
"text": "Insecure Base Configuration Permitting cleartext traffic could allow eavesdroppers to intercept data sent by your app, which impacts the privacy of your users. Consider only allowing encrypted traffic by setting the 'cleartextTrafficPermitted' tag to '\"false\"'. Issue id: InsecureBaseConfiguration https://goo.gle/InsecureBaseConfiguration https://developer.android.com/preview/features/security-config.html",
"markdown": "Insecure Base Configuration \n\nPermitting cleartext traffic could allow eavesdroppers to intercept data sent by your app, which impacts the privacy of your users. Consider only allowing encrypted traffic by setting the `cleartextTrafficPermitted` tag to `\"false\"`. \n\nIssue id: InsecureBaseConfiguration \n\n<https://goo.gle/InsecureBaseConfiguration> \n<https://developer.android.com/preview/features/security-config.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintInsecureBaseConfiguration",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintInlinedApi",
"shortDescription": {
"text": "Using inlined constants on older versions"
},
"fullDescription": {
"text": "Using inlined constants on older versions This check scans through all the Android API field references in the application and flags certain constants, such as static final integers and Strings, which were introduced in later versions. These will actually be copied into the class files rather than being referenced, which means that the value is available even when running on older devices. In some cases that's fine, and in other cases it can result in a runtime crash or incorrect behavior. It depends on the context, so consider the code carefully and decide whether it's safe and can be suppressed or whether the code needs to be guarded. If you really want to use this API and don't need to support older devices just set the 'minSdkVersion' in your 'build.gradle' or 'AndroidManifest.xml' files. If your code is deliberately accessing newer APIs, and you have ensured (e.g. with conditional execution) that this code will only ever be called on a supported platform, then you can annotate your class or method with the '@TargetApi' annotation specifying the local minimum SDK to apply, such as '@TargetApi(11)', such that this check considers 11 rather than your manifest file's minimum SDK as the required API level. Issue id: InlinedApi",
"markdown": "Using inlined constants on older versions \n\nThis check scans through all the Android API field references in the application and flags certain constants, such as static final integers and Strings, which were introduced in later versions. These will actually be copied into the class files rather than being referenced, which means that the value is available even when running on older devices. In some cases that's fine, and in other cases it can result in a runtime crash or incorrect behavior. It depends on the context, so consider the code carefully and decide whether it's safe and can be suppressed or whether the code needs to be guarded. \n\nIf you really want to use this API and don't need to support older devices just set the `minSdkVersion` in your `build.gradle` or `AndroidManifest.xml` files. \n\nIf your code is **deliberately** accessing newer APIs, and you have ensured (e.g. with conditional execution) that this code will only ever be called on a supported platform, then you can annotate your class or method with the `@TargetApi` annotation specifying the local minimum SDK to apply, such as `@TargetApi(11)`, such that this check considers 11 rather than your manifest file's minimum SDK as the required API level. \n\nIssue id: InlinedApi"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintInlinedApi",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintInvalidUsesTagAttribute",
"shortDescription": {
"text": "Invalid name attribute for uses element"
},
"fullDescription": {
"text": "Invalid 'name' attribute for 'uses' element The <uses> element in '<automotiveApp>' should contain a valid value for the 'name' attribute. Valid values are 'media', 'notification', or 'sms'. Issue id: InvalidUsesTagAttribute https://developer.android.com/training/auto/start/index.html#auto-metadata",
"markdown": "Invalid `name` attribute for `uses` element \n\nThe \\<uses\\> element in `<automotiveApp>` should contain a valid value for the `name` attribute. Valid values are `media`, `notification`, or `sms`. \n\nIssue id: InvalidUsesTagAttribute \n\n<https://developer.android.com/training/auto/start/index.html#auto-metadata>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintInvalidUsesTagAttribute",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintTrustAllX509TrustManager",
"shortDescription": {
"text": "Insecure TLS/SSL trust manager"
},
"fullDescription": {
"text": "Insecure TLS/SSL trust manager This check looks for X509TrustManager implementations whose 'checkServerTrusted' or 'checkClientTrusted' methods do nothing (thus trusting any certificate chain) which could result in insecure network traffic caused by trusting arbitrary TLS/SSL certificates presented by peers. Issue id: TrustAllX509TrustManager https://goo.gle/TrustAllX509TrustManager",
"markdown": "Insecure TLS/SSL trust manager \n\nThis check looks for X509TrustManager implementations whose `checkServerTrusted` or `checkClientTrusted` methods do nothing (thus trusting any certificate chain) which could result in insecure network traffic caused by trusting arbitrary TLS/SSL certificates presented by peers. \n\nIssue id: TrustAllX509TrustManager \n\n<https://goo.gle/TrustAllX509TrustManager>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintTrustAllX509TrustManager",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintParcelCreator",
"shortDescription": {
"text": "Missing Parcelable CREATOR field"
},
"fullDescription": {
"text": "Missing Parcelable 'CREATOR' field According to the 'Parcelable' interface documentation, \"Classes implementing the Parcelable interface must also have a static field called 'CREATOR', which is an object implementing the 'Parcelable.Creator' interface.\" Issue id: ParcelCreator https://developer.android.com/reference/android/os/Parcelable.html",
"markdown": "Missing Parcelable `CREATOR` field \n\nAccording to the `Parcelable` interface documentation, \"Classes implementing the Parcelable interface must also have a static field called `CREATOR`, which is an object implementing the `Parcelable.Creator` interface.\" \n\nIssue id: ParcelCreator \n\n<https://developer.android.com/reference/android/os/Parcelable.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintParcelCreator",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUnknownNullness",
"shortDescription": {
"text": "Unknown nullness"
},
"fullDescription": {
"text": "Unknown nullness To improve referencing this code from Kotlin, consider adding explicit nullness information here with either '@NonNull' or '@Nullable'. Issue id: UnknownNullness Available options: ignore-deprecated (default is false): Whether to ignore classes and members that have been annotated with '@Deprecated'. Normally this lint check will flag all unannotated elements, but by setting this option to 'true' it will skip any deprecated elements. To configure this option, use a 'lint.xml' file with an <option> like this: <lint>\n <issue id=\"UnknownNullness\">\n <option name=\"ignore-deprecated\" value=\"false\" />\n </issue>\n</lint>\n https://developer.android.com/kotlin/interop#nullability_annotations",
"markdown": "Unknown nullness \n\nTo improve referencing this code from Kotlin, consider adding explicit nullness information here with either `@NonNull` or `@Nullable`. \n\nIssue id: UnknownNullness \n\nAvailable options: \n\n**ignore-deprecated** (default is false): \nWhether to ignore classes and members that have been annotated with `@Deprecated`. \n\nNormally this lint check will flag all unannotated elements, but by setting this option to `true` it will skip any deprecated elements. \n\nTo configure this option, use a `lint.xml` file with an \\<option\\> like this: \n\n```\n<lint>\n <issue id=\"UnknownNullness\">\n <option name=\"ignore-deprecated\" value=\"false\" />\n </issue>\n</lint>\n```\n\n<br />\n\n<br />\n\n<https://developer.android.com/kotlin/interop#nullability_annotations>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintUnknownNullness",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Interoperability",
"index": 53,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMissingInflatedId",
"shortDescription": {
"text": "ID not found in inflated resource"
},
"fullDescription": {
"text": "ID not found in inflated resource Checks calls to layout inflation and makes sure that the referenced ids are found in the corresponding layout (or at least one of them, if the layout has multiple configurations.) Issue id: MissingInflatedId",
"markdown": "ID not found in inflated resource \n\nChecks calls to layout inflation and makes sure that the referenced ids are found in the corresponding layout (or at least one of them, if the layout has multiple configurations.) \n\nIssue id: MissingInflatedId"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintMissingInflatedId",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintInconsistentArrays",
"shortDescription": {
"text": "Inconsistencies in array element counts"
},
"fullDescription": {
"text": "Inconsistencies in array element counts When an array is translated in a different locale, it should normally have the same number of elements as the original array. When adding or removing elements to an array, it is easy to forget to update all the locales, and this lint warning finds inconsistencies like these. Note however that there may be cases where you really want to declare a different number of array items in each configuration (for example where the array represents available options, and those options differ for different layout orientations and so on), so use your own judgment to decide if this is really an error. You can suppress this error type if it finds false errors in your project. Issue id: InconsistentArrays",
"markdown": "Inconsistencies in array element counts \n\nWhen an array is translated in a different locale, it should normally have the same number of elements as the original array. When adding or removing elements to an array, it is easy to forget to update all the locales, and this lint warning finds inconsistencies like these. \n\nNote however that there may be cases where you really want to declare a different number of array items in each configuration (for example where the array represents available options, and those options differ for different layout orientations and so on), so use your own judgment to decide if this is really an error. \n\nYou can suppress this error type if it finds false errors in your project. \n\nIssue id: InconsistentArrays"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintInconsistentArrays",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintNonResizeableActivity",
"shortDescription": {
"text": "Activity is set to be non resizeable"
},
"fullDescription": {
"text": "Activity is set to be non resizeable The '<activity>' element should be allowed to be resized to allow users to take advantage of the multi-window environments available on larger screen Android devices. To fix the issue, consider declaring the corresponding activity element with 'resizableActivity=\"true\"' attribute. Issue id: NonResizeableActivity https://developer.android.com/topic/arc/window-management",
"markdown": "Activity is set to be non resizeable \n\nThe `<activity>` element should be allowed to be resized to allow users to take advantage of the multi-window environments available on larger screen Android devices. \n\nTo fix the issue, consider declaring the corresponding activity element with `resizableActivity=\"true\"` attribute. \n\nIssue id: NonResizeableActivity \n\n<https://developer.android.com/topic/arc/window-management>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintNonResizeableActivity",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUnsupportedChromeOsHardware",
"shortDescription": {
"text": "Unsupported Chrome OS Hardware Feature"
},
"fullDescription": {
"text": "Unsupported Chrome OS Hardware Feature The '<uses-feature>' element should not require this unsupported large screen hardware feature. Any <uses-feature> not explicitly marked with 'required=\"false\"' is necessary on the device to be installed on. Ensure that any features that might prevent it from being installed on a ChromeOS, large screen, or foldable device are reviewed and marked as not required in the manifest. Issue id: UnsupportedChromeOsHardware https://developer.android.com/topic/arc/manifest.html#incompat-entries",
"markdown": "Unsupported Chrome OS Hardware Feature \n\nThe `<uses-feature>` element should not require this unsupported large screen hardware feature. Any \\<uses-feature\\> not explicitly marked with `required=\"false\"` is necessary on the device to be installed on. Ensure that any features that might prevent it from being installed on a ChromeOS, large screen, or foldable device are reviewed and marked as not required in the manifest. \n\nIssue id: UnsupportedChromeOsHardware \n\n<https://developer.android.com/topic/arc/manifest.html#incompat-entries>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintUnsupportedChromeOsHardware",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUnspecifiedRegisterReceiverFlag",
"shortDescription": {
"text": "Missing registerReceiver() exported flag"
},
"fullDescription": {
"text": "Missing 'registerReceiver()' exported flag A future platform release will require all receivers registering for non-system broadcasts to include a flag indicating the receiver's exported state. Apps registering for non-system broadcasts should use the 'ContextCompat#registerReceiver' APIs with flags set to either 'RECEIVER_EXPORTED' or 'RECEIVER_NOT_EXPORTED'. If you are not expecting broadcasts from other apps on the device, register your receiver with 'RECEIVER_NOT_EXPORTED' to protect your receiver on all platform releases. Issue id: UnspecifiedRegisterReceiverFlag https://developer.android.com/reference/androidx/core/content/ContextCompat#registerReceiver(android.content.Context,android.content.BroadcastReceiver,android.content.IntentFilter,int)",
"markdown": "Missing `registerReceiver()` exported flag \n\nA future platform release will require all receivers registering for non-system broadcasts to include a flag indicating the receiver's exported state. Apps registering for non-system broadcasts should use the `ContextCompat#registerReceiver` APIs with flags set to either `RECEIVER_EXPORTED` or `RECEIVER_NOT_EXPORTED`. \n\nIf you are not expecting broadcasts from other apps on the device, register your receiver with `RECEIVER_NOT_EXPORTED` to protect your receiver on all platform releases. \n\nIssue id: UnspecifiedRegisterReceiverFlag \n\n<https://developer.android.com/reference/androidx/core/content/ContextCompat#registerReceiver(android.content.Context,android.content.BroadcastReceiver,android.content.IntentFilter,int)>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintUnspecifiedRegisterReceiverFlag",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintCustomPermissionTypo",
"shortDescription": {
"text": "Permission appears to be a custom permission with a typo"
},
"fullDescription": {
"text": "Permission appears to be a custom permission with a typo This check looks for required permissions that look like custom permissions defined in the same manifest, but aren't, and may be typos. Please double check the permission value you have supplied. Issue id: CustomPermissionTypo https://goo.gle/CustomPermissionTypo",
"markdown": "Permission appears to be a custom permission with a typo \n\nThis check looks for required permissions that *look* like custom permissions defined in the same manifest, but aren't, and may be typos. \n\nPlease double check the permission value you have supplied. \n\nIssue id: CustomPermissionTypo \n\n<https://goo.gle/CustomPermissionTypo>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintCustomPermissionTypo",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintContentDescription",
"shortDescription": {
"text": "Image without contentDescription"
},
"fullDescription": {
"text": "Image without 'contentDescription' Non-textual widgets like ImageViews and ImageButtons should use the 'contentDescription' attribute to specify a textual description of the widget such that screen readers and other accessibility tools can adequately describe the user interface. Note that elements in application screens that are purely decorative and do not provide any content or enable a user action should not have accessibility content descriptions. In this case, set their descriptions to '@null'. If your app's minSdkVersion is 16 or higher, you can instead set these graphical elements' 'android:importantForAccessibility' attributes to 'no'. Note that for text fields, you should not set both the 'hint' and the 'contentDescription' attributes since the hint will never be shown. Just set the 'hint'. Issue id: ContentDescription https://developer.android.com/guide/topics/ui/accessibility/apps#special-cases",
"markdown": "Image without `contentDescription` \n\nNon-textual widgets like ImageViews and ImageButtons should use the `contentDescription` attribute to specify a textual description of the widget such that screen readers and other accessibility tools can adequately describe the user interface. \n\nNote that elements in application screens that are purely decorative and do not provide any content or enable a user action should not have accessibility content descriptions. In this case, set their descriptions to `@null`. If your app's minSdkVersion is 16 or higher, you can instead set these graphical elements' `android:importantForAccessibility` attributes to `no`. \n\nNote that for text fields, you should not set both the `hint` and the `contentDescription` attributes since the hint will never be shown. Just set the `hint`. \n\nIssue id: ContentDescription \n\n<https://developer.android.com/guide/topics/ui/accessibility/apps#special-cases>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintContentDescription",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Accessibility",
"index": 167,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintButtonCase",
"shortDescription": {
"text": "Cancel/OK dialog button capitalization"
},
"fullDescription": {
"text": "Cancel/OK dialog button capitalization The standard capitalization for OK/Cancel dialogs is \"OK\" and \"Cancel\". To ensure that your dialogs use the standard strings, you can use the resource strings @android:string/ok and @android:string/cancel. Issue id: ButtonCase",
"markdown": "Cancel/OK dialog button capitalization \n\nThe standard capitalization for OK/Cancel dialogs is \"OK\" and \"Cancel\". To ensure that your dialogs use the standard strings, you can use the resource strings @android:string/ok and @android:string/cancel. \n\nIssue id: ButtonCase"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintButtonCase",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUnprotectedSMSBroadcastReceiver",
"shortDescription": {
"text": "Unprotected SMS BroadcastReceiver"
},
"fullDescription": {
"text": "Unprotected SMS 'BroadcastReceiver' BroadcastReceivers that declare an intent-filter for 'SMS_DELIVER' or 'SMS_RECEIVED' must ensure that the caller has the 'BROADCAST_SMS' permission, otherwise it is possible for malicious actors to spoof intents. Issue id: UnprotectedSMSBroadcastReceiver https://goo.gle/UnprotectedSMSBroadcastReceiver",
"markdown": "Unprotected SMS `BroadcastReceiver` \n\nBroadcastReceivers that declare an intent-filter for `SMS_DELIVER` or `SMS_RECEIVED` must ensure that the caller has the `BROADCAST_SMS` permission, otherwise it is possible for malicious actors to spoof intents. \n\nIssue id: UnprotectedSMSBroadcastReceiver \n\n<https://goo.gle/UnprotectedSMSBroadcastReceiver>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintUnprotectedSMSBroadcastReceiver",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintValidActionsXml",
"shortDescription": {
"text": "Invalid Action Descriptor"
},
"fullDescription": {
"text": "Invalid Action Descriptor Ensures that an actions XML file is properly formed Issue id: ValidActionsXml",
"markdown": "Invalid Action Descriptor \n\nEnsures that an actions XML file is properly formed \n\nIssue id: ValidActionsXml"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintValidActionsXml",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintInstantApps",
"shortDescription": {
"text": "Instant App Issues"
},
"fullDescription": {
"text": "Instant App Issues This issue flags code that will not work correctly in Instant Apps Issue id: InstantApps",
"markdown": "Instant App Issues \n\nThis issue flags code that will not work correctly in Instant Apps \n\nIssue id: InstantApps"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintInstantApps",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintTypographyOther",
"shortDescription": {
"text": "Other typographical problems"
},
"fullDescription": {
"text": "Other typographical problems This check looks for miscellaneous typographical problems and offers replacement sequences that will make the text easier to read and your application more polished. Issue id: TypographyOther",
"markdown": "Other typographical problems \n\nThis check looks for miscellaneous typographical problems and offers replacement sequences that will make the text easier to read and your application more polished. \n\nIssue id: TypographyOther"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintTypographyOther",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintViewBindingType",
"shortDescription": {
"text": "tools:viewBindingType issues"
},
"fullDescription": {
"text": "'tools:viewBindingType' issues All issues related to using the View Binding 'tools:viewBindingType' attribute. Issue id: ViewBindingType",
"markdown": "`tools:viewBindingType` issues \n\nAll issues related to using the View Binding `tools:viewBindingType` attribute. \n\nIssue id: ViewBindingType"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintViewBindingType",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintInvalidId",
"shortDescription": {
"text": "Invalid ID declaration"
},
"fullDescription": {
"text": "Invalid ID declaration An id definition must be of the form '@+id/yourname'. The tools have not rejected strings of the form '@+foo/bar' in the past, but that was an error, and could lead to tricky errors because of the way the id integers are assigned. If you really want to have different \"scopes\" for your id's, use prefixes instead, such as 'login_button1' and 'login_button2'. Issue id: InvalidId",
"markdown": "Invalid ID declaration \n\nAn id definition **must** be of the form `@+id/yourname`. The tools have not rejected strings of the form `@+foo/bar` in the past, but that was an error, and could lead to tricky errors because of the way the id integers are assigned. \n\nIf you really want to have different \"scopes\" for your id's, use prefixes instead, such as `login_button1` and `login_button2`. \n\nIssue id: InvalidId"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintInvalidId",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintInefficientWeight",
"shortDescription": {
"text": "Inefficient layout weight"
},
"fullDescription": {
"text": "Inefficient layout weight When only a single widget in a 'LinearLayout' defines a weight, it is more efficient to assign a width/height of '0dp' to it since it will absorb all the remaining space anyway. With a declared width/height of '0dp' it does not have to measure its own size first. Issue id: InefficientWeight",
"markdown": "Inefficient layout weight \n\nWhen only a single widget in a `LinearLayout` defines a weight, it is more efficient to assign a width/height of `0dp` to it since it will absorb all the remaining space anyway. With a declared width/height of `0dp` it does not have to measure its own size first. \n\nIssue id: InefficientWeight"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintInefficientWeight",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintGestureBackNavigation",
"shortDescription": {
"text": "Usage of KeyEvent.KEYCODE_BACK"
},
"fullDescription": {
"text": "Usage of KeyEvent.KEYCODE_BACK Starting in Android 13 (API 33+), the handling of back events is moving to an ahead-of-time callback model. Use 'OnBackInvokedDispatcher.registerOnBackInvokedCallback(...)' and 'onBackInvokedCallback' or AndroidX's 'OnBackPressedDispatcher' with an implemented 'onBackPressedCallback' to handle back gestures and key presses. Issue id: GestureBackNavigation https://developer.android.com/about/versions/13/features/predictive-back-gesture",
"markdown": "Usage of KeyEvent.KEYCODE_BACK \n\nStarting in Android 13 (API 33+), the handling of back events is moving to an ahead-of-time callback model. Use `OnBackInvokedDispatcher.registerOnBackInvokedCallback(...)` and `onBackInvokedCallback` or AndroidX's `OnBackPressedDispatcher` with an implemented `onBackPressedCallback` to handle back gestures and key presses. \n\nIssue id: GestureBackNavigation \n\n<https://developer.android.com/about/versions/13/features/predictive-back-gesture>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintGestureBackNavigation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMissingSuperCall",
"shortDescription": {
"text": "Missing Super Call"
},
"fullDescription": {
"text": "Missing Super Call Some methods, such as 'View#onDetachedFromWindow', require that you also call the super implementation as part of your method. Issue id: MissingSuperCall",
"markdown": "Missing Super Call \n\nSome methods, such as `View#onDetachedFromWindow`, require that you also call the super implementation as part of your method. \n\nIssue id: MissingSuperCall"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintMissingSuperCall",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintRiskyLibrary",
"shortDescription": {
"text": "Libraries with Privacy or Security Risks"
},
"fullDescription": {
"text": "Libraries with Privacy or Security Risks Your app is using a version of a library that has been identified by the library developer as a potential source of privacy and/or security risks. This may be a violation of Google Play policies (see https://play.google.com/about/monetization-ads/ads/) and/or affect your apps visibility on the Play Store. When available, the individual error messages from lint will include details about the reasons for this advisory. Please try updating your app with an updated version of this library, or remove it from your app. Issue id: RiskyLibrary https://play.google.com/sdks https://goo.gle/RiskyLibrary",
"markdown": "Libraries with Privacy or Security Risks \n\nYour app is using a version of a library that has been identified by the library developer as a potential source of privacy and/or security risks. This may be a violation of Google Play policies (see <https://play.google.com/about/monetization-ads/ads/>) and/or affect your app's visibility on the Play Store. \n\nWhen available, the individual error messages from lint will include details about the reasons for this advisory. \n\nPlease try updating your app with an updated version of this library, or remove it from your app. \n\nIssue id: RiskyLibrary \n\n<https://play.google.com/sdks> \n<https://goo.gle/RiskyLibrary>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintRiskyLibrary",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintApplySharedPref",
"shortDescription": {
"text": "Use apply() on SharedPreferences"
},
"fullDescription": {
"text": "Use 'apply()' on 'SharedPreferences' Consider using 'apply()' instead of 'commit' on shared preferences. Whereas 'commit' blocks and writes its data to persistent storage immediately, 'apply' will handle it in the background. Issue id: ApplySharedPref",
"markdown": "Use `apply()` on `SharedPreferences` \n\nConsider using `apply()` instead of `commit` on shared preferences. Whereas `commit` blocks and writes its data to persistent storage immediately, `apply` will handle it in the background. \n\nIssue id: ApplySharedPref"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintApplySharedPref",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUnsupportedChromeOsCameraSystemFeature",
"shortDescription": {
"text": "Looking for Rear Camera only feature"
},
"fullDescription": {
"text": "Looking for Rear Camera only feature You should look for the 'FEATURE_CAMERA_ANY' features to include all possible cameras that may be on the device. Looking for 'FEATURE_CAMERA' only looks for a rear facing camera, which certain large screen devices don't have, as well as newer device configurations and modes may place the device in a state where the rear camera is not available. To fix the issue, look for 'FEATURE_CAMERA_ANY' instead. Issue id: UnsupportedChromeOsCameraSystemFeature https://developer.android.com/guide/topics/large-screens/large-screen-cookbook#chromebook_camera_support",
"markdown": "Looking for Rear Camera only feature \n\nYou should look for the `FEATURE_CAMERA_ANY` features to include all possible cameras that may be on the device. Looking for `FEATURE_CAMERA` only looks for a rear facing camera, which certain large screen devices don't have, as well as newer device configurations and modes may place the device in a state where the rear camera is not available. To fix the issue, look for `FEATURE_CAMERA_ANY` instead. \n\nIssue id: UnsupportedChromeOsCameraSystemFeature \n\n<https://developer.android.com/guide/topics/large-screens/large-screen-cookbook#chromebook_camera_support>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintUnsupportedChromeOsCameraSystemFeature",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMissingQuantity",
"shortDescription": {
"text": "Missing quantity translation"
},
"fullDescription": {
"text": "Missing quantity translation Different languages have different rules for grammatical agreement with quantity. In English, for example, the quantity 1 is a special case. We write \"1 book\", but for any other quantity we'd write \"n books\". This distinction between singular and plural is very common, but other languages make finer distinctions. This lint check looks at each translation of a '<plural>' and makes sure that all the quantity strings considered by the given language are provided by this translation. For example, an English translation must provide a string for 'quantity=\"one\"'. Similarly, a Czech translation must provide a string for 'quantity=\"few\"'. Issue id: MissingQuantity https://developer.android.com/guide/topics/resources/string-resource.html#Plurals",
"markdown": "Missing quantity translation \n\nDifferent languages have different rules for grammatical agreement with quantity. In English, for example, the quantity 1 is a special case. We write \"1 book\", but for any other quantity we'd write \"n books\". This distinction between singular and plural is very common, but other languages make finer distinctions. \n\nThis lint check looks at each translation of a `<plural>` and makes sure that all the quantity strings considered by the given language are provided by this translation. \n\nFor example, an English translation must provide a string for `quantity=\"one\"`. Similarly, a Czech translation must provide a string for `quantity=\"few\"`. \n\nIssue id: MissingQuantity \n\n<https://developer.android.com/guide/topics/resources/string-resource.html#Plurals>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintMissingQuantity",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintNotInterpolated",
"shortDescription": {
"text": "Incorrect Interpolation"
},
"fullDescription": {
"text": "Incorrect Interpolation To insert the value of a variable, you can use '${variable}' inside a string literal, but only if you are using double quotes! Issue id: NotInterpolated https://www.groovy-lang.org/syntax.html#_string_interpolation",
"markdown": "Incorrect Interpolation \n\nTo insert the value of a variable, you can use `${variable}` inside a string literal, but **only** if you are using double quotes! \n\nIssue id: NotInterpolated \n\n<https://www.groovy-lang.org/syntax.html#_string_interpolation>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintNotInterpolated",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintDeprecatedProvider",
"shortDescription": {
"text": "Using BC Provider"
},
"fullDescription": {
"text": "Using BC Provider The 'BC' provider has been deprecated and will not be provided when 'targetSdkVersion' is P or higher. Issue id: DeprecatedProvider https://android-developers.googleblog.com/2018/03/cryptography-changes-in-android-p.html https://goo.gle/DeprecatedProvider",
"markdown": "Using BC Provider \n\nThe `BC` provider has been deprecated and will not be provided when `targetSdkVersion` is P or higher. \n\nIssue id: DeprecatedProvider \n\n<https://android-developers.googleblog.com/2018/03/cryptography-changes-in-android-p.html> \n<https://goo.gle/DeprecatedProvider>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintDeprecatedProvider",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintBackButton",
"shortDescription": {
"text": "Back button"
},
"fullDescription": {
"text": "Back button According to the Android Design Guide, \"Other platforms use an explicit back button with label to allow the user to navigate up the application's hierarchy. Instead, Android uses the main action bar's app icon for hierarchical navigation and the navigation bar's back button for temporal navigation.\" This check is not very sophisticated (it just looks for buttons with the label \"Back\"), so it is disabled by default to not trigger on common scenarios like pairs of Back/Next buttons to paginate through screens. Issue id: BackButton https://material.io/design/",
"markdown": "Back button \n\nAccording to the Android Design Guide, \n\n\"Other platforms use an explicit back button with label to allow the user to navigate up the application's hierarchy. Instead, Android uses the main action bar's app icon for hierarchical navigation and the navigation bar's back button for temporal navigation.\" \n\nThis check is not very sophisticated (it just looks for buttons with the label \"Back\"), so it is disabled by default to not trigger on common scenarios like pairs of Back/Next buttons to paginate through screens. \n\nIssue id: BackButton \n\n<https://material.io/design/>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintBackButton",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintWorldReadableFiles",
"shortDescription": {
"text": "openFileOutput() with MODE_WORLD_READABLE"
},
"fullDescription": {
"text": "'openFileOutput()' with 'MODE_WORLD_READABLE' There are cases where it is appropriate for an application to write world readable files, but these should be reviewed carefully to ensure that they contain no private data that is leaked to other applications. Issue id: WorldReadableFiles https://goo.gle/WorldReadableFiles",
"markdown": "`openFileOutput()` with `MODE_WORLD_READABLE` \n\nThere are cases where it is appropriate for an application to write world readable files, but these should be reviewed carefully to ensure that they contain no private data that is leaked to other applications. \n\nIssue id: WorldReadableFiles \n\n<https://goo.gle/WorldReadableFiles>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintWorldReadableFiles",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUseValueOf",
"shortDescription": {
"text": "Should use valueOf instead of new"
},
"fullDescription": {
"text": "Should use 'valueOf' instead of 'new' You should not call the constructor for wrapper classes directly, such as`new Integer(42)`. Instead, call the 'valueOf' factory method, such as 'Integer.valueOf(42)'. This will typically use less memory because common integers such as 0 and 1 will share a single instance. Issue id: UseValueOf",
"markdown": "Should use `valueOf` instead of `new` \n\nYou should not call the constructor for wrapper classes directly, such as\\`new Integer(42)\\`. Instead, call the `valueOf` factory method, such as `Integer.valueOf(42)`. This will typically use less memory because common integers such as 0 and 1 will share a single instance. \n\nIssue id: UseValueOf"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintUseValueOf",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintCheckResult",
"shortDescription": {
"text": "Ignoring results"
},
"fullDescription": {
"text": "Ignoring results Some methods have no side effects, and calling them without doing something with the result is suspicious. Issue id: CheckResult",
"markdown": "Ignoring results \n\nSome methods have no side effects, and calling them without doing something with the result is suspicious. \n\nIssue id: CheckResult"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintCheckResult",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintDuplicateIncludedIds",
"shortDescription": {
"text": "Duplicate ids across layouts combined with include tags"
},
"fullDescription": {
"text": "Duplicate ids across layouts combined with include tags It's okay for two independent layouts to use the same ids. However, if layouts are combined with include tags, then the id's need to be unique within any chain of included layouts, or 'Activity#findViewById()' can return an unexpected view. Issue id: DuplicateIncludedIds",
"markdown": "Duplicate ids across layouts combined with include tags \n\nIt's okay for two independent layouts to use the same ids. However, if layouts are combined with include tags, then the id's need to be unique within any chain of included layouts, or `Activity#findViewById()` can return an unexpected view. \n\nIssue id: DuplicateIncludedIds"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintDuplicateIncludedIds",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintNonConstantResourceId",
"shortDescription": {
"text": "Checks use of resource IDs in places requiring constants"
},
"fullDescription": {
"text": "Checks use of resource IDs in places requiring constants Avoid the usage of resource IDs where constant expressions are required. A future version of the Android Gradle Plugin will generate R classes with non-constant IDs in order to improve the performance of incremental compilation. Issue id: NonConstantResourceId",
"markdown": "Checks use of resource IDs in places requiring constants \n\nAvoid the usage of resource IDs where constant expressions are required. \n\nA future version of the Android Gradle Plugin will generate R classes with non-constant IDs in order to improve the performance of incremental compilation. \n\nIssue id: NonConstantResourceId"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintNonConstantResourceId",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintInvalidVectorPath",
"shortDescription": {
"text": "Invalid vector paths"
},
"fullDescription": {
"text": "Invalid vector paths This check ensures that vector paths are valid. For example, it makes sure that the numbers are not using scientific notation (such as 1.0e3) which can lead to runtime crashes on older devices. As another example, it flags numbers like '.5' which should be written as '0.5' instead to avoid crashes on some pre-Marshmallow devices. Issue id: InvalidVectorPath https://issuetracker.google.com/37008268",
"markdown": "Invalid vector paths \n\nThis check ensures that vector paths are valid. For example, it makes sure that the numbers are not using scientific notation (such as 1.0e3) which can lead to runtime crashes on older devices. As another example, it flags numbers like `.5` which should be written as `0.5` instead to avoid crashes on some pre-Marshmallow devices. \n\nIssue id: InvalidVectorPath \n\n<https://issuetracker.google.com/37008268>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintInvalidVectorPath",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintStringFormatTrivial",
"shortDescription": {
"text": "String.format string only contains trivial conversions"
},
"fullDescription": {
"text": "'String.format' string only contains trivial conversions Every call to 'String.format' creates a new 'Formatter' instance, which will decrease the performance of your app. 'String.format' should only be used when necessary--if the formatted string contains only trivial conversions (e.g. 'b', 's', 'c') and there are no translation concerns, it will be more efficient to replace them and concatenate with '+'. Issue id: StringFormatTrivial",
"markdown": "`String.format` string only contains trivial conversions \n\nEvery call to `String.format` creates a new `Formatter` instance, which will decrease the performance of your app. `String.format` should only be used when necessary--if the formatted string contains only trivial conversions (e.g. `b`, `s`, `c`) and there are no translation concerns, it will be more efficient to replace them and concatenate with `+`. \n\nIssue id: StringFormatTrivial"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintStringFormatTrivial",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintIntentReset",
"shortDescription": {
"text": "Suspicious mix of setType and setData"
},
"fullDescription": {
"text": "Suspicious mix of 'setType' and 'setData' Intent provides the following APIs: 'setData(Uri)' and 'setType(String)'. Unfortunately, setting one clears the other. If you want to set both, you should call 'setDataAndType(Uri, String)' instead. Issue id: IntentReset",
"markdown": "Suspicious mix of `setType` and `setData` \n\nIntent provides the following APIs: `setData(Uri)` and `setType(String)`. Unfortunately, setting one clears the other. If you want to set both, you should call `setDataAndType(Uri, String)` instead. \n\nIssue id: IntentReset"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintIntentReset",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintWrongThreadInterprocedural",
"shortDescription": {
"text": "Wrong Thread (Interprocedural)"
},
"fullDescription": {
"text": "Wrong Thread (Interprocedural) Searches for interprocedural call paths that violate thread annotations in the program. Tracks the flow of instantiated types and lambda expressions to increase accuracy across method boundaries. Issue id: WrongThreadInterprocedural https://developer.android.com/guide/components/processes-and-threads.html#Threads",
"markdown": "Wrong Thread (Interprocedural) \n\nSearches for interprocedural call paths that violate thread annotations in the program. Tracks the flow of instantiated types and lambda expressions to increase accuracy across method boundaries. \n\nIssue id: WrongThreadInterprocedural \n\n<https://developer.android.com/guide/components/processes-and-threads.html#Threads>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintWrongThreadInterprocedural",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintIconExtension",
"shortDescription": {
"text": "Icon format does not match the file extension"
},
"fullDescription": {
"text": "Icon format does not match the file extension Ensures that icons have the correct file extension (e.g. a '.png' file is really in the PNG format and not for example a GIF file named '.png'). Issue id: IconExtension",
"markdown": "Icon format does not match the file extension \n\nEnsures that icons have the correct file extension (e.g. a `.png` file is really in the PNG format and not for example a GIF file named `.png`). \n\nIssue id: IconExtension"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintIconExtension",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintServiceCast",
"shortDescription": {
"text": "Wrong system service casts"
},
"fullDescription": {
"text": "Wrong system service casts When you call 'Context#getSystemService()', the result is typically cast to a specific interface. This lint check ensures that the cast is compatible with the expected type of the return value. Issue id: ServiceCast",
"markdown": "Wrong system service casts \n\nWhen you call `Context#getSystemService()`, the result is typically cast to a specific interface. This lint check ensures that the cast is compatible with the expected type of the return value. \n\nIssue id: ServiceCast"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintServiceCast",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintJobSchedulerService",
"shortDescription": {
"text": "JobScheduler problems"
},
"fullDescription": {
"text": "JobScheduler problems This check looks for various common mistakes in using the JobScheduler API: the service class must extend 'JobService', the service must be registered in the manifest and the registration must require the permission 'android.permission.BIND_JOB_SERVICE'. Issue id: JobSchedulerService https://developer.android.com/topic/performance/scheduling.html",
"markdown": "JobScheduler problems \n\nThis check looks for various common mistakes in using the JobScheduler API: the service class must extend `JobService`, the service must be registered in the manifest and the registration must require the permission `android.permission.BIND_JOB_SERVICE`. \n\nIssue id: JobSchedulerService \n\n<https://developer.android.com/topic/performance/scheduling.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintJobSchedulerService",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IllegalIdentifier",
"shortDescription": {
"text": "Illegal Android Identifier"
},
"fullDescription": {
"text": "Reports Android projects identifiers that are not accepted by the Android runtime. For example, method names with whitespaces. Example: 'class Test {\n var `a b c` = 3\n }' To fix the problem change the identifier's name to match the Android runtime requirements.",
"markdown": "Reports Android projects identifiers that are not accepted by the Android runtime. For example, method names with whitespaces.\n\n**Example:**\n\n\n class Test {\n var `a b c` = 3\n }\n\nTo fix the problem change the identifier's name to match the Android runtime requirements."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "IllegalIdentifier",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Kotlin Android",
"index": 253,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintResourceType",
"shortDescription": {
"text": "Wrong Resource Type"
},
"fullDescription": {
"text": "Wrong Resource Type Ensures that resource id's passed to APIs are of the right type; for example, calling 'Resources.getColor(R.string.name)' is wrong. Issue id: ResourceType",
"markdown": "Wrong Resource Type \n\nEnsures that resource id's passed to APIs are of the right type; for example, calling `Resources.getColor(R.string.name)` is wrong. \n\nIssue id: ResourceType"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintResourceType",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUsingHttp",
"shortDescription": {
"text": "Using HTTP instead of HTTPS"
},
"fullDescription": {
"text": "Using HTTP instead of HTTPS The Gradle Wrapper is available both via HTTP and HTTPS. HTTPS is more secure since it protects against man-in-the-middle attacks etc. Older projects created in Android Studio used HTTP but we now default to HTTPS and recommend upgrading existing projects. Issue id: UsingHttp https://goo.gle/UsingHttp",
"markdown": "Using HTTP instead of HTTPS \n\nThe Gradle Wrapper is available both via HTTP and HTTPS. HTTPS is more secure since it protects against man-in-the-middle attacks etc. Older projects created in Android Studio used HTTP but we now default to HTTPS and recommend upgrading existing projects. \n\nIssue id: UsingHttp \n\n<https://goo.gle/UsingHttp>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintUsingHttp",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintIconLocation",
"shortDescription": {
"text": "Image defined in density-independent drawable folder"
},
"fullDescription": {
"text": "Image defined in density-independent drawable folder The res/drawable folder is intended for density-independent graphics such as shapes defined in XML. For bitmaps, move it to 'drawable-mdpi' and consider providing higher and lower resolution versions in 'drawable-ldpi', 'drawable-hdpi' and 'drawable-xhdpi'. If the icon really is density independent (for example a solid color) you can place it in 'drawable-nodpi'. Issue id: IconLocation https://developer.android.com/guide/practices/screens_support.html",
"markdown": "Image defined in density-independent drawable folder \n\nThe res/drawable folder is intended for density-independent graphics such as shapes defined in XML. For bitmaps, move it to `drawable-mdpi` and consider providing higher and lower resolution versions in `drawable-ldpi`, `drawable-hdpi` and `drawable-xhdpi`. If the icon **really** is density independent (for example a solid color) you can place it in `drawable-nodpi`. \n\nIssue id: IconLocation \n\n<https://developer.android.com/guide/practices/screens_support.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintIconLocation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintWrongRegion",
"shortDescription": {
"text": "Suspicious Language/Region Combination"
},
"fullDescription": {
"text": "Suspicious Language/Region Combination Android uses the letter codes ISO 639-1 for languages, and the letter codes ISO 3166-1 for the region codes. In many cases, the language code and the country where the language is spoken is the same, but it is also often not the case. For example, while 'se' refers to Sweden, where Swedish is spoken, the language code for Swedish is not 'se' (which refers to the Northern Sami language), the language code is 'sv'. And similarly the region code for 'sv' is El Salvador. This lint check looks for suspicious language and region combinations, to help catch cases where you've accidentally used the wrong language or region code. Lint knows about the most common regions where a language is spoken, and if a folder combination is not one of these, it is flagged as suspicious. Note however that it may not be an error: you can theoretically have speakers of any language in any region and want to target that with your resources, so this check is aimed at tracking down likely mistakes, not to enforce a specific set of region and language combinations. Issue id: WrongRegion",
"markdown": "Suspicious Language/Region Combination \n\nAndroid uses the letter codes ISO 639-1 for languages, and the letter codes ISO 3166-1 for the region codes. In many cases, the language code and the country where the language is spoken is the same, but it is also often not the case. For example, while 'se' refers to Sweden, where Swedish is spoken, the language code for Swedish is **not** `se` (which refers to the Northern Sami language), the language code is `sv`. And similarly the region code for `sv` is El Salvador. \n\nThis lint check looks for suspicious language and region combinations, to help catch cases where you've accidentally used the wrong language or region code. Lint knows about the most common regions where a language is spoken, and if a folder combination is not one of these, it is flagged as suspicious. \n\nNote however that it may not be an error: you can theoretically have speakers of any language in any region and want to target that with your resources, so this check is aimed at tracking down likely mistakes, not to enforce a specific set of region and language combinations. \n\nIssue id: WrongRegion"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintWrongRegion",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintExpiringTargetSdkVersion",
"shortDescription": {
"text": "TargetSdkVersion Soon Expiring"
},
"fullDescription": {
"text": "TargetSdkVersion Soon Expiring In the second half of 2018, Google Play will require that new apps and app updates target API level 26 or higher. This will be required for new apps in August 2018, and for updates to existing apps in November 2018. Configuring your app to target a recent API level ensures that users benefit from significant security and performance improvements, while still allowing your app to run on older Android versions (down to the 'minSdkVersion'). This lint check starts warning you some months before these changes go into effect if your 'targetSdkVersion' is 25 or lower. This is intended to give you a heads up to update your app, since depending on your current 'targetSdkVersion' the work can be nontrivial. To update your 'targetSdkVersion', follow the steps from \"Meeting Google Play requirements for target API level\", https://developer.android.com/distribute/best-practices/develop/target-sdk.html Issue id: ExpiringTargetSdkVersion https://support.google.com/googleplay/android-developer/answer/113469#targetsdk",
"markdown": "TargetSdkVersion Soon Expiring \n\nIn the second half of 2018, Google Play will require that new apps and app updates target API level 26 or higher. This will be required for new apps in August 2018, and for updates to existing apps in November 2018. \n\nConfiguring your app to target a recent API level ensures that users benefit from significant security and performance improvements, while still allowing your app to run on older Android versions (down to the `minSdkVersion`). \n\nThis lint check starts warning you some months **before** these changes go into effect if your `targetSdkVersion` is 25 or lower. This is intended to give you a heads up to update your app, since depending on your current `targetSdkVersion` the work can be nontrivial. \n\nTo update your `targetSdkVersion`, follow the steps from \"Meeting Google Play requirements for target API level\", <https://developer.android.com/distribute/best-practices/develop/target-sdk.html> \n\nIssue id: ExpiringTargetSdkVersion \n\n<https://support.google.com/googleplay/android-developer/answer/113469#targetsdk>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintExpiringTargetSdkVersion",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Compliance",
"index": 203,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintHardcodedDebugMode",
"shortDescription": {
"text": "Hardcoded value of android:debuggable in the manifest"
},
"fullDescription": {
"text": "Hardcoded value of 'android:debuggable' in the manifest It's best to leave out the 'android:debuggable' attribute from the manifest. If you do, then the tools will automatically insert 'android:debuggable=true' when building an APK to debug on an emulator or device. And when you perform a release build, such as Exporting APK, it will automatically set it to 'false'. If on the other hand you specify a specific value in the manifest file, then the tools will always use it. This can lead to accidentally publishing your app with debug information. Issue id: HardcodedDebugMode https://goo.gle/HardcodedDebugMode",
"markdown": "Hardcoded value of `android:debuggable` in the manifest \n\nIt's best to leave out the `android:debuggable` attribute from the manifest. If you do, then the tools will automatically insert `android:debuggable=true` when building an APK to debug on an emulator or device. And when you perform a release build, such as Exporting APK, it will automatically set it to `false`. \n\nIf on the other hand you specify a specific value in the manifest file, then the tools will always use it. This can lead to accidentally publishing your app with debug information. \n\nIssue id: HardcodedDebugMode \n\n<https://goo.gle/HardcodedDebugMode>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintHardcodedDebugMode",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintOrientation",
"shortDescription": {
"text": "Missing explicit orientation"
},
"fullDescription": {
"text": "Missing explicit orientation The default orientation of a 'LinearLayout' is horizontal. It's pretty easy to believe that the layout is vertical, add multiple children to it, and wonder why only the first child is visible (when the subsequent children are off screen to the right). This lint rule helps pinpoint this issue by warning whenever a 'LinearLayout' is used with an implicit orientation and multiple children. It also checks for empty LinearLayouts without an 'orientation' attribute that also defines an 'id' attribute. This catches the scenarios where children will be added to the 'LinearLayout' dynamically. Issue id: Orientation",
"markdown": "Missing explicit orientation \n\nThe default orientation of a `LinearLayout` is horizontal. It's pretty easy to believe that the layout is vertical, add multiple children to it, and wonder why only the first child is visible (when the subsequent children are off screen to the right). This lint rule helps pinpoint this issue by warning whenever a `LinearLayout` is used with an implicit orientation and multiple children. \n\nIt also checks for empty LinearLayouts without an `orientation` attribute that also defines an `id` attribute. This catches the scenarios where children will be added to the `LinearLayout` dynamically. \n\nIssue id: Orientation"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintOrientation",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintFileEndsWithExt",
"shortDescription": {
"text": "File endsWith on file extensions"
},
"fullDescription": {
"text": "File endsWith on file extensions The Kotlin extension method 'File.endsWith(suffix)' checks whole path components, not just string suffixes. This means that 'File(\"foo.txt\").endsWith(\".txt\")' will return false. Instead you might have intended 'file.path.endsWith' or 'file.extension.equals'. Issue id: FileEndsWithExt",
"markdown": "File endsWith on file extensions \n\nThe Kotlin extension method `File.endsWith(suffix)` checks whole path components, not just string suffixes. This means that `File(\"foo.txt\").endsWith(\".txt\")` will return false. Instead you might have intended `file.path.endsWith` or `file.extension.equals`. \n\nIssue id: FileEndsWithExt"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintFileEndsWithExt",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintTypographyFractions",
"shortDescription": {
"text": "Fraction string can be replaced with fraction character"
},
"fullDescription": {
"text": "Fraction string can be replaced with fraction character You can replace certain strings, such as 1/2, and 1/4, with dedicated characters for these, such as ½ (&#189;) and ¼ (&#188;). This can help make the text more readable. Issue id: TypographyFractions https://en.wikipedia.org/wiki/Number_Forms",
"markdown": "Fraction string can be replaced with fraction character \n\nYou can replace certain strings, such as 1/2, and 1/4, with dedicated characters for these, such as ½ (\\&#189;) and ¼ (\\&#188;). This can help make the text more readable. \n\nIssue id: TypographyFractions \n\n<https://en.wikipedia.org/wiki/Number_Forms>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintTypographyFractions",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintBidiSpoofing",
"shortDescription": {
"text": "Bidirectional text spoofing"
},
"fullDescription": {
"text": "Bidirectional text spoofing Unicode bidirectional text characters can alter the order in which the compiler processes tokens. However, this can also be used to hide malicious code, and can be difficult to spot. This lint check audits the source code and looks for cases where it looks like bidirectional text has the potential to be misleading. Issue id: BidiSpoofing https://krebsonsecurity.com/2021/11/trojan-source-bug-threatens-the-security-of-all-code/",
"markdown": "Bidirectional text spoofing \n\nUnicode bidirectional text characters can alter the order in which the compiler processes tokens. However, this can also be used to hide malicious code, and can be difficult to spot. This lint check audits the source code and looks for cases where it looks like bidirectional text has the potential to be misleading. \n\nIssue id: BidiSpoofing \n\n<https://krebsonsecurity.com/2021/11/trojan-source-bug-threatens-the-security-of-all-code/>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintBidiSpoofing",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintSetJavaScriptEnabled",
"shortDescription": {
"text": "Using setJavaScriptEnabled"
},
"fullDescription": {
"text": "Using 'setJavaScriptEnabled' Your code should not invoke 'setJavaScriptEnabled' if you are not sure that your app really requires JavaScript support. Issue id: SetJavaScriptEnabled https://goo.gle/SetJavaScriptEnabled https://developer.android.com/training/articles/security-tips",
"markdown": "Using `setJavaScriptEnabled` \n\nYour code should not invoke `setJavaScriptEnabled` if you are not sure that your app really requires JavaScript support. \n\nIssue id: SetJavaScriptEnabled \n\n<https://goo.gle/SetJavaScriptEnabled> \n<https://developer.android.com/training/articles/security-tips>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintSetJavaScriptEnabled",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintByteOrderMark",
"shortDescription": {
"text": "Byte order mark inside files"
},
"fullDescription": {
"text": "Byte order mark inside files Lint will flag any byte-order-mark (BOM) characters it finds in the middle of a file. Since we expect files to be encoded with UTF-8 (see the EnforceUTF8 issue), the BOM characters are not necessary, and they are not handled correctly by all tools. For example, if you have a BOM as part of a resource name in one particular translation, that name will not be considered identical to the base resource's name and the translation will not be used. Issue id: ByteOrderMark https://en.wikipedia.org/wiki/Byte_order_mark",
"markdown": "Byte order mark inside files \n\nLint will flag any byte-order-mark (BOM) characters it finds in the middle of a file. Since we expect files to be encoded with UTF-8 (see the EnforceUTF8 issue), the BOM characters are not necessary, and they are not handled correctly by all tools. For example, if you have a BOM as part of a resource name in one particular translation, that name will not be considered identical to the base resource's name and the translation will not be used. \n\nIssue id: ByteOrderMark \n\n<https://en.wikipedia.org/wiki/Byte_order_mark>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintByteOrderMark",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Internationalization",
"index": 187,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintShortAlarm",
"shortDescription": {
"text": "Short or Frequent Alarm"
},
"fullDescription": {
"text": "Short or Frequent Alarm Frequent alarms are bad for battery life. As of API 22, the 'AlarmManager' will override near-future and high-frequency alarm requests, delaying the alarm at least 5 seconds into the future and ensuring that the repeat interval is at least 60 seconds. If you really need to do work sooner than 5 seconds, post a delayed message or runnable to a Handler. Issue id: ShortAlarm",
"markdown": "Short or Frequent Alarm \n\nFrequent alarms are bad for battery life. As of API 22, the `AlarmManager` will override near-future and high-frequency alarm requests, delaying the alarm at least 5 seconds into the future and ensuring that the repeat interval is at least 60 seconds. \n\nIf you really need to do work sooner than 5 seconds, post a delayed message or runnable to a Handler. \n\nIssue id: ShortAlarm"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintShortAlarm",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMissingTvBanner",
"shortDescription": {
"text": "TV Missing Banner"
},
"fullDescription": {
"text": "TV Missing Banner A TV application must provide a home screen banner for each localization if it includes a Leanback launcher intent filter. The banner is the app launch point that appears on the home screen in the apps and games rows. Issue id: MissingTvBanner https://developer.android.com/training/tv/start/start.html#banner",
"markdown": "TV Missing Banner \n\nA TV application must provide a home screen banner for each localization if it includes a Leanback launcher intent filter. The banner is the app launch point that appears on the home screen in the apps and games rows. \n\nIssue id: MissingTvBanner \n\n<https://developer.android.com/training/tv/start/start.html#banner>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintMissingTvBanner",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintRtlEnabled",
"shortDescription": {
"text": "Using RTL attributes without enabling RTL support"
},
"fullDescription": {
"text": "Using RTL attributes without enabling RTL support To enable right-to-left support, when running on API 17 and higher, you must set the 'android:supportsRtl' attribute in the manifest '<application>' element. If you have started adding RTL attributes, but have not yet finished the migration, you can set the attribute to false to satisfy this lint check. Issue id: RtlEnabled",
"markdown": "Using RTL attributes without enabling RTL support \n\nTo enable right-to-left support, when running on API 17 and higher, you must set the `android:supportsRtl` attribute in the manifest `<application>` element. \n\nIf you have started adding RTL attributes, but have not yet finished the migration, you can set the attribute to false to satisfy this lint check. \n\nIssue id: RtlEnabled"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintRtlEnabled",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Internationalization",
"index": 187,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMenuTitle",
"shortDescription": {
"text": "Missing menu title"
},
"fullDescription": {
"text": "Missing menu title From the action bar documentation: \"It's important that you always define android:title for each menu item — even if you don't declare that the title appear with the action item — for three reasons: * If there's not enough room in the action bar for the action item, the menu item appears in the overflow menu and only the title appears. * Screen readers for sight-impaired users read the menu item's title. * If the action item appears with only the icon, a user can long-press the item to reveal a tool-tip that displays the action item's title. The android:icon is always optional, but recommended. Issue id: MenuTitle https://developer.android.com/training/appbar",
"markdown": "Missing menu title \n\nFrom the action bar documentation: \n\"It's important that you always define android:title for each menu item --- even if you don't declare that the title appear with the action item --- for three reasons: \n\n\\* If there's not enough room in the action bar for the action item, the menu item appears in the overflow menu and only the title appears. \n\\* Screen readers for sight-impaired users read the menu item's title. \n\\* If the action item appears with only the icon, a user can long-press the item to reveal a tool-tip that displays the action item's title. \n\nThe android:icon is always optional, but recommended. \n\nIssue id: MenuTitle \n\n<https://developer.android.com/training/appbar>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintMenuTitle",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMissingMediaBrowserServiceIntentFilter",
"shortDescription": {
"text": "Missing MediaBrowserService intent-filter"
},
"fullDescription": {
"text": "Missing MediaBrowserService intent-filter An Automotive Media App requires an exported service that extends 'android.service.media.MediaBrowserService' with an 'intent-filter' for the action 'android.media.browse.MediaBrowserService' to be able to browse and play media. To do this, add `<intent-filter>`\n `<action android:name=\"android.media.browse.MediaBrowserService\" />`\n`</intent-filter>`\n to the service that extends 'android.service.media.MediaBrowserService' Issue id: MissingMediaBrowserServiceIntentFilter https://developer.android.com/training/auto/audio/index.html#config_manifest",
"markdown": "Missing MediaBrowserService intent-filter \n\nAn Automotive Media App requires an exported service that extends `android.service.media.MediaBrowserService` with an `intent-filter` for the action `android.media.browse.MediaBrowserService` to be able to browse and play media. \n\nTo do this, add\n\n```\n`<intent-filter>`\n `<action android:name=\"android.media.browse.MediaBrowserService\" />`\n`</intent-filter>`\n```\n\nto the service that extends `android.service.media.MediaBrowserService` \n\nIssue id: MissingMediaBrowserServiceIntentFilter \n\n<https://developer.android.com/training/auto/audio/index.html#config_manifest>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintMissingMediaBrowserServiceIntentFilter",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidRoomQuestionMarkBindParameter",
"shortDescription": {
"text": "'?' used as parameter in a Room query."
},
"fullDescription": {
"text": "Reports Room SQL queries that use unnamed query parameters (e.g. 'WHERE id = ?'). This is not supported by the Room query analyzer which requires named query parameters (e.g. 'WHERE id = :id') that correspond to arguments of the method annotated with '@Query'.",
"markdown": "Reports Room SQL queries that use unnamed query parameters (e.g. `WHERE id = ?`). This is not supported by the Room query analyzer which requires named query parameters (e.g. `WHERE id = :id`) that correspond to arguments of the method annotated with `@Query`."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidRoomQuestionMarkBindParameter",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Room",
"index": 258,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMutatingSharedPrefs",
"shortDescription": {
"text": "Mutating an Immutable SharedPrefs Set"
},
"fullDescription": {
"text": "Mutating an Immutable SharedPrefs Set As stated in the docs for 'SharedPreferences.getStringSet', you must not modify the set returned by 'getStringSet': \"Note that you <em>must not</em> modify the set instance returned by this call. The consistency of the stored data is not guaranteed if you do, nor is your ability to modify the instance at all.\" Issue id: MutatingSharedPrefs",
"markdown": "Mutating an Immutable SharedPrefs Set \n\nAs stated in the docs for `SharedPreferences.getStringSet`, you must not modify the set returned by `getStringSet`: \n\n\"Note that you \\<em\\>must not\\</em\\> modify the set instance returned by this call. The consistency of the stored data is not guaranteed if you do, nor is your ability to modify the instance at all.\" \n\nIssue id: MutatingSharedPrefs"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintMutatingSharedPrefs",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintConstantLocale",
"shortDescription": {
"text": "Constant Locale"
},
"fullDescription": {
"text": "Constant Locale Assigning 'Locale.getDefault()' to a constant is suspicious, because the locale can change while the app is running. Issue id: ConstantLocale",
"markdown": "Constant Locale \n\nAssigning `Locale.getDefault()` to a constant is suspicious, because the locale can change while the app is running. \n\nIssue id: ConstantLocale"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintConstantLocale",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Internationalization",
"index": 187,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintIconColors",
"shortDescription": {
"text": "Icon colors do not follow the recommended visual style"
},
"fullDescription": {
"text": "Icon colors do not follow the recommended visual style Notification icons and Action Bar icons should only white and shades of gray. See the Android Design Guide for more details. Note that the way Lint decides whether an icon is an action bar icon or a notification icon is based on the filename prefix: 'ic_menu_' for action bar icons, 'ic_stat_' for notification icons etc. These correspond to the naming conventions documented in https://material.io/design/iconography/ Issue id: IconColors",
"markdown": "Icon colors do not follow the recommended visual style \n\nNotification icons and Action Bar icons should only white and shades of gray. See the Android Design Guide for more details. Note that the way Lint decides whether an icon is an action bar icon or a notification icon is based on the filename prefix: `ic_menu_` for action bar icons, `ic_stat_` for notification icons etc. These correspond to the naming conventions documented in <https://material.io/design/iconography/> \n\nIssue id: IconColors"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintIconColors",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintLibraryCustomView",
"shortDescription": {
"text": "Custom views in libraries should use res-auto-namespace"
},
"fullDescription": {
"text": "Custom views in libraries should use res-auto-namespace When using a custom view with custom attributes in a library project, the layout must use the special namespace http://schemas.android.com/apk/res-auto instead of a URI which includes the library project's own package. This will be used to automatically adjust the namespace of the attributes when the library resources are merged into the application project. Issue id: LibraryCustomView",
"markdown": "Custom views in libraries should use res-auto-namespace \n\nWhen using a custom view with custom attributes in a library project, the layout must use the special namespace <http://schemas.android.com/apk/res-auto> instead of a URI which includes the library project's own package. This will be used to automatically adjust the namespace of the attributes when the library resources are merged into the application project. \n\nIssue id: LibraryCustomView"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintLibraryCustomView",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintCustomX509TrustManager",
"shortDescription": {
"text": "Implements custom TLS trust manager"
},
"fullDescription": {
"text": "Implements custom TLS trust manager This check looks for custom 'X509TrustManager' implementations. Issue id: CustomX509TrustManager https://goo.gle/CustomX509TrustManager",
"markdown": "Implements custom TLS trust manager \n\nThis check looks for custom `X509TrustManager` implementations. \n\nIssue id: CustomX509TrustManager \n\n<https://goo.gle/CustomX509TrustManager>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintCustomX509TrustManager",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintVectorPath",
"shortDescription": {
"text": "Long vector paths"
},
"fullDescription": {
"text": "Long vector paths Using long vector paths is bad for performance. There are several ways to make the 'pathData' shorter: * Using less precision * Removing some minor details * Using the Android Studio vector conversion tool * Rasterizing the image (converting to PNG) Issue id: VectorPath",
"markdown": "Long vector paths \n\nUsing long vector paths is bad for performance. There are several ways to make the `pathData` shorter: \n\\* Using less precision \n\\* Removing some minor details \n\\* Using the Android Studio vector conversion tool \n\\* Rasterizing the image (converting to PNG) \n\nIssue id: VectorPath"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintVectorPath",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintReportShortcutUsage",
"shortDescription": {
"text": "Report shortcut usage"
},
"fullDescription": {
"text": "Report shortcut usage Reporting shortcut usage is important to improving the ranking of shortcuts Issue id: ReportShortcutUsage https://developer.android.com/develop/ui/views/launch/shortcuts/managing-shortcuts",
"markdown": "Report shortcut usage \n\nReporting shortcut usage is important to improving the ranking of shortcuts \n\nIssue id: ReportShortcutUsage \n\n<https://developer.android.com/develop/ui/views/launch/shortcuts/managing-shortcuts>"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "AndroidLintReportShortcutUsage",
"ideaSeverity": "INFO",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintLaunchActivityFromNotification",
"shortDescription": {
"text": "Notification Launches Services or BroadcastReceivers"
},
"fullDescription": {
"text": "Notification Launches Services or BroadcastReceivers Notifications should only launch activities -- that's what users expect (and has been the guidance in both the Android SDK and Material Design documentation for a while). A 'Service' or a 'BroadcastReceiver' should not be used as an intermediate, because this can lead to significant performance problems, and as a result, this will not be allowed in Android 12. Issue id: LaunchActivityFromNotification https://developer.android.com/guide/topics/ui/notifiers/notifications?hl=en#Actions https://material.io/design/platform-guidance/android-notifications.html#behavior https://developer.android.com/guide/topics/ui/notifiers/notifications?hl=en",
"markdown": "Notification Launches Services or BroadcastReceivers \n\nNotifications should only launch activities -- that's what users expect (and has been the guidance in both the Android SDK and Material Design documentation for a while). \n\nA `Service` or a `BroadcastReceiver` should not be used as an intermediate, because this can lead to significant performance problems, and as a result, this will not be allowed in Android 12. \n\nIssue id: LaunchActivityFromNotification \n\n<https://developer.android.com/guide/topics/ui/notifiers/notifications?hl=en#Actions> \n<https://material.io/design/platform-guidance/android-notifications.html#behavior> \n<https://developer.android.com/guide/topics/ui/notifiers/notifications?hl=en>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintLaunchActivityFromNotification",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintWebViewApiAvailability",
"shortDescription": {
"text": "WebView API Availability"
},
"fullDescription": {
"text": "WebView API Availability The 'androidx.webkit' library is a static library you can add to your Android application allowing you to use new APIs on older platform versions, targeting more devices. Issue id: WebViewApiAvailability https://developer.android.com/reference/androidx/webkit/package-summary",
"markdown": "WebView API Availability \n\nThe `androidx.webkit` library is a static library you can add to your Android application allowing you to use new APIs on older platform versions, targeting more devices. \n\nIssue id: WebViewApiAvailability \n\n<https://developer.android.com/reference/androidx/webkit/package-summary>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintWebViewApiAvailability",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintAnimatorKeep",
"shortDescription": {
"text": "Missing @Keep for Animated Properties"
},
"fullDescription": {
"text": "Missing @Keep for Animated Properties When you use property animators, properties can be accessed via reflection. Those methods should be annotated with @Keep to ensure that during release builds, the methods are not potentially treated as unused and removed, or treated as internal only and get renamed to something shorter. This check will also flag other potential reflection problems it encounters, such as a missing property, wrong argument types, etc. Issue id: AnimatorKeep",
"markdown": "Missing @Keep for Animated Properties \n\nWhen you use property animators, properties can be accessed via reflection. Those methods should be annotated with @Keep to ensure that during release builds, the methods are not potentially treated as unused and removed, or treated as internal only and get renamed to something shorter. \n\nThis check will also flag other potential reflection problems it encounters, such as a missing property, wrong argument types, etc. \n\nIssue id: AnimatorKeep"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintAnimatorKeep",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintHighSamplingRate",
"shortDescription": {
"text": "High sensor sampling rate"
},
"fullDescription": {
"text": "High sensor sampling rate Most apps don't need access to high sensor sampling rate. Double check your use case to ensure your app absolutely needs access to sensor sampling rate > 200Hz. Be prepared for your app to be rejected from listing on Play Store until your use case for high sensor sampling rate has been reviewed and validated by the policy team. Issue id: HighSamplingRate",
"markdown": "High sensor sampling rate \n\nMost apps don't need access to high sensor sampling rate. Double check your use case to ensure your app absolutely needs access to sensor sampling rate \\> 200Hz. Be prepared for your app to be rejected from listing on Play Store until your use case for high sensor sampling rate has been reviewed and validated by the policy team. \n\nIssue id: HighSamplingRate"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintHighSamplingRate",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintSimpleDateFormat",
"shortDescription": {
"text": "Implied locale in date format"
},
"fullDescription": {
"text": "Implied locale in date format Almost all callers should use 'getDateInstance()', 'getDateTimeInstance()', or 'getTimeInstance()' to get a ready-made instance of SimpleDateFormat suitable for the user's locale. The main reason you'd create an instance this class directly is because you need to format/parse a specific machine-readable format, in which case you almost certainly want to explicitly ask for US to ensure that you get ASCII digits (rather than, say, Arabic digits). Therefore, you should either use the form of the SimpleDateFormat constructor where you pass in an explicit locale, such as Locale.US, or use one of the get instance methods, or suppress this error if really know what you are doing. Issue id: SimpleDateFormat https://developer.android.com/reference/java/text/SimpleDateFormat.html",
"markdown": "Implied locale in date format \n\nAlmost all callers should use `getDateInstance()`, `getDateTimeInstance()`, or `getTimeInstance()` to get a ready-made instance of SimpleDateFormat suitable for the user's locale. The main reason you'd create an instance this class directly is because you need to format/parse a specific machine-readable format, in which case you almost certainly want to explicitly ask for US to ensure that you get ASCII digits (rather than, say, Arabic digits). \n\nTherefore, you should either use the form of the SimpleDateFormat constructor where you pass in an explicit locale, such as Locale.US, or use one of the get instance methods, or suppress this error if really know what you are doing. \n\nIssue id: SimpleDateFormat \n\n<https://developer.android.com/reference/java/text/SimpleDateFormat.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintSimpleDateFormat",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintAppIndexingService",
"shortDescription": {
"text": "App Indexing Background Services"
},
"fullDescription": {
"text": "App Indexing Background Services Apps targeting Android 8.0 or higher can no longer rely on background services while listening for updates to the on-device index. Use a 'BroadcastReceiver' for the 'UPDATE_INDEX' intent to continue supporting indexing in your app. Issue id: AppIndexingService https://firebase.google.com/docs/app-indexing/android/personal-content#add-a-broadcast-receiver-to-your-app",
"markdown": "App Indexing Background Services \n\nApps targeting Android 8.0 or higher can no longer rely on background services while listening for updates to the on-device index. Use a `BroadcastReceiver` for the `UPDATE_INDEX` intent to continue supporting indexing in your app. \n\nIssue id: AppIndexingService \n\n<https://firebase.google.com/docs/app-indexing/android/personal-content#add-a-broadcast-receiver-to-your-app>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintAppIndexingService",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintIllegalResourceRef",
"shortDescription": {
"text": "Name and version must be integer or string, not resource"
},
"fullDescription": {
"text": "Name and version must be integer or string, not resource For the 'versionCode' attribute, you have to specify an actual integer literal; you cannot use an indirection with a '@dimen/name' resource. Similarly, the 'versionName' attribute should be an actual string, not a string resource url. Issue id: IllegalResourceRef",
"markdown": "Name and version must be integer or string, not resource \n\nFor the `versionCode` attribute, you have to specify an actual integer literal; you cannot use an indirection with a `@dimen/name` resource. Similarly, the `versionName` attribute should be an actual string, not a string resource url. \n\nIssue id: IllegalResourceRef"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintIllegalResourceRef",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintBottomAppBar",
"shortDescription": {
"text": "BottomAppBar Problems"
},
"fullDescription": {
"text": "BottomAppBar Problems The 'BottomAppBar' widget must be placed within a 'CoordinatorLayout'. Issue id: BottomAppBar",
"markdown": "BottomAppBar Problems \n\nThe `BottomAppBar` widget must be placed within a `CoordinatorLayout`. \n\nIssue id: BottomAppBar"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintBottomAppBar",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintBinderGetCallingInMainThread",
"shortDescription": {
"text": "Incorrect usage of getCallingUid() or getCallingPid()"
},
"fullDescription": {
"text": "Incorrect usage of getCallingUid() or getCallingPid() 'Binder.getCallingUid()' and 'Binder.getCallingPid()' will return information about the current process if called inside a thread that is not handling a binder transaction. This can cause security issues. If you still want to use your own uid/pid, use 'Process.myUid()' or 'Process.myPid()'. Issue id: BinderGetCallingInMainThread",
"markdown": "Incorrect usage of getCallingUid() or getCallingPid() \n\n`Binder.getCallingUid()` and `Binder.getCallingPid()` will return information about the current process if called inside a thread that is not handling a binder transaction. This can cause security issues. If you still want to use your own uid/pid, use `Process.myUid()` or `Process.myPid()`. \n\nIssue id: BinderGetCallingInMainThread"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintBinderGetCallingInMainThread",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintJavascriptInterface",
"shortDescription": {
"text": "Missing @JavascriptInterface on methods"
},
"fullDescription": {
"text": "Missing @JavascriptInterface on methods As of API 17, you must annotate methods in objects registered with the 'addJavascriptInterface' method with a '@JavascriptInterface' annotation. Issue id: JavascriptInterface https://developer.android.com/reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object, java.lang.String) https://goo.gle/JavascriptInterface",
"markdown": "Missing @JavascriptInterface on methods \n\nAs of API 17, you must annotate methods in objects registered with the `addJavascriptInterface` method with a `@JavascriptInterface` annotation. \n\nIssue id: JavascriptInterface \n\n<https://developer.android.com/reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object, java.lang.String)> \n<https://goo.gle/JavascriptInterface>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintJavascriptInterface",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMinSdkTooLow",
"shortDescription": {
"text": "API Version Too Low"
},
"fullDescription": {
"text": "API Version Too Low The value of the 'minSdkVersion' property is too low and can be incremented without noticeably reducing the number of supported devices. Issue id: MinSdkTooLow",
"markdown": "API Version Too Low \n\nThe value of the `minSdkVersion` property is too low and can be incremented without noticeably reducing the number of supported devices. \n\nIssue id: MinSdkTooLow"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintMinSdkTooLow",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidUnresolvedRoomSqlReference",
"shortDescription": {
"text": "Unresolved reference in Room SQL"
},
"fullDescription": {
"text": "Checks Room SQL queries for unresolved references.",
"markdown": "Checks Room SQL queries for unresolved references."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidUnresolvedRoomSqlReference",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Room",
"index": 258,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintIntentFilterUniqueDataAttributes",
"shortDescription": {
"text": "Data tags should only declare unique attributes"
},
"fullDescription": {
"text": "Data tags should only declare unique attributes '<intent-filter>' '<data>' tags should only declare a single unique attribute (i.e. scheme OR host, but not both). This better matches the runtime behavior of intent filters, as they combine all of the declared data attributes into a single matcher which is allowed to handle any combination across attribute types. For example, the following two '<intent-filter>' declarations are the same: <intent-filter>\n <data android:scheme=\"http\" android:host=\"example.com\" />\n <data android:scheme=\"https\" android:host=\"example.org\" />\n</intent-filter>\n <intent-filter>\n <data android:scheme=\"http\"/>\n <data android:scheme=\"https\"/>\n <data android:host=\"example.com\" />\n <data android:host=\"example.org\" />\n</intent-filter>\n They both handle all of the following: * http://example.com * https://example.com * http://example.org * https://example.org The second one better communicates the combining behavior and is clearer to an external reader that one should not rely on the scheme/host being self contained. It is not obvious in the first that http://example.org is also matched, which can lead to confusion (or incorrect behavior) with a more complex set of schemes/hosts. Note that this does not apply to host + port, as those must be declared in the same '<data>' tag and are only associated with each other. Issue id: IntentFilterUniqueDataAttributes https://developer.android.com/guide/components/intents-filters",
"markdown": "Data tags should only declare unique attributes \n\n`<intent-filter>` `<data>` tags should only declare a single unique attribute (i.e. scheme OR host, but not both). This better matches the runtime behavior of intent filters, as they combine all of the declared data attributes into a single matcher which is allowed to handle any combination across attribute types. \n\nFor example, the following two `<intent-filter>` declarations are the same:\n\n```\n<intent-filter>\n <data android:scheme=\"http\" android:host=\"example.com\" />\n <data android:scheme=\"https\" android:host=\"example.org\" />\n</intent-filter>\n```\n\n```\n<intent-filter>\n <data android:scheme=\"http\"/>\n <data android:scheme=\"https\"/>\n <data android:host=\"example.com\" />\n <data android:host=\"example.org\" />\n</intent-filter>\n```\n\n<br />\n\nThey both handle all of the following: \n\\* <http://example.com> \n\\* <https://example.com> \n\\* <http://example.org> \n\\* <https://example.org> \n\nThe second one better communicates the combining behavior and is clearer to an external reader that one should not rely on the scheme/host being self contained. It is not obvious in the first that <http://example.org> is also matched, which can lead to confusion (or incorrect behavior) with a more complex set of schemes/hosts. \n\nNote that this does not apply to host + port, as those must be declared in the same `<data>` tag and are only associated with each other. \n\nIssue id: IntentFilterUniqueDataAttributes \n\n<https://developer.android.com/guide/components/intents-filters>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintIntentFilterUniqueDataAttributes",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMissingLeanbackSupport",
"shortDescription": {
"text": "Missing Leanback Support"
},
"fullDescription": {
"text": "Missing Leanback Support The manifest should declare the use of the Leanback user interface required by Android TV. To fix this, add `<uses-feature android:name=\"android.software.leanback\"\n android:required=\"false\" />`\n to your manifest. Issue id: MissingLeanbackSupport https://developer.android.com/training/tv/start/start.html#leanback-req",
"markdown": "Missing Leanback Support \n\nThe manifest should declare the use of the Leanback user interface required by Android TV. \n\nTo fix this, add\n\n```\n`<uses-feature android:name=\"android.software.leanback\"\n android:required=\"false\" />`\n```\n\nto your manifest. \n\nIssue id: MissingLeanbackSupport \n\n<https://developer.android.com/training/tv/start/start.html#leanback-req>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintMissingLeanbackSupport",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintIconExpectedSize",
"shortDescription": {
"text": "Icon has incorrect size"
},
"fullDescription": {
"text": "Icon has incorrect size There are predefined sizes (for each density) for launcher icons. You should follow these conventions to make sure your icons fit in with the overall look of the platform. Issue id: IconExpectedSize https://material.io/design/iconography/",
"markdown": "Icon has incorrect size \n\nThere are predefined sizes (for each density) for launcher icons. You should follow these conventions to make sure your icons fit in with the overall look of the platform. \n\nIssue id: IconExpectedSize \n\n<https://material.io/design/iconography/>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintIconExpectedSize",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintShiftFlags",
"shortDescription": {
"text": "Dangerous Flag Constant Declaration"
},
"fullDescription": {
"text": "Dangerous Flag Constant Declaration When defining multiple constants for use in flags, the recommended style is to use the form '1 << 2', '1 << 3', '1 << 4' and so on to ensure that the constants are unique and non-overlapping. Issue id: ShiftFlags",
"markdown": "Dangerous Flag Constant Declaration \n\nWhen defining multiple constants for use in flags, the recommended style is to use the form `1 << 2`, `1 << 3`, `1 << 4` and so on to ensure that the constants are unique and non-overlapping. \n\nIssue id: ShiftFlags"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintShiftFlags",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintFullBackupContent",
"shortDescription": {
"text": "Valid Full Backup Content File"
},
"fullDescription": {
"text": "Valid Full Backup Content File Ensures that '<data-extraction-rules'> and '<full-backup-content>' files, which configure backup options, are valid. Issue id: FullBackupContent https://android-developers.googleblog.com/2015/07/auto-backup-for-apps-made-simple.html",
"markdown": "Valid Full Backup Content File \n\nEnsures that `<data-extraction-rules`\\> and `<full-backup-content>` files, which configure backup options, are valid. \n\nIssue id: FullBackupContent \n\n<https://android-developers.googleblog.com/2015/07/auto-backup-for-apps-made-simple.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintFullBackupContent",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintExifInterface",
"shortDescription": {
"text": "Using android.media.ExifInterface"
},
"fullDescription": {
"text": "Using 'android.media.ExifInterface' The 'android.media.ExifInterface' implementation has some known security bugs in older versions of Android. There is a new implementation available of this library in the support library, which is preferable. Issue id: ExifInterface",
"markdown": "Using `android.media.ExifInterface` \n\nThe `android.media.ExifInterface` implementation has some known security bugs in older versions of Android. There is a new implementation available of this library in the support library, which is preferable. \n\nIssue id: ExifInterface"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintExifInterface",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMissingOnPlayFromSearch",
"shortDescription": {
"text": "Missing onPlayFromSearch"
},
"fullDescription": {
"text": "Missing 'onPlayFromSearch' To support voice searches on Android Auto, in addition to adding an 'intent-filter' for the action 'onPlayFromSearch', you also need to override and implement 'onPlayFromSearch(String query, Bundle bundle)' Issue id: MissingOnPlayFromSearch https://developer.android.com/training/auto/audio/index.html#support_voice",
"markdown": "Missing `onPlayFromSearch` \n\nTo support voice searches on Android Auto, in addition to adding an `intent-filter` for the action `onPlayFromSearch`, you also need to override and implement `onPlayFromSearch(String query, Bundle bundle)` \n\nIssue id: MissingOnPlayFromSearch \n\n<https://developer.android.com/training/auto/audio/index.html#support_voice>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintMissingOnPlayFromSearch",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintAppBundleLocaleChanges",
"shortDescription": {
"text": "App Bundle handling of runtime locale changes"
},
"fullDescription": {
"text": "App Bundle handling of runtime locale changes When changing locales at runtime (e.g. to provide an in-app language switcher), the Android App Bundle must be configured to not split by locale or the Play Core library must be used to download additional locales at runtime. Issue id: AppBundleLocaleChanges https://developer.android.com/guide/app-bundle/configure-base#handling_language_changes",
"markdown": "App Bundle handling of runtime locale changes \n\nWhen changing locales at runtime (e.g. to provide an in-app language switcher), the Android App Bundle must be configured to not split by locale or the Play Core library must be used to download additional locales at runtime. \n\nIssue id: AppBundleLocaleChanges \n\n<https://developer.android.com/guide/app-bundle/configure-base#handling_language_changes>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintAppBundleLocaleChanges",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintChromeOsOnConfigurationChanged",
"shortDescription": {
"text": "Poor performance with APIs inside onConfigurationChanged()"
},
"fullDescription": {
"text": "Poor performance with APIs inside 'onConfigurationChanged()' When users resize the Android emulator in Android 13 and Chrome OS, an 'onConfigurationChanged()' API call occurs. If your 'onConfigurationChanged()' method contains any code that can cause a redraw, your app might take a performance hit on large screens. To fix the issue, ensure your 'onConfigurationChanged()' method does not contain any calls to UI redraw logic for specific elements. Issue id: ChromeOsOnConfigurationChanged",
"markdown": "Poor performance with APIs inside `onConfigurationChanged()` \n\nWhen users resize the Android emulator in Android 13 and Chrome OS, an `onConfigurationChanged()` API call occurs. If your `onConfigurationChanged()` method contains any code that can cause a redraw, your app might take a performance hit on large screens. To fix the issue, ensure your `onConfigurationChanged()` method does not contain any calls to UI redraw logic for specific elements. \n\nIssue id: ChromeOsOnConfigurationChanged"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintChromeOsOnConfigurationChanged",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintWrongCall",
"shortDescription": {
"text": "Using wrong draw/layout method"
},
"fullDescription": {
"text": "Using wrong draw/layout method Custom views typically need to call 'measure()' on their children, not 'onMeasure'. Ditto for onDraw, onLayout, etc. Issue id: WrongCall",
"markdown": "Using wrong draw/layout method \n\nCustom views typically need to call `measure()` on their children, not `onMeasure`. Ditto for onDraw, onLayout, etc. \n\nIssue id: WrongCall"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintWrongCall",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintNotSibling",
"shortDescription": {
"text": "Invalid Constraints"
},
"fullDescription": {
"text": "Invalid Constraints Layout constraints in a given 'ConstraintLayout' or 'RelativeLayout' should reference other views within the same relative layout (but not itself!) Issue id: NotSibling",
"markdown": "Invalid Constraints \n\nLayout constraints in a given `ConstraintLayout` or `RelativeLayout` should reference other views within the same relative layout (but not itself!) \n\nIssue id: NotSibling"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintNotSibling",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintRedundantLabel",
"shortDescription": {
"text": "Redundant label on activity"
},
"fullDescription": {
"text": "Redundant label on activity When an activity does not have a label attribute, it will use the one from the application tag. Since the application has already specified the same label, the label on this activity can be omitted. Issue id: RedundantLabel",
"markdown": "Redundant label on activity \n\nWhen an activity does not have a label attribute, it will use the one from the application tag. Since the application has already specified the same label, the label on this activity can be omitted. \n\nIssue id: RedundantLabel"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintRedundantLabel",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintClickableViewAccessibility",
"shortDescription": {
"text": "Accessibility in Custom Views"
},
"fullDescription": {
"text": "Accessibility in Custom Views If a 'View' that overrides 'onTouchEvent' or uses an 'OnTouchListener' does not also implement 'performClick' and call it when clicks are detected, the 'View' may not handle accessibility actions properly. Logic handling the click actions should ideally be placed in 'View#performClick' as some accessibility services invoke 'performClick' when a click action should occur. Issue id: ClickableViewAccessibility",
"markdown": "Accessibility in Custom Views \n\nIf a `View` that overrides `onTouchEvent` or uses an `OnTouchListener` does not also implement `performClick` and call it when clicks are detected, the `View` may not handle accessibility actions properly. Logic handling the click actions should ideally be placed in `View#performClick` as some accessibility services invoke `performClick` when a click action should occur. \n\nIssue id: ClickableViewAccessibility"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintClickableViewAccessibility",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Accessibility",
"index": 167,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMissingDefaultResource",
"shortDescription": {
"text": "Missing Default"
},
"fullDescription": {
"text": "Missing Default If a resource is only defined in folders with qualifiers like '-land' or '-en', and there is no default declaration in the base folder ('layout' or 'values' etc), then the app will crash if that resource is accessed on a device where the device is in a configuration missing the given qualifier. As a special case, drawables do not have to be specified in the base folder; if there is a match in a density folder (such as 'drawable-mdpi') that image will be used and scaled. Note however that if you only specify a drawable in a folder like 'drawable-en-hdpi', the app will crash in non-English locales. There may be scenarios where you have a resource, such as a '-fr' drawable, which is only referenced from some other resource with the same qualifiers (such as a '-fr' style), which itself has safe fallbacks. However, this still makes it possible for somebody to accidentally reference the drawable and crash, so it is safer to create a default fallback in the base folder. Alternatively, you can suppress the issue by adding 'tools:ignore=\"MissingDefaultResource\"' on the element. (This scenario frequently happens with string translations, where you might delete code and the corresponding resources, but forget to delete a translation. There is a dedicated issue id for that scenario, with the id 'ExtraTranslation'.) Issue id: MissingDefaultResource",
"markdown": "Missing Default \n\nIf a resource is only defined in folders with qualifiers like `-land` or `-en`, and there is no default declaration in the base folder (`layout` or `values` etc), then the app will crash if that resource is accessed on a device where the device is in a configuration missing the given qualifier. \n\nAs a special case, drawables do not have to be specified in the base folder; if there is a match in a density folder (such as `drawable-mdpi`) that image will be used and scaled. Note however that if you only specify a drawable in a folder like `drawable-en-hdpi`, the app will crash in non-English locales. \n\nThere may be scenarios where you have a resource, such as a `-fr` drawable, which is only referenced from some other resource with the same qualifiers (such as a `-fr` style), which itself has safe fallbacks. However, this still makes it possible for somebody to accidentally reference the drawable and crash, so it is safer to create a default fallback in the base folder. Alternatively, you can suppress the issue by adding `tools:ignore=\"MissingDefaultResource\"` on the element. \n\n(This scenario frequently happens with string translations, where you might delete code and the corresponding resources, but forget to delete a translation. There is a dedicated issue id for that scenario, with the id `ExtraTranslation`.) \n\nIssue id: MissingDefaultResource"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintMissingDefaultResource",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMergeMarker",
"shortDescription": {
"text": "Code contains merge marker"
},
"fullDescription": {
"text": "Code contains merge marker Many version control systems leave unmerged files with markers such as <<< in the source code. This check looks for these markers, which are sometimes accidentally left in, particularly in resource files where they don't break compilation. Issue id: MergeMarker",
"markdown": "Code contains merge marker \n\nMany version control systems leave unmerged files with markers such as \\<\\<\\< in the source code. This check looks for these markers, which are sometimes accidentally left in, particularly in resource files where they don't break compilation. \n\nIssue id: MergeMarker"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintMergeMarker",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "R8IgnoredFlags",
"shortDescription": {
"text": "Flags ignored by R8"
},
"fullDescription": {
"text": "Reports flags that are ignored by R8.",
"markdown": "Reports flags that are ignored by R8."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "R8IgnoredFlags",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Shrinker",
"index": 127,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintKnownPermissionError",
"shortDescription": {
"text": "Value specified for permission is a known error"
},
"fullDescription": {
"text": "Value specified for permission is a known error This check looks for values specified in component permissions that are known errors, such as 'android:permission=\"true\"'. Please double check the permission value you have supplied. The value is expected to be a permission string from the system, another app, or your own, NOT a boolean. Issue id: KnownPermissionError https://goo.gle/KnownPermissionError",
"markdown": "Value specified for permission is a known error \n\nThis check looks for values specified in component permissions that are known errors, such as `android:permission=\"true\"`. \n\nPlease double check the permission value you have supplied. The value is expected to be a permission string from the system, another app, or your own, NOT a boolean. \n\nIssue id: KnownPermissionError \n\n<https://goo.gle/KnownPermissionError>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintKnownPermissionError",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintExtraTranslation",
"shortDescription": {
"text": "Extra translation"
},
"fullDescription": {
"text": "Extra translation If a string appears in a specific language translation file, but there is no corresponding string in the default locale, then this string is probably unused. (It's technically possible that your application is only intended to run in a specific locale, but it's still a good idea to provide a fallback.) Note that these strings can lead to crashes if the string is looked up on any locale not providing a translation, so it's important to clean them up. Issue id: ExtraTranslation",
"markdown": "Extra translation \n\nIf a string appears in a specific language translation file, but there is no corresponding string in the default locale, then this string is probably unused. (It's technically possible that your application is only intended to run in a specific locale, but it's still a good idea to provide a fallback.) \n\nNote that these strings can lead to crashes if the string is looked up on any locale not providing a translation, so it's important to clean them up. \n\nIssue id: ExtraTranslation"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintExtraTranslation",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintBatteryLife",
"shortDescription": {
"text": "Battery Life Issues"
},
"fullDescription": {
"text": "Battery Life Issues This issue flags code that either * negatively affects battery life, or * uses APIs that have recently changed behavior to prevent background tasks from consuming memory and battery excessively. Generally, you should be using 'WorkManager' instead. For more details on how to update your code, please see https://developer.android.com/topic/performance/background-optimization Issue id: BatteryLife",
"markdown": "Battery Life Issues \n\nThis issue flags code that either \n\\* negatively affects battery life, or \n\\* uses APIs that have recently changed behavior to prevent background tasks from consuming memory and battery excessively. \n\nGenerally, you should be using `WorkManager` instead. \n\nFor more details on how to update your code, please see <https://developer.android.com/topic/performance/background-optimization> \n\nIssue id: BatteryLife"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintBatteryLife",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintPermissionImpliesUnsupportedHardware",
"shortDescription": {
"text": "Permission Implies Unsupported Hardware"
},
"fullDescription": {
"text": "Permission Implies Unsupported Hardware The '<uses-permission>' element should not require a permission that implies an unsupported TV hardware feature. Google Play assumes that certain hardware related permissions indicate that the underlying hardware features are required by default. To fix the issue, consider declaring the corresponding 'uses-feature' element with 'required=\"false\"' attribute. Issue id: PermissionImpliesUnsupportedHardware https://developer.android.com/guide/topics/manifest/uses-feature-element.html#permissions",
"markdown": "Permission Implies Unsupported Hardware \n\nThe `<uses-permission>` element should not require a permission that implies an unsupported TV hardware feature. Google Play assumes that certain hardware related permissions indicate that the underlying hardware features are required by default. To fix the issue, consider declaring the corresponding `uses-feature` element with `required=\"false\"` attribute. \n\nIssue id: PermissionImpliesUnsupportedHardware \n\n<https://developer.android.com/guide/topics/manifest/uses-feature-element.html#permissions>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintPermissionImpliesUnsupportedHardware",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintImpliedQuantity",
"shortDescription": {
"text": "Implied Quantities"
},
"fullDescription": {
"text": "Implied Quantities Plural strings should generally include a '%s' or '%d' formatting argument. In locales like English, the 'one' quantity only applies to a single value, 1, but that's not true everywhere. For example, in Slovene, the 'one' quantity will apply to 1, 101, 201, 301, and so on. Similarly, there are locales where multiple values match the 'zero' and 'two' quantities. In these locales, it is usually an error to have a message which does not include a formatting argument (such as '%d'), since it will not be clear from the grammar what quantity the quantity string is describing. Issue id: ImpliedQuantity https://developer.android.com/guide/topics/resources/string-resource.html#Plurals",
"markdown": "Implied Quantities \n\nPlural strings should generally include a `%s` or `%d` formatting argument. In locales like English, the `one` quantity only applies to a single value, 1, but that's not true everywhere. For example, in Slovene, the `one` quantity will apply to 1, 101, 201, 301, and so on. Similarly, there are locales where multiple values match the `zero` and `two` quantities. \n\nIn these locales, it is usually an error to have a message which does not include a formatting argument (such as '%d'), since it will not be clear from the grammar what quantity the quantity string is describing. \n\nIssue id: ImpliedQuantity \n\n<https://developer.android.com/guide/topics/resources/string-resource.html#Plurals>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintImpliedQuantity",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintDuplicateDivider",
"shortDescription": {
"text": "Unnecessary Divider Copy"
},
"fullDescription": {
"text": "Unnecessary Divider Copy Older versions of the RecyclerView library did not include a divider decorator, but one was provided as a sample in the support demos. This divider class has been widely copy/pasted into various projects. In recent versions of the support library, the divider decorator is now included, so you can replace custom copies with the \"built-in\" version, 'android.support.v7.widget.DividerItemDecoration'. Issue id: DuplicateDivider",
"markdown": "Unnecessary Divider Copy \n\nOlder versions of the RecyclerView library did not include a divider decorator, but one was provided as a sample in the support demos. This divider class has been widely copy/pasted into various projects. \n\nIn recent versions of the support library, the divider decorator is now included, so you can replace custom copies with the \"built-in\" version, `android.support.v7.widget.DividerItemDecoration`. \n\nIssue id: DuplicateDivider"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintDuplicateDivider",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintInvalidPermission",
"shortDescription": {
"text": "Invalid Permission Attribute"
},
"fullDescription": {
"text": "Invalid Permission Attribute Not all elements support the permission attribute. If a permission is set on an invalid element, it is a no-op and ignored. Ensure that this permission attribute was set on the correct element to protect the correct component. Issue id: InvalidPermission",
"markdown": "Invalid Permission Attribute \n\nNot all elements support the permission attribute. If a permission is set on an invalid element, it is a no-op and ignored. Ensure that this permission attribute was set on the correct element to protect the correct component. \n\nIssue id: InvalidPermission"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintInvalidPermission",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintSignatureOrSystemPermissions",
"shortDescription": {
"text": "Declaring signatureOrSystem permissions"
},
"fullDescription": {
"text": "Declaring signatureOrSystem permissions The 'signature' protection level should probably be sufficient for most needs and works regardless of where applications are installed. The 'signatureOrSystem' level is used for certain situations where multiple vendors have applications built into a system image and need to share specific features explicitly because they are being built together. Issue id: SignatureOrSystemPermissions",
"markdown": "Declaring signatureOrSystem permissions \n\nThe `signature` protection level should probably be sufficient for most needs and works regardless of where applications are installed. The `signatureOrSystem` level is used for certain situations where multiple vendors have applications built into a system image and need to share specific features explicitly because they are being built together. \n\nIssue id: SignatureOrSystemPermissions"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintSignatureOrSystemPermissions",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintWrongCase",
"shortDescription": {
"text": "Wrong case for view tag"
},
"fullDescription": {
"text": "Wrong case for view tag Most layout tags, such as '<Button>', refer to actual view classes and are therefore capitalized. However, there are exceptions such as '<fragment>' and '<include>'. This lint check looks for incorrect capitalizations. Issue id: WrongCase https://developer.android.com/guide/components/fragments.html",
"markdown": "Wrong case for view tag \n\nMost layout tags, such as `<Button>`, refer to actual view classes and are therefore capitalized. However, there are exceptions such as `<fragment>` and `<include>`. This lint check looks for incorrect capitalizations. \n\nIssue id: WrongCase \n\n<https://developer.android.com/guide/components/fragments.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintWrongCase",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintIconLauncherShape",
"shortDescription": {
"text": "The launcher icon shape should use a distinct silhouette"
},
"fullDescription": {
"text": "The launcher icon shape should use a distinct silhouette According to the Android Design Guide (https://material.io/design/iconography/) your launcher icons should \"use a distinct silhouette\", a \"three-dimensional, front view, with a slight perspective as if viewed from above, so that users perceive some depth.\" The unique silhouette implies that your launcher icon should not be a filled square. Issue id: IconLauncherShape",
"markdown": "The launcher icon shape should use a distinct silhouette \n\nAccording to the Android Design Guide (<https://material.io/design/iconography/>) your launcher icons should \"use a distinct silhouette\", a \"three-dimensional, front view, with a slight perspective as if viewed from above, so that users perceive some depth.\" \n\nThe unique silhouette implies that your launcher icon should not be a filled square. \n\nIssue id: IconLauncherShape"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintIconLauncherShape",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUnusedTranslation",
"shortDescription": {
"text": "Unused Translation"
},
"fullDescription": {
"text": "Unused Translation If an application defines a translation for a language which is not included in the app's 'localeConfig' file (when declared in the manifest), that language will be \"unused\"; it will not be presented to the user. Usually this means you have forgotten to include it in the locale config file. Issue id: UnusedTranslation https://developer.android.com/about/versions/13/features/app-languages",
"markdown": "Unused Translation \n\nIf an application defines a translation for a language which is not included in the app's `localeConfig` file (when declared in the manifest), that language will be \"unused\"; it will not be presented to the user. Usually this means you have forgotten to include it in the locale config file. \n\nIssue id: UnusedTranslation \n\n<https://developer.android.com/about/versions/13/features/app-languages>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintUnusedTranslation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintWifiManagerLeak",
"shortDescription": {
"text": "WifiManager Leak"
},
"fullDescription": {
"text": "WifiManager Leak On versions prior to Android N (24), initializing the 'WifiManager' via 'Context#getSystemService' can cause a memory leak if the context is not the application context. Change 'context.getSystemService(...)' to 'context.getApplicationContext().getSystemService(...)'. Issue id: WifiManagerLeak",
"markdown": "WifiManager Leak \n\nOn versions prior to Android N (24), initializing the `WifiManager` via `Context#getSystemService` can cause a memory leak if the context is not the application context. Change `context.getSystemService(...)` to `context.getApplicationContext().getSystemService(...)`. \n\nIssue id: WifiManagerLeak"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintWifiManagerLeak",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintEasterEgg",
"shortDescription": {
"text": "Code contains easter egg"
},
"fullDescription": {
"text": "Code contains easter egg An \"easter egg\" is code deliberately hidden in the code, both from potential users and even from other developers. This lint check looks for code which looks like it may be hidden from sight. Issue id: EasterEgg",
"markdown": "Code contains easter egg \n\nAn \"easter egg\" is code deliberately hidden in the code, both from potential users and even from other developers. This lint check looks for code which looks like it may be hidden from sight. \n\nIssue id: EasterEgg"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintEasterEgg",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUsableSpace",
"shortDescription": {
"text": "Using getUsableSpace()"
},
"fullDescription": {
"text": "Using getUsableSpace() When you need to allocate disk space for large files, consider using the new 'allocateBytes(FileDescriptor, long)' API, which will automatically clear cached files belonging to other apps (as needed) to meet your request. When deciding if the device has enough disk space to hold your new data, call 'getAllocatableBytes(UUID)' instead of using 'getUsableSpace()', since the former will consider any cached data that the system is willing to clear on your behalf. Note that these methods require API level 26. If your app is running on older devices, you will probably need to use both APIs, conditionally switching on 'Build.VERSION.SDK_INT'. Lint only looks in the same compilation unit to see if you are already using both APIs, so if it warns even though you are already using the new API, consider moving the calls to the same file or suppressing the warning. Issue id: UsableSpace",
"markdown": "Using getUsableSpace() \n\nWhen you need to allocate disk space for large files, consider using the new `allocateBytes(FileDescriptor, long)` API, which will automatically clear cached files belonging to other apps (as needed) to meet your request. \n\nWhen deciding if the device has enough disk space to hold your new data, call `getAllocatableBytes(UUID)` instead of using `getUsableSpace()`, since the former will consider any cached data that the system is willing to clear on your behalf. \n\nNote that these methods require API level 26. If your app is running on older devices, you will probably need to use both APIs, conditionally switching on `Build.VERSION.SDK_INT`. Lint only looks in the same compilation unit to see if you are already using both APIs, so if it warns even though you are already using the new API, consider moving the calls to the same file or suppressing the warning. \n\nIssue id: UsableSpace"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintUsableSpace",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintLogConditional",
"shortDescription": {
"text": "Unconditional Logging Calls"
},
"fullDescription": {
"text": "Unconditional Logging Calls The 'BuildConfig' class provides a constant, 'DEBUG', which indicates whether the code is being built in release mode or in debug mode. In release mode, you typically want to strip out all the logging calls. Since the compiler will automatically remove all code which is inside a 'if (false)' check, surrounding your logging calls with a check for 'BuildConfig.DEBUG' is a good idea. If you really intend for the logging to be present in release mode, you can suppress this warning with a '@SuppressLint' annotation for the intentional logging calls. Issue id: LogConditional",
"markdown": "Unconditional Logging Calls \n\nThe `BuildConfig` class provides a constant, `DEBUG`, which indicates whether the code is being built in release mode or in debug mode. In release mode, you typically want to strip out all the logging calls. Since the compiler will automatically remove all code which is inside a `if (false)` check, surrounding your logging calls with a check for `BuildConfig.DEBUG` is a good idea. \n\nIf you **really** intend for the logging to be present in release mode, you can suppress this warning with a `@SuppressLint` annotation for the intentional logging calls. \n\nIssue id: LogConditional"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintLogConditional",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintKotlinNullnessAnnotation",
"shortDescription": {
"text": "Kotlin nullability annotation"
},
"fullDescription": {
"text": "Kotlin nullability annotation In Kotlin, nullness is part of the type system; 's: String' is never null and 's: String?' is sometimes null, whether or not you add in additional annotations stating '@NonNull' or '@Nullable'. These are likely copy/paste mistakes, and are misleading. Issue id: KotlinNullnessAnnotation",
"markdown": "Kotlin nullability annotation \n\nIn Kotlin, nullness is part of the type system; `s: String` is **never** null and `s: String?` is sometimes null, whether or not you add in additional annotations stating `@NonNull` or `@Nullable`. These are likely copy/paste mistakes, and are misleading. \n\nIssue id: KotlinNullnessAnnotation"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintKotlinNullnessAnnotation",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NavigationFile",
"shortDescription": {
"text": "Navigation file"
},
"fullDescription": {
"text": "This inspection highlights invalid destinations in the name attributes of the fragment and activity tags of navigation resource files.",
"markdown": "This inspection highlights invalid destinations in the name attributes of the fragment and activity tags of navigation resource files."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "NavigationFile",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android",
"index": 14,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintTranslucentOrientation",
"shortDescription": {
"text": "Mixing screenOrientation and translucency"
},
"fullDescription": {
"text": "Mixing screenOrientation and translucency Specifying a fixed screen orientation with a translucent theme isn't supported on apps with 'targetSdkVersion' O or greater since there can be an another activity visible behind your activity with a conflicting request. For example, your activity requests landscape and the visible activity behind your translucent activity request portrait. In this case the system can only honor one of the requests and currently prefers to honor the request from non-translucent activities since there is nothing visible behind them. Devices running platform version O or greater will throw an exception in your app if this state is detected. Issue id: TranslucentOrientation",
"markdown": "Mixing screenOrientation and translucency \n\nSpecifying a fixed screen orientation with a translucent theme isn't supported on apps with `targetSdkVersion` O or greater since there can be an another activity visible behind your activity with a conflicting request. \n\nFor example, your activity requests landscape and the visible activity behind your translucent activity request portrait. In this case the system can only honor one of the requests and currently prefers to honor the request from non-translucent activities since there is nothing visible behind them. \n\nDevices running platform version O or greater will throw an exception in your app if this state is detected. \n\nIssue id: TranslucentOrientation"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintTranslucentOrientation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUselessLeaf",
"shortDescription": {
"text": "Unnecessary leaf layout"
},
"fullDescription": {
"text": "Unnecessary leaf layout A layout that has no children or no background can often be removed (since it is invisible) for a flatter and more efficient layout hierarchy. Issue id: UselessLeaf",
"markdown": "Unnecessary leaf layout \n\nA layout that has no children or no background can often be removed (since it is invisible) for a flatter and more efficient layout hierarchy. \n\nIssue id: UselessLeaf"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintUselessLeaf",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintNewApi",
"shortDescription": {
"text": "Calling new methods on older versions"
},
"fullDescription": {
"text": "Calling new methods on older versions This check scans through all the Android API calls in the application and warns about any calls that are not available on all versions targeted by this application (according to its minimum SDK attribute in the manifest). If you really want to use this API and don't need to support older devices just set the 'minSdkVersion' in your 'build.gradle' or 'AndroidManifest.xml' files. If your code is deliberately accessing newer APIs, and you have ensured (e.g. with conditional execution) that this code will only ever be called on a supported platform, then you can annotate your class or method with the '@TargetApi' annotation specifying the local minimum SDK to apply, such as '@TargetApi(11)', such that this check considers 11 rather than your manifest file's minimum SDK as the required API level. If you are deliberately setting 'android:' attributes in style definitions, make sure you place this in a 'values-v'NN folder in order to avoid running into runtime conflicts on certain devices where manufacturers have added custom attributes whose ids conflict with the new ones on later platforms. Similarly, you can use tools:targetApi=\"11\" in an XML file to indicate that the element will only be inflated in an adequate context. Issue id: NewApi",
"markdown": "Calling new methods on older versions \n\nThis check scans through all the Android API calls in the application and warns about any calls that are not available on **all** versions targeted by this application (according to its minimum SDK attribute in the manifest). \n\nIf you really want to use this API and don't need to support older devices just set the `minSdkVersion` in your `build.gradle` or `AndroidManifest.xml` files. \n\nIf your code is **deliberately** accessing newer APIs, and you have ensured (e.g. with conditional execution) that this code will only ever be called on a supported platform, then you can annotate your class or method with the `@TargetApi` annotation specifying the local minimum SDK to apply, such as `@TargetApi(11)`, such that this check considers 11 rather than your manifest file's minimum SDK as the required API level. \n\nIf you are deliberately setting `android:` attributes in style definitions, make sure you place this in a `values-v`*NN* folder in order to avoid running into runtime conflicts on certain devices where manufacturers have added custom attributes whose ids conflict with the new ones on later platforms. \n\nSimilarly, you can use tools:targetApi=\"11\" in an XML file to indicate that the element will only be inflated in an adequate context. \n\nIssue id: NewApi"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintNewApi",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintAnnotateVersionCheck",
"shortDescription": {
"text": "Annotate SDK_INT checks"
},
"fullDescription": {
"text": "Annotate SDK_INT checks Methods which perform 'SDK_INT' version checks (or field constants which reflect the result of a version check) in libraries should be annotated with '@ChecksSdkIntAtLeast'. This makes it possible for lint to correctly check calls into the library later to correctly understand that problematic code which is wrapped within a call into this library is safe after all. Issue id: AnnotateVersionCheck",
"markdown": "Annotate SDK_INT checks \n\nMethods which perform `SDK_INT` version checks (or field constants which reflect the result of a version check) in libraries should be annotated with `@ChecksSdkIntAtLeast`. This makes it possible for lint to correctly check calls into the library later to correctly understand that problematic code which is wrapped within a call into this library is safe after all. \n\nIssue id: AnnotateVersionCheck"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintAnnotateVersionCheck",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintQueryAllPackagesPermission",
"shortDescription": {
"text": "Using the QUERY_ALL_PACKAGES permission"
},
"fullDescription": {
"text": "Using the QUERY_ALL_PACKAGES permission If you need to query or interact with other installed apps, you should be using a '<queries>' declaration in your manifest. Using the QUERY_ALL_PACKAGES permission in order to see all installed apps is rarely necessary, and most apps on Google Play are not allowed to have this permission. Issue id: QueryAllPackagesPermission https://g.co/dev/packagevisibility",
"markdown": "Using the QUERY_ALL_PACKAGES permission \n\nIf you need to query or interact with other installed apps, you should be using a `<queries>` declaration in your manifest. Using the QUERY_ALL_PACKAGES permission in order to see all installed apps is rarely necessary, and most apps on Google Play are not allowed to have this permission. \n\nIssue id: QueryAllPackagesPermission \n\n<https://g.co/dev/packagevisibility>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintQueryAllPackagesPermission",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Compliance",
"index": 203,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUnusedAttribute",
"shortDescription": {
"text": "Attribute unused on older versions"
},
"fullDescription": {
"text": "Attribute unused on older versions This check finds attributes set in XML files that were introduced in a version newer than the oldest version targeted by your application (with the 'minSdkVersion' attribute). This is not an error; the application will simply ignore the attribute. However, if the attribute is important to the appearance or functionality of your application, you should consider finding an alternative way to achieve the same result with only available attributes, and then you can optionally create a copy of the layout in a layout-vNN folder which will be used on API NN or higher where you can take advantage of the newer attribute. Note: This check does not only apply to attributes. For example, some tags can be unused too, such as the new '<tag>' element in layouts introduced in API 21. Issue id: UnusedAttribute",
"markdown": "Attribute unused on older versions \n\nThis check finds attributes set in XML files that were introduced in a version newer than the oldest version targeted by your application (with the `minSdkVersion` attribute). \n\nThis is not an error; the application will simply ignore the attribute. However, if the attribute is important to the appearance or functionality of your application, you should consider finding an alternative way to achieve the same result with only available attributes, and then you can optionally create a copy of the layout in a layout-vNN folder which will be used on API NN or higher where you can take advantage of the newer attribute. \n\nNote: This check does not only apply to attributes. For example, some tags can be unused too, such as the new `<tag>` element in layouts introduced in API 21. \n\nIssue id: UnusedAttribute"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintUnusedAttribute",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintSetWorldWritable",
"shortDescription": {
"text": "File.setWritable() used to make file world-writable"
},
"fullDescription": {
"text": "'File.setWritable()' used to make file world-writable Setting files world-writable is very dangerous, and likely to cause security holes in applications. It is strongly discouraged; instead, applications should use more formal mechanisms for interactions such as 'ContentProvider', 'BroadcastReceiver', and 'Service'. Issue id: SetWorldWritable https://goo.gle/SetWorldWritable",
"markdown": "`File.setWritable()` used to make file world-writable \n\nSetting files world-writable is very dangerous, and likely to cause security holes in applications. It is strongly discouraged; instead, applications should use more formal mechanisms for interactions such as `ContentProvider`, `BroadcastReceiver`, and `Service`. \n\nIssue id: SetWorldWritable \n\n<https://goo.gle/SetWorldWritable>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintSetWorldWritable",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintInOrMmUsage",
"shortDescription": {
"text": "Using mm or in dimensions"
},
"fullDescription": {
"text": "Using 'mm' or 'in' dimensions Avoid using 'mm' (millimeters) or 'in' (inches) as the unit for dimensions. While it should work in principle, unfortunately many devices do not report the correct true physical density, which means that the dimension calculations won't work correctly. You are better off using 'dp' (and for font sizes, 'sp'). Issue id: InOrMmUsage",
"markdown": "Using `mm` or `in` dimensions \n\nAvoid using `mm` (millimeters) or `in` (inches) as the unit for dimensions. \n\nWhile it should work in principle, unfortunately many devices do not report the correct true physical density, which means that the dimension calculations won't work correctly. You are better off using `dp` (and for font sizes, `sp`). \n\nIssue id: InOrMmUsage"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintInOrMmUsage",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintRtlCompat",
"shortDescription": {
"text": "Right-to-left text compatibility issues"
},
"fullDescription": {
"text": "Right-to-left text compatibility issues API 17 adds a 'textAlignment' attribute to specify text alignment. However, if you are supporting older versions than API 17, you must also specify a gravity or layout_gravity attribute, since older platforms will ignore the 'textAlignment' attribute. Issue id: RtlCompat",
"markdown": "Right-to-left text compatibility issues \n\nAPI 17 adds a `textAlignment` attribute to specify text alignment. However, if you are supporting older versions than API 17, you must **also** specify a gravity or layout_gravity attribute, since older platforms will ignore the `textAlignment` attribute. \n\nIssue id: RtlCompat"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintRtlCompat",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Internationalization",
"index": 187,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintLifecycleAnnotationProcessorWithJava8",
"shortDescription": {
"text": "Lifecycle Annotation Processor with Java 8 Compile Option"
},
"fullDescription": {
"text": "Lifecycle Annotation Processor with Java 8 Compile Option For faster incremental build, switch to the Lifecycle Java 8 API with these steps: First replace annotationProcessor \"androidx.lifecycle:lifecycle-compiler:*version*\"\nkapt \"androidx.lifecycle:lifecycle-compiler:*version*\"\n with implementation \"androidx.lifecycle:lifecycle-common-java8:*version*\"\n Then remove any 'OnLifecycleEvent' annotations from 'Observer' classes and make them implement the 'DefaultLifecycleObserver' interface. Issue id: LifecycleAnnotationProcessorWithJava8 https://d.android.com/r/studio-ui/lifecycle-release-notes",
"markdown": "Lifecycle Annotation Processor with Java 8 Compile Option \n\nFor faster incremental build, switch to the Lifecycle Java 8 API with these steps: \n\nFirst replace\n\n```\nannotationProcessor \"androidx.lifecycle:lifecycle-compiler:*version*\"\nkapt \"androidx.lifecycle:lifecycle-compiler:*version*\"\n```\n\nwith\n\n```\nimplementation \"androidx.lifecycle:lifecycle-common-java8:*version*\"\n```\n\nThen remove any `OnLifecycleEvent` annotations from `Observer` classes and make them implement the `DefaultLifecycleObserver` interface. \n\nIssue id: LifecycleAnnotationProcessorWithJava8 \n\n<https://d.android.com/r/studio-ui/lifecycle-release-notes>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintLifecycleAnnotationProcessorWithJava8",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintOnClick",
"shortDescription": {
"text": "onClick method does not exist"
},
"fullDescription": {
"text": "'onClick' method does not exist The 'onClick' attribute value should be the name of a method in this View's context to invoke when the view is clicked. This name must correspond to a public method that takes exactly one parameter of type 'View'. Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. Issue id: OnClick",
"markdown": "`onClick` method does not exist \n\nThe `onClick` attribute value should be the name of a method in this View's context to invoke when the view is clicked. This name must correspond to a public method that takes exactly one parameter of type `View`. \n\nMust be a string value, using '\\\\;' to escape characters such as '\\\\n' or '\\\\uxxxx' for a unicode character. \n\nIssue id: OnClick"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintOnClick",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintWrongThread",
"shortDescription": {
"text": "Wrong Thread"
},
"fullDescription": {
"text": "Wrong Thread Ensures that a method which expects to be called on a specific thread, is actually called from that thread. For example, calls on methods in widgets should always be made on the UI thread. Issue id: WrongThread https://developer.android.com/guide/components/processes-and-threads.html#Threads",
"markdown": "Wrong Thread \n\nEnsures that a method which expects to be called on a specific thread, is actually called from that thread. For example, calls on methods in widgets should always be made on the UI thread. \n\nIssue id: WrongThread \n\n<https://developer.android.com/guide/components/processes-and-threads.html#Threads>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintWrongThread",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintNfcTechWhitespace",
"shortDescription": {
"text": "Whitespace in NFC tech lists"
},
"fullDescription": {
"text": "Whitespace in NFC tech lists In a '<tech-list>', there can be whitespace around the '<tech>' elements,but not inside them. This is because the code which reads in the tech list is currently very strict and will include the whitespace as part of the name. In other words, use '<tech>name</tech>', not '<tech> name </tech>'. Issue id: NfcTechWhitespace https://issuetracker.google.com/36988969",
"markdown": "Whitespace in NFC tech lists \n\nIn a `<tech-list>`, there can be whitespace around the `<tech>` elements,but not inside them. This is because the code which reads in the tech list is currently very strict and will include the whitespace as part of the name. \n\nIn other words, use `<tech>name</tech>`, not `<tech> name </tech>`. \n\nIssue id: NfcTechWhitespace \n\n<https://issuetracker.google.com/36988969>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintNfcTechWhitespace",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintInvalidResourceFolder",
"shortDescription": {
"text": "Invalid Resource Folder"
},
"fullDescription": {
"text": "Invalid Resource Folder This lint check looks for a folder name that is not a valid resource folder name; these will be ignored and not packaged by the Android Gradle build plugin. Note that the order of resources is very important; for example, you can't specify a language before a network code. Similarly, note that to use 3 letter region codes, you have to use a special BCP 47 syntax: the prefix b+ followed by the BCP 47 language tag but with '+' as the individual separators instead of '-'. Therefore, for the BCP 47 language tag 'nl-ABW' you have to use 'b+nl+ABW'. Issue id: InvalidResourceFolder https://developer.android.com/guide/topics/resources/providing-resources.html https://tools.ietf.org/html/bcp47",
"markdown": "Invalid Resource Folder \n\nThis lint check looks for a folder name that is not a valid resource folder name; these will be ignored and not packaged by the Android Gradle build plugin. \n\nNote that the order of resources is very important; for example, you can't specify a language before a network code. \n\nSimilarly, note that to use 3 letter region codes, you have to use a special BCP 47 syntax: the prefix b+ followed by the BCP 47 language tag but with `+` as the individual separators instead of `-`. Therefore, for the BCP 47 language tag `nl-ABW` you have to use `b+nl+ABW`. \n\nIssue id: InvalidResourceFolder \n\n<https://developer.android.com/guide/topics/resources/providing-resources.html> \n<https://tools.ietf.org/html/bcp47>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintInvalidResourceFolder",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintCommitPrefEdits",
"shortDescription": {
"text": "Missing commit() on SharedPreference editor"
},
"fullDescription": {
"text": "Missing 'commit()' on 'SharedPreference' editor After calling 'edit()' on a 'SharedPreference', you must call 'commit()' or 'apply()' on the editor to save the results. Issue id: CommitPrefEdits",
"markdown": "Missing `commit()` on `SharedPreference` editor \n\nAfter calling `edit()` on a `SharedPreference`, you must call `commit()` or `apply()` on the editor to save the results. \n\nIssue id: CommitPrefEdits"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintCommitPrefEdits",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintProxyPassword",
"shortDescription": {
"text": "Proxy Password in Cleartext"
},
"fullDescription": {
"text": "Proxy Password in Cleartext Storing proxy server passwords in clear text is dangerous if this file is shared via version control. If this is deliberate or this is a truly private project, suppress this warning. Issue id: ProxyPassword",
"markdown": "Proxy Password in Cleartext \n\nStoring proxy server passwords in clear text is dangerous if this file is shared via version control. If this is deliberate or this is a truly private project, suppress this warning. \n\nIssue id: ProxyPassword"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintProxyPassword",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintButtonOrder",
"shortDescription": {
"text": "Button order"
},
"fullDescription": {
"text": "Button order According to the Android Design Guide, \"Action buttons are typically Cancel and/or OK, with OK indicating the preferred or most likely action. However, if the options consist of specific actions such as Close or Wait rather than a confirmation or cancellation of the action described in the content, then all the buttons should be active verbs. As a rule, the dismissive action of a dialog is always on the left whereas the affirmative actions are on the right.\" This check looks for button bars and buttons which look like cancel buttons, and makes sure that these are on the left. Issue id: ButtonOrder https://material.io/components/dialogs/",
"markdown": "Button order \n\nAccording to the Android Design Guide, \n\n\"Action buttons are typically Cancel and/or OK, with OK indicating the preferred or most likely action. However, if the options consist of specific actions such as Close or Wait rather than a confirmation or cancellation of the action described in the content, then all the buttons should be active verbs. As a rule, the dismissive action of a dialog is always on the left whereas the affirmative actions are on the right.\" \n\nThis check looks for button bars and buttons which look like cancel buttons, and makes sure that these are on the left. \n\nIssue id: ButtonOrder \n\n<https://material.io/components/dialogs/>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintButtonOrder",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintIconXmlAndPng",
"shortDescription": {
"text": "Icon is specified both as .xml file and as a bitmap"
},
"fullDescription": {
"text": "Icon is specified both as '.xml' file and as a bitmap If a drawable resource appears as an '.xml' file in the 'drawable/' folder, it's usually not intentional for it to also appear as a bitmap using the same name; generally you expect the drawable XML file to define states and each state has a corresponding drawable bitmap. Issue id: IconXmlAndPng",
"markdown": "Icon is specified both as `.xml` file and as a bitmap \n\nIf a drawable resource appears as an `.xml` file in the `drawable/` folder, it's usually not intentional for it to also appear as a bitmap using the same name; generally you expect the drawable XML file to define states and each state has a corresponding drawable bitmap. \n\nIssue id: IconXmlAndPng"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintIconXmlAndPng",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintAlwaysShowAction",
"shortDescription": {
"text": "Usage of showAsAction=always"
},
"fullDescription": {
"text": "Usage of 'showAsAction=always' Using 'showAsAction=\"always\"' in menu XML, or 'MenuItem.SHOW_AS_ACTION_ALWAYS' in Java code is usually a deviation from the user interface style guide.Use 'ifRoom' or the corresponding 'MenuItem.SHOW_AS_ACTION_IF_ROOM' instead. If 'always' is used sparingly there are usually no problems and behavior is roughly equivalent to 'ifRoom' but with preference over other 'ifRoom' items. Using it more than twice in the same menu is a bad idea. This check looks for menu XML files that contain more than two 'always' actions, or some 'always' actions and no 'ifRoom' actions. In Java code, it looks for projects that contain references to 'MenuItem.SHOW_AS_ACTION_ALWAYS' and no references to 'MenuItem.SHOW_AS_ACTION_IF_ROOM'. Issue id: AlwaysShowAction",
"markdown": "Usage of `showAsAction=always` \n\nUsing `showAsAction=\"always\"` in menu XML, or `MenuItem.SHOW_AS_ACTION_ALWAYS` in Java code is usually a deviation from the user interface style guide.Use `ifRoom` or the corresponding `MenuItem.SHOW_AS_ACTION_IF_ROOM` instead. \n\nIf `always` is used sparingly there are usually no problems and behavior is roughly equivalent to `ifRoom` but with preference over other `ifRoom` items. Using it more than twice in the same menu is a bad idea. \n\nThis check looks for menu XML files that contain more than two `always` actions, or some `always` actions and no `ifRoom` actions. In Java code, it looks for projects that contain references to `MenuItem.SHOW_AS_ACTION_ALWAYS` and no references to `MenuItem.SHOW_AS_ACTION_IF_ROOM`. \n\nIssue id: AlwaysShowAction"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintAlwaysShowAction",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUnsafeNativeCodeLocation",
"shortDescription": {
"text": "Native code outside library directory"
},
"fullDescription": {
"text": "Native code outside library directory In general, application native code should only be placed in the application's library directory, not in other locations such as the res or assets directories. Placing the code in the library directory provides increased assurance that the code will not be tampered with after application installation. Application developers should use the features of their development environment to place application native libraries into the lib directory of their compiled APKs. Embedding non-shared library native executables into applications should be avoided when possible. Issue id: UnsafeNativeCodeLocation",
"markdown": "Native code outside library directory \n\nIn general, application native code should only be placed in the application's library directory, not in other locations such as the res or assets directories. Placing the code in the library directory provides increased assurance that the code will not be tampered with after application installation. Application developers should use the features of their development environment to place application native libraries into the lib directory of their compiled APKs. Embedding non-shared library native executables into applications should be avoided when possible. \n\nIssue id: UnsafeNativeCodeLocation"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintUnsafeNativeCodeLocation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintObsoleteSdkInt",
"shortDescription": {
"text": "Obsolete SDK_INT Version Check"
},
"fullDescription": {
"text": "Obsolete SDK_INT Version Check This check flags version checks that are not necessary, because the 'minSdkVersion' (or surrounding known API level) is already at least as high as the version checked for. Similarly, it also looks for resources in '-vNN' folders, such as 'values-v14' where the version qualifier is less than or equal to the 'minSdkVersion', where the contents should be merged into the best folder. Issue id: ObsoleteSdkInt",
"markdown": "Obsolete SDK_INT Version Check \n\nThis check flags version checks that are not necessary, because the `minSdkVersion` (or surrounding known API level) is already at least as high as the version checked for. \n\nSimilarly, it also looks for resources in `-vNN` folders, such as `values-v14` where the version qualifier is less than or equal to the `minSdkVersion`, where the contents should be merged into the best folder. \n\nIssue id: ObsoleteSdkInt"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintObsoleteSdkInt",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMotionLayoutInvalidSceneFileReference",
"shortDescription": {
"text": "layoutDescription must specify a scene file"
},
"fullDescription": {
"text": "layoutDescription must specify a scene file A motion scene file specifies the animations used in a 'MotionLayout'. The 'layoutDescription' is required to specify a valid motion scene file. Issue id: MotionLayoutInvalidSceneFileReference",
"markdown": "layoutDescription must specify a scene file \n\nA motion scene file specifies the animations used in a `MotionLayout`. The `layoutDescription` is required to specify a valid motion scene file. \n\nIssue id: MotionLayoutInvalidSceneFileReference"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintMotionLayoutInvalidSceneFileReference",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintDrawAllocation",
"shortDescription": {
"text": "Memory allocations within drawing code"
},
"fullDescription": {
"text": "Memory allocations within drawing code You should avoid allocating objects during a drawing or layout operation. These are called frequently, so a smooth UI can be interrupted by garbage collection pauses caused by the object allocations. The way this is generally handled is to allocate the needed objects up front and to reuse them for each drawing operation. Some methods allocate memory on your behalf (such as 'Bitmap.create'), and these should be handled in the same way. Issue id: DrawAllocation",
"markdown": "Memory allocations within drawing code \n\nYou should avoid allocating objects during a drawing or layout operation. These are called frequently, so a smooth UI can be interrupted by garbage collection pauses caused by the object allocations. \n\nThe way this is generally handled is to allocate the needed objects up front and to reuse them for each drawing operation. \n\nSome methods allocate memory on your behalf (such as `Bitmap.create`), and these should be handled in the same way. \n\nIssue id: DrawAllocation"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintDrawAllocation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintPropertyEscape",
"shortDescription": {
"text": "Incorrect property escapes"
},
"fullDescription": {
"text": "Incorrect property escapes All backslashes and colons in .property files must be escaped with a backslash (). This means that when writing a Windows path, you must escape the file separators, so the path MyFiles should be written as 'key=\\\\My\\\\Files.' Issue id: PropertyEscape",
"markdown": "Incorrect property escapes \n\nAll backslashes and colons in .property files must be escaped with a backslash (). This means that when writing a Windows path, you must escape the file separators, so the path MyFiles should be written as `key=\\\\My\\\\Files.` \n\nIssue id: PropertyEscape"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintPropertyEscape",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintIconMissingDensityFolder",
"shortDescription": {
"text": "Missing density folder"
},
"fullDescription": {
"text": "Missing density folder Icons will look best if a custom version is provided for each of the major screen density classes (low, medium, high, extra-high, extra-extra-high). This lint check identifies folders which are missing, such as 'drawable-hdpi'. Low density is not really used much anymore, so this check ignores the ldpi density. To force lint to include it, set the environment variable 'ANDROID_LINT_INCLUDE_LDPI=true'. For more information on current density usage, see https://developer.android.com/about/dashboards Issue id: IconMissingDensityFolder https://developer.android.com/guide/practices/screens_support.html",
"markdown": "Missing density folder \n\nIcons will look best if a custom version is provided for each of the major screen density classes (low, medium, high, extra-high, extra-extra-high). This lint check identifies folders which are missing, such as `drawable-hdpi`. \n\nLow density is not really used much anymore, so this check ignores the ldpi density. To force lint to include it, set the environment variable `ANDROID_LINT_INCLUDE_LDPI=true`. For more information on current density usage, see <https://developer.android.com/about/dashboards> \n\nIssue id: IconMissingDensityFolder \n\n<https://developer.android.com/guide/practices/screens_support.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintIconMissingDensityFolder",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintPlaySdkIndexNonCompliant",
"shortDescription": {
"text": "Library has policy issues in SDK Index"
},
"fullDescription": {
"text": "Library has policy issues in SDK Index This library version has policy issues that will block publishing in the Google Play Store. Issue id: PlaySdkIndexNonCompliant https://play.google.com/sdks",
"markdown": "Library has policy issues in SDK Index \n\nThis library version has policy issues that will block publishing in the Google Play Store. \n\nIssue id: PlaySdkIndexNonCompliant \n\n<https://play.google.com/sdks>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintPlaySdkIndexNonCompliant",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Compliance",
"index": 203,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintIconMixedNinePatch",
"shortDescription": {
"text": "Clashing PNG and 9-PNG files"
},
"fullDescription": {
"text": "Clashing PNG and 9-PNG files If you accidentally name two separate resources 'file.png' and 'file.9.png', the image file and the nine patch file will both map to the same drawable resource, '@drawable/file', which is probably not what was intended. Issue id: IconMixedNinePatch",
"markdown": "Clashing PNG and 9-PNG files \n\nIf you accidentally name two separate resources `file.png` and `file.9.png`, the image file and the nine patch file will both map to the same drawable resource, `@drawable/file`, which is probably not what was intended. \n\nIssue id: IconMixedNinePatch"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintIconMixedNinePatch",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintStringFormatInvalid",
"shortDescription": {
"text": "Invalid format string"
},
"fullDescription": {
"text": "Invalid format string If a string contains a '%' character, then the string may be a formatting string which will be passed to 'String.format' from Java code to replace each '%' occurrence with specific values. This lint warning checks for two related problems: (1) Formatting strings that are invalid, meaning that 'String.format' will throw exceptions at runtime when attempting to use the format string. (2) Strings containing '%' that are not formatting strings getting passed to a 'String.format' call. In this case the '%' will need to be escaped as '%%'. NOTE: Not all Strings which look like formatting strings are intended for use by 'String.format'; for example, they may contain date formats intended for 'android.text.format.Time#format()'. Lint cannot always figure out that a String is a date format, so you may get false warnings in those scenarios. See the suppress help topic for information on how to suppress errors in that case. Issue id: StringFormatInvalid",
"markdown": "Invalid format string \n\nIf a string contains a '%' character, then the string may be a formatting string which will be passed to `String.format` from Java code to replace each '%' occurrence with specific values. \n\nThis lint warning checks for two related problems: \n(1) Formatting strings that are invalid, meaning that `String.format` will throw exceptions at runtime when attempting to use the format string. \n(2) Strings containing '%' that are not formatting strings getting passed to a `String.format` call. In this case the '%' will need to be escaped as '%%'. \n\nNOTE: Not all Strings which look like formatting strings are intended for use by `String.format`; for example, they may contain date formats intended for `android.text.format.Time#format()`. Lint cannot always figure out that a String is a date format, so you may get false warnings in those scenarios. See the suppress help topic for information on how to suppress errors in that case. \n\nIssue id: StringFormatInvalid"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintStringFormatInvalid",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintVectorRaster",
"shortDescription": {
"text": "Vector Image Generation"
},
"fullDescription": {
"text": "Vector Image Generation Vector icons require API 21 or API 24 depending on used features, but when 'minSdkVersion' is less than 21 or 24 and Android Gradle plugin 1.4 or higher is used, a vector drawable placed in the 'drawable' folder is automatically moved to 'drawable-anydpi-v21' or 'drawable-anydpi-v24' and bitmap images are generated for different screen resolutions for backwards compatibility. However, there are some limitations to this raster image generation, and this lint check flags elements and attributes that are not fully supported. You should manually check whether the generated output is acceptable for those older devices. Issue id: VectorRaster",
"markdown": "Vector Image Generation \n\nVector icons require API 21 or API 24 depending on used features, but when `minSdkVersion` is less than 21 or 24 and Android Gradle plugin 1.4 or higher is used, a vector drawable placed in the `drawable` folder is automatically moved to `drawable-anydpi-v21` or `drawable-anydpi-v24` and bitmap images are generated for different screen resolutions for backwards compatibility. \n\nHowever, there are some limitations to this raster image generation, and this lint check flags elements and attributes that are not fully supported. You should manually check whether the generated output is acceptable for those older devices. \n\nIssue id: VectorRaster"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintVectorRaster",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintCoarseFineLocation",
"shortDescription": {
"text": "Cannot use ACCESS_FINE_LOCATION without ACCESS_COARSE_LOCATION"
},
"fullDescription": {
"text": "Cannot use 'ACCESS_FINE_LOCATION' without 'ACCESS_COARSE_LOCATION' If your app requires access to FINE location, on Android 12 and higher you must now request both FINE and COARSE. Users will have the option to grant only COARSE location. Ensure your app can work with just COARSE location. Issue id: CoarseFineLocation",
"markdown": "Cannot use `ACCESS_FINE_LOCATION` without `ACCESS_COARSE_LOCATION` \n\nIf your app requires access to FINE location, on Android 12 and higher you must now request both FINE and COARSE. Users will have the option to grant only COARSE location. Ensure your app can work with just COARSE location. \n\nIssue id: CoarseFineLocation"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintCoarseFineLocation",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintLeanbackUsesWifi",
"shortDescription": {
"text": "Using android.hardware.wifi on TV"
},
"fullDescription": {
"text": "Using android.hardware.wifi on TV WiFi is not required for Android TV and many devices connect to the internet via alternative methods e.g. Ethernet. If your app is not focused specifically on WiFi functionality and only wishes to connect to the internet, please modify your Manifest to contain: '<uses-feature android:name=\"android.hardware.wifi\" android:required=\"false\" />' Un-metered or non-roaming connections can be detected in software using 'NetworkCapabilities#NET_CAPABILITY_NOT_METERED' and 'NetworkCapabilities#NET_CAPABILITY_NOT_ROAMING.' Issue id: LeanbackUsesWifi",
"markdown": "Using android.hardware.wifi on TV \n\nWiFi is not required for Android TV and many devices connect to the internet via alternative methods e.g. Ethernet. \n\nIf your app is not focused specifically on WiFi functionality and only wishes to connect to the internet, please modify your Manifest to contain: `<uses-feature android:name=\"android.hardware.wifi\" android:required=\"false\" />` \n\nUn-metered or non-roaming connections can be detected in software using `NetworkCapabilities#NET_CAPABILITY_NOT_METERED` and `NetworkCapabilities#NET_CAPABILITY_NOT_ROAMING.` \n\nIssue id: LeanbackUsesWifi"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintLeanbackUsesWifi",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintAppCompatMethod",
"shortDescription": {
"text": "Using Wrong AppCompat Method"
},
"fullDescription": {
"text": "Using Wrong AppCompat Method When using the appcompat library, there are some methods you should be calling instead of the normal ones; for example, 'getSupportActionBar()' instead of 'getActionBar()'. This lint check looks for calls to the wrong method. Issue id: AppCompatMethod https://developer.android.com/topic/libraries/support-library/",
"markdown": "Using Wrong AppCompat Method \n\nWhen using the appcompat library, there are some methods you should be calling instead of the normal ones; for example, `getSupportActionBar()` instead of `getActionBar()`. This lint check looks for calls to the wrong method. \n\nIssue id: AppCompatMethod \n\n<https://developer.android.com/topic/libraries/support-library/>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintAppCompatMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintIconNoDpi",
"shortDescription": {
"text": "Icon appears in both -nodpi and dpi folders"
},
"fullDescription": {
"text": "Icon appears in both '-nodpi' and dpi folders Bitmaps that appear in 'drawable-nodpi' folders will not be scaled by the Android framework. If a drawable resource of the same name appears both in a '-nodpi' folder as well as a dpi folder such as 'drawable-hdpi', then the behavior is ambiguous and probably not intentional. Delete one or the other, or use different names for the icons. Issue id: IconNoDpi",
"markdown": "Icon appears in both `-nodpi` and dpi folders \n\nBitmaps that appear in `drawable-nodpi` folders will not be scaled by the Android framework. If a drawable resource of the same name appears **both** in a `-nodpi` folder as well as a dpi folder such as `drawable-hdpi`, then the behavior is ambiguous and probably not intentional. Delete one or the other, or use different names for the icons. \n\nIssue id: IconNoDpi"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintIconNoDpi",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintInstantiatable",
"shortDescription": {
"text": "Registered class is not instantiatable"
},
"fullDescription": {
"text": "Registered class is not instantiatable Activities, services, broadcast receivers etc. registered in the manifest file (or for custom views, in a layout file) must be \"instantiatable\" by the system, which means that the class must be public, it must have an empty public constructor, and if it's an inner class, it must be a static inner class. Issue id: Instantiatable",
"markdown": "Registered class is not instantiatable \n\nActivities, services, broadcast receivers etc. registered in the manifest file (or for custom views, in a layout file) must be \"instantiatable\" by the system, which means that the class must be public, it must have an empty public constructor, and if it's an inner class, it must be a static inner class. \n\nIssue id: Instantiatable"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintInstantiatable",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintStaticFieldLeak",
"shortDescription": {
"text": "Static Field Leaks"
},
"fullDescription": {
"text": "Static Field Leaks A static field will leak contexts. Non-static inner classes have an implicit reference to their outer class. If that outer class is for example a 'Fragment' or 'Activity', then this reference means that the long-running handler/loader/task will hold a reference to the activity which prevents it from getting garbage collected. Similarly, direct field references to activities and fragments from these longer running instances can cause leaks. ViewModel classes should never point to Views or non-application Contexts. Issue id: StaticFieldLeak",
"markdown": "Static Field Leaks \n\nA static field will leak contexts. \n\nNon-static inner classes have an implicit reference to their outer class. If that outer class is for example a `Fragment` or `Activity`, then this reference means that the long-running handler/loader/task will hold a reference to the activity which prevents it from getting garbage collected. \n\nSimilarly, direct field references to activities and fragments from these longer running instances can cause leaks. \n\nViewModel classes should never point to Views or non-application Contexts. \n\nIssue id: StaticFieldLeak"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintStaticFieldLeak",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintImplicitSamInstance",
"shortDescription": {
"text": "Implicit SAM Instances"
},
"fullDescription": {
"text": "Implicit SAM Instances Kotlin's support for SAM (single accessor method) interfaces lets you pass a lambda to the interface. This will create a new instance on the fly even though there is no explicit constructor call. If you pass one of these lambdas or method references into a method which (for example) stores or compares the object identity, unexpected results may happen. Issue id: ImplicitSamInstance",
"markdown": "Implicit SAM Instances \n\nKotlin's support for SAM (single accessor method) interfaces lets you pass a lambda to the interface. This will create a new instance on the fly even though there is no explicit constructor call. If you pass one of these lambdas or method references into a method which (for example) stores or compares the object identity, unexpected results may happen. \n\nIssue id: ImplicitSamInstance"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintImplicitSamInstance",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintOverrideAbstract",
"shortDescription": {
"text": "Not overriding abstract methods on older platforms"
},
"fullDescription": {
"text": "Not overriding abstract methods on older platforms To improve the usability of some APIs, some methods that used to be 'abstract' have been made concrete by adding default implementations. This means that when compiling with new versions of the SDK, your code does not have to override these methods. However, if your code is also targeting older versions of the platform where these methods were still 'abstract', the code will crash. You must override all methods that used to be abstract in any versions targeted by your application's 'minSdkVersion'. Issue id: OverrideAbstract",
"markdown": "Not overriding abstract methods on older platforms \n\nTo improve the usability of some APIs, some methods that used to be `abstract` have been made concrete by adding default implementations. This means that when compiling with new versions of the SDK, your code does not have to override these methods. \n\nHowever, if your code is also targeting older versions of the platform where these methods were still `abstract`, the code will crash. You must override all methods that used to be abstract in any versions targeted by your application's `minSdkVersion`. \n\nIssue id: OverrideAbstract"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintOverrideAbstract",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintAppLinkUrlError",
"shortDescription": {
"text": "URL not supported by app for Firebase App Indexing"
},
"fullDescription": {
"text": "URL not supported by app for Firebase App Indexing Ensure the URL is supported by your app, to get installs and traffic to your app from Google Search. Issue id: AppLinkUrlError https://g.co/AppIndexing/AndroidStudio",
"markdown": "URL not supported by app for Firebase App Indexing \n\nEnsure the URL is supported by your app, to get installs and traffic to your app from Google Search. \n\nIssue id: AppLinkUrlError \n\n<https://g.co/AppIndexing/AndroidStudio>"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintAppLinkUrlError",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Usability",
"index": 84,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintWakelockTimeout",
"shortDescription": {
"text": "Using wakeLock without timeout"
},
"fullDescription": {
"text": "Using wakeLock without timeout Wakelocks have two acquire methods: one with a timeout, and one without. You should generally always use the one with a timeout. A typical timeout is 10 minutes. If the task takes longer than it is critical that it happens (i.e. can't use 'JobScheduler') then maybe they should consider a foreground service instead (which is a stronger run guarantee and lets the user know something long/important is happening). Issue id: WakelockTimeout",
"markdown": "Using wakeLock without timeout \n\nWakelocks have two acquire methods: one with a timeout, and one without. You should generally always use the one with a timeout. A typical timeout is 10 minutes. If the task takes longer than it is critical that it happens (i.e. can't use `JobScheduler`) then maybe they should consider a foreground service instead (which is a stronger run guarantee and lets the user know something long/important is happening). \n\nIssue id: WakelockTimeout"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintWakelockTimeout",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintUnsafeProtectedBroadcastReceiver",
"shortDescription": {
"text": "Unsafe Protected BroadcastReceiver"
},
"fullDescription": {
"text": "Unsafe Protected 'BroadcastReceiver' `BroadcastReceiver`s that declare an intent-filter for a protected-broadcast action string must check that the received intent's action string matches the expected value, otherwise it is possible for malicious actors to spoof intents. Issue id: UnsafeProtectedBroadcastReceiver https://goo.gle/UnsafeProtectedBroadcastReceiver",
"markdown": "Unsafe Protected `BroadcastReceiver` \n\n\\`BroadcastReceiver\\`s that declare an intent-filter for a protected-broadcast action string must check that the received intent's action string matches the expected value, otherwise it is possible for malicious actors to spoof intents. \n\nIssue id: UnsafeProtectedBroadcastReceiver \n\n<https://goo.gle/UnsafeProtectedBroadcastReceiver>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintUnsafeProtectedBroadcastReceiver",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Security",
"index": 65,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintResourceCycle",
"shortDescription": {
"text": "Cycle in resource definitions"
},
"fullDescription": {
"text": "Cycle in resource definitions There should be no cycles in resource definitions as this can lead to runtime exceptions. Issue id: ResourceCycle",
"markdown": "Cycle in resource definitions \n\nThere should be no cycles in resource definitions as this can lead to runtime exceptions. \n\nIssue id: ResourceCycle"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintResourceCycle",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ShrinkerArrayType",
"shortDescription": {
"text": "Invalid using of array type"
},
"fullDescription": {
"text": "Reports incorrect usage of array type notation. 'type[]' should be used for array type, without any spaces. Example: 'java.lang.Object[]'.",
"markdown": "Reports incorrect usage of array type notation.\n\n\n`type[]` should be used for array type, without any spaces.\n\n\n<br />\n\n\nExample: `java.lang.Object[]`."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "ShrinkerArrayType",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Shrinker",
"index": 127,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintTextViewEdits",
"shortDescription": {
"text": "TextView should probably be an EditText instead"
},
"fullDescription": {
"text": "TextView should probably be an EditText instead Using a '<TextView>' to input text is generally an error, you should be using '<EditText>' instead. 'EditText' is a subclass of 'TextView', and some of the editing support is provided by 'TextView', so it's possible to set some input-related properties on a 'TextView'. However, using a 'TextView' along with input attributes is usually a cut & paste error. To input text you should be using '<EditText>'. This check also checks subclasses of 'TextView', such as 'Button' and 'CheckBox', since these have the same issue: they should not be used with editable attributes. Issue id: TextViewEdits",
"markdown": "TextView should probably be an EditText instead \n\nUsing a `<TextView>` to input text is generally an error, you should be using `<EditText>` instead. `EditText` is a subclass of `TextView`, and some of the editing support is provided by `TextView`, so it's possible to set some input-related properties on a `TextView`. However, using a `TextView` along with input attributes is usually a cut \\& paste error. To input text you should be using `<EditText>`. \n\nThis check also checks subclasses of `TextView`, such as `Button` and `CheckBox`, since these have the same issue: they should not be used with editable attributes. \n\nIssue id: TextViewEdits"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintTextViewEdits",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintLocalSuppress",
"shortDescription": {
"text": "@SuppressLint on invalid element"
},
"fullDescription": {
"text": "@SuppressLint on invalid element The '@SuppressAnnotation' is used to suppress Lint warnings in Java files. However, while many lint checks analyzes the Java source code, where they can find annotations on (for example) local variables, some checks are analyzing the '.class' files. And in class files, annotations only appear on classes, fields and methods. Annotations placed on local variables disappear. If you attempt to suppress a lint error for a class-file based lint check, the suppress annotation not work. You must move the annotation out to the surrounding method. Issue id: LocalSuppress",
"markdown": "@SuppressLint on invalid element \n\nThe `@SuppressAnnotation` is used to suppress Lint warnings in Java files. However, while many lint checks analyzes the Java source code, where they can find annotations on (for example) local variables, some checks are analyzing the `.class` files. And in class files, annotations only appear on classes, fields and methods. Annotations placed on local variables disappear. If you attempt to suppress a lint error for a class-file based lint check, the suppress annotation not work. You must move the annotation out to the surrounding method. \n\nIssue id: LocalSuppress"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintLocalSuppress",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintOutdatedLibrary",
"shortDescription": {
"text": "Outdated Library"
},
"fullDescription": {
"text": "Outdated Library Your app is using an outdated version of a library. This may cause violations of Google Play policies (see https://play.google.com/about/monetization-ads/ads/) and/or may affect your apps visibility on the Play Store. Please try updating your app with an updated version of this library, or remove it from your app. Issue id: OutdatedLibrary https://play.google.com/sdks",
"markdown": "Outdated Library \n\nYour app is using an outdated version of a library. This may cause violations of Google Play policies (see <https://play.google.com/about/monetization-ads/ads/>) and/or may affect your app's visibility on the Play Store. \n\nPlease try updating your app with an updated version of this library, or remove it from your app. \n\nIssue id: OutdatedLibrary \n\n<https://play.google.com/sdks>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintOutdatedLibrary",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Compliance",
"index": 203,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintQueryPermissionsNeeded",
"shortDescription": {
"text": "Using APIs affected by query permissions"
},
"fullDescription": {
"text": "Using APIs affected by query permissions Apps that target Android 11 cannot query or interact with other installed apps by default. If you need to query or interact with other installed apps, you may need to add a '<queries>' declaration in your manifest. As a corollary, the methods 'PackageManager#getInstalledPackages' and 'PackageManager#getInstalledApplications' will no longer return information about all installed apps. To query specific apps or types of apps, you can use methods like 'PackageManager#getPackageInfo' or 'PackageManager#queryIntentActivities'. Issue id: QueryPermissionsNeeded https://g.co/dev/packagevisibility",
"markdown": "Using APIs affected by query permissions \n\nApps that target Android 11 cannot query or interact with other installed apps by default. If you need to query or interact with other installed apps, you may need to add a `<queries>` declaration in your manifest. \n\nAs a corollary, the methods `PackageManager#getInstalledPackages` and `PackageManager#getInstalledApplications` will no longer return information about all installed apps. To query specific apps or types of apps, you can use methods like `PackageManager#getPackageInfo` or `PackageManager#queryIntentActivities`. \n\nIssue id: QueryPermissionsNeeded \n\n<https://g.co/dev/packagevisibility>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintQueryPermissionsNeeded",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintNotificationTrampoline",
"shortDescription": {
"text": "Notification Trampolines"
},
"fullDescription": {
"text": "Notification Trampolines Activities should not be launched indirectly from a notification via an intermediate 'BroadcastReceiver' or 'Service'. This can lead to significant lags in some scenarios, and is forbidden if 'targetSdkVersion' is set to the API level for Android 12 or higher. To fix this, launch the 'Activity' directly from the notification. Issue id: NotificationTrampoline",
"markdown": "Notification Trampolines \n\nActivities should not be launched indirectly from a notification via an intermediate `BroadcastReceiver` or `Service`. This can lead to significant lags in some scenarios, and is forbidden if `targetSdkVersion` is set to the API level for Android 12 or higher. \n\nTo fix this, launch the `Activity` directly from the notification. \n\nIssue id: NotificationTrampoline"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintNotificationTrampoline",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintCustomSplashScreen",
"shortDescription": {
"text": "Application-defined Launch Screen"
},
"fullDescription": {
"text": "Application-defined Launch Screen Starting in Android 12 (API 31+), the application's Launch Screen is provided by the system and the application should not create its own, otherwise the user will see two splashscreens. Please check the 'SplashScreen' class to check how the Splash Screen can be controlled and customized. Issue id: CustomSplashScreen https://developer.android.com/guide/topics/ui/splash-screen",
"markdown": "Application-defined Launch Screen \n\nStarting in Android 12 (API 31+), the application's Launch Screen is provided by the system and the application should not create its own, otherwise the user will see two splashscreens. Please check the `SplashScreen` class to check how the Splash Screen can be controlled and customized. \n\nIssue id: CustomSplashScreen \n\n<https://developer.android.com/guide/topics/ui/splash-screen>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintCustomSplashScreen",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TypeParameterFindViewById",
"shortDescription": {
"text": "Cast can be converted to findViewById with type parameter"
},
"fullDescription": {
"text": "Reports 'findViewById' calls with type casts that can be converted to 'findViewById' with a type parameter from Android 8.0 (API level 26).",
"markdown": "Reports `findViewById` calls with type casts that can be converted to `findViewById` with a type parameter from Android 8.0 (API level 26)."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "TypeParameterFindViewById",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Kotlin Android",
"index": 253,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintStopShip",
"shortDescription": {
"text": "Code contains STOPSHIP marker"
},
"fullDescription": {
"text": "Code contains 'STOPSHIP' marker Using the comment '// STOPSHIP' can be used to flag code that is incomplete but checked in. This comment marker can be used to indicate that the code should not be shipped until the issue is addressed, and lint will look for these. In Gradle projects, this is only checked for non-debug (release) builds. In Kotlin, the 'TODO()' method is also treated as a stop ship marker; you can use it to make incomplete code compile, but it will throw an exception at runtime and therefore should be fixed before shipping releases. Issue id: StopShip",
"markdown": "Code contains `STOPSHIP` marker \n\nUsing the comment `// STOPSHIP` can be used to flag code that is incomplete but checked in. This comment marker can be used to indicate that the code should not be shipped until the issue is addressed, and lint will look for these. In Gradle projects, this is only checked for non-debug (release) builds. \n\nIn Kotlin, the `TODO()` method is also treated as a stop ship marker; you can use it to make incomplete code compile, but it will throw an exception at runtime and therefore should be fixed before shipping releases. \n\nIssue id: StopShip"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintStopShip",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintSdCardPath",
"shortDescription": {
"text": "Hardcoded reference to /sdcard"
},
"fullDescription": {
"text": "Hardcoded reference to '/sdcard' Your code should not reference the '/sdcard' path directly; instead use 'Environment.getExternalStorageDirectory().getPath()'. Similarly, do not reference the '/data/data/' path directly; it can vary in multi-user scenarios. Instead, use 'Context.getFilesDir().getPath()'. Issue id: SdCardPath https://developer.android.com/training/data-storage#filesExternal",
"markdown": "Hardcoded reference to `/sdcard` \n\nYour code should not reference the `/sdcard` path directly; instead use `Environment.getExternalStorageDirectory().getPath()`. \n\nSimilarly, do not reference the `/data/data/` path directly; it can vary in multi-user scenarios. Instead, use `Context.getFilesDir().getPath()`. \n\nIssue id: SdCardPath \n\n<https://developer.android.com/training/data-storage#filesExternal>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintSdCardPath",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintMergeRootFrame",
"shortDescription": {
"text": "FrameLayout can be replaced with <merge> tag"
},
"fullDescription": {
"text": "FrameLayout can be replaced with '<merge>' tag If a '<FrameLayout>' is the root of a layout and does not provide background or padding etc, it can often be replaced with a '<merge>' tag which is slightly more efficient. Note that this depends on context, so make sure you understand how the '<merge>' tag works before proceeding. Issue id: MergeRootFrame https://android-developers.googleblog.com/2009/03/android-layout-tricks-3-optimize-by.html",
"markdown": "FrameLayout can be replaced with `<merge>` tag \n\nIf a `<FrameLayout>` is the root of a layout and does not provide background or padding etc, it can often be replaced with a `<merge>` tag which is slightly more efficient. Note that this depends on context, so make sure you understand how the `<merge>` tag works before proceeding. \n\nIssue id: MergeRootFrame \n\n<https://android-developers.googleblog.com/2009/03/android-layout-tricks-3-optimize-by.html>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintMergeRootFrame",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintEnforceUTF8",
"shortDescription": {
"text": "Encoding used in resource files is not UTF-8"
},
"fullDescription": {
"text": "Encoding used in resource files is not UTF-8 XML supports encoding in a wide variety of character sets. However, not all tools handle the XML encoding attribute correctly, and nearly all Android apps use UTF-8, so by using UTF-8 you can protect yourself against subtle bugs when using non-ASCII characters. In particular, the Android Gradle build system will merge resource XML files assuming the resource files are using UTF-8 encoding. Issue id: EnforceUTF8",
"markdown": "Encoding used in resource files is not UTF-8 \n\nXML supports encoding in a wide variety of character sets. However, not all tools handle the XML encoding attribute correctly, and nearly all Android apps use UTF-8, so by using UTF-8 you can protect yourself against subtle bugs when using non-ASCII characters. \n\nIn particular, the Android Gradle build system will merge resource XML files assuming the resource files are using UTF-8 encoding. \n\nIssue id: EnforceUTF8"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintEnforceUTF8",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Internationalization",
"index": 187,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintGradleGetter",
"shortDescription": {
"text": "Gradle Implicit Getter Call"
},
"fullDescription": {
"text": "Gradle Implicit Getter Call Gradle will let you replace specific constants in your build scripts with method calls, so you can for example dynamically compute a version string based on your current version control revision number, rather than hardcoding a number. When computing a version name, it's tempting to for example call the method to do that 'getVersionName'. However, when you put that method call inside the 'defaultConfig' block, you will actually be calling the Groovy getter for the 'versionName' property instead. Therefore, you need to name your method something which does not conflict with the existing implicit getters. Consider using 'compute' as a prefix instead of 'get'. Issue id: GradleGetter",
"markdown": "Gradle Implicit Getter Call \n\nGradle will let you replace specific constants in your build scripts with method calls, so you can for example dynamically compute a version string based on your current version control revision number, rather than hardcoding a number. \n\nWhen computing a version name, it's tempting to for example call the method to do that `getVersionName`. However, when you put that method call inside the `defaultConfig` block, you will actually be calling the Groovy getter for the `versionName` property instead. Therefore, you need to name your method something which does not conflict with the existing implicit getters. Consider using `compute` as a prefix instead of `get`. \n\nIssue id: GradleGetter"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintGradleGetter",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintInconsistentLayout",
"shortDescription": {
"text": "Inconsistent Layouts"
},
"fullDescription": {
"text": "Inconsistent Layouts This check ensures that a layout resource which is defined in multiple resource folders, specifies the same set of widgets. This finds cases where you have accidentally forgotten to add a widget to all variations of the layout, which could result in a runtime crash for some resource configurations when a 'findViewById()' fails. There are cases where this is intentional. For example, you may have a dedicated large tablet layout which adds some extra widgets that are not present in the phone version of the layout. As long as the code accessing the layout resource is careful to handle this properly, it is valid. In that case, you can suppress this lint check for the given extra or missing views, or the whole layout Issue id: InconsistentLayout",
"markdown": "Inconsistent Layouts \n\nThis check ensures that a layout resource which is defined in multiple resource folders, specifies the same set of widgets. \n\nThis finds cases where you have accidentally forgotten to add a widget to all variations of the layout, which could result in a runtime crash for some resource configurations when a `findViewById()` fails. \n\nThere **are** cases where this is intentional. For example, you may have a dedicated large tablet layout which adds some extra widgets that are not present in the phone version of the layout. As long as the code accessing the layout resource is careful to handle this properly, it is valid. In that case, you can suppress this lint check for the given extra or missing views, or the whole layout \n\nIssue id: InconsistentLayout"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintInconsistentLayout",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintGetContentDescriptionOverride",
"shortDescription": {
"text": "Overriding getContentDescription() on a View"
},
"fullDescription": {
"text": "Overriding 'getContentDescription()' on a View Overriding 'getContentDescription()' may prevent some accessibility services from properly navigating content exposed by your view. Instead, call 'setContentDescription()' when the content description needs to be changed. Issue id: GetContentDescriptionOverride",
"markdown": "Overriding `getContentDescription()` on a View \n\nOverriding `getContentDescription()` may prevent some accessibility services from properly navigating content exposed by your view. Instead, call `setContentDescription()` when the content description needs to be changed. \n\nIssue id: GetContentDescriptionOverride"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintGetContentDescriptionOverride",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Accessibility",
"index": 167,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintWrongConstant",
"shortDescription": {
"text": "Incorrect constant"
},
"fullDescription": {
"text": "Incorrect constant Ensures that when parameter in a method only allows a specific set of constants, calls obey those rules. Issue id: WrongConstant",
"markdown": "Incorrect constant \n\nEnsures that when parameter in a method only allows a specific set of constants, calls obey those rules. \n\nIssue id: WrongConstant"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AndroidLintWrongConstant",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintDuplicateStrings",
"shortDescription": {
"text": "Duplicate Strings"
},
"fullDescription": {
"text": "Duplicate Strings Duplicate strings can make applications larger unnecessarily. This lint check looks for duplicate strings, including differences for strings where the only difference is in capitalization. Title casing and all uppercase can all be adjusted in the layout or in code. Issue id: DuplicateStrings https://developer.android.com/reference/android/widget/TextView.html#attr_android:inputType",
"markdown": "Duplicate Strings \n\nDuplicate strings can make applications larger unnecessarily. \n\nThis lint check looks for duplicate strings, including differences for strings where the only difference is in capitalization. Title casing and all uppercase can all be adjusted in the layout or in code. \n\nIssue id: DuplicateStrings \n\n<https://developer.android.com/reference/android/widget/TextView.html#attr_android:inputType>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintDuplicateStrings",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Performance",
"index": 16,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintVisibleForTests",
"shortDescription": {
"text": "Visible Only For Tests"
},
"fullDescription": {
"text": "Visible Only For Tests With the '@VisibleForTesting' annotation you can specify an 'otherwise=' attribute which specifies the intended visibility if the method had not been made more widely visible for the tests. This check looks for accesses from production code (e.g. not tests) where the access would not have been allowed with the intended production visibility. Issue id: VisibleForTests",
"markdown": "Visible Only For Tests \n\nWith the `@VisibleForTesting` annotation you can specify an `otherwise=` attribute which specifies the intended visibility if the method had not been made more widely visible for the tests. \n\nThis check looks for accesses from production code (e.g. not tests) where the access would not have been allowed with the intended production visibility. \n\nIssue id: VisibleForTests"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintVisibleForTests",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintJavaPluginLanguageLevel",
"shortDescription": {
"text": "No Explicit Java Language Level Given"
},
"fullDescription": {
"text": "No Explicit Java Language Level Given In modules using plugins deriving from the Gradle 'java' plugin (e.g. 'java-library' or 'application'), the java source and target compatibility default to the version of the JDK being used to run Gradle, which may cause compatibility problems with Android (or other) modules. You can specify an explicit sourceCompatibility and targetCompatibility in this module to maintain compatibility no matter which JDK is used to run Gradle. Issue id: JavaPluginLanguageLevel",
"markdown": "No Explicit Java Language Level Given \n\nIn modules using plugins deriving from the Gradle `java` plugin (e.g. `java-library` or `application`), the java source and target compatibility default to the version of the JDK being used to run Gradle, which may cause compatibility problems with Android (or other) modules. \n\nYou can specify an explicit sourceCompatibility and targetCompatibility in this module to maintain compatibility no matter which JDK is used to run Gradle. \n\nIssue id: JavaPluginLanguageLevel"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintJavaPluginLanguageLevel",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Interoperability",
"index": 53,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintCommitTransaction",
"shortDescription": {
"text": "Missing commit() calls"
},
"fullDescription": {
"text": "Missing 'commit()' calls After creating a 'FragmentTransaction', you typically need to commit it as well Issue id: CommitTransaction",
"markdown": "Missing `commit()` calls \n\nAfter creating a `FragmentTransaction`, you typically need to commit it as well \n\nIssue id: CommitTransaction"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintCommitTransaction",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Correctness",
"index": 51,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintLambdaLast",
"shortDescription": {
"text": "Lambda Parameters Last"
},
"fullDescription": {
"text": "Lambda Parameters Last To improve calling this code from Kotlin, parameter types eligible for SAM conversion should be last. Issue id: LambdaLast https://android.github.io/kotlin-guides/interop.html#lambda-parameters-last",
"markdown": "Lambda Parameters Last \n\nTo improve calling this code from Kotlin, parameter types eligible for SAM conversion should be last. \n\nIssue id: LambdaLast \n\n<https://android.github.io/kotlin-guides/interop.html#lambda-parameters-last>"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintLambdaLast",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Interoperability",
"index": 53,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AndroidLintLabelFor",
"shortDescription": {
"text": "Missing accessibility label"
},
"fullDescription": {
"text": "Missing accessibility label Editable text fields should provide an 'android:hint' or, provided your 'minSdkVersion' is at least 17, they may be referenced by a view with a 'android:labelFor' attribute. When using 'android:labelFor', be sure to provide an 'android:text' or an 'android:contentDescription'. If your view is labeled but by a label in a different layout which includes this one, just suppress this warning from lint. Issue id: LabelFor",
"markdown": "Missing accessibility label \n\nEditable text fields should provide an `android:hint` or, provided your `minSdkVersion` is at least 17, they may be referenced by a view with a `android:labelFor` attribute. \n\nWhen using `android:labelFor`, be sure to provide an `android:text` or an `android:contentDescription`. \n\nIf your view is labeled but by a label in a different layout which includes this one, just suppress this warning from lint. \n\nIssue id: LabelFor"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AndroidLintLabelFor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Android/Lint/Accessibility",
"index": 167,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.spring.cloud",
"version": "232.8660.185",
"rules": [
{
"id": "SpringBootBootstrapConfigurationInspection",
"shortDescription": {
"text": "Bootstrap configuration included in application context"
},
"fullDescription": {
"text": "Reports 'BootstrapConfiguration' included into the Spring Boot application context via a component scan where it might not be needed. For more information, see Spring Cloud Commons documentation.",
"markdown": "Reports `BootstrapConfiguration` included into the Spring Boot application context via a component scan where it might not be needed.\n\nFor more information, see [Spring Cloud Commons documentation](https://docs.spring.io/spring-cloud-commons/docs/current/reference/html/#customizing-the-bootstrap-configuration)."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "SpringBootBootstrapConfigurationInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Cloud",
"index": 17,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringCloudStreamInconsistencyInspection",
"shortDescription": {
"text": "Stream handler method error"
},
"fullDescription": {
"text": "Reports inconsistency errors in stream handler methods. Input and output stream handler methods annotated with '@StreamListener' or '@StreamEmitter' have various constraints. Violation of the constraints results in errors at runtime. For example: Channel defined in '@StreamListener' 'value' attribute may never be combined with method parameters annotated with '@Input' or '@Output' An input channel must be specified for a method annotated with '@StreamListener' An output channel must be specified for a method that can return a value An output channel cannot be specified for a method that does not return a value '@StreamListener' 'condition' attribute cannot be set for methods that return a value",
"markdown": "Reports inconsistency errors in stream handler methods.\n\n\nInput and output stream handler methods annotated with `@StreamListener` or `@StreamEmitter` have various constraints.\nViolation of the constraints results in errors at runtime.\n\nFor example:\n\n* Channel defined in `@StreamListener` `value` attribute may never be combined with method parameters annotated with `@Input` or `@Output`\n* An input channel must be specified for a method annotated with `@StreamListener`\n* An output channel must be specified for a method that can return a value\n* An output channel cannot be specified for a method that does not return a value\n* `@StreamListener` `condition` attribute cannot be set for methods that return a value"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringCloudStreamInconsistencyInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Cloud Stream",
"index": 228,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringCloudStreamMessageChannelInspection",
"shortDescription": {
"text": "Unresolved message channel"
},
"fullDescription": {
"text": "Reports unresolved channel attributes in '@StreamListener', '@SendTo', '@Output', and '@Input' annotations. Using invalid binding name results in 'bean not found' error at runtime. Example: '@EnableBinding(Sink.class)\n public class LogSource {\n @StreamListener(Sink.class)\n\t public void log1() {\n }\n\n @StreamListener(\"invalid\") // Reports 'Cannot find channel'\n\t public void log2() {\n }\n }'",
"markdown": "Reports unresolved channel attributes in `@StreamListener`, `@SendTo`, `@Output`, and `@Input` annotations.\n\nUsing invalid binding name results in 'bean not found' error at runtime.\n\n**Example:**\n\n\n @EnableBinding(Sink.class)\n public class LogSource {\n @StreamListener(Sink.class)\n \t public void log1() {\n }\n\n @StreamListener(\"invalid\") // Reports 'Cannot find channel'\n \t public void log2() {\n }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringCloudStreamMessageChannelInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Cloud Stream",
"index": 228,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.javaee.jpa",
"version": "232.8660.185",
"rules": [
{
"id": "JpaObjectClassSignatureInspection",
"shortDescription": {
"text": "Persistent object class signature checks"
},
"fullDescription": {
"text": "Reports incorrectly defined persistent object classes in the following cases: Class is not top-level Class is final Class is annotated several times Class is defined as both a persistent entity and an entity listener Example: '@Entity\n @EntityListeners(value = JavaEntity.class) // Error: both @Entity and @EntityListener annotations are pointing to the same class\n public final class JavaEntity { // Error: persistent entity should not be final\n ...\n }'",
"markdown": "Reports incorrectly defined persistent object classes in the following cases:\n\n* Class is not top-level\n* Class is final\n* Class is annotated several times\n* Class is defined as both a persistent entity and an entity listener\n\n**Example:**\n\n\n @Entity\n @EntityListeners(value = JavaEntity.class) // Error: both @Entity and @EntityListener annotations are pointing to the same class\n public final class JavaEntity { // Error: persistent entity should not be final\n ...\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "JpaObjectClassSignatureInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JPA",
"index": 24,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JpaQlInspection",
"shortDescription": {
"text": "Query language checks"
},
"fullDescription": {
"text": "Reports the following errors inside Persistence QL queries: Mismatching expression types Incorrect parameters Empty or constant conditions Unresolved symbols Example queries: 'SELECT OBJECT(e) FROM JavaEntity e WHERE TRUE // Warning: constant condition\n\nSELECT OBJECT(e) FROM JavaEntity e WHERE e.id BETWEEN 0 AND '2' // Error: expected a numeric value but got a string\n\nSELECT e from JavaEntity e where e.id=?1 and e.name=?3 // Error: there are only 2 actual query parameters'",
"markdown": "Reports the following errors inside Persistence QL queries:\n\n* Mismatching expression types\n* Incorrect parameters\n* Empty or constant conditions\n* Unresolved symbols\n\n**Example queries:**\n\n\n SELECT OBJECT(e) FROM JavaEntity e WHERE TRUE // Warning: constant condition\n\n SELECT OBJECT(e) FROM JavaEntity e WHERE e.id BETWEEN 0 AND '2' // Error: expected a numeric value but got a string\n\n SELECT e from JavaEntity e where e.id=?1 and e.name=?3 // Error: there are only 2 actual query parameters\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "JpaQlInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JPA",
"index": 24,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JpaDataSourceORMDomInspection",
"shortDescription": {
"text": "Unresolved database references in XML"
},
"fullDescription": {
"text": "Reports Persistence ORM XML descriptors that cannot be resolved within the configured datasource and suggests refreshing the datasource or assigning a different one. Example database table: 'CREATE TABLE DATA_TABLE (\n ID INTEGER,\n DATA VARCHAR(100)\n );' Example JSP file: '<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n <entity-mappings xmlns=\"http://java.sun.com/xml/ns/persistence/orm\" version=\"1.0\">\n <entity name=\"JavaEntity\" class=\"JavaEntity\">\n <table name=\"UNKNOWN_TABLE\"/> // Error: unresolved table\n <attributes>\n <id name=\"id\">\n <column name=\"ID\" nullable=\"false\"/>\n </id>\n <basic name=\"UNKNOWN_COLUMN\"> // Error: unresolved column\n <column name=\"UNKNOWN_COLUMN\" length=\"12\"/>\n </basic>\n </attributes>\n </entity>\n </entity-mappings>' NOTE: Datasource can be configured via `Assign datasource` action",
"markdown": "Reports Persistence ORM XML descriptors that cannot be resolved within the configured datasource and suggests refreshing the datasource or assigning a different one.\n\n**Example database table:**\n\n\n CREATE TABLE DATA_TABLE (\n ID INTEGER,\n DATA VARCHAR(100)\n );\n\n<br />\n\n**Example JSP file:**\n\n\n <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n <entity-mappings xmlns=\"http://java.sun.com/xml/ns/persistence/orm\" version=\"1.0\">\n <entity name=\"JavaEntity\" class=\"JavaEntity\">\n <table name=\"UNKNOWN_TABLE\"/> // Error: unresolved table\n <attributes>\n <id name=\"id\">\n <column name=\"ID\" nullable=\"false\"/>\n </id>\n <basic name=\"UNKNOWN_COLUMN\"> // Error: unresolved column\n <column name=\"UNKNOWN_COLUMN\" length=\"12\"/>\n </basic>\n </attributes>\n </entity>\n </entity-mappings>\n\n<br />\n\n\n**NOTE:** Datasource can be configured via \\`Assign datasource\\` action"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "JpaDataSourceORMDomInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JPA",
"index": 24,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JpaAttributeTypeInspection",
"shortDescription": {
"text": "Persistent attribute type checks"
},
"fullDescription": {
"text": "Reports property type mismatch for JPA attributes. Example: '@Entity\n public class JavaEntity {\n\n @OneToOne\n Map<Integer, AnotherEntity> incorrectRelationship; // Error: 'One To One' attribute type should be an entity, not a map\n\n @ManyToMany\n Map<Integer, AnotherEntity> correctRelationship;\n }'",
"markdown": "Reports property type mismatch for JPA attributes.\n\n**Example:**\n\n\n @Entity\n public class JavaEntity {\n\n @OneToOne\n Map<Integer, AnotherEntity> incorrectRelationship; // Error: 'One To One' attribute type should be an entity, not a map\n\n @ManyToMany\n Map<Integer, AnotherEntity> correctRelationship;\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "JpaAttributeTypeInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JPA",
"index": 24,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JpaMissingIdInspection",
"shortDescription": {
"text": "Persistent entity misses primary key"
},
"fullDescription": {
"text": "Reports missing identification property persistence objects. Example: '@Entity\n public class JavaEntity { // Error: entity class should have an @Id annotated property\n\n }'",
"markdown": "Reports missing identification property persistence objects. \n\n**Example:**\n\n\n @Entity\n public class JavaEntity { // Error: entity class should have an @Id annotated property\n\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "JpaMissingIdInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JPA",
"index": 24,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JpaORMDomInspection",
"shortDescription": {
"text": "Orm.xml problems"
},
"fullDescription": {
"text": "Reports unresolved references to any database objects inside `orm.xml` configuration files: Tables Columns Schemas Catalogs Sequences Example database table: 'CREATE TABLE DATA_TABLE (\n ID INTEGER,\n DATA VARCHAR(100)\n);' Example orm.xml file: '<entity-mappings xmlns=\"http://java.sun.com/xml/ns/persistence/orm\" version=\"1.0\">\n <package>example</package>\n <entity name=\"JavaEntity\" class=\"JavaEntity\">\n <table name=\"DATA_TABLE\"/>\n <attributes>\n <id name=\"id\">\n <column name=\"UNKNOWN_ID\" nullable=\"false\" length=\"20\"/> // Error: unresolved column name\n </id>\n <basic name=\"data\">\n <column name=\"DATA\" length=\"12\"/> // Good\n </basic>\n </attributes>\n </entity>\n</entity-mappings>'",
"markdown": "Reports unresolved references to any database objects inside \\`orm.xml\\` configuration files:\n\n* Tables\n* Columns\n* Schemas\n* Catalogs\n* Sequences\n\n**Example database table:**\n\n\n CREATE TABLE DATA_TABLE (\n ID INTEGER,\n DATA VARCHAR(100)\n );\n\n<br />\n\n**Example orm.xml file:**\n\n\n <entity-mappings xmlns=\"http://java.sun.com/xml/ns/persistence/orm\" version=\"1.0\">\n <package>example</package>\n <entity name=\"JavaEntity\" class=\"JavaEntity\">\n <table name=\"DATA_TABLE\"/>\n <attributes>\n <id name=\"id\">\n <column name=\"UNKNOWN_ID\" nullable=\"false\" length=\"20\"/> // Error: unresolved column name\n </id>\n <basic name=\"data\">\n <column name=\"DATA\" length=\"12\"/> // Good\n </basic>\n </attributes>\n </entity>\n </entity-mappings>\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "JpaORMDomInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JPA",
"index": 24,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JpaEntityListenerInspection",
"shortDescription": {
"text": "Entity listener problems"
},
"fullDescription": {
"text": "Reports the following JPA specification errors: Entity listener classes without public no-argument constructors Entity listener methods with incorrect signatures Example: '@Entity\n @EntityListeners(value = JavaEntityListener.class)\n class JavaEntity { ... }\n\n class JavaEntityListener {\n\n @PostLoad\n void postLoad(String parameter) { ... } // Error: method 'postLoad' should take parameter of type 'Object' here\n }'",
"markdown": "Reports the following JPA specification errors: \n\n* Entity listener classes without public no-argument constructors\n* Entity listener methods with incorrect signatures\n\n<br />\n\n**Example:**\n\n\n @Entity\n @EntityListeners(value = JavaEntityListener.class)\n class JavaEntity { ... }\n\n class JavaEntityListener {\n\n @PostLoad\n void postLoad(String parameter) { ... } // Error: method 'postLoad' should take parameter of type 'Object' here\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "JpaEntityListenerInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JPA",
"index": 24,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JpaAttributeMemberSignatureInspection",
"shortDescription": {
"text": "Persistent attribute signature checks"
},
"fullDescription": {
"text": "Reports the following JPA specification errors: Several attributes are configured for a method or field Illegal attribute is used in Embeddable object (JPA 1.0) Persistent attribute metadata is specified not on a field or property getter No setter or getter with property-based access Example: '@Entity\n @Table(name = \"TABLE\")\n public class JavaEntity {\n\n private Integer id; // Error: both getter and setter should be present\n\n public Integer getId() { ... }\n\n\n\n private String data;\n\n public String getData() { ... }\n\n @Basic // Error: persistence annotation should be placed on field or getter method\n public void setData(String data) { ... }\n }'",
"markdown": "Reports the following JPA specification errors:\n\n* Several attributes are configured for a method or field\n* Illegal attribute is used in Embeddable object (JPA 1.0)\n* Persistent attribute metadata is specified not on a field or property getter\n* No setter or getter with property-based access\n\n**Example:**\n\n\n @Entity\n @Table(name = \"TABLE\")\n public class JavaEntity {\n\n private Integer id; // Error: both getter and setter should be present\n\n public Integer getId() { ... }\n\n\n\n private String data;\n\n public String getData() { ... }\n\n @Basic // Error: persistence annotation should be placed on field or getter method\n public void setData(String data) { ... }\n }\n\n<br />"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "JpaAttributeMemberSignatureInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JPA",
"index": 24,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JpaConfigDomFacetInspection",
"shortDescription": {
"text": "Persistence.xml is not added to facet"
},
"fullDescription": {
"text": "Reports missing persistence.xml configuration files and suggests adding the file to the persistence facet.",
"markdown": "Reports missing persistence.xml configuration files and suggests adding the file to the persistence facet."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JpaConfigDomFacetInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JPA",
"index": 24,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JpaQueryApiInspection",
"shortDescription": {
"text": "Unresolved queries and query parameters"
},
"fullDescription": {
"text": "Reports unresolved symbols in named and native queries and related API methods: Unknown named query Unknown query parameter Example: '@Entity\n @NamedQuery(name = \"SelectByConditionQuery\", query = \"...\")\n public class JavaEntity { ... }\n\n class Main {\n public static void executeQuery() {\n Persistence.createEntityManagerFactory(\"\")\n .createEntityManager()\n .createNamedQuery(\"SelectAllQuery\") // Error: unknown query name\n ...\n }\n }'",
"markdown": "Reports unresolved symbols in named and native queries and related API methods:\n\n* Unknown named query\n* Unknown query parameter\n\n**Example:**\n\n\n @Entity\n @NamedQuery(name = \"SelectByConditionQuery\", query = \"...\")\n public class JavaEntity { ... }\n\n class Main {\n public static void executeQuery() {\n Persistence.createEntityManagerFactory(\"\")\n .createEntityManager()\n .createNamedQuery(\"SelectAllQuery\") // Error: unknown query name\n ...\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "JpaQueryApiInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JPA",
"index": 24,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JpaDomInspection",
"shortDescription": {
"text": "persistence.xml problems"
},
"fullDescription": {
"text": "Reports the following problems inside XML configuration files: References to non-instantiable classes References to classes that do not extend required class References to classes with inappropriate scope Tag and attribute values that do not match required pattern (for example, Java Identifiers) Tags that do not include required children tags or attributes Tags that define objects with duplicate names Example: '<persistence>\n <persistence-unit name=\"example-persistence-unit\">\n <provider>org.example.SomeRandomClass</provider> // Error: provider class should implement PersistenceProvider interface\n </persistence-unit>\n</persistence>'",
"markdown": "Reports the following problems inside XML configuration files:\n\n* References to non-instantiable classes\n* References to classes that do not extend required class\n* References to classes with inappropriate scope\n* Tag and attribute values that do not match required pattern (for example, Java Identifiers)\n* Tags that do not include required children tags or attributes\n* Tags that define objects with duplicate names\n\n**Example:**\n\n\n <persistence>\n <persistence-unit name=\"example-persistence-unit\">\n <provider>org.example.SomeRandomClass</provider> // Error: provider class should implement PersistenceProvider interface\n </persistence-unit>\n </persistence>\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "JpaDomInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JPA",
"index": 24,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JpaDataSourceORMInspection",
"shortDescription": {
"text": "Unresolved database references in annotations"
},
"fullDescription": {
"text": "Reports references inside the following Persistence ORM annotations if they cannot be resolved within the configured datasource: Table Column [Any]To[Any] JoinColumn / JoinTable NamedQuery / NativeQuery Embeddable Suggests refreshing the datasource or assigning a different one. Example database table: 'CREATE TABLE DATA_TABLE (\n ID INTEGER,\n DATA VARCHAR(100)\n);' Example JPA entity class: '@Entity\n @Table(name = \"UNKNOWN_TABLE\") // unresolved reference\n public class JavaEntity {\n @Column(name = \"ID\") // cannot resolve columns in a table that's not defined\n Integer id;\n }' NOTE: Datasource can be configured via `Assign datasource` action or the corresponding gutter icon for entity class",
"markdown": "Reports references inside the following Persistence ORM annotations if they cannot be resolved within the configured datasource: \n\n* Table\n* Column\n* \\[Any\\]To\\[Any\\]\n* JoinColumn / JoinTable\n* NamedQuery / NativeQuery\n* Embeddable\n\n<br />\n\nSuggests refreshing the datasource or assigning a different one. \n\n**Example database table:**\n\n\n CREATE TABLE DATA_TABLE (\n ID INTEGER,\n DATA VARCHAR(100)\n );\n\n<br />\n\n**Example JPA entity class:**\n\n\n @Entity\n @Table(name = \"UNKNOWN_TABLE\") // unresolved reference\n public class JavaEntity {\n @Column(name = \"ID\") // cannot resolve columns in a table that's not defined\n Integer id;\n }\n\n<br />\n\n\n**NOTE:** Datasource can be configured via \\`Assign datasource\\` action or the corresponding gutter icon for entity class"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "JpaDataSourceORMInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JPA",
"index": 24,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JpaEntityListenerWarningsInspection",
"shortDescription": {
"text": "Entity listener warnings"
},
"fullDescription": {
"text": "Reports entity listener classes without any entity listener methods. Example: '@Entity\n @EntityListeners(value = JavaEntityListener.class)\n public class JavaEntity { ... }\n\n class JavaEntityListener { // Error: no entity listener-specific methods found\n\n }'",
"markdown": "Reports entity listener classes without any entity listener methods.\n\n**Example:**\n\n\n @Entity\n @EntityListeners(value = JavaEntityListener.class)\n public class JavaEntity { ... }\n\n class JavaEntityListener { // Error: no entity listener-specific methods found\n\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JpaEntityListenerWarningsInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JPA",
"index": 24,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JpaEntityGraphsInspection",
"shortDescription": {
"text": "Unresolved entity graph names"
},
"fullDescription": {
"text": "Reports the following unresolved attributes inside EntityGraph-related annotations: Value in '@NamedAttributeNode' Named subgraph in '@NamedAttributeNode' Name in '@NamedEntityGraph' Example: '@Entity\n @NamedEntityGraph(name = \"entity-graph\", ...)\n public class JavaEntity {\n public void foo() {\n Persistence.createEntityManagerFactory(\"\")\n .createEntityManager()\n .getEntityGraph(\"unknown-entity-graph\"); // unresolved reference\n }\n }'",
"markdown": "Reports the following unresolved attributes inside EntityGraph-related annotations: \n\n* Value in `@NamedAttributeNode`\n* Named subgraph in `@NamedAttributeNode`\n* Name in `@NamedEntityGraph`\n\n<br />\n\n**Example:**\n\n\n @Entity\n @NamedEntityGraph(name = \"entity-graph\", ...)\n public class JavaEntity {\n public void foo() {\n Persistence.createEntityManagerFactory(\"\")\n .createEntityManager()\n .getEntityGraph(\"unknown-entity-graph\"); // unresolved reference\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "JpaEntityGraphsInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JPA",
"index": 24,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JpaModelReferenceInspection",
"shortDescription": {
"text": "Unresolved references in queries"
},
"fullDescription": {
"text": "Reports unresolved symbols in the following JPA annotations and API methods: 'AttributeOverride' 'AssociationOverride' 'MapsId' 'MapKey' 'Criteria API methods' Example: '@Entity\n @AssociationOverrides({\n @AssociationOverride(name = \"missingAttribute\", joinColumns = { ... }), // Error: unresolved attribute\n @AssociationOverride(name = \"existingAttribute\", joinColumns = { ... })\n })\n public class JavaEntity {\n @OneToOne\n AnotherEntity existingAttribute;\n }'",
"markdown": "Reports unresolved symbols in the following JPA annotations and API methods:\n\n* `AttributeOverride`\n* `AssociationOverride`\n* `MapsId`\n* `MapKey`\n* `Criteria API methods`\n\n**Example:**\n\n\n @Entity\n @AssociationOverrides({\n @AssociationOverride(name = \"missingAttribute\", joinColumns = { ... }), // Error: unresolved attribute\n @AssociationOverride(name = \"existingAttribute\", joinColumns = { ... })\n })\n public class JavaEntity {\n @OneToOne\n AnotherEntity existingAttribute;\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "JpaModelReferenceInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JPA",
"index": 24,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "org.jetbrains.plugins.sass",
"version": "232.8660.185",
"rules": [
{
"id": "SassScssResolvedByNameOnly",
"shortDescription": {
"text": "Missing import"
},
"fullDescription": {
"text": "Reports a reference to a variable, mixin, or function that is declared in another file but this file isn't explicitly imported in the current file. Example: '* {\n margin: $var-in-other-file;\n}'",
"markdown": "Reports a reference to a variable, mixin, or function that is declared in another file but this file isn't explicitly [imported](https://sass-lang.com/documentation/at-rules/import) in the current file.\n\n**Example:**\n\n\n * {\n margin: $var-in-other-file;\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "SassScssResolvedByNameOnly",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Sass/SCSS",
"index": 27,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SassScssUnresolvedVariable",
"shortDescription": {
"text": "Unresolved variable"
},
"fullDescription": {
"text": "Reports an unresolved Sass/SCSS variable reference. Example: '* {\n margin: $unknown-var;\n}'",
"markdown": "Reports an unresolved [Sass/SCSS variable](https://sass-lang.com/documentation/variables) reference.\n\n**Example:**\n\n\n * {\n margin: $unknown-var;\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SassScssUnresolvedVariable",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Sass/SCSS",
"index": 27,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SassScssUnresolvedMixin",
"shortDescription": {
"text": "Unresolved mixin"
},
"fullDescription": {
"text": "Reports an unresolved Sass/SCSS mixin reference. Example: '* {\n @include unknown-mixin;\n}'",
"markdown": "Reports an unresolved [Sass/SCSS mixin](https://sass-lang.com/documentation/at-rules/mixin) reference.\n\n**Example:**\n\n\n * {\n @include unknown-mixin;\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SassScssUnresolvedMixin",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Sass/SCSS",
"index": 27,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SassScssUnresolvedPlaceholderSelector",
"shortDescription": {
"text": "Unresolved placeholder selector"
},
"fullDescription": {
"text": "Reports an unresolved Sass/SCSS placeholder selector reference. Example: '* {\n @extend %unknown-placeholder-selector;\n}'",
"markdown": "Reports an unresolved [Sass/SCSS placeholder selector](https://sass-lang.com/documentation/variables) reference.\n\n**Example:**\n\n\n * {\n @extend %unknown-placeholder-selector;\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SassScssUnresolvedPlaceholderSelector",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Sass/SCSS",
"index": 27,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij",
"version": "232.8660.185",
"rules": [
{
"id": "HtmlUnknownBooleanAttribute",
"shortDescription": {
"text": "Incorrect boolean attribute"
},
"fullDescription": {
"text": "Reports an HTML non-boolean attribute without a value. Suggests configuring attributes that should not be reported.",
"markdown": "Reports an HTML non-boolean attribute without a value. Suggests configuring attributes that should not be reported."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "HtmlUnknownBooleanAttribute",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "HTML",
"index": 28,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DuplicatedCode",
"shortDescription": {
"text": "Duplicated code fragment"
},
"fullDescription": {
"text": "Reports duplicated blocks of code from the selected scope: the same file, same module, dependent modules or the entire project. The inspection features quick-fixes that help you to set the size of detected duplicates, navigate to repetitive code fragments, and compare them in a tool window.When possible, the inspection provides a quick-fix to extract a method from the duplicated code. The inspection options allow you to select the scope of the reported duplicated fragments and set the initial size for the duplicated language constructs. You can also configure the constructs that you want to anonymize in File | Settings | Editor | Duplicates.",
"markdown": "Reports duplicated blocks of code from the selected scope: the same file, same module, dependent modules or the entire project.\n\nThe inspection features quick-fixes that help you to set the size of detected duplicates, navigate to repetitive code fragments, and compare them in a tool window.When possible, the inspection provides a quick-fix to extract a method from the duplicated code.\n\nThe inspection options allow you to select the scope of the reported duplicated fragments and set the initial size for the duplicated language constructs.\n\nYou can also configure the constructs that you want to anonymize in [File \\| Settings \\| Editor \\| Duplicates](settings://duplicates.index)."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "DuplicatedCode",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "General",
"index": 44,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IncorrectFormatting",
"shortDescription": {
"text": "Incorrect formatting"
},
"fullDescription": {
"text": "Reports formatting issues that appear if your code doesn't follow your project's code style settings. This inspection is not compatible with languages that require third-party formatters for code formatting, for example, Go or C with CLangFormat enabled.",
"markdown": "Reports formatting issues that appear if your code doesn't\nfollow your project's code style settings.\n\n\nThis inspection is not compatible with languages that require\nthird-party formatters for code formatting, for example, Go or\nC with CLangFormat enabled."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "IncorrectFormatting",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "General",
"index": 44,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CheckXmlFileWithXercesValidator",
"shortDescription": {
"text": "Failed external validation"
},
"fullDescription": {
"text": "Reports a discrepancy in an XML file with the specified DTD or schema detected by the Xerces validator.",
"markdown": "Reports a discrepancy in an XML file with the specified DTD or schema detected by the Xerces validator."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "CheckXmlFileWithXercesValidator",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "XML",
"index": 112,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RegExpEscapedMetaCharacter",
"shortDescription": {
"text": "Escaped meta character"
},
"fullDescription": {
"text": "Reports escaped meta characters. Some RegExp coding styles specify that meta characters should be placed inside a character class, to make the regular expression easier to understand. This inspection does not warn about the meta character '[', ']' and '^', because those would need additional escaping inside a character class. Example: '\\d+\\.\\d+' After the quick-fix is applied: '\\d+[.]\\d+' New in 2017.1",
"markdown": "Reports escaped meta characters. Some RegExp coding styles specify that meta characters should be placed inside a character class, to make the regular expression easier to understand. This inspection does not warn about the meta character `[`, `]` and `^`, because those would need additional escaping inside a character class.\n\n**Example:**\n\n\n \\d+\\.\\d+\n\nAfter the quick-fix is applied:\n\n\n \\d+[.]\\d+\n\nNew in 2017.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RegExpEscapedMetaCharacter",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "RegExp",
"index": 115,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "XmlUnusedNamespaceDeclaration",
"shortDescription": {
"text": "Unused schema declaration"
},
"fullDescription": {
"text": "Reports an unused namespace declaration or location hint in XML.",
"markdown": "Reports an unused namespace declaration or location hint in XML."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "XmlUnusedNamespaceDeclaration",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "XML",
"index": 112,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RegExpUnnecessaryNonCapturingGroup",
"shortDescription": {
"text": "Unnecessary non-capturing group"
},
"fullDescription": {
"text": "Reports unnecessary non-capturing groups, which have no influence on the match result. Example: 'Everybody be cool, (?:this) is a robbery!' After the quick-fix is applied: 'Everybody be cool, this is a robbery!' New in 2021.1",
"markdown": "Reports unnecessary non-capturing groups, which have no influence on the match result.\n\n**Example:**\n\n\n Everybody be cool, (?:this) is a robbery!\n\nAfter the quick-fix is applied:\n\n\n Everybody be cool, this is a robbery!\n\nNew in 2021.1"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "RegExpUnnecessaryNonCapturingGroup",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "RegExp",
"index": 115,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JsonSchemaCompliance",
"shortDescription": {
"text": "Compliance with JSON schema"
},
"fullDescription": {
"text": "Reports inconsistence between a JSON file and the JSON schema that is assigned to it.",
"markdown": "Reports inconsistence between a JSON file and the [JSON schema](https://json-schema.org) that is assigned to it. "
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JsonSchemaCompliance",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JSON and JSON5",
"index": 150,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CheckDtdRefs",
"shortDescription": {
"text": "Unresolved DTD reference"
},
"fullDescription": {
"text": "Reports inconsistency in a DTD-specific reference, for example, in a reference to an XML entity or to a DTD element declaration. Works in DTD an XML files.",
"markdown": "Reports inconsistency in a DTD-specific reference, for example, in a reference to an XML entity or to a DTD element declaration. Works in DTD an XML files."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "CheckDtdRefs",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "XML",
"index": 112,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SSBasedInspection",
"shortDescription": {
"text": "Structural search inspection"
},
"fullDescription": {
"text": "Allows configuring Structural Search/Structural Replace templates that you can apply to the file you are editing. All matches will be highlighted and marked with the template name that you have configured. If you configure the Structural Replace pattern as well, the corresponding replace option will be available as a quick-fix.",
"markdown": "Allows configuring **Structural Search/Structural Replace** templates that you can apply to the file you are editing.\n\nAll matches will be highlighted and marked with the template name that you have configured.\nIf you configure the **Structural Replace** pattern as well, the corresponding replace option will be available as a quick-fix."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SSBasedInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Structural search",
"index": 173,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RegExpSingleCharAlternation",
"shortDescription": {
"text": "Single character alternation"
},
"fullDescription": {
"text": "Reports single char alternation in a RegExp. It is simpler to use a character class instead. This may also provide better matching performance. Example: 'a|b|c|d' After the quick-fix is applied: '[abcd]' New in 2017.1",
"markdown": "Reports single char alternation in a RegExp. It is simpler to use a character class instead. This may also provide better matching performance.\n\n**Example:**\n\n\n a|b|c|d\n\nAfter the quick-fix is applied:\n\n\n [abcd]\n\n\nNew in 2017.1"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "RegExpSingleCharAlternation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "RegExp",
"index": 115,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CheckTagEmptyBody",
"shortDescription": {
"text": "Empty element content"
},
"fullDescription": {
"text": "Reports XML elements without contents. Example: '<user>\n <name></name>\n </user>' After the quick-fix is applied: '<user>\n <name/>\n </user>'",
"markdown": "Reports XML elements without contents.\n\n**Example:**\n\n\n <user>\n <name></name>\n </user>\n\nAfter the quick-fix is applied:\n\n\n <user>\n <name/>\n </user>\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CheckTagEmptyBody",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "XML",
"index": 112,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReassignedToPlainText",
"shortDescription": {
"text": "Reassigned to plain text"
},
"fullDescription": {
"text": "Reports files that were explicitly re-assigned to Plain Text File Type. This association is unnecessary because the platform auto-detects text files by content automatically. You can dismiss this warning by removing the file type association in Settings | Editor | File Types | Text.",
"markdown": "Reports files that were explicitly re-assigned to Plain Text File Type. This association is unnecessary because the platform auto-detects text files by content automatically.\n\nYou can dismiss this warning by removing the file type association\nin **Settings \\| Editor \\| File Types \\| Text**."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ReassignedToPlainText",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "General",
"index": 44,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CheckEmptyScriptTag",
"shortDescription": {
"text": "Empty tag"
},
"fullDescription": {
"text": "Reports empty tags that do not work in some browsers. Example: '<html>\n <script/>\n </html>' After the quick-fix is applied: '<html>\n <script></script>\n </html>'",
"markdown": "Reports empty tags that do not work in some browsers.\n\n**Example:**\n\n\n <html>\n <script/>\n </html>\n\nAfter the quick-fix is applied:\n\n\n <html>\n <script></script>\n </html>\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CheckEmptyScriptTag",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "HTML",
"index": 28,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HtmlUnknownTarget",
"shortDescription": {
"text": "Unresolved file in a link"
},
"fullDescription": {
"text": "Reports an unresolved file in a link.",
"markdown": "Reports an unresolved file in a link."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "HtmlUnknownTarget",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "HTML",
"index": 28,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "XmlWrongRootElement",
"shortDescription": {
"text": "Wrong root element"
},
"fullDescription": {
"text": "Reports a root tag name different from the name specified in the '<doctype>' tag.",
"markdown": "Reports a root tag name different from the name specified in the `<doctype>` tag."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "XmlWrongRootElement",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "XML",
"index": 112,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HtmlUnknownAttribute",
"shortDescription": {
"text": "Unknown attribute"
},
"fullDescription": {
"text": "Reports an unknown HTML attribute. Suggests configuring attributes that should not be reported.",
"markdown": "Reports an unknown HTML attribute. Suggests configuring attributes that should not be reported."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "HtmlUnknownAttribute",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "HTML",
"index": 28,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RegExpRedundantEscape",
"shortDescription": {
"text": "Redundant character escape"
},
"fullDescription": {
"text": "Reports redundant character escape sequences that can be replaced with unescaped characters preserving the meaning. Many escape sequences that are necessary outside of a character class are redundant inside square brackets '[]' of a character class. Although unescaped opening curly braces '{' outside of character classes are allowed in some dialects (JavaScript, Python, and so on), it can cause confusion and make the pattern less portable, because there are dialects that require escaping curly braces as characters. For this reason the inspection does not report escaped opening curly braces. Example: '\\-\\;[\\.]' After the quick-fix is applied: '-;[.]' The Ignore escaped closing brackets '}' and ']' option specifies whether to report '\\}' and '\\]' outside of a character class when they are allowed to be unescaped by the RegExp dialect. New in 2017.3",
"markdown": "Reports redundant character escape sequences that can be replaced with unescaped characters preserving the meaning. Many escape sequences that are necessary outside of a character class are redundant inside square brackets `[]` of a character class.\n\n\nAlthough unescaped opening curly braces `{` outside of character classes are allowed in some dialects (JavaScript, Python, and so on),\nit can cause confusion and make the pattern less portable, because there are dialects that require escaping curly braces as characters.\nFor this reason the inspection does not report escaped opening curly braces.\n\n**Example:**\n\n\n \\-\\;[\\.]\n\nAfter the quick-fix is applied:\n\n\n -;[.]\n\n\nThe **Ignore escaped closing brackets '}' and '\\]'** option specifies whether to report `\\}` and `\\]` outside of a character class\nwhen they are allowed to be unescaped by the RegExp dialect.\n\nNew in 2017.3"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RegExpRedundantEscape",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "RegExp",
"index": 115,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HtmlExtraClosingTag",
"shortDescription": {
"text": "Redundant closing tag"
},
"fullDescription": {
"text": "Reports redundant closing tags on empty elements, for example, 'img' or 'br'. Example: '<html>\n <body>\n <br></br>\n </body>\n </html>' After the quick-fix is applied: '<html>\n <body>\n <br>\n </body>\n </html>'",
"markdown": "Reports redundant closing tags on empty elements, for example, `img` or `br`.\n\n**Example:**\n\n\n <html>\n <body>\n <br></br>\n </body>\n </html>\n\nAfter the quick-fix is applied:\n\n\n <html>\n <body>\n <br>\n </body>\n </html>\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "HtmlExtraClosingTag",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "HTML",
"index": 28,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "XmlDuplicatedId",
"shortDescription": {
"text": "Duplicate 'id' attribute"
},
"fullDescription": {
"text": "Reports a duplicate 'id' attribute in XML.",
"markdown": "Reports a duplicate `id` attribute in XML."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "XmlDuplicatedId",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "XML",
"index": 112,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "XmlUnboundNsPrefix",
"shortDescription": {
"text": "Unbound namespace prefix"
},
"fullDescription": {
"text": "Reports an unbound namespace prefix in XML.",
"markdown": "Reports an unbound namespace prefix in XML."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "XmlUnboundNsPrefix",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "XML",
"index": 112,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "XmlPathReference",
"shortDescription": {
"text": "Unresolved file reference"
},
"fullDescription": {
"text": "Reports an unresolved file reference in XML.",
"markdown": "Reports an unresolved file reference in XML."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "XmlPathReference",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "XML",
"index": 112,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LossyEncoding",
"shortDescription": {
"text": "Lossy encoding"
},
"fullDescription": {
"text": "Reports characters that cannot be displayed because of the current document encoding. Examples: If you type international characters in a document with the US-ASCII charset, some characters will be lost on save. If you load a UTF-8-encoded file using the ISO-8859-1 one-byte charset, some characters will be displayed incorrectly. You can fix this by changing the file encoding either by specifying the encoding directly in the file, e.g. by editing 'encoding=' attribute in the XML prolog of XML file, or by changing the corresponding options in Settings | Editor | File Encodings.",
"markdown": "Reports characters that cannot be displayed because of the current document encoding.\n\nExamples:\n\n* If you type international characters in a document with the **US-ASCII** charset, some characters will be lost on save.\n* If you load a **UTF-8** -encoded file using the **ISO-8859-1** one-byte charset, some characters will be displayed incorrectly.\n\nYou can fix this by changing the file encoding\neither by specifying the encoding directly in the file, e.g. by editing `encoding=` attribute in the XML prolog of XML file,\nor by changing the corresponding options in **Settings \\| Editor \\| File Encodings**."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LossyEncoding",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Internationalization",
"index": 225,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JsonSchemaDeprecation",
"shortDescription": {
"text": "Deprecated JSON property"
},
"fullDescription": {
"text": "Reports a deprecated property in a JSON file. Note that deprecation mechanism is not defined in the JSON Schema specification yet, and this inspection uses a non-standard extension 'deprecationMessage'.",
"markdown": "Reports a deprecated property in a JSON file. \nNote that deprecation mechanism is not defined in the JSON Schema specification yet, and this inspection uses a non-standard extension 'deprecationMessage'."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "JsonSchemaDeprecation",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "JSON and JSON5",
"index": 150,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RegExpRedundantNestedCharacterClass",
"shortDescription": {
"text": "Redundant nested character class"
},
"fullDescription": {
"text": "Reports unnecessary nested character classes. Example: '[a-c[x-z]]' After the quick-fix is applied: '[a-cx-z]' New in 2020.2",
"markdown": "Reports unnecessary nested character classes.\n\n**Example:**\n\n\n [a-c[x-z]]\n\nAfter the quick-fix is applied:\n\n\n [a-cx-z]\n\nNew in 2020.2"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "RegExpRedundantNestedCharacterClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "RegExp",
"index": 115,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RegExpOctalEscape",
"shortDescription": {
"text": "Octal escape"
},
"fullDescription": {
"text": "Reports octal escapes, which are easily confused with back references. Use hexadecimal escapes to avoid confusion. Example: '\\07' After the quick-fix is applied: '\\x07' New in 2017.1",
"markdown": "Reports octal escapes, which are easily confused with back references. Use hexadecimal escapes to avoid confusion.\n\n**Example:**\n\n\n \\07\n\nAfter the quick-fix is applied:\n\n\n \\x07\n\nNew in 2017.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RegExpOctalEscape",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "RegExp",
"index": 115,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnusedDefine",
"shortDescription": {
"text": "Unused define"
},
"fullDescription": {
"text": "Reports an unused named pattern ('define') in a RELAX-NG file (XML or Compact Syntax). 'define' elements that are used through an include in another file are ignored.",
"markdown": "Reports an unused named pattern (`define`) in a RELAX-NG file (XML or Compact Syntax). `define` elements that are used through an include in another file are ignored."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnusedDefine",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "RELAX NG",
"index": 237,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RegExpDuplicateAlternationBranch",
"shortDescription": {
"text": "Duplicate branch in alternation"
},
"fullDescription": {
"text": "Reports duplicate branches in a RegExp alternation. Duplicate branches slow down matching and obscure the intent of the expression. Example: '(alpha|bravo|charlie|alpha)' After the quick-fix is applied: '(alpha|bravo|charlie)' New in 2017.1",
"markdown": "Reports duplicate branches in a RegExp alternation. Duplicate branches slow down matching and obscure the intent of the expression.\n\n**Example:**\n\n\n (alpha|bravo|charlie|alpha)\n\nAfter the quick-fix is applied:\n\n\n (alpha|bravo|charlie)\n\nNew in 2017.1"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "RegExpDuplicateAlternationBranch",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "RegExp",
"index": 115,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantSuppression",
"shortDescription": {
"text": "Redundant suppression"
},
"fullDescription": {
"text": "Reports usages of the following elements that can be safely removed because the inspection they affect is no longer applicable in this context: '@SuppressWarning' annotation, or '// noinspection' line comment, or '/** noinspection */' JavaDoc comment Example: 'public class C {\n // symbol is already private,\n // but annotation is still around\n @SuppressWarnings({\"WeakerAccess\"})\n private boolean CONST = true;\n void f() {\n CONST = false;\n }\n}'",
"markdown": "Reports usages of the following elements that can be safely removed because the inspection they affect is no longer applicable in this context:\n\n* `@SuppressWarning` annotation, or\n* `// noinspection` line comment, or\n* `/** noinspection */` JavaDoc comment\n\nExample:\n\n\n public class C {\n // symbol is already private,\n // but annotation is still around\n @SuppressWarnings({\"WeakerAccess\"})\n private boolean CONST = true;\n void f() {\n CONST = false;\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantSuppression",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "General",
"index": 44,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CustomRegExpInspection",
"shortDescription": {
"text": "Custom RegExp inspection"
},
"fullDescription": {
"text": "Custom Regex Inspection",
"markdown": "Custom Regex Inspection"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "CustomRegExpInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "RegExp",
"index": 115,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RegExpUnexpectedAnchor",
"shortDescription": {
"text": "Begin or end anchor in unexpected position"
},
"fullDescription": {
"text": "Reports '^' or '\\A' anchors not at the beginning of the pattern and '$', '\\Z' or '\\z' anchors not at the end of the pattern. In the wrong position these RegExp anchors prevent the pattern from matching anything. In case of the '^' and '$' anchors, most likely the literal character was meant and the escape forgotten. Example: '(Price $10)' New in 2018.1",
"markdown": "Reports `^` or `\\A` anchors not at the beginning of the pattern and `$`, `\\Z` or `\\z` anchors not at the end of the pattern. In the wrong position these RegExp anchors prevent the pattern from matching anything. In case of the `^` and `$` anchors, most likely the literal character was meant and the escape forgotten.\n\n**Example:**\n\n\n (Price $10)\n\n\nNew in 2018.1"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "RegExpUnexpectedAnchor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "RegExp",
"index": 115,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpellCheckingInspection",
"shortDescription": {
"text": "Typo"
},
"fullDescription": {
"text": "Reports typos and misspellings in your code, comments, and literals and fixes them with one click.",
"markdown": "Reports typos and misspellings in your code, comments, and literals and fixes them with one click."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "SpellCheckingInspection",
"ideaSeverity": "TYPO",
"qodanaSeverity": "Low"
}
},
"relationships": [
{
"target": {
"id": "Proofreading",
"index": 223,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RegExpSimplifiable",
"shortDescription": {
"text": "Regular expression can be simplified"
},
"fullDescription": {
"text": "Reports regular expressions that can be simplified. Example: '[a] xx* [ah-hz]' After the quick-fix is applied: 'a x+ [ahz]' New in 2022.1",
"markdown": "Reports regular expressions that can be simplified.\n\n**Example:**\n\n\n [a] xx* [ah-hz]\n\nAfter the quick-fix is applied:\n\n\n a x+ [ahz]\n\nNew in 2022.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "RegExpSimplifiable",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "RegExp",
"index": 115,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RegExpEmptyAlternationBranch",
"shortDescription": {
"text": "Empty branch in alternation"
},
"fullDescription": {
"text": "Reports empty branches in a RegExp alternation. An empty branch will only match the empty string, and in most cases that is not what is desired. This inspection will not report a single empty branch at the start or the end of an alternation. Example: '(alpha||bravo)' After the quick-fix is applied: '(alpha|bravo)' New in 2017.2",
"markdown": "Reports empty branches in a RegExp alternation. An empty branch will only match the empty string, and in most cases that is not what is desired. This inspection will not report a single empty branch at the start or the end of an alternation.\n\n**Example:**\n\n\n (alpha||bravo)\n\nAfter the quick-fix is applied:\n\n\n (alpha|bravo)\n\nNew in 2017.2"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "RegExpEmptyAlternationBranch",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "RegExp",
"index": 115,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TodoComment",
"shortDescription": {
"text": "TODO comment"
},
"fullDescription": {
"text": "Reports TODO comments in your code. You can configure the format for TODO comments in Settings | Editor | TODO. Enable the Only warn on TODO comments without any details option to only warn on empty TODO comments, that don't provide any description on the task that should be done. Disable to report all TODO comments.",
"markdown": "Reports **TODO** comments in your code.\n\nYou can configure the format for **TODO** comments in [Settings \\| Editor \\| TODO](settings://preferences.toDoOptions).\n\nEnable the **Only warn on TODO comments without any details** option to only warn on empty TODO comments, that\ndon't provide any description on the task that should be done. Disable to report all TODO comments."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "TodoComment",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "General",
"index": 44,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "XmlDefaultAttributeValue",
"shortDescription": {
"text": "Redundant attribute with default value"
},
"fullDescription": {
"text": "Reports a redundant assignment of the default value to an XML attribute.",
"markdown": "Reports a redundant assignment of the default value to an XML attribute."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "XmlDefaultAttributeValue",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "XML",
"index": 112,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EmptyDirectory",
"shortDescription": {
"text": "Empty directory"
},
"fullDescription": {
"text": "Reports empty directories. Available only from Code | Inspect Code or Code | Analyze Code | Run Inspection by Name and isn't reported in the editor. Use the Only report empty directories located under a source folder option to have only directories under source roots reported.",
"markdown": "Reports empty directories.\n\nAvailable only from **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name** and isn't reported in the editor.\n\nUse the **Only report empty directories located under a source folder** option to have only directories under source\nroots reported."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EmptyDirectory",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "General",
"index": 44,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonAsciiCharacters",
"shortDescription": {
"text": "Non-ASCII characters"
},
"fullDescription": {
"text": "Reports code elements that use non-ASCII symbols in an unusual context. Example: Non-ASCII characters used in identifiers, strings, or comments. Identifiers written in different languages, such as 'myСollection' with the letter 'C' written in Cyrillic. Comments or strings containing Unicode symbols, such as long dashes and arrows.",
"markdown": "Reports code elements that use non-ASCII symbols in an unusual context.\n\nExample:\n\n* Non-ASCII characters used in identifiers, strings, or comments.\n* Identifiers written in different languages, such as `my`**С**`ollection` with the letter **C** written in Cyrillic.\n* Comments or strings containing Unicode symbols, such as long dashes and arrows."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonAsciiCharacters",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Internationalization",
"index": 225,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IgnoreFileDuplicateEntry",
"shortDescription": {
"text": "Ignore file duplicates"
},
"fullDescription": {
"text": "Reports duplicate entries (patterns) in the ignore file (e.g. .gitignore, .hgignore). Duplicate entries in these files are redundant and can be removed. Example: '# Output directories\n /out/\n /target/\n /out/'",
"markdown": "Reports duplicate entries (patterns) in the ignore file (e.g. .gitignore, .hgignore). Duplicate entries in these files are redundant and can be removed.\n\nExample:\n\n\n # Output directories\n /out/\n /target/\n /out/\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "IgnoreFileDuplicateEntry",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Version control",
"index": 247,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JsonStandardCompliance",
"shortDescription": {
"text": "Compliance with JSON standard"
},
"fullDescription": {
"text": "Reports the following discrepancies of a JSON file with the language specification: A line or block comment (configurable). Multiple top-level values (expect for JSON Lines files, configurable for others). A trailing comma in an object or array (configurable). A single quoted string. A property key is a not a double quoted strings. A NaN or Infinity/-Infinity numeric value as a floating point literal (configurable).",
"markdown": "Reports the following discrepancies of a JSON file with [the language specification](https://tools.ietf.org/html/rfc7159):\n\n* A line or block comment (configurable).\n* Multiple top-level values (expect for JSON Lines files, configurable for others).\n* A trailing comma in an object or array (configurable).\n* A single quoted string.\n* A property key is a not a double quoted strings.\n* A NaN or Infinity/-Infinity numeric value as a floating point literal (configurable)."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "JsonStandardCompliance",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JSON and JSON5",
"index": 150,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JsonSchemaRefReference",
"shortDescription": {
"text": "Unresolved '$ref' and '$schema' references"
},
"fullDescription": {
"text": "Reports an unresolved '$ref' or '$schema' path in a JSON schema.",
"markdown": "Reports an unresolved `$ref` or `$schema` path in a JSON schema. "
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JsonSchemaRefReference",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JSON and JSON5",
"index": 150,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RegExpSuspiciousBackref",
"shortDescription": {
"text": "Suspicious back reference"
},
"fullDescription": {
"text": "Reports back references that will not be resolvable at runtime. This means that the back reference can never match anything. A back reference will not be resolvable when the group is defined after the back reference, or if the group is defined in a different branch of an alternation. Example of a group defined after its back reference: '\\1(abc)' Example of a group and a back reference in different branches: 'a(b)c|(xy)\\1z' New in 2022.1",
"markdown": "Reports back references that will not be resolvable at runtime. This means that the back reference can never match anything. A back reference will not be resolvable when the group is defined after the back reference, or if the group is defined in a different branch of an alternation.\n\n**Example of a group defined after its back reference:**\n\n\n \\1(abc)\n\n**Example of a group and a back reference in different branches:**\n\n\n a(b)c|(xy)\\1z\n\nNew in 2022.1"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "RegExpSuspiciousBackref",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "RegExp",
"index": 115,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnresolvedReference",
"shortDescription": {
"text": "Unresolved reference"
},
"fullDescription": {
"text": "Reports an unresolved reference to a named pattern ('define') in RELAX-NG files that use XML syntax. Suggests creating the referenced 'define' element.",
"markdown": "Reports an unresolved reference to a named pattern (`define`) in RELAX-NG files that use XML syntax. Suggests creating the referenced `define` element."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "UnresolvedReference",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "RELAX NG",
"index": 237,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HtmlMissingClosingTag",
"shortDescription": {
"text": "Missing closing tag"
},
"fullDescription": {
"text": "Reports an HTML element without a closing tag. Some coding styles require that HTML elements have closing tags even where this is optional. Example: '<html>\n <body>\n <p>Behold!\n </body>\n </html>' After the quick-fix is applied: '<html>\n <body>\n <p>Behold!</p>\n </body>\n </html>'",
"markdown": "Reports an HTML element without a closing tag. Some coding styles require that HTML elements have closing tags even where this is optional.\n\n**Example:**\n\n\n <html>\n <body>\n <p>Behold!\n </body>\n </html>\n\nAfter the quick-fix is applied:\n\n\n <html>\n <body>\n <p>Behold!</p>\n </body>\n </html>\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "HtmlMissingClosingTag",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "HTML",
"index": 28,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "XmlInvalidId",
"shortDescription": {
"text": "Unresolved 'id' reference"
},
"fullDescription": {
"text": "Reports an unresolved 'id' reference in XML.",
"markdown": "Reports an unresolved `id` reference in XML."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "XmlInvalidId",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "XML",
"index": 112,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "XmlDeprecatedElement",
"shortDescription": {
"text": "Deprecated symbol"
},
"fullDescription": {
"text": "Reports a deprecated XML element or attribute. Symbols can be marked by XML comment or documentation tag with text 'deprecated'.",
"markdown": "Reports a deprecated XML element or attribute.\n\nSymbols can be marked by XML comment or documentation tag with text 'deprecated'."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "XmlDeprecatedElement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "XML",
"index": 112,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RegExpAnonymousGroup",
"shortDescription": {
"text": "Anonymous capturing group or numeric back reference"
},
"fullDescription": {
"text": "Reports anonymous capturing groups and numeric back references in a RegExp. These are only reported when the RegExp dialect supports named group and named group references. Named groups and named back references improve code readability and are recommended to use instead. When a capture is not needed, matching can be more performant and use less memory by using a non-capturing group, i.e. '(?:xxx)' instead of '(xxx)'. Example: '(\\d\\d\\d\\d)\\1' A better regex pattern could look like this: '(?<quad>\\d\\d\\d\\d)\\k<quad>' New in 2017.2",
"markdown": "Reports anonymous capturing groups and numeric back references in a RegExp. These are only reported when the RegExp dialect supports named group and named group references. Named groups and named back references improve code readability and are recommended to use instead. When a capture is not needed, matching can be more performant and use less memory by using a non-capturing group, i.e. `(?:xxx)` instead of `(xxx)`.\n\n**Example:**\n\n\n (\\d\\d\\d\\d)\\1\n\nA better regex pattern could look like this:\n\n\n (?<quad>\\d\\d\\d\\d)\\k<quad>\n\nNew in 2017.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RegExpAnonymousGroup",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "RegExp",
"index": 115,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RegExpRepeatedSpace",
"shortDescription": {
"text": "Consecutive spaces"
},
"fullDescription": {
"text": "Reports multiple consecutive spaces in a RegExp. Because spaces are not visible by default, it can be hard to see how many spaces are required. The RegExp can be made more clear by replacing the consecutive spaces with a single space and a counted quantifier. Example: '( )' After the quick-fix is applied: '( {5})' New in 2017.1",
"markdown": "Reports multiple consecutive spaces in a RegExp. Because spaces are not visible by default, it can be hard to see how many spaces are required. The RegExp can be made more clear by replacing the consecutive spaces with a single space and a counted quantifier.\n\n**Example:**\n\n\n ( )\n\nAfter the quick-fix is applied:\n\n\n ( {5})\n\n\nNew in 2017.1"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "RegExpRepeatedSpace",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "RegExp",
"index": 115,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InconsistentLineSeparators",
"shortDescription": {
"text": "Inconsistent line separators"
},
"fullDescription": {
"text": "Reports files with line separators different from the ones that are specified in the project's settings. For example, the inspection will be triggered if you set the line separator to '\\n' in Settings | Editor | Code Style | Line separator, while the file you are editing uses '\\r\\n' as a line separator. The inspection also warns you about mixed line separators within a file.",
"markdown": "Reports files with line separators different from the ones that are specified in the project's settings.\n\nFor example, the inspection will be triggered if you set the line separator to `\\n` in\n[Settings \\| Editor \\| Code Style \\| Line separator](settings://preferences.sourceCode?Line%20separator),\nwhile the file you are editing uses `\\r\\n` as a line separator.\n\nThe inspection also warns you about mixed line separators within a file."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "InconsistentLineSeparators",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "General",
"index": 44,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ProblematicWhitespace",
"shortDescription": {
"text": "Problematic whitespace"
},
"fullDescription": {
"text": "Reports the following problems: Tabs used for indentation when the code style is configured to use only spaces. Spaces used for indentation when the code style is configured to use only tabs. Spaces used for indentation and tabs used for alignment when the code style is configured to use smart tabs.",
"markdown": "Reports the following problems:\n\n* Tabs used for indentation when the code style is configured to use only spaces.\n* Spaces used for indentation when the code style is configured to use only tabs.\n* Spaces used for indentation and tabs used for alignment when the code style is configured to use smart tabs."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ProblematicWhitespace",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "General",
"index": 44,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LongLine",
"shortDescription": {
"text": "Line is longer than allowed by code style"
},
"fullDescription": {
"text": "Reports lines that are longer than the Hard wrap at parameter specified in Settings | Editor | Code Style | General.",
"markdown": "Reports lines that are longer than the **Hard wrap at** parameter specified in [Settings \\| Editor \\| Code Style \\| General](settings://preferences.sourceCode?Hard%20wrap%20at)."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LongLine",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "General",
"index": 44,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HtmlUnknownTag",
"shortDescription": {
"text": "Unknown tag"
},
"fullDescription": {
"text": "Reports an unknown HTML tag. Suggests configuring tags that should not be reported.",
"markdown": "Reports an unknown HTML tag. Suggests configuring tags that should not be reported."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "HtmlUnknownTag",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "HTML",
"index": 28,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "XmlHighlighting",
"shortDescription": {
"text": "XML highlighting"
},
"fullDescription": {
"text": "Reports XML validation problems in the results of a batch code inspection.",
"markdown": "Reports XML validation problems in the results of a batch code inspection."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "XmlHighlighting",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "XML",
"index": 112,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RegExpDuplicateCharacterInClass",
"shortDescription": {
"text": "Duplicate character in character class"
},
"fullDescription": {
"text": "Reports duplicate characters inside a RegExp character class. Duplicate characters are unnecessary and can be removed without changing the semantics of the regex. Example: '[aabc]' After the quick-fix is applied: '[abc]'",
"markdown": "Reports duplicate characters inside a RegExp character class. Duplicate characters are unnecessary and can be removed without changing the semantics of the regex.\n\n**Example:**\n\n\n [aabc]\n\nAfter the quick-fix is applied:\n\n\n [abc]\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "RegExpDuplicateCharacterInClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "RegExp",
"index": 115,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RequiredAttributes",
"shortDescription": {
"text": "Missing required attribute"
},
"fullDescription": {
"text": "Reports a missing mandatory attribute in an XML/HTML tag. Suggests configuring attributes that should not be reported.",
"markdown": "Reports a missing mandatory attribute in an XML/HTML tag. Suggests configuring attributes that should not be reported."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RequiredAttributes",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "HTML",
"index": 28,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RegExpRedundantClassElement",
"shortDescription": {
"text": "Redundant '\\d', '[:digit:]', or '\\D' class elements"
},
"fullDescription": {
"text": "Reports redundant '\\d' or '[:digit:]' that are used in one class with '\\w' or '[:word:]' ('\\D' with '\\W') and can be removed. Example: '[\\w\\d]' After the quick-fix is applied: '[\\w]' New in 2022.2",
"markdown": "Reports redundant `\\d` or `[:digit:]` that are used in one class with `\\w` or `[:word:]` (`\\D` with `\\W`) and can be removed.\n\n**Example:**\n\n\n [\\w\\d]\n\nAfter the quick-fix is applied:\n\n\n [\\w]\n\nNew in 2022.2"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "RegExpRedundantClassElement",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "RegExp",
"index": 115,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Json5StandardCompliance",
"shortDescription": {
"text": "Compliance with JSON5 standard"
},
"fullDescription": {
"text": "Reports inconsistency with the language specification in a JSON5 file.",
"markdown": "Reports inconsistency with [the language specification](http://json5.org) in a JSON5 file."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "Json5StandardCompliance",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JSON and JSON5",
"index": 150,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HtmlWrongAttributeValue",
"shortDescription": {
"text": "Wrong attribute value"
},
"fullDescription": {
"text": "Reports an incorrect HTML attribute value.",
"markdown": "Reports an incorrect HTML attribute value."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "HtmlWrongAttributeValue",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "HTML",
"index": 28,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CheckValidXmlInScriptTagBody",
"shortDescription": {
"text": "Malformed content of 'script' tag"
},
"fullDescription": {
"text": "Reports contents of 'script' tags that are invalid XML. Example: '<script type=\"text/javascript\">\n console.log('<');\n </script>' After the quick-fix is applied: '<script type=\"text/javascript\">\n console.log('&lt;');\n </script>'",
"markdown": "Reports contents of `script` tags that are invalid XML. \n\n**Example:**\n\n\n <script type=\"text/javascript\">\n console.log('<');\n </script>\n\nAfter the quick-fix is applied:\n\n\n <script type=\"text/javascript\">\n console.log('&lt;');\n </script>\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "CheckValidXmlInScriptTagBody",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "HTML",
"index": 28,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HtmlUnknownAnchorTarget",
"shortDescription": {
"text": "Unresolved fragment in a link"
},
"fullDescription": {
"text": "Reports an unresolved last part of an URL after the '#' sign.",
"markdown": "Reports an unresolved last part of an URL after the `#` sign."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "HtmlUnknownAnchorTarget",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "HTML",
"index": 28,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Annotator",
"shortDescription": {
"text": "Annotator"
},
"fullDescription": {
"text": "Reports issues essential to this file (e.g., syntax errors) in the result of a batch code inspection run. These issues are usually always highlighted in the editor and can't be configured, unlike inspections. These options control the scope of checks performed by this inspection: Option \"Report syntax errors\": report parser-related issues. Option \"Report issues from language-specific annotators\": report issues found by annotators configured for the relevant language. See Custom Language Support: Annotators for details. Option \"Report other highlighting problems\": report issues specific to the language of the current file (e.g., type mismatches or unreported exceptions). See Custom Language Support: Highlighting for details.",
"markdown": "Reports issues essential to this file (e.g., syntax errors) in the result of a batch code inspection run. These issues are usually always highlighted in the editor and can't be configured, unlike inspections. These options control the scope of checks performed by this inspection:\n\n* Option \"**Report syntax errors**\": report parser-related issues.\n* Option \"**Report issues from language-specific annotators** \": report issues found by annotators configured for the relevant language. See [Custom Language Support: Annotators](https://plugins.jetbrains.com/docs/intellij/annotator.html) for details.\n* Option \"**Report other highlighting problems** \": report issues specific to the language of the current file (e.g., type mismatches or unreported exceptions). See [Custom Language Support: Highlighting](https://plugins.jetbrains.com/docs/intellij/syntax-highlighting-and-error-highlighting.html#semantic-highlighting) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "Annotator",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "General",
"index": 44,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JsonDuplicatePropertyKeys",
"shortDescription": {
"text": "Duplicate keys in object literals"
},
"fullDescription": {
"text": "Reports a duplicate key in an object literal.",
"markdown": "Reports a duplicate key in an object literal."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JsonDuplicatePropertyKeys",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JSON and JSON5",
"index": 150,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "gherkin",
"version": "232.8660.185",
"rules": [
{
"id": "GherkinScenarioToScenarioOutline",
"shortDescription": {
"text": "Scenario with Examples section"
},
"fullDescription": {
"text": "Reports Gherkin scenarios that contain an 'Examples' section. Use the quick-fix to convert 'Scenario' to 'Scenario Outline'.",
"markdown": "Reports Gherkin scenarios that contain an `Examples` section.\n\nUse the quick-fix to convert `Scenario` to `Scenario Outline`."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "GherkinScenarioToScenarioOutline",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Cucumber",
"index": 29,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CucumberTableInspection",
"shortDescription": {
"text": "Unused or missing columns in Cucumber tables"
},
"fullDescription": {
"text": "Reports tables in 'Examples' sections in Cucumber .feature files with unused or missing columns.",
"markdown": "Reports tables in `Examples` sections in Cucumber .feature files with unused or missing columns."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CucumberTableInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Cucumber",
"index": 29,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GherkinMisplacedBackground",
"shortDescription": {
"text": "Misplaced background section"
},
"fullDescription": {
"text": "Reports 'Background' sections that are located incorrectly. The 'Background' section must be located before the 'Scenario' section.",
"markdown": "Reports `Background` sections that are located incorrectly. The `Background` section must be located before the `Scenario` section."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "GherkinMisplacedBackground",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Cucumber",
"index": 29,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CucumberUndefinedStep",
"shortDescription": {
"text": "Undefined step"
},
"fullDescription": {
"text": "Reports steps in Cucumber (or some other Gherkin) .feature files that do not have matching step definitions. Use the quick-fix to automatically create a new step definition.",
"markdown": "Reports steps in Cucumber (or some other Gherkin) .feature files that do not have matching step definitions.\n\nUse the quick-fix to automatically create a new step definition."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CucumberUndefinedStep",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Cucumber",
"index": 29,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GherkinBrokenTableInspection",
"shortDescription": {
"text": "Gherkin table is broken"
},
"fullDescription": {
"text": "Reports a table if there is at least one row with the number of cells different from the number of cells in the table header.",
"markdown": "Reports a table if there is at least one row with the number of cells different from the number of cells in the table header."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "GherkinBrokenTableInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Cucumber",
"index": 29,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CucumberExamplesColon",
"shortDescription": {
"text": "Missing ':' after examples keyword"
},
"fullDescription": {
"text": "Reports 'Examples' sections in Cucumber .feature files if they do not have ':' after the 'Examples' keyword.",
"markdown": "Reports `Examples` sections in Cucumber .feature files if they do not have ':' after the `Examples` keyword."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "CucumberExamplesColon",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Cucumber",
"index": 29,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CucumberMissedExamples",
"shortDescription": {
"text": "Missing examples section"
},
"fullDescription": {
"text": "Reports scenario outlines in Cucumber .feature files that do not have the 'Examples' section. Use the quick-fix to automatically create the 'Examples' section with a pre-filled table header.",
"markdown": "Reports scenario outlines in Cucumber .feature files that do not have the `Examples` section.\n\nUse the quick-fix to automatically create the `Examples` section with a pre-filled table header."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "CucumberMissedExamples",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Cucumber",
"index": 29,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "JavaScript",
"version": "232.8660.185",
"rules": [
{
"id": "FlowJSError",
"shortDescription": {
"text": "Flow type checker"
},
"fullDescription": {
"text": "Reports errors from Flow.",
"markdown": "Reports errors from [Flow](https://flowtype.org/)."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "FlowJSError",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Flow type checker",
"index": 31,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ShiftOutOfRangeJS",
"shortDescription": {
"text": "Shift operation by possibly wrong constant"
},
"fullDescription": {
"text": "Reports a shift operation where the second operand is a constant outside the reasonable range, for example, an integer shift operation outside the range '0..31', shifting by negative or overly large values.",
"markdown": "Reports a shift operation where the second operand is a constant outside the reasonable range, for example, an integer shift operation outside the range `0..31`, shifting by negative or overly large values."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ShiftOutOfRangeJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Bitwise operation issues",
"index": 37,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSClosureCompilerSyntax",
"shortDescription": {
"text": "Incorrect usage of JSDoc tags"
},
"fullDescription": {
"text": "Reports warnings implied by Google Closure Compiler annotations including correct use of '@abstract', '@interface', and '@implements' tags.",
"markdown": "Reports warnings implied by *Google Closure Compiler* annotations including correct use of `@abstract`, `@interface`, and `@implements` tags."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSClosureCompilerSyntax",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BadExpressionStatementJS",
"shortDescription": {
"text": "Expression statement which is not assignment or call"
},
"fullDescription": {
"text": "Reports an expression statement that is neither an assignment nor a call. Such statements usually indicate an error.",
"markdown": "Reports an expression statement that is neither an assignment nor a call. Such statements usually indicate an error."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "BadExpressionStatementJS",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Validity issues",
"index": 52,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ContinueStatementJS",
"shortDescription": {
"text": "'continue' statement"
},
"fullDescription": {
"text": "Reports a 'continue' statement.",
"markdown": "Reports a `continue` statement."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ContinueStatementJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Potentially undesirable code constructs",
"index": 76,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSXSyntaxUsed",
"shortDescription": {
"text": "JSX syntax used"
},
"fullDescription": {
"text": "Reports a usage of a JSX tag in JavaScript code.",
"markdown": "Reports a usage of a JSX tag in JavaScript code."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "JSXSyntaxUsed",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSJoinVariableDeclarationAndAssignment",
"shortDescription": {
"text": "Variable declaration can be merged with the first assignment to the variable"
},
"fullDescription": {
"text": "Reports a variable that is declared without an initializer and is used much further in the code or in a single nested scope. Suggests moving the variable closer to its usages and joining it with the initializer expression.",
"markdown": "Reports a variable that is declared without an initializer and is used much further in the code or in a single nested scope. Suggests moving the variable closer to its usages and joining it with the initializer expression."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "JSJoinVariableDeclarationAndAssignment",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ES6ConvertModuleExportToExport",
"shortDescription": {
"text": "'module.exports' is used instead of 'export'"
},
"fullDescription": {
"text": "Reports a 'module.export' statement. Suggests replacing it with an 'export' or 'export default' statement. Please note that the quick-fix for converting 'module.export' into 'export' is not available for 'module.export' inside functions or statements because 'export' statements can only be at the top level of a module.",
"markdown": "Reports a `module.export` statement. Suggests replacing it with an `export` or `export default` statement. \n\nPlease note that the quick-fix for converting `module.export` into `export` is not available for `module.export` inside functions or statements because `export` statements can only be at the top level of a module."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ES6ConvertModuleExportToExport",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/ES2015 migration aids",
"index": 105,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DocumentWriteJS",
"shortDescription": {
"text": "Call to 'document.write()'"
},
"fullDescription": {
"text": "Reports a method call to 'document.write()' or 'document.writeln()'. Most usages of such calls are performed better with explicit DOM calls, such as 'getElementByID()' and 'createElement()'. Additionally, the 'write()' and 'writeln()' calls will not work with XML DOMs, including DOMs for XHTML if viewed as XML. This can result in difficulty to point out bugs.",
"markdown": "Reports a method call to `document.write()` or `document.writeln()`. Most usages of such calls are performed better with explicit DOM calls, such as `getElementByID()` and `createElement()`. Additionally, the `write()` and `writeln()` calls will not work with XML DOMs, including DOMs for XHTML if viewed as XML. This can result in difficulty to point out bugs."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DocumentWriteJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/DOM issues",
"index": 108,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IncompatibleMaskJS",
"shortDescription": {
"text": "Incompatible bitwise mask operation"
},
"fullDescription": {
"text": "Reports a bitwise mask expression which for sure evaluates to 'true' or 'false'. Expressions are of the form '(var & constant1) == constant2' or '(var | constant1) == constant2', where 'constant1' and 'constant2' are incompatible bitmask constants. Example: '// Incompatible mask: as the last byte in mask is zero,\n// something like 0x1200 would be possible, but not 0x1234\nif ((mask & 0xFF00) == 0x1234) {...}'",
"markdown": "Reports a bitwise mask expression which for sure evaluates to `true` or `false`. Expressions are of the form `(var & constant1) == constant2` or `(var | constant1) == constant2`, where `constant1` and `constant2` are incompatible bitmask constants.\n\nExample:\n\n\n // Incompatible mask: as the last byte in mask is zero,\n // something like 0x1200 would be possible, but not 0x1234\n if ((mask & 0xFF00) == 0x1234) {...}\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "IncompatibleBitwiseMaskOperation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Bitwise operation issues",
"index": 37,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSDuplicatedDeclaration",
"shortDescription": {
"text": "Duplicate declaration"
},
"fullDescription": {
"text": "Reports multiple declarations in a scope.",
"markdown": "Reports multiple declarations in a scope."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSDuplicatedDeclaration",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TypeScriptValidateGenericTypes",
"shortDescription": {
"text": "Incorrect generic type argument"
},
"fullDescription": {
"text": "Reports an invalid type argument in a function, interface, or class declaration.",
"markdown": "Reports an invalid type argument in a function, interface, or class declaration."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "TypeScriptValidateGenericTypes",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/TypeScript",
"index": 111,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSFileReferences",
"shortDescription": {
"text": "Unresolved file reference"
},
"fullDescription": {
"text": "Reports an unresolved file reference in a JavaScript file, including CommonJS and AMD modules references.",
"markdown": "Reports an unresolved file reference in a JavaScript file, including CommonJS and AMD modules references."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSFileReferences",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FunctionWithInconsistentReturnsJS",
"shortDescription": {
"text": "Function with inconsistent returns"
},
"fullDescription": {
"text": "Reports a function that returns a value in some cases while in other cases no value is returned. This usually indicates an error. Example: 'function foo() {\n if (true)\n return 3;\n return;\n}'",
"markdown": "Reports a function that returns a value in some cases while in other cases no value is returned. This usually indicates an error.\n\nExample:\n\n\n function foo() {\n if (true)\n return 3;\n return;\n }\n\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FunctionWithInconsistentReturnsJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Validity issues",
"index": 52,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ES6ClassMemberInitializationOrder",
"shortDescription": {
"text": "Use of possibly unassigned property in a static initializer"
},
"fullDescription": {
"text": "Reports a class member initializer which references another non-hoisted class member while the latter may be not initialized yet. Initialization of class members happens consequently for fields, so a field cannot reference another field that is declared later.",
"markdown": "Reports a class member initializer which references another non-hoisted class member while the latter may be not initialized yet. \n\nInitialization of class members happens consequently for fields, so a field cannot reference another field that is declared later."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ES6ClassMemberInitializationOrder",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NestedFunctionJS",
"shortDescription": {
"text": "Nested function"
},
"fullDescription": {
"text": "Reports a function nested inside another function. Although JavaScript allows functions to be nested, such constructs may be confusing. Use the checkbox below to ignore anonymous nested functions.",
"markdown": "Reports a function nested inside another function. Although JavaScript allows functions to be nested, such constructs may be confusing.\n\n\nUse the checkbox below to ignore anonymous nested functions."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NestedFunctionJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Potentially confusing code constructs",
"index": 123,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TypeScriptUMDGlobal",
"shortDescription": {
"text": "Referenced UMD global variable"
},
"fullDescription": {
"text": "Reports a usage of a Universal Module Definition (UMD) global variable if the current file is a module (ECMAScript or CommonJS). Referencing UMD variables without explicit imports can lead to a runtime error if the library isn't included implicitly.",
"markdown": "Reports a usage of a Universal Module Definition (UMD) global variable if the current file is a module (ECMAScript or CommonJS). Referencing UMD variables without explicit imports can lead to a runtime error if the library isn't included implicitly."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "TypeScriptUMDGlobal",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/TypeScript",
"index": 111,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryReturnJS",
"shortDescription": {
"text": "Unnecessary 'return' statement"
},
"fullDescription": {
"text": "Reports an unnecessary 'return' statement, that is, a 'return' statement that returns no value and occurs just before the function would have \"fallen through\" the bottom. These statements may be safely removed.",
"markdown": "Reports an unnecessary `return` statement, that is, a `return` statement that returns no value and occurs just before the function would have \"fallen through\" the bottom. These statements may be safely removed."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryReturnStatementJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Control flow issues",
"index": 129,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StandardJS",
"shortDescription": {
"text": "Standard code style"
},
"fullDescription": {
"text": "Reports a discrepancy detected by the JavaScript Standard Style linter. The highlighting severity in the editor is based on the severity level the linter reports.",
"markdown": "Reports a discrepancy detected by the [JavaScript Standard Style](https://standardjs.com/) linter. \n\nThe highlighting severity in the editor is based on the severity level the linter reports."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "StandardJS",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Code quality tools",
"index": 134,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSCommentMatchesSignature",
"shortDescription": {
"text": "Mismatched JSDoc and function signature"
},
"fullDescription": {
"text": "Reports mismatch between the names and the number of parameters within a JSDoc comment and the actual parameters of a function. Suggests updating parameters in JSDoc comment. Example: '/**\n * @param height Height in pixels\n */\nfunction sq(height, width) {} // width is not documented' After the quick-fix is applied: '/**\n * @param height Height in pixels\n * @param width\n */\nfunction sq(height, width) {}'",
"markdown": "Reports mismatch between the names and the number of parameters within a JSDoc comment and the actual parameters of a function. Suggests updating parameters in JSDoc comment.\n\n**Example:**\n\n\n /**\n * @param height Height in pixels\n */\n function sq(height, width) {} // width is not documented\n\nAfter the quick-fix is applied:\n\n\n /**\n * @param height Height in pixels\n * @param width\n */\n function sq(height, width) {}\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSCommentMatchesSignature",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FunctionWithMultipleReturnPointsJS",
"shortDescription": {
"text": "Function with multiple return points"
},
"fullDescription": {
"text": "Reports a function with multiple return points. Such functions are hard to understand and maintain.",
"markdown": "Reports a function with multiple return points. Such functions are hard to understand and maintain."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FunctionWithMultipleReturnPointsJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Function metrics",
"index": 144,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSRemoveUnnecessaryParentheses",
"shortDescription": {
"text": "Unnecessary parentheses"
},
"fullDescription": {
"text": "Reports redundant parentheses. In expressions: 'var x = ((1) + 2) + 3' In arrow function argument lists: 'var incrementer = (x) => x + 1' In TypeScript and Flow type declarations: 'type Card = (Suit & Rank) | (Suit & Number)'",
"markdown": "Reports redundant parentheses.\n\nIn expressions:\n\n var x = ((1) + 2) + 3\n\nIn arrow function argument lists:\n\n var incrementer = (x) => x + 1\n\nIn TypeScript and Flow type declarations:\n\n type Card = (Suit & Rank) | (Suit & Number)\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "JSRemoveUnnecessaryParentheses",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Code style issues",
"index": 146,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CommaExpressionJS",
"shortDescription": {
"text": "Comma expression"
},
"fullDescription": {
"text": "Reports a comma expression. Such expressions are often a sign of overly clever code, and may lead to subtle bugs. Comma expressions in the initializer or in the update section of 'for' loops are ignored.",
"markdown": "Reports a comma expression. Such expressions are often a sign of overly clever code, and may lead to subtle bugs. Comma expressions in the initializer or in the update section of `for` loops are ignored."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CommaExpressionJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Potentially undesirable code constructs",
"index": 76,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ES6BindWithArrowFunction",
"shortDescription": {
"text": "Suspicious usage of 'bind' with arrow function"
},
"fullDescription": {
"text": "Reports 'bind' used together with an arrow function. Because arrow functions use lexical 'this', a 'bind' call will have no effect on them. See here for details.",
"markdown": "Reports `bind` used together with an arrow function. \nBecause arrow functions use lexical `this`, a `bind` call will have no effect on them. \nSee [here](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Functions/Arrow_functions#Lexical_this) for details."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ES6BindWithArrowFunction",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Probable bugs",
"index": 153,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSBitwiseOperatorUsage",
"shortDescription": {
"text": "Bitwise operator usage"
},
"fullDescription": {
"text": "Reports a suspicious usage of a bitwise AND (\"'&'\") or OR (\"'|'\") operator. Usually it is a typo and the result of applying boolean operations AND (\"'&&'\") and OR (\"'||'\") is expected.",
"markdown": "Reports a suspicious usage of a bitwise AND (\"`&`\") or OR (\"`|`\") operator. Usually it is a typo and the result of applying boolean operations AND (\"`&&`\") and OR (\"`||`\") is expected."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSBitwiseOperatorUsage",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Bitwise operation issues",
"index": 37,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IfStatementWithIdenticalBranchesJS",
"shortDescription": {
"text": "'if' statement with identical branches"
},
"fullDescription": {
"text": "Reports an 'if' statement with identical 'then' and 'else' branches. Such statements are almost certainly an error.",
"markdown": "Reports an `if` statement with identical `then` and `else` branches. Such statements are almost certainly an error."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "IfStatementWithIdenticalBranchesJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Control flow issues",
"index": 129,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSConsecutiveCommasInArrayLiteral",
"shortDescription": {
"text": "Consecutive commas in array literal"
},
"fullDescription": {
"text": "Reports a consecutive comma in an array literal. The skipped element accepts the 'undefined' value, but it could be done unintentionally, for example, when commas are at the end of one line and at the beginning of the next one.",
"markdown": "Reports a consecutive comma in an array literal. The skipped element accepts the `undefined` value, but it could be done unintentionally, for example, when commas are at the end of one line and at the beginning of the next one."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSConsecutiveCommasInArrayLiteral",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Probable bugs",
"index": 153,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSValidateTypes",
"shortDescription": {
"text": "Type mismatch"
},
"fullDescription": {
"text": "Reports incorrect type of: a parameter in a function call a return value an assigned expression TypeScript code is ignored.",
"markdown": "Reports incorrect type of:\n\n* a parameter in a function call\n* a return value\n* an assigned expression\n\nTypeScript code is ignored."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "JSValidateTypes",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSPotentiallyInvalidUsageOfClassThis",
"shortDescription": {
"text": "Potentially invalid reference to 'this' of a class from closure"
},
"fullDescription": {
"text": "Reports an attempt to reference a member of an ECMAScript class via the 'this.' qualifier in a nested function that is not a lambda. 'this' in a nested function that is not a lambda is the function's own 'this' and doesn't relate to the outer class.",
"markdown": "Reports an attempt to reference a member of an ECMAScript class via the `this.` qualifier in a nested function that is not a lambda. \n`this` in a nested function that is not a lambda is the function's own `this` and doesn't relate to the outer class."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSPotentiallyInvalidUsageOfClassThis",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Probable bugs",
"index": 153,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryContinueJS",
"shortDescription": {
"text": "Unnecessary 'continue' statement"
},
"fullDescription": {
"text": "Reports an unnecessary 'continue' statement at the end of a loop. Suggests removing such statements.",
"markdown": "Reports an unnecessary `continue` statement at the end of a loop. Suggests removing such statements."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryContinueJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Control flow issues",
"index": 129,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BreakStatementWithLabelJS",
"shortDescription": {
"text": "'break' statement with label"
},
"fullDescription": {
"text": "Reports a labeled 'break' statement.",
"markdown": "Reports a labeled `break` statement."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "BreakStatementWithLabelJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Potentially undesirable code constructs",
"index": 76,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSDeclarationsAtScopeStart",
"shortDescription": {
"text": "'var' declared not at the beginning of a function"
},
"fullDescription": {
"text": "Checks that declarations of local variables declared with var are at the top of a function scope. By default, variable declarations are always moved (\"hoisted\") invisibly to the top of their containing scope when the code is executed. Therefore, declaring them at the top of the scope helps represent this behavior in the code.",
"markdown": "Checks that declarations of local variables declared with **var** are at the top of a function scope. \n\nBy default, variable declarations are always moved (\"hoisted\") invisibly to the top of their containing scope when the code is executed. Therefore, declaring them at the top of the scope helps represent this behavior in the code."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "JSDeclarationsAtScopeStart",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Code style issues",
"index": 146,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ES6ConvertIndexedForToForOf",
"shortDescription": {
"text": "Indexed 'for' is used instead of 'for..of'"
},
"fullDescription": {
"text": "Reports an indexed 'for' loop used on an array. Suggests replacing it with a 'for..of' loop. 'for..of' loops are introduced in ECMAScript 6 and iterate over 'iterable' objects.",
"markdown": "Reports an indexed [for](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for) loop used on an array. Suggests replacing it with a [for..of](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) loop. \n`for..of` loops are introduced in ECMAScript 6 and iterate over `iterable` objects."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ES6ConvertIndexedForToForOf",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/ES2015 migration aids",
"index": 105,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ES6ConvertVarToLetConst",
"shortDescription": {
"text": "'var' is used instead of 'let' or 'const'"
},
"fullDescription": {
"text": "Reports a 'var' declaration that is used instead of 'let' or 'const'. Both 'let' and 'const' are block-scoped and behave more strictly. Suggests replacing all 'var' declarations with 'let' or 'const' declarations, depending on the semantics of a particular value. The declarations may be moved to the top of the function or placed before the first usage of the variable to avoid Reference errors. Select the 'Conservatively convert var with Fix all action' option to prevent any changes in these complex cases when using the 'Fix all' action.",
"markdown": "Reports a `var` declaration that is used instead of `let` or `const`. \nBoth `let` and `const` are block-scoped and behave more strictly. \n\nSuggests replacing all `var` declarations with `let` or `const` declarations, depending on the semantics of a particular value. The declarations may be moved to the top of the function or placed before the first usage of the variable to avoid Reference errors. \nSelect the 'Conservatively convert var with Fix all action' option to prevent any changes in these complex cases when using the 'Fix all' action."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ES6ConvertVarToLetConst",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/ES2015 migration aids",
"index": 105,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DynamicallyGeneratedCodeJS",
"shortDescription": {
"text": "Execution of dynamically generated code"
},
"fullDescription": {
"text": "Reports a call of the 'eval()', 'setTimeout()', or 'setInterval()' function or an allocation of a 'Function' object. These functions are used to execute arbitrary strings of JavaScript text, which often dynamically generated. This can be very confusing, and may be a security risk. Ignores the cases when a callback function is provided to these methods statically, without code generation.",
"markdown": "Reports a call of the `eval()`, `setTimeout()`, or `setInterval()` function or an allocation of a `Function` object. These functions are used to execute arbitrary strings of JavaScript text, which often dynamically generated. This can be very confusing, and may be a security risk. \n\nIgnores the cases when a callback function is provided to these methods statically, without code generation."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DynamicallyGeneratedCodeJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Potentially confusing code constructs",
"index": 123,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnusedCatchParameterJS",
"shortDescription": {
"text": "Unused 'catch' parameter"
},
"fullDescription": {
"text": "Reports a 'catch' parameter that is not used in the corresponding block. The 'catch' parameters named 'ignore' or 'ignored' are ignored. Use the checkbox below to disable this inspection for 'catch' blocks with comments.",
"markdown": "Reports a `catch` parameter that is not used in the corresponding block. The `catch` parameters named `ignore` or `ignored` are ignored.\n\n\nUse the checkbox below to disable this inspection for `catch`\nblocks with comments."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnusedCatchParameterJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Try statement issues",
"index": 181,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AnonymousFunctionJS",
"shortDescription": {
"text": "Anonymous function"
},
"fullDescription": {
"text": "Reports an anonymous function. An explicit name of a function expression may be helpful for debugging. Ignores function expressions without names if they have a 'name' property specified in the ECMAScript 6 standard. For example, 'var bar = function() {};' is not reported.",
"markdown": "Reports an anonymous function. An explicit name of a function expression may be helpful for debugging. Ignores function expressions without names if they have a `name` property specified in the ECMAScript 6 standard. For example, `var bar = function() {};` is not reported."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AnonymousFunctionJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Potentially undesirable code constructs",
"index": 76,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EmptyCatchBlockJS",
"shortDescription": {
"text": "Empty 'catch' block"
},
"fullDescription": {
"text": "Reports an empty 'catch' block. This indicates that errors are simply ignored instead of handling them. Any comment in a 'catch' block mutes the inspection.",
"markdown": "Reports an empty `catch` block. This indicates that errors are simply ignored instead of handling them. \n\nAny comment in a `catch` block mutes the inspection."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EmptyCatchBlockJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Try statement issues",
"index": 181,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ThrowFromFinallyBlockJS",
"shortDescription": {
"text": "'throw' inside 'finally' block"
},
"fullDescription": {
"text": "Reports s 'throw' statement inside a 'finally' block. Such 'throw' statements may mask exceptions thrown, and complicate debugging.",
"markdown": "Reports s `throw` statement inside a `finally` block. Such `throw` statements may mask exceptions thrown, and complicate debugging."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ThrowInsideFinallyBlockJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Try statement issues",
"index": 181,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSPotentiallyInvalidUsageOfThis",
"shortDescription": {
"text": "Potentially invalid reference to 'this' from closure"
},
"fullDescription": {
"text": "Reports a 'this' in closure that is used for referencing properties of outer context. Example: 'function Outer() {\n this.outerProp = 1;\n function inner() {\n // bad, because 'outerProp' of Outer\n // won't be updated here\n // on calling 'new Outer()' as may be expected\n this.outerProp = 2;\n }\n inner();\n}'",
"markdown": "Reports a `this` in closure that is used for referencing properties of outer context.\n\nExample:\n\n\n function Outer() {\n this.outerProp = 1;\n function inner() {\n // bad, because 'outerProp' of Outer\n // won't be updated here\n // on calling 'new Outer()' as may be expected\n this.outerProp = 2;\n }\n inner();\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSPotentiallyInvalidUsageOfThis",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Probable bugs",
"index": 153,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSUnresolvedLibraryURL",
"shortDescription": {
"text": "Missed locally stored library for HTTP link"
},
"fullDescription": {
"text": "Reports a URL of an external JavaScript library that is not associated with any locally stored file. Suggests downloading the library. Such association enables the IDE to provide proper code completion and navigation.",
"markdown": "Reports a URL of an external JavaScript library that is not associated with any locally stored file. Suggests downloading the library. Such association enables the IDE to provide proper code completion and navigation."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSUnresolvedLibraryURL",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TypeScriptFieldCanBeMadeReadonly",
"shortDescription": {
"text": "Field can be readonly"
},
"fullDescription": {
"text": "Reports a private field that can be made readonly (for example, if the field is assigned only in the constructor).",
"markdown": "Reports a private field that can be made readonly (for example, if the field is assigned only in the constructor)."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "TypeScriptFieldCanBeMadeReadonly",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/TypeScript",
"index": 111,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NegatedIfStatementJS",
"shortDescription": {
"text": "Negated 'if' statement"
},
"fullDescription": {
"text": "Reports if statements which have an else branch and a negated condition. Flipping the order of the if and else branches will usually increase the clarity of such statements.",
"markdown": "Reports **if** statements which have an **else** branch and a negated condition. Flipping the order of the **if** and **else** branches will usually increase the clarity of such statements."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NegatedIfStatementJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Potentially confusing code constructs",
"index": 123,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConditionalExpressionWithIdenticalBranchesJS",
"shortDescription": {
"text": "Conditional expression with identical branches"
},
"fullDescription": {
"text": "Reports a ternary conditional expression with identical 'then' and 'else' branches.",
"markdown": "Reports a ternary conditional expression with identical `then` and `else` branches."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ConditionalExpressionWithIdenticalBranchesJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Control flow issues",
"index": 129,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSIncompatibleTypesComparison",
"shortDescription": {
"text": "Comparison of expressions having incompatible types"
},
"fullDescription": {
"text": "Reports a comparison with operands of incompatible types or an operand with a type without possible common values.",
"markdown": "Reports a comparison with operands of incompatible types or an operand with a type without possible common values."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "JSIncompatibleTypesComparison",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Probable bugs",
"index": 153,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ES6TopLevelAwaitExpression",
"shortDescription": {
"text": "Top-level 'await' expression"
},
"fullDescription": {
"text": "Reports a usage of a top-level 'await' expression. While the new 'top-level async' proposal is on its way, using 'await' outside async functions is not allowed.",
"markdown": "Reports a usage of a top-level `await` expression. While the new 'top-level async' proposal is on its way, using `await` outside async functions is not allowed."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "ES6TopLevelAwaitExpression",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Async code and promises",
"index": 195,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ParameterNamingConventionJS",
"shortDescription": {
"text": "Function parameter naming convention"
},
"fullDescription": {
"text": "Reports a function parameter whose name is too short, too long, or doesn't follow the specified regular expression pattern. Use the fields provided below to specify minimum length, maximum length and regular expression expected for local variables names. Use the standard 'java.util.regex' format regular expressions.",
"markdown": "Reports a function parameter whose name is too short, too long, or doesn't follow the specified regular expression pattern.\n\n\nUse the fields provided below to specify minimum length, maximum length and regular expression\nexpected for local variables names. Use the standard `java.util.regex` format regular expressions."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ParameterNamingConventionJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Naming conventions",
"index": 196,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ParametersPerFunctionJS",
"shortDescription": {
"text": "Function with too many parameters"
},
"fullDescription": {
"text": "Reports a function with too many parameters. Such functions often indicate problems with design. Use the field below to specify the maximum acceptable number of parameters for a function.",
"markdown": "Reports a function with too many parameters. Such functions often indicate problems with design.\n\n\nUse the field below to specify the maximum acceptable number of parameters for a function."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OverlyComplexFunctionJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Function metrics",
"index": 144,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSSuspiciousNameCombination",
"shortDescription": {
"text": "Suspicious variable/parameter name combination"
},
"fullDescription": {
"text": "Reports an assignment or a function call where the name of the target variable or the function parameter does not match the name of the value assigned to it. Example: 'var x = 0;\n var y = x;' or 'var x = 0, y = 0;\n var rc = new Rectangle(y, x, 20, 20);' Here the inspection guesses that 'x' and 'y' are mixed up. Specify the names that should not be used together. An error is reported if a parameter name or an assignment target name contains words from one group while the name of the assigned or passed variable contains words from another group.",
"markdown": "Reports an assignment or a function call where the name of the target variable or the function parameter does not match the name of the value assigned to it.\n\nExample:\n\n\n var x = 0;\n var y = x;\n\nor\n\n\n var x = 0, y = 0;\n var rc = new Rectangle(y, x, 20, 20);\n\nHere the inspection guesses that `x` and `y` are mixed up.\n\nSpecify the names that should not be used together. An error is reported\nif a parameter name or an assignment target name contains words from one group while the name of the assigned or passed\nvariable contains words from another group."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSSuspiciousNameCombination",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Probable bugs",
"index": 153,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ChainedFunctionCallJS",
"shortDescription": {
"text": "Chained function call"
},
"fullDescription": {
"text": "Reports a function call whose target is another function call, for example, 'foo().bar()'",
"markdown": "Reports a function call whose target is another function call, for example, `foo().bar()`"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ChainedFunctionCallJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Code style issues",
"index": 146,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConstantOnLHSOfComparisonJS",
"shortDescription": {
"text": "Constant on left side of comparison"
},
"fullDescription": {
"text": "Reports a comparison operation with a constant value in the left-hand side. According to coding conventions, constants should be in the right-hand side of comparisons.",
"markdown": "Reports a comparison operation with a constant value in the left-hand side. According to coding conventions, constants should be in the right-hand side of comparisons."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ConstantOnLefSideOfComparisonJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Code style issues",
"index": 146,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSCheckFunctionSignatures",
"shortDescription": {
"text": "Signature mismatch"
},
"fullDescription": {
"text": "Reports a JavaScript call expression where the arguments do not match the signature of the referenced function, including the types of arguments and their number. Also, reports if the overloading function doesn't match the overloaded one in terms of parameters and return types. TypeScript code is ignored.",
"markdown": "Reports a JavaScript call expression where the arguments do not match the signature of the referenced function, including the types of arguments and their number. Also, reports if the overloading function doesn't match the overloaded one in terms of parameters and return types.\n\nTypeScript code is ignored."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "JSCheckFunctionSignatures",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TypeScriptUnresolvedReference",
"shortDescription": {
"text": "Unresolved TypeScript reference"
},
"fullDescription": {
"text": "Reports an unresolved reference in TypeScript code.",
"markdown": "Reports an unresolved reference in TypeScript code."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "TypeScriptUnresolvedReference",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/TypeScript",
"index": 111,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ES6RedundantAwait",
"shortDescription": {
"text": "Redundant 'await' expression"
},
"fullDescription": {
"text": "Reports a redundant usage of 'await', such as 'await await', or awaiting a non-promise result. When the 'Report for promises' option is selected, suggests removing 'await' before promises when applicable (in 'return' statements, and with 'Promise.resolve/reject'). Removing 'await' in such contexts causes two problems. Surrounding your code with 'try-catch' and forgetting to add 'await' will change code semantics while you may fail to notice that. Having an explicit 'await' may prevent the V8 runtime from providing async stack traces.",
"markdown": "Reports a redundant usage of `await`, such as `await await`, or awaiting a non-promise result.\n\n\nWhen the 'Report for promises' option is selected, suggests removing `await` before promises when applicable\n(in `return` statements, and with `Promise.resolve/reject`).\n\nRemoving `await` in such contexts causes two problems.\n\n* Surrounding your code with `try-catch` and forgetting to add `await` will change code semantics while you may fail to notice that.\n* Having an explicit `await` may prevent the V8 runtime from providing [async stack traces](http://bit.ly/v8-zero-cost-async-stack-traces)."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ES6RedundantAwait",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Async code and promises",
"index": 195,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AssignmentToFunctionParameterJS",
"shortDescription": {
"text": "Assignment to function parameter"
},
"fullDescription": {
"text": "Reports an assignment to a function parameter, including increment and decrement operations. Although occasionally intended, this construct can be extremely confusing, and is often a result of an error.",
"markdown": "Reports an assignment to a function parameter, including increment and decrement operations. Although occasionally intended, this construct can be extremely confusing, and is often a result of an error."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AssignmentToFunctionParameterJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Assignment issues",
"index": 201,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FallThroughInSwitchStatementJS",
"shortDescription": {
"text": "Fallthrough in 'switch' statement"
},
"fullDescription": {
"text": "Reports a 'switch' statement where control can proceed from a branch to the next one. Such \"fall-through\" often indicates an error, for example, a missing 'break' or 'return'.",
"markdown": "Reports a `switch` statement where control can proceed from a branch to the next one. Such \"fall-through\" often indicates an error, for example, a missing `break` or `return`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FallThroughInSwitchStatementJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Switch statement issues",
"index": 202,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CallerJS",
"shortDescription": {
"text": "Use of 'caller' property"
},
"fullDescription": {
"text": "Reports a usage of the 'caller' property in a JavaScript function. Using this property to access the stack frame of the calling method can be extremely confusing and result in subtle bugs.",
"markdown": "Reports a usage of the `caller` property in a JavaScript function. Using this property to access the stack frame of the calling method can be extremely confusing and result in subtle bugs."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CallerJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Potentially confusing code constructs",
"index": 123,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSSwitchVariableDeclarationIssue",
"shortDescription": {
"text": "Variable is declared and being used in different 'case' clauses"
},
"fullDescription": {
"text": "Reports a variable that is declared in one 'case' clause of a 'switch' statement but is used in another 'case' clause of the same statement. For block-scoped variables, this results in throwing a 'ReferenceError'. For 'var' variables, it indicates a potential error. Disable the inspection for 'var' variables if this pattern is used intentionally.",
"markdown": "Reports a variable that is declared in one `case` clause of a `switch` statement but is used in another `case` clause of the same statement. For block-scoped variables, this results in throwing a `ReferenceError`. For `var` variables, it indicates a potential error.\n\nDisable the inspection for `var` variables if this pattern is used intentionally."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSSwitchVariableDeclarationIssue",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Switch statement issues",
"index": 202,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReuseOfLocalVariableJS",
"shortDescription": {
"text": "Reuse of local variable"
},
"fullDescription": {
"text": "Reports reusing a local variable and overwriting its value with a new value that is not related to the original variable usage. Reusing a local variable in this way may be confusing because the intended semantics of the local variable may vary with each usage. It may also cause bugs, if code changes result in values that were expected to be overwritten while they are actually live. It is good practices to keep variable lifetimes as short as possible, and not reuse local variables for the sake of brevity.",
"markdown": "Reports reusing a local variable and overwriting its value with a new value that is not related to the original variable usage. Reusing a local variable in this way may be confusing because the intended semantics of the local variable may vary with each usage. It may also cause bugs, if code changes result in values that were expected to be overwritten while they are actually live. It is good practices to keep variable lifetimes as short as possible, and not reuse local variables for the sake of brevity."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ReuseOfLocalVariableJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Data flow",
"index": 209,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ES6ConvertLetToConst",
"shortDescription": {
"text": "'let' is used instead of 'const'"
},
"fullDescription": {
"text": "Reports a 'let' declaration that can be made 'const'.",
"markdown": "Reports a `let` declaration that can be made `const`. "
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ES6ConvertLetToConst",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/ES2015 migration aids",
"index": 105,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSReferencingMutableVariableFromClosure",
"shortDescription": {
"text": "Referencing mutable variable from closure"
},
"fullDescription": {
"text": "Reports access to outer mutable variables from functions. Example: 'for (var i = 1; i <= 3; i++) {\n setTimeout(function() {\n console.log(i); // bad\n }, 0);\n }'",
"markdown": "Reports access to outer mutable variables from functions.\n\nExample:\n\n\n for (var i = 1; i <= 3; i++) {\n setTimeout(function() {\n console.log(i); // bad\n }, 0);\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSReferencingMutableVariableFromClosure",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ES6ConvertRequireIntoImport",
"shortDescription": {
"text": "'require()' is used instead of 'import'"
},
"fullDescription": {
"text": "Reports a 'require()' statement. Suggests converting it to a 'require()' call with an 'import' statement. Enable 'Convert require() inside inner scopes with Fix all action' to convert all 'require()' calls inside the nested functions and statements when using the 'Fix all' action. Please note that converting 'require()' statements inside inner scopes to 'import' statements may cause changes in the semantics of the code. Import statements are static module dependencies and are hoisted, which means that they are moved to the top of the current module. 'require()' calls load modules dynamically. They can be executed conditionally, and their scope is defined by the expression in which they are used. Clear the 'Convert require() inside inner scopes with Fix all action' checkbox to prevent any changes in these complex cases when using the 'Fix all' action.",
"markdown": "Reports a `require()` statement. Suggests converting it to a `require()` call with an `import` statement. \n\nEnable 'Convert require() inside inner scopes with Fix all action' to convert all `require()` calls inside the nested functions and statements when using the 'Fix all' action. \n\nPlease note that converting `require()` statements inside inner scopes to `import` statements may cause changes in the semantics of the code. Import statements are static module dependencies and are hoisted, which means that they are moved to the top of the current module. `require()` calls load modules dynamically. They can be executed conditionally, and their scope is defined by the expression in which they are used. \nClear the 'Convert require() inside inner scopes with Fix all action' checkbox to prevent any changes in these complex cases when using the 'Fix all' action."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ES6ConvertRequireIntoImport",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/ES2015 migration aids",
"index": 105,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSUnusedGlobalSymbols",
"shortDescription": {
"text": "Unused global symbol"
},
"fullDescription": {
"text": "Reports an unused globally accessible public function, variable, class, or property.",
"markdown": "Reports an unused globally accessible public function, variable, class, or property."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSUnusedGlobalSymbols",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Unused symbols",
"index": 216,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NestedConditionalExpressionJS",
"shortDescription": {
"text": "Nested conditional expression"
},
"fullDescription": {
"text": "Reports a ternary conditional expression within another ternary condition. Such nested conditionals may be extremely confusing, and best replaced by more explicit conditional logic.",
"markdown": "Reports a ternary conditional expression within another ternary condition. Such nested conditionals may be extremely confusing, and best replaced by more explicit conditional logic."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NestedConditionalExpressionJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Potentially confusing code constructs",
"index": 123,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ES6PossiblyAsyncFunction",
"shortDescription": {
"text": "'await' in non-async function"
},
"fullDescription": {
"text": "Reports a usage of 'await' in a function that was possibly intended to be async but is actually missing the 'async' modifier. Although 'await' can be used as an identifier, it is likely that it was intended to be used as an operator, so the containing function should be made 'async'.",
"markdown": "Reports a usage of `await` in a function that was possibly intended to be async but is actually missing the `async` modifier. Although `await` can be used as an identifier, it is likely that it was intended to be used as an operator, so the containing function should be made `async`."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ES6PossiblyAsyncFunction",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Async code and promises",
"index": 195,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FlowJSFlagCommentPlacement",
"shortDescription": {
"text": "Misplaced @flow flag"
},
"fullDescription": {
"text": "Reports a '@flow' flag comment that is not located at the top of a file.",
"markdown": "Reports a `@flow` flag comment that is not located at the top of a file."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FlowJSFlagCommentPlacement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Flow type checker",
"index": 31,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSMissingSwitchDefault",
"shortDescription": {
"text": "'switch' statement has no 'default' branch"
},
"fullDescription": {
"text": "Reports a 'switch' statement without a 'default' clause when some possible values are not enumerated.",
"markdown": "Reports a `switch` statement without a `default` clause when some possible values are not enumerated."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "JSMissingSwitchDefault",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Switch statement issues",
"index": 202,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSXNamespaceValidation",
"shortDescription": {
"text": "Missing JSX namespace"
},
"fullDescription": {
"text": "Reports a usage of a JSX construction without importing namespace. Having the namespace in the file scope ensures proper code compilation.",
"markdown": "Reports a usage of a JSX construction without importing namespace. Having the namespace in the file scope ensures proper code compilation."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "JSXNamespaceValidation",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Imports and dependencies",
"index": 218,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReservedWordUsedAsNameJS",
"shortDescription": {
"text": "Reserved word used as name"
},
"fullDescription": {
"text": "Reports a JavaScript reserved word used as a name. The JavaScript specification reserves a number of words which are currently not used as keywords. Using those words as identifiers may result in broken code if later versions of JavaScript start using them as keywords.",
"markdown": "Reports a JavaScript reserved word used as a name. The JavaScript specification reserves a number of words which are currently not used as keywords. Using those words as identifiers may result in broken code if later versions of JavaScript start using them as keywords."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ReservedWordAsName",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Validity issues",
"index": 52,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IncrementDecrementResultUsedJS",
"shortDescription": {
"text": "Result of increment or decrement used"
},
"fullDescription": {
"text": "Reports an increment ('++') or decrement ('--') expression where the result of the assignment is used in a containing expression. Such assignments can result in confusion due to the order of operations, as evaluation of the assignment may affect the outer expression in unexpected ways. Example: 'var a = b++'",
"markdown": "Reports an increment (`++`) or decrement (`--`) expression where the result of the assignment is used in a containing expression. Such assignments can result in confusion due to the order of operations, as evaluation of the assignment may affect the outer expression in unexpected ways. Example: `var a = b++`"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "IncrementDecrementResultUsedJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Potentially confusing code constructs",
"index": 123,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SuspiciousTypeOfGuard",
"shortDescription": {
"text": "Unsound type guard check"
},
"fullDescription": {
"text": "Reports a 'typeof' or 'instanceof' unsound type guard check. The 'typeof x' type guard can be unsound in one of the following two cases: 'typeof x' never corresponds to the specified value (for example, 'typeof x === 'number'' when 'x' is of the type 'string | boolean') 'typeof x' always corresponds to the specified value (for example, 'typeof x === 'string'' when 'x' is of the type 'string') The 'x instanceof A' type guard can be unsound in one of the following two cases: The type of 'x' is not related to 'A' The type of 'x' is 'A' or a subtype of 'A'",
"markdown": "Reports a `typeof` or `instanceof` unsound type guard check. The `typeof x` type guard can be unsound in one of the following two cases:\n\n* `typeof x` never corresponds to the specified value (for example, `typeof x === 'number'` when `x` is of the type 'string \\| boolean')\n* `typeof x` always corresponds to the specified value (for example, `typeof x === 'string'` when `x` is of the type 'string')\n\n<br />\n\nThe `x instanceof A` type guard can be unsound in one of the following two cases:\n\n* The type of `x` is not related to `A`\n* The type of `x` is `A` or a subtype of `A`"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SuspiciousTypeOfGuard",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Control flow issues",
"index": 129,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LoopStatementThatDoesntLoopJS",
"shortDescription": {
"text": "Loop statement that doesn't loop"
},
"fullDescription": {
"text": "Reports a 'for', 'while', or 'do' statement whose bodies are guaranteed to execute at most once. Normally, this indicates an error.",
"markdown": "Reports a `for`, `while`, or `do` statement whose bodies are guaranteed to execute at most once. Normally, this indicates an error."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LoopStatementThatDoesntLoopJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Control flow issues",
"index": 129,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSNonASCIINames",
"shortDescription": {
"text": "Identifiers with non-ASCII symbols"
},
"fullDescription": {
"text": "Reports a non-ASCII symbol in a name. If the 'Allow only ASCII names' option is selected, reports all names that contain non-ASCII symbols. Otherwise reports all names that contain both ASCII and non-ASCII symbols.",
"markdown": "Reports a non-ASCII symbol in a name. \n\nIf the 'Allow only ASCII names' option is selected, reports all names that contain non-ASCII symbols. \nOtherwise reports all names that contain both ASCII and non-ASCII symbols."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSNonASCIINames",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Naming conventions",
"index": 196,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ES6MissingAwait",
"shortDescription": {
"text": "Missing await for an async function call"
},
"fullDescription": {
"text": "Reports an 'async' function call without an expected 'await' prefix inside an 'async' function. Such call returns a 'Promise' and control flow is continued immediately. Example: 'async function bar() { /* ... */ }\nasync function foo() {\n bar(); // bad\n}' After the quick-fix is applied, the 'await' prefix is added: 'async function bar() { /* ... */ }\nasync function foo() {\n await bar(); // good\n}' When the 'Report for promises in return statements' checkbox is selected, also suggests adding 'await' in return statements. While this is generally not necessary, it gives two main benefits. You won't forget to add 'await' when surrounding your code with 'try-catch'. An explicit 'await' helps V8 runtime to provide async stack traces.",
"markdown": "Reports an `async` function call without an expected `await` prefix inside an `async` function. Such call returns a `Promise` and control flow is continued immediately.\n\nExample:\n\n\n async function bar() { /* ... */ }\n async function foo() {\n bar(); // bad\n }\n\n\nAfter the quick-fix is applied, the `await` prefix is added:\n\n\n async function bar() { /* ... */ }\n async function foo() {\n await bar(); // good\n }\n\n<br />\n\nWhen the 'Report for promises in return statements' checkbox is selected, also suggests adding `await` in return statements. \nWhile this is generally not necessary, it gives two main benefits. \n\n* You won't forget to add `await` when surrounding your code with `try-catch`.\n* An explicit `await` helps V8 runtime to provide [async stack traces](https://bit.ly/v8-zero-cost-async-stack-traces)."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ES6MissingAwait",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Async code and promises",
"index": 195,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TailRecursionJS",
"shortDescription": {
"text": "Tail recursion"
},
"fullDescription": {
"text": "Reports a tail recursion, that is, when a function calls itself as its last action before returning. A tail recursion can always be replaced by looping, which will be considerably faster. Some JavaScript engines perform this optimization, while others do not. Thus, tail recursive solutions may have considerably different performance characteristics in different environments.",
"markdown": "Reports a tail recursion, that is, when a function calls itself as its last action before returning. A tail recursion can always be replaced by looping, which will be considerably faster. Some JavaScript engines perform this optimization, while others do not. Thus, tail recursive solutions may have considerably different performance characteristics in different environments."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "TailRecursionJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Control flow issues",
"index": 129,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConfusingPlusesOrMinusesJS",
"shortDescription": {
"text": "Confusing sequence of '+' or '-'"
},
"fullDescription": {
"text": "Reports a suspicious combination of '+' or '-' characters in JavaScript code (for example, 'a+++b'. Such sequences are confusing, and their semantics may change through changes in the whitespace.",
"markdown": "Reports a suspicious combination of `+` or `-` characters in JavaScript code (for example, `a+++b`. Such sequences are confusing, and their semantics may change through changes in the whitespace."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ConfusingPlusesOrMinusesJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Potentially confusing code constructs",
"index": 123,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TypeScriptConfig",
"shortDescription": {
"text": "Inconsistent tsconfig.json properties"
},
"fullDescription": {
"text": "Reports inconsistency of a 'paths', 'checkJs', or 'extends' property in a tsconfig.json file. The 'checkJs' property requires 'allowJs'. The 'extends' property should be a valid file reference.",
"markdown": "Reports inconsistency of a `paths`, `checkJs`, or `extends` property in a tsconfig.json file. \nThe `checkJs` property requires `allowJs`. \nThe `extends` property should be a valid file reference."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "TypeScriptConfig",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/TypeScript",
"index": 111,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OverlyComplexBooleanExpressionJS",
"shortDescription": {
"text": "Overly complex boolean expression"
},
"fullDescription": {
"text": "Reports a boolean expression with too many terms. Such expressions may be confusing and bug-prone. Use the field below to specify the maximum number of terms allowed in an arithmetic expression.",
"markdown": "Reports a boolean expression with too many terms. Such expressions may be confusing and bug-prone.\n\n\nUse the field below to specify the maximum number of terms allowed in an arithmetic expression."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OverlyComplexBooleanExpressionJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Potentially confusing code constructs",
"index": 123,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OverlyComplexArithmeticExpressionJS",
"shortDescription": {
"text": "Overly complex arithmetic expression"
},
"fullDescription": {
"text": "Reports an arithmetic expression with too many terms. Such expressions may be confusing and bug-prone. Use the field below to specify the maximum number of terms allowed in an arithmetic expression.",
"markdown": "Reports an arithmetic expression with too many terms. Such expressions may be confusing and bug-prone.\n\n\nUse the field below to specify the maximum number of terms allowed in an arithmetic expression."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OverlyComplexArithmeticExpressionJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Potentially confusing code constructs",
"index": 123,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DuplicateConditionJS",
"shortDescription": {
"text": "Duplicate condition in 'if' statement"
},
"fullDescription": {
"text": "Reports duplicate conditions in different branches of an 'if' statement. Duplicate conditions usually represent programmer oversight. Example: 'if (a) {\n ...\n } else if (a) {\n ...\n }'",
"markdown": "Reports duplicate conditions in different branches of an `if` statement. Duplicate conditions usually represent programmer oversight.\n\nExample:\n\n\n if (a) {\n ...\n } else if (a) {\n ...\n }\n\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DuplicateConditionJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Control flow issues",
"index": 129,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryLabelJS",
"shortDescription": {
"text": "Unnecessary label"
},
"fullDescription": {
"text": "Reports an unused label.",
"markdown": "Reports an unused label."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryLabelJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Control flow issues",
"index": 129,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ES6UnusedImports",
"shortDescription": {
"text": "Unused import"
},
"fullDescription": {
"text": "Reports a redundant 'import' statement. This is usually the case if the imported symbols are not used in the source file. To avoid side-effects, consider using bare import 'import 'packageName'' instead of the regular one.",
"markdown": "Reports a redundant `import` statement. This is usually the case if the imported symbols are not used in the source file. To avoid side-effects, consider using bare import `import 'packageName'` instead of the regular one."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ES6UnusedImports",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Imports and dependencies",
"index": 218,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InnerHTMLJS",
"shortDescription": {
"text": "Use of 'innerHTML' property"
},
"fullDescription": {
"text": "Reports a JavaScript access to DOM nodes as text using the 'innerHTML' property. Most usages of 'innerHTML' are performed better with explicit DOM calls, such as 'getElementByID()' and 'createElement()'. Additionally, 'innerHTML' will not work with XML DOMs, including DOMs for XHTML if viewed as XML. This can lead to difficulties in diagnosing bugs.",
"markdown": "Reports a JavaScript access to DOM nodes as text using the `innerHTML` property. Most usages of `innerHTML` are performed better with explicit DOM calls, such as `getElementByID()` and `createElement()`. Additionally, `innerHTML` will not work with XML DOMs, including DOMs for XHTML if viewed as XML. This can lead to difficulties in diagnosing bugs."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "InnerHTMLJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/DOM issues",
"index": 108,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSAssignmentUsedAsCondition",
"shortDescription": {
"text": "Assignment used as condition"
},
"fullDescription": {
"text": "Reports an assignment that is used as the condition of an 'if', 'while', 'for', or 'do' statement. Although occasionally intended, this usage is confusing, and often indicates a typo (for example, '=' instead of '==').",
"markdown": "Reports an assignment that is used as the condition of an `if`, `while`, `for`, or `do` statement. Although occasionally intended, this usage is confusing, and often indicates a typo (for example, `=` instead of `==`)."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSAssignmentUsedAsCondition",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Assignment issues",
"index": 201,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ForLoopReplaceableByWhileJS",
"shortDescription": {
"text": "'for' loop may be replaced by 'while' loop"
},
"fullDescription": {
"text": "Reports a 'for' loop that contains neither initialization nor an update component. Suggests replacing the loop with a simpler 'while' statement. Example: 'for(; exitCondition(); ) {\n process();\n }' After the quick-fix is applied the result looks like: 'while(exitCondition()) {\n process();\n }' Use the checkbox below if you wish this inspection to ignore for loops with trivial or non-existent conditions.",
"markdown": "Reports a `for` loop that contains neither initialization nor an update component. Suggests replacing the loop with a simpler `while` statement.\n\nExample:\n\n\n for(; exitCondition(); ) {\n process();\n }\n\nAfter the quick-fix is applied the result looks like:\n\n\n while(exitCondition()) {\n process();\n }\n\nUse the checkbox below if you wish this inspection to ignore **for** loops with trivial or non-existent conditions."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ForLoopReplaceableByWhile",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Control flow issues",
"index": 129,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConstantConditionalExpressionJS",
"shortDescription": {
"text": "Constant conditional expression"
},
"fullDescription": {
"text": "Reports a conditional expression in the format 'true? result1: result2' or 'false? result1: result2. Suggests simplifying the expression.'",
"markdown": "Reports a conditional expression in the format `true? result1: result2` or `false? result1: result2``.\nSuggests simplifying the expression.\n`"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ConstantConditionalExpressionJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Control flow issues",
"index": 129,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSValidateJSDoc",
"shortDescription": {
"text": "Syntax errors and unresolved references in JSDoc"
},
"fullDescription": {
"text": "Reports a syntax discrepancy in a documentation comment.",
"markdown": "Reports a syntax discrepancy in a documentation comment."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSValidateJSDoc",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonBlockStatementBodyJS",
"shortDescription": {
"text": "Statement body without braces"
},
"fullDescription": {
"text": "Reports a 'if', 'while', 'for', or 'with' statements whose body is not a block statement. Using code block in statement bodies is usually safer for downstream maintenance.",
"markdown": "Reports a `if`, `while`, `for`, or `with` statements whose body is not a block statement. Using code block in statement bodies is usually safer for downstream maintenance."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NonBlockStatementBodyJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Code style issues",
"index": 146,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FlowJSConfig",
"shortDescription": {
"text": "Missing .flowconfig"
},
"fullDescription": {
"text": "Reports a JavaScript file with a '@flow' flag that doesn't have an associated '.flowconfig' file in the project.",
"markdown": "Reports a JavaScript file with a `@flow` flag that doesn't have an associated `.flowconfig` file in the project."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FlowJSConfig",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Flow type checker",
"index": 31,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TypeScriptValidateTypes",
"shortDescription": {
"text": "Type mismatch"
},
"fullDescription": {
"text": "Reports a parameter, return value, or assigned expression of incorrect type.",
"markdown": "Reports a parameter, return value, or assigned expression of incorrect type."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "TypeScriptValidateTypes",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/TypeScript",
"index": 111,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSObjectNullOrUndefined",
"shortDescription": {
"text": "Object is 'null' or 'undefined'"
},
"fullDescription": {
"text": "Reports an error caused by invoking a method, accessing a property, or calling a function on an object that is 'undefined' or 'null'.",
"markdown": "Reports an error caused by invoking a method, accessing a property, or calling a function on an object that is `undefined` or `null`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSObjectNullOrUndefined",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Control flow issues",
"index": 129,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PointlessArithmeticExpressionJS",
"shortDescription": {
"text": "Pointless arithmetic expression"
},
"fullDescription": {
"text": "Reports an arithmetic expression that include adding or subtracting zero, multiplying by zero or one, division by one, and shift by zero. Such expressions may result from not fully completed automated refactoring.",
"markdown": "Reports an arithmetic expression that include adding or subtracting zero, multiplying by zero or one, division by one, and shift by zero. Such expressions may result from not fully completed automated refactoring."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PointlessArithmeticExpressionJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Potentially confusing code constructs",
"index": 123,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TypeScriptSmartCast",
"shortDescription": {
"text": "Narrowed type"
},
"fullDescription": {
"text": "Reports a usage of a variable where the variable type is narrowed by a type guard. Note that severity level doesn't affect this inspection.",
"markdown": "Reports a usage of a variable where the variable type is narrowed by a type guard. Note that severity level doesn't affect this inspection."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "TypeScriptSmartCast",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/TypeScript",
"index": 111,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSAccessibilityCheck",
"shortDescription": {
"text": "Inaccessible @private and @protected members referenced"
},
"fullDescription": {
"text": "Reports a reference to a JavaScript member that is marked with a '@private' or '@protected' tag but does not comply with visibility rules that these tags imply.",
"markdown": "Reports a reference to a JavaScript member that is marked with a `@private` or `@protected` tag but does not comply with visibility rules that these tags imply."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSAccessibilityCheck",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FunctionWithMultipleLoopsJS",
"shortDescription": {
"text": "Function with multiple loops"
},
"fullDescription": {
"text": "Reports a function with multiple loop statements.",
"markdown": "Reports a function with multiple loop statements."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FunctionWithMultipleLoopsJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Function metrics",
"index": 144,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NpmUsedModulesInstalled",
"shortDescription": {
"text": "Missing module dependency"
},
"fullDescription": {
"text": "Reports a module from a 'require()' call or an 'import' statement that is not installed or is not listed in package.json dependencies. Suggests installing the module and/or including it into package.json. For 'require()' calls, works only in the files from the scope of Node.js Core JavaScript library.",
"markdown": "Reports a module from a `require()` call or an `import` statement that is not installed or is not listed in package.json dependencies.\n\nSuggests installing the module and/or including it into package.json.\n\nFor `require()` calls, works only in the files from the scope of *Node.js Core* JavaScript library."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "NpmUsedModulesInstalled",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Imports and dependencies",
"index": 218,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FunctionNamingConventionJS",
"shortDescription": {
"text": "Function naming convention"
},
"fullDescription": {
"text": "Reports a function whose name is too short, too long, or does not follow the specified regular expression pattern. Use the fields provided below to specify minimum length, maximum length, and a regular expression for function names. Use the standard 'java.util.regex' format for regular expressions.",
"markdown": "Reports a function whose name is too short, too long, or does not follow the specified regular expression pattern.\n\n\nUse the fields provided below to specify minimum length, maximum length, and a regular expression\nfor function names. Use the standard `java.util.regex` format for regular expressions."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FunctionNamingConventionJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Naming conventions",
"index": 196,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ObjectAllocationIgnoredJS",
"shortDescription": {
"text": "Result of object allocation ignored"
},
"fullDescription": {
"text": "Reports object allocation where the result of the allocated object is ignored, for example, 'new Error();' as a statement, without any assignment. Such allocation expressions may indicate an odd object initialization strategy.",
"markdown": "Reports object allocation where the result of the allocated object is ignored, for example, `new Error();` as a statement, without any assignment. Such allocation expressions may indicate an odd object initialization strategy."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ObjectAllocationIgnored",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Probable bugs",
"index": 153,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSHint",
"shortDescription": {
"text": "JSHint"
},
"fullDescription": {
"text": "Reports a problem detected by the JSHint linter.",
"markdown": "Reports a problem detected by the [JSHint](https://jshint.com/) linter."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "JSHint",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Code quality tools",
"index": 134,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ExceptionCaughtLocallyJS",
"shortDescription": {
"text": "Exception used for local control-flow"
},
"fullDescription": {
"text": "Reports a 'throw' statement whose exceptions are always caught by the containing 'try' statement. Using 'throw' statements as a 'goto' to change the local flow of control is confusing.",
"markdown": "Reports a `throw` statement whose exceptions are always caught by the containing `try` statement. Using `throw` statements as a `goto` to change the local flow of control is confusing."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ExceptionCaughtLocallyJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Try statement issues",
"index": 181,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CyclomaticComplexityJS",
"shortDescription": {
"text": "Overly complex function"
},
"fullDescription": {
"text": "Reports a function with too many branching points in a function (too high cyclomatic complexity). Such functions may be confusing and hard to test. Use the field provided below to specify the maximum acceptable cyclomatic complexity for a function.",
"markdown": "Reports a function with too many branching points in a function (too high cyclomatic complexity). Such functions may be confusing and hard to test.\n\n\nUse the field provided below to specify the maximum acceptable cyclomatic complexity for a function."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OverlyComplexFunctionJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Function metrics",
"index": 144,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Stylelint",
"shortDescription": {
"text": "Stylelint"
},
"fullDescription": {
"text": "Reports a discrepancy detected by the Stylelint linter. The highlighting is based on the rule severity specified in the Stylelint configuration file for each individual rule.",
"markdown": "Reports a discrepancy detected by the [Stylelint](http://stylelint.io) linter. \n\nThe highlighting is based on the rule severity specified in the [Stylelint configuration file](https://stylelint.io/user-guide/configure) for each individual rule."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "Stylelint",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "CSS/Code quality tools",
"index": 233,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TypeScriptJSXUnresolvedComponent",
"shortDescription": {
"text": "Unresolved JSX component"
},
"fullDescription": {
"text": "Reports an unresolved reference to a JSX component. Suggests adding an import statement if the referenced component is defined in the project or its dependencies or creating a new component with the specified name. The template for a new component can be modified in Editor | File and Code Templates.",
"markdown": "Reports an unresolved reference to a JSX component. Suggests adding an import statement if the referenced component is defined in the project or its dependencies or creating a new component with the specified name.\n\nThe template for a new component can be modified in Editor \\| File and Code Templates."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "TypeScriptJSXUnresolvedComponent",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/TypeScript",
"index": 111,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSUnfilteredForInLoop",
"shortDescription": {
"text": "Unfiltered for..in loop"
},
"fullDescription": {
"text": "Reports unfiltered 'for-in' loops. The use of this construct results in processing not only own properties of an object but properties from its prototype as well. It may be unexpected in some specific cases, for example, in utility methods that copy or modify all properties or when 'Object''s prototype may be incorrectly modified. For example, the following code will print 42 and myMethod: 'Object.prototype.myMethod = function myMethod() {};\nlet a = { foo: 42 };\nfor (let i in a) {\n console.log(a[i]);\n}' Suggests replacing the whole loop with a 'Object.keys()' method or adding a 'hasOwnProperty()' check. After applying the quick-fix the code looks as follows: 'for (let i in a) {\n if (a.hasOwnProperty(i)) {\n console.log(a[i]);\n }\n}'",
"markdown": "Reports unfiltered `for-in` loops. \n\nThe use of this construct results in processing not only own properties of an object but properties from its prototype as well. It may be unexpected in some specific cases, for example, in utility methods that copy or modify all properties or when `Object`'s prototype may be incorrectly modified. For example, the following code will print **42** and **myMethod** : \n\n\n Object.prototype.myMethod = function myMethod() {};\n let a = { foo: 42 };\n for (let i in a) {\n console.log(a[i]);\n }\n\nSuggests replacing the whole loop with a `Object.keys()` method or adding a `hasOwnProperty()` check. After applying the quick-fix the code looks as follows:\n\n\n for (let i in a) {\n if (a.hasOwnProperty(i)) {\n console.log(a[i]);\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSUnfilteredForInLoop",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSFunctionExpressionToArrowFunction",
"shortDescription": {
"text": "Function expression is used instead of arrow function"
},
"fullDescription": {
"text": "Reports a function expression. Suggests converting it to an arrow function. Example: 'arr.map(function(el) {return el + 1})' After applying the quick-fix the code looks as follows: 'arr.map(el => el + 1)'",
"markdown": "Reports a [function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/function) expression. Suggests converting it to an [arrow function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions).\n\nExample:\n\n arr.map(function(el) {return el + 1})\n\nAfter applying the quick-fix the code looks as follows:\n\n arr.map(el => el + 1)\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "JSFunctionExpressionToArrowFunction",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/ES2015 migration aids",
"index": 105,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UpdateDependencyToLatestVersion",
"shortDescription": {
"text": "Update package.json dependencies to latest versions"
},
"fullDescription": {
"text": "Suggests to upgrade your package.json dependencies to the latest versions, ignoring specified versions.",
"markdown": "Suggests to upgrade your package.json dependencies to the latest versions, ignoring specified versions."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "UpdateDependencyToLatestVersion",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Imports and dependencies",
"index": 218,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AssignmentResultUsedJS",
"shortDescription": {
"text": "Result of assignment used"
},
"fullDescription": {
"text": "Reports an assignment expression where the result of the assignment is used in the containing expression. Such assignments often indicate coding errors, for example, '=' instead of '=='. Moreover, they can result in confusion due to the order of operations, as evaluation of the assignment may affect the outer expression in unexpected ways. Expressions in parentheses are ignored.",
"markdown": "Reports an assignment expression where the result of the assignment is used in the containing expression. Such assignments often indicate coding errors, for example, `=` instead of `==`. Moreover, they can result in confusion due to the order of operations, as evaluation of the assignment may affect the outer expression in unexpected ways.\n\nExpressions in parentheses are ignored."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AssignmentResultUsedJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Assignment issues",
"index": 201,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConstantOnRHSOfComparisonJS",
"shortDescription": {
"text": "Constant on right side of comparison"
},
"fullDescription": {
"text": "Reports a comparison operation with a constant in the right-hand side. According to coding conventions, constants should only be in the left-hand side of comparisons.",
"markdown": "Reports a comparison operation with a constant in the right-hand side. According to coding conventions, constants should only be in the left-hand side of comparisons."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ConstantOnRightSideOfComparisonJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Code style issues",
"index": 146,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSUnnecessarySemicolon",
"shortDescription": {
"text": "Unnecessary semicolon"
},
"fullDescription": {
"text": "Reports an unneeded semicolon.",
"markdown": "Reports an unneeded semicolon."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSUnnecessarySemicolon",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSSuspiciousEqPlus",
"shortDescription": {
"text": "Suspicious '=+' assignment"
},
"fullDescription": {
"text": "Reports an assignment in the form 'a =+ b'. Suggests replacing with 'a += b'.",
"markdown": "Reports an assignment in the form `a =+ b`. Suggests replacing with `a += b`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSSuspiciousEqPlus",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Probable bugs",
"index": 153,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSUnusedAssignment",
"shortDescription": {
"text": "Unused assignment"
},
"fullDescription": {
"text": "Reports a variable whose value is never used after assignment. Suggests removing the unused variable to shorten the code and to avoid redundant allocations. The following cases are reported: A variable is never read after assignment. The value of a variable is always overwritten with another assignment before the variable is read next time. The initializer of a variable is redundant (for one of the above-mentioned reasons).",
"markdown": "Reports a variable whose value is never used after assignment. \nSuggests removing the unused variable to shorten the code and to avoid redundant allocations.\n\nThe following cases are reported:\n\n* A variable is never read after assignment.\n* The value of a variable is always overwritten with another assignment before the variable is read next time.\n* The initializer of a variable is redundant (for one of the above-mentioned reasons)."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSUnusedAssignment",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Unused symbols",
"index": 216,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConfusingFloatingPointLiteralJS",
"shortDescription": {
"text": "Confusing floating point literal"
},
"fullDescription": {
"text": "Reports any floating point number that does not have a decimal point, or any numbers before the decimal point, or and numbers after the decimal point. Such literals may be confusing, and violate several coding standards.",
"markdown": "Reports any floating point number that does not have a decimal point, or any numbers before the decimal point, or and numbers after the decimal point. Such literals may be confusing, and violate several coding standards."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ConfusingFloatingPointLiteralJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Potentially confusing code constructs",
"index": 123,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ContinueOrBreakFromFinallyBlockJS",
"shortDescription": {
"text": "'continue' or 'break' inside 'finally' block"
},
"fullDescription": {
"text": "Reports a 'break' or 'continue' statement inside a 'finally' block. Such statements are very confusing, may hide exceptions, and complicate debugging.",
"markdown": "Reports a `break` or `continue` statement inside a `finally` block. Such statements are very confusing, may hide exceptions, and complicate debugging."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ContinueOrBreakFromFinallyBlockJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Try statement issues",
"index": 181,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSMethodCanBeStatic",
"shortDescription": {
"text": "Method can be made 'static'"
},
"fullDescription": {
"text": "Reports a class method that can be safely made 'static'. A method can be 'static' if it does not reference any of its class' non-static methods and non-static fields and is not overridden in a subclass. Use the first checkbox below to inspect only 'private' methods.",
"markdown": "Reports a class method that can be safely made `static`. A method can be `static` if it does not reference any of its class' non-static methods and non-static fields and is not overridden in a subclass.\n\n\nUse the first checkbox below to inspect only `private` methods."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "JSMethodCanBeStatic",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSUndeclaredVariable",
"shortDescription": {
"text": "Implicitly declared global JavaScript variable"
},
"fullDescription": {
"text": "Reports an implicit declaration of a global variable. Example: 'var aaa = 1; // good\n bbb = 2; // bad, if bbb is not declared with 'var' somewhere'",
"markdown": "Reports an implicit declaration of a global variable.\n\nExample:\n\n\n var aaa = 1; // good\n bbb = 2; // bad, if bbb is not declared with 'var' somewhere\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "JSUndeclaredVariable",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SillyAssignmentJS",
"shortDescription": {
"text": "Variable is assigned to itself"
},
"fullDescription": {
"text": "Reports an assignment in the form 'x = x'.",
"markdown": "Reports an assignment in the form `x = x`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SillyAssignmentJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Assignment issues",
"index": 201,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TypeScriptCheckImport",
"shortDescription": {
"text": "Unresolved imported name"
},
"fullDescription": {
"text": "Reports an unresolved name or binding in an 'import' declaration in TypeScript code.",
"markdown": "Reports an unresolved name or binding in an `import` declaration in TypeScript code."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "TypeScriptCheckImport",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/TypeScript",
"index": 111,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InfiniteRecursionJS",
"shortDescription": {
"text": "Infinite recursion"
},
"fullDescription": {
"text": "Reports a function which must either recurse infinitely or throw an exception. Such functions may not return normally.",
"markdown": "Reports a function which must either recurse infinitely or throw an exception. Such functions may not return normally."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "InfiniteRecursionJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Probable bugs",
"index": 153,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSMismatchedCollectionQueryUpdate",
"shortDescription": {
"text": "Mismatched query and update of collection"
},
"fullDescription": {
"text": "Reports a collection of fields or variables whose contents are either queried and not updated or updated and not queried. Such mismatched queries and updates are pointless and may indicate either dead code or a typographical error. Query methods are automatically detected, based on whether they return something, or a callback is passed to them. Use the table below to specify which methods are update methods.",
"markdown": "Reports a collection of fields or variables whose contents are either queried and not updated or updated and not queried. Such mismatched queries and updates are pointless and may indicate either dead code or a typographical error.\n\n\nQuery methods are automatically detected, based on whether they return something, or a callback is passed to them.\nUse the table below to specify which methods are update methods."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSMismatchedCollectionQueryUpdate",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ES6PreferShortImport",
"shortDescription": {
"text": "Import can be shortened"
},
"fullDescription": {
"text": "Reports an ES6 import whose 'from' part can be shortened. Suggests importing the parent directory.",
"markdown": "Reports an ES6 import whose `from` part can be shortened. Suggests importing the parent directory."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ES6PreferShortImport",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PointlessBitwiseExpressionJS",
"shortDescription": {
"text": "Bitwise expression can be simplified"
},
"fullDescription": {
"text": "Reports an expression that includes 'and' with zero, 'or' by zero, or shifting by zero. Such expressions may result from not fully completed automated refactorings.",
"markdown": "Reports an expression that includes `and` with zero, `or` by zero, or shifting by zero. Such expressions may result from not fully completed automated refactorings."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PointlessBitwiseExpressionJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Bitwise operation issues",
"index": 37,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSStringConcatenationToES6Template",
"shortDescription": {
"text": "String concatenation is used instead of template literal"
},
"fullDescription": {
"text": "Reports a string concatenation. Suggests replacing it with a template literal Example '\"result: \" + a + \".\"' After applying the quick-fix the code looks as follows: '`result: ${a}.`'",
"markdown": "Reports a string concatenation. Suggests replacing it with a [template literal](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)\n\nExample\n\n \"result: \" + a + \".\" \n\nAfter applying the quick-fix the code looks as follows:\n\n `result: ${a}.` \n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "JSStringConcatenationToES6Template",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/ES2015 migration aids",
"index": 105,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReplaceAssignmentWithOperatorAssignmentJS",
"shortDescription": {
"text": "Assignment could be replaced with operator assignment"
},
"fullDescription": {
"text": "Reports an assignment operation that can be replaced by an operator assignment to make your code shorter and probably clearer. Example: 'x = x + 3;'\n 'x = x / 3;'\n After the quick fix is applied the result looks like: 'x += 3;'\n 'x /= 3;'",
"markdown": "Reports an assignment operation that can be replaced by an operator assignment to make your code shorter and probably clearer.\n\n\nExample:\n\n x = x + 3;\n x = x / 3;\n\nAfter the quick fix is applied the result looks like:\n\n x += 3;\n x /= 3;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AssignmentReplaceableWithOperatorAssignmentJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Assignment issues",
"index": 201,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ES6DestructuringVariablesMerge",
"shortDescription": {
"text": "Destructuring properties with the same key"
},
"fullDescription": {
"text": "Reports multiple destructuring properties with identical keys. Suggests merging the properties.",
"markdown": "Reports multiple destructuring properties with identical keys. Suggests merging the properties."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ES6DestructuringVariablesMerge",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TypeScriptRedundantGenericType",
"shortDescription": {
"text": "Redundant type arguments"
},
"fullDescription": {
"text": "Reports a type argument that is equal to the default one and can be removed. Example: 'type Foo<T=number> = T;\nlet z: Foo<number>;'",
"markdown": "Reports a type argument that is equal to the default one and can be removed.\n\n\nExample:\n\n\n type Foo<T=number> = T;\n let z: Foo<number>;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "TypeScriptRedundantGenericType",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/TypeScript",
"index": 111,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSLastCommaInObjectLiteral",
"shortDescription": {
"text": "Unneeded last comma in object literal"
},
"fullDescription": {
"text": "Reports usages of a trailing comma in object literals. The warning is reported only when the JavaScript language version is set to ECMAScript 5.1. Trailing commas in object literals are allowed by the specification, however, some browsers might throw an error when a trailing comma is used. You can configure formatting options for trailing commas in Code Style | JavaScript or TypeScript | Punctuation.",
"markdown": "Reports usages of a trailing comma in object literals.\n\nThe warning is reported only when the JavaScript language version is set to ECMAScript 5.1.\n\nTrailing commas in object literals are allowed by the specification, however, some browsers might throw an error when a trailing comma is used.\n\nYou can configure formatting options for trailing commas in **Code Style** \\| **JavaScript** or **TypeScript** \\| **Punctuation**."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSLastCommaInObjectLiteral",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NestedAssignmentJS",
"shortDescription": {
"text": "Nested assignment"
},
"fullDescription": {
"text": "Reports an assignment expression nested inside another expression, for example, 'a = b = 1'. Such expressions may be confusing and violate the general design principle that a given construct should do precisely one thing.",
"markdown": "Reports an assignment expression nested inside another expression, for example, `a = b = 1`. Such expressions may be confusing and violate the general design principle that a given construct should do precisely one thing."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NestedAssignmentJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Assignment issues",
"index": 201,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DefaultNotLastCaseInSwitchJS",
"shortDescription": {
"text": "'default' not last case in 'switch'"
},
"fullDescription": {
"text": "Reports a 'switch' statement where the 'default' case comes before another case instead of being the very last case, which may cause confusion.",
"markdown": "Reports a `switch` statement where the `default` case comes before another case instead of being the very last case, which may cause confusion."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DefaultNotLastCaseInSwitchJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Switch statement issues",
"index": 202,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EmptyFinallyBlockJS",
"shortDescription": {
"text": "Empty 'finally' block"
},
"fullDescription": {
"text": "Reports an empty 'finally' block, which usually indicates an error.",
"markdown": "Reports an empty `finally` block, which usually indicates an error."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EmptyFinallyBlockJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Try statement issues",
"index": 181,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ForLoopThatDoesntUseLoopVariableJS",
"shortDescription": {
"text": "'for' loop where update or condition does not use loop variable"
},
"fullDescription": {
"text": "Reports a 'for' loop where the condition or update does not use the 'for' loop variable.",
"markdown": "Reports a `for` loop where the condition or update does not use the `for` loop variable."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ForLoopThatDoesntUseLoopVariableJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Probable bugs",
"index": 153,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TypeScriptAbstractClassConstructorCanBeMadeProtected",
"shortDescription": {
"text": "Abstract class constructor can be made protected"
},
"fullDescription": {
"text": "Reports a public constructor of an abstract class and suggests making it protected (because it is useless to have it public).",
"markdown": "Reports a public constructor of an abstract class and suggests making it protected (because it is useless to have it public)."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "TypeScriptAbstractClassConstructorCanBeMadeProtected",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/TypeScript",
"index": 111,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ThreeNegationsPerFunctionJS",
"shortDescription": {
"text": "Function with more than three negations"
},
"fullDescription": {
"text": "Reports a function with three or more negation operations ('!' or '!='). Such functions may be unnecessarily confusing.",
"markdown": "Reports a function with three or more negation operations (`!` or `!=`). Such functions may be unnecessarily confusing."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FunctionWithMoreThanThreeNegationsJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Function metrics",
"index": 144,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TrivialIfJS",
"shortDescription": {
"text": "Redundant 'if' statement"
},
"fullDescription": {
"text": "Reports an 'if' statement that can be simplified to a single assignment or a 'return' statement. Example: 'if(foo())\n {\n return true;\n }\n else\n {\n return false;\n }' After applying the quick-fix the code looks as follows: 'return foo();'",
"markdown": "Reports an `if` statement that can be simplified to a single assignment or a `return` statement.\n\nExample:\n\n\n if(foo())\n {\n return true;\n }\n else\n {\n return false;\n }\n\nAfter applying the quick-fix the code looks as follows:\n\n return foo();\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantIfStatementJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Control flow issues",
"index": 129,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnterminatedStatementJS",
"shortDescription": {
"text": "Unterminated statement"
},
"fullDescription": {
"text": "Reports a statement without a semicolon or a newline at the end. Select the 'Terminate statements with semicolons' option in Editor | Code Style | JavaScript or TypeScript - Punctuation to report any statement that doesn't end with a semicolon, even if a newline is used. According to some coding styles, semicolons are preferred to line-breaks for consistency with the other languages.",
"markdown": "Reports a statement without a semicolon or a newline at the end.\n\nSelect the 'Terminate statements with semicolons' option in *Editor \\| Code Style \\| JavaScript or TypeScript - Punctuation* to report any statement that doesn't end with a semicolon, even if a newline is used.\nAccording to some coding styles, semicolons are preferred to line-breaks for consistency with the other languages."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnterminatedStatementJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Code style issues",
"index": 146,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSUnreachableSwitchBranches",
"shortDescription": {
"text": "Unreachable 'case' branch of a 'switch' statement"
},
"fullDescription": {
"text": "Reports an unreachable 'case' branch of a 'switch' statement. Example: '/**\n * @param {('foo' | 'bar')} p\n */\nfunction foo(p) {\n switch (p) {\n case 'foo': break;\n case 'bar': break;\n case 'baz': break; // unreachable\n }\n}'",
"markdown": "Reports an unreachable `case` branch of a `switch` statement.\n\nExample:\n\n\n /**\n * @param {('foo' | 'bar')} p\n */\n function foo(p) {\n switch (p) {\n case 'foo': break;\n case 'bar': break;\n case 'baz': break; // unreachable\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSUnreachableSwitchBranches",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Switch statement issues",
"index": 202,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TrivialConditionalJS",
"shortDescription": {
"text": "Redundant conditional expression"
},
"fullDescription": {
"text": "Reports a conditional expression of the form 'condition ? true : false\ncondition ? false : true' These expressions may be safely converted to 'condition\n!condition'",
"markdown": "Reports a conditional expression of the form\n\n\n condition ? true : false\n condition ? false : true\n\n\nThese expressions may be safely converted to\n\n\n condition\n !condition\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantConditionalExpressionJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Control flow issues",
"index": 129,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSTestFailedLine",
"shortDescription": {
"text": "Highlight failure line in test code"
},
"fullDescription": {
"text": "Reports a failed method call or an assertion in a test.",
"markdown": "Reports a failed method call or an assertion in a test."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSTestFailedLine",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Unit testing",
"index": 240,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IfStatementWithTooManyBranchesJS",
"shortDescription": {
"text": "'if' statement with too many branches"
},
"fullDescription": {
"text": "Reports an 'if' statement with too many branches. Such statements may be confusing, and often indicate inadequate levels of design abstraction. Use the field below to specify the maximum number of branches expected.",
"markdown": "Reports an `if` statement with too many branches. Such statements may be confusing, and often indicate inadequate levels of design abstraction.\n\n\nUse the field below to specify the maximum number of branches expected."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "IfStatementWithTooManyBranchesJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Control flow issues",
"index": 129,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BreakStatementJS",
"shortDescription": {
"text": "'break' statement"
},
"fullDescription": {
"text": "Reports a 'break' statements. Ignores 'break' statements that end case blocks.",
"markdown": "Reports a `break` statements. Ignores `break` statements that end case blocks."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "BreakStatementJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Potentially undesirable code constructs",
"index": 76,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DebuggerStatementJS",
"shortDescription": {
"text": "'debugger' statement"
},
"fullDescription": {
"text": "Reports a 'debugger' statement used for interaction with the Javascript debuggers. Such statements should not appear in production code.",
"markdown": "Reports a `debugger` statement used for interaction with the Javascript debuggers. Such statements should not appear in production code."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DebuggerStatementJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Potentially undesirable code constructs",
"index": 76,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AssignmentToForLoopParameterJS",
"shortDescription": {
"text": "Assignment to 'for' loop parameter"
},
"fullDescription": {
"text": "Reports an assignment to a variable declared as a 'for' loop parameter. Although occasionally intended, this construct can be extremely confusing, and is often a result of an error.",
"markdown": "Reports an assignment to a variable declared as a `for` loop parameter. Although occasionally intended, this construct can be extremely confusing, and is often a result of an error."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AssignmentToForLoopParameterJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Assignment issues",
"index": 201,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConditionalExpressionJS",
"shortDescription": {
"text": "Conditional expression"
},
"fullDescription": {
"text": "Reports a ternary conditional expression. Some coding standards prohibit such expressions in favor of explicit 'if' statements.",
"markdown": "Reports a ternary conditional expression. Some coding standards prohibit such expressions in favor of explicit `if` statements."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ConditionalExpressionJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Potentially undesirable code constructs",
"index": 76,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PointlessBooleanExpressionJS",
"shortDescription": {
"text": "Pointless statement or boolean expression"
},
"fullDescription": {
"text": "Reports a pointless or pointlessly complicated boolean expression or statement. Example: 'let a = !(false && x);\n let b = false || x;' After the quick fix is applied the result looks like: 'let a = true;\n let b = x;'",
"markdown": "Reports a pointless or pointlessly complicated boolean expression or statement.\n\nExample:\n\n\n let a = !(false && x);\n let b = false || x;\n\nAfter the quick fix is applied the result looks like:\n\n\n let a = true;\n let b = x;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PointlessBooleanExpressionJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Control flow issues",
"index": 129,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSUrlImportUsage",
"shortDescription": {
"text": "URL import is used"
},
"fullDescription": {
"text": "Checks used URL imports in the JavaScript language. Suggests downloading the module for the specified remote URL. Such association enables the IDE to provide proper code completion and navigation. URLs in import specifiers are supported only for ECMAScript modules in the JavaScript language.",
"markdown": "Checks used URL imports in the JavaScript language. Suggests downloading the module for the specified remote URL. Such association enables the IDE to provide proper code completion and navigation. \n\nURLs in import specifiers are supported only for ECMAScript modules in the JavaScript language."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "JSUrlImportUsage",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Imports and dependencies",
"index": 218,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryLabelOnContinueStatementJS",
"shortDescription": {
"text": "Unnecessary label on 'continue' statement"
},
"fullDescription": {
"text": "Reports a labeled 'continue' statement whose labels may be removed without changing the flow of control.",
"markdown": "Reports a labeled `continue` statement whose labels may be removed without changing the flow of control."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryLabelOnContinueStatementJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Control flow issues",
"index": 129,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSPotentiallyInvalidTargetOfIndexedPropertyAccess",
"shortDescription": {
"text": "Possibly incorrect target of indexed property access"
},
"fullDescription": {
"text": "Reports a potentially invalid indexed property access, for example, 'Array[1]'.",
"markdown": "Reports a potentially invalid indexed property access, for example, `Array[1]`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSPotentiallyInvalidTargetOfIndexedPropertyAccess",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Probable bugs",
"index": 153,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSTypeOfValues",
"shortDescription": {
"text": "'typeof' comparison with non-standard value"
},
"fullDescription": {
"text": "Reports a comparison of a 'typeof' expression with a literal string which is not one of the standard types: 'undefined', 'object', 'boolean', 'number', 'string', 'function', or 'symbol'. Such comparisons always return 'false'.",
"markdown": "Reports a comparison of a `typeof` expression with a literal string which is not one of the standard types: `undefined`, `object`, `boolean`, `number`, `string`, `function`, or `symbol`. Such comparisons always return `false`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSTypeOfValues",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Probable bugs",
"index": 153,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TypeScriptValidateJSTypes",
"shortDescription": {
"text": "Type mismatch in 'any' type"
},
"fullDescription": {
"text": "Reports a function call with a parameter, return value, or assigned expression or incorrect type, if the context symbol can be implicitly resolved to the 'any' type. declare var test: any;\ntest.hasOwnProperty(true); //reports 'true'",
"markdown": "Reports a function call with a parameter, return value, or assigned expression or incorrect type, if the context symbol can be implicitly resolved to the `any` type.\n\n```\ndeclare var test: any;\ntest.hasOwnProperty(true); //reports 'true'\n```"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "TypeScriptValidateJSTypes",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/TypeScript",
"index": 111,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "XHTMLIncompatabilitiesJS",
"shortDescription": {
"text": "Incompatible XHTML usages"
},
"fullDescription": {
"text": "Reports common JavaScript DOM patterns which may present problems with XHTML documents. In particular, the patterns detected will behave completely differently depending on whether the document is loaded as XML or HTML. This can result in subtle bugs where script behaviour is dependent on the MIME-type of the document, rather than its content. Patterns detected include document.body, document.images, document.applets, document.links, document.forms, and document.anchors.",
"markdown": "Reports common JavaScript DOM patterns which may present problems with XHTML documents. In particular, the patterns detected will behave completely differently depending on whether the document is loaded as XML or HTML. This can result in subtle bugs where script behaviour is dependent on the MIME-type of the document, rather than its content. Patterns detected include **document.body** , **document.images** , **document.applets** , **document.links** , **document.forms** , and **document.anchors**."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "XHTMLIncompatabilitiesJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/DOM issues",
"index": 108,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSAnnotator",
"shortDescription": {
"text": "ECMAScript specification is not followed"
},
"fullDescription": {
"text": "Reports basic syntax issues and inconsistencies with language specification, such as invalid usages of keywords, usages of incompatible numeric format, or multiple parameters to getters/setters. Generally, such errors must always be reported and shouldn't be disabled. But in some cases, such as issues due to the dynamic nature of JavaScript, the use of not yet supported language features, or bugs in IDE's checker, it may be handy to disable reporting these very basic errors.",
"markdown": "Reports basic syntax issues and inconsistencies with language specification, such as invalid usages of keywords, usages of incompatible numeric format, or multiple parameters to getters/setters. \nGenerally, such errors must always be reported and shouldn't be disabled. But in some cases, such as issues due to the dynamic nature of JavaScript, the use of not yet supported language features, or bugs in IDE's checker, it may be handy to disable reporting these very basic errors."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "JSAnnotator",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ES6ConvertToForOf",
"shortDescription": {
"text": "'for..in' is used instead of 'for..of'"
},
"fullDescription": {
"text": "Reports a usage of a 'for..in' loop on an array. Suggests replacing it with a 'for..of' loop. 'for..of' loops, which are introduced in ECMAScript 6, iterate over 'iterable' objects. For arrays, this structure is preferable to 'for..in', because it works only with array values but not with array object's properties.",
"markdown": "Reports a usage of a [for..in](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in) loop on an array. Suggests replacing it with a [for..of](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) loop. \n`for..of` loops, which are introduced in ECMAScript 6, iterate over `iterable` objects. For arrays, this structure is preferable to `for..in`, because it works only with array values but not with array object's properties."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ES6ConvertToForOf",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/ES2015 migration aids",
"index": 105,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ThisExpressionReferencesGlobalObjectJS",
"shortDescription": {
"text": "'this' expression which references the global object"
},
"fullDescription": {
"text": "Reports a 'this' expression outside an object literal or a constructor body. Such 'this' expressions reference the top-level \"global\" JavaScript object, but are mostly useless.",
"markdown": "Reports a `this` expression outside an object literal or a constructor body. Such `this` expressions reference the top-level \"global\" JavaScript object, but are mostly useless."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ThisExpressionReferencesGlobalObjectJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Validity issues",
"index": 52,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NestedFunctionCallJS",
"shortDescription": {
"text": "Nested function call"
},
"fullDescription": {
"text": "Reports a function call that is used as an argument in another function call, for example, 'foo(bar())'",
"markdown": "Reports a function call that is used as an argument in another function call, for example, `foo(bar())`"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NestedFunctionCallJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Code style issues",
"index": 146,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSEqualityComparisonWithCoercion",
"shortDescription": {
"text": "Equality operator may cause type coercion"
},
"fullDescription": {
"text": "Reports a usage of an equality operator that may cause unexpected type coercions. Suggests replacing '==' and '!=' with type-safe equality operators '===' and '!=='. Depending on the option selected, one of the following cases will be reported: All usages of '==' and '!=' operators. All usages except comparison with null. Some code styles allow using 'x == null' as a replacement for 'x === null || x === undefined'. Only suspicious expressions, such as: '==' or '!=' comparisons with '0', '''', 'null', 'true', 'false', or 'undefined'.",
"markdown": "Reports a usage of an equality operator that may cause unexpected type coercions. Suggests replacing `==` and `!=` with type-safe equality operators `===` and `!==`.\n\nDepending on the option selected, one of the following cases will be reported:\n\n* All usages of `==` and `!=` operators.\n* All usages except comparison with null. Some code styles allow using `x == null` as a replacement for `x === null || x === undefined`.\n* Only suspicious expressions, such as: `==` or `!=` comparisons with `0`, `''`, `null`, `true`, `false`, or `undefined`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EqualityComparisonWithCoercionJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Probable bugs",
"index": 153,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSNonStrictModeUsed",
"shortDescription": {
"text": "Non-strict mode used"
},
"fullDescription": {
"text": "Reports a JavaScript file that is not in the 'strict' mode.",
"markdown": "Reports a JavaScript file that is not in the `strict` mode."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSNonStrictModeUsed",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TypeScriptExplicitMemberType",
"shortDescription": {
"text": "Explicit types"
},
"fullDescription": {
"text": "Reports a type annotation that doesn't match the current code style for explicit types. Type declarations are not necessary when the type that is inferred from the context exactly matches the type annotation, for example: 'var pi: number = 3.14' In some cases it is preferable to always have explicit types - this prevents accidental type changes and makes code more explicit.",
"markdown": "Reports a type annotation that doesn't match the current code style for explicit types.\n\n\nType declarations are not necessary when the type that is inferred from the context exactly matches the type annotation, for example:\n\n\n var pi: number = 3.14\n\nIn some cases it is preferable to always have explicit types - this prevents accidental type changes and makes code more explicit."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "TypeScriptExplicitMemberType",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/TypeScript",
"index": 111,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSDuplicateCaseLabel",
"shortDescription": {
"text": "Duplicate 'case' label"
},
"fullDescription": {
"text": "Reports a duplicated 'case' label on a 'switch' statement, which normally indicates an error.",
"markdown": "Reports a duplicated `case` label on a `switch` statement, which normally indicates an error."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSDuplicateCaseLabel",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Switch statement issues",
"index": 202,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSXDomNesting",
"shortDescription": {
"text": "Invalid DOM element nesting"
},
"fullDescription": {
"text": "Detects HTML elements in JSX files which are not nested properly according to the DOM specification. React reports runtime warnings on incorrectly nested elements.",
"markdown": "Detects HTML elements in JSX files which are not nested properly according to the DOM specification. React reports runtime warnings on incorrectly nested elements."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSXDomNesting",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/React",
"index": 257,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryLocalVariableJS",
"shortDescription": {
"text": "Redundant local variable"
},
"fullDescription": {
"text": "Reports an unnecessary local variable that does not make a function more comprehensible: a local variable that is immediately returned a local variable that is immediately assigned to another variable and is not used anymore a local variable that always has the same value as another local variable or parameter. Use the checkbox below to have this inspection ignore variables that are immediately returned or thrown. Some coding styles suggest using such variables for clarity and ease of debugging.",
"markdown": "Reports an unnecessary local variable that does not make a function more comprehensible:\n\n* a local variable that is immediately returned\n* a local variable that is immediately assigned to another variable and is not used anymore\n* a local variable that always has the same value as another local variable or parameter.\n\n\nUse the checkbox below to have this inspection ignore variables that are immediately\nreturned or thrown. Some coding styles suggest using such variables for clarity and\nease of debugging."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryLocalVariableJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Data flow",
"index": 209,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSXUnresolvedComponent",
"shortDescription": {
"text": "Unresolved JSX component"
},
"fullDescription": {
"text": "Reports an unresolved reference to a JSX component. Suggests adding a missing import statement if the referenced component is defined in the project or its dependencies or creating a new component with this name. The template for a new component can be modified in Editor | File and Code Templates.",
"markdown": "Reports an unresolved reference to a JSX component. Suggests adding a missing import statement if the referenced component is defined in the project or its dependencies or creating a new component with this name.\n\nThe template for a new component can be modified in Editor \\| File and Code Templates."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "JSXUnresolvedComponent",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryLabelOnBreakStatementJS",
"shortDescription": {
"text": "Unnecessary label on 'break' statement"
},
"fullDescription": {
"text": "Reports a labeled 'break' statement whose labels may be removed without changing the flow of control.",
"markdown": "Reports a labeled `break` statement whose labels may be removed without changing the flow of control."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryLabelOnBreakStatementJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Control flow issues",
"index": 129,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DivideByZeroJS",
"shortDescription": {
"text": "Division by zero"
},
"fullDescription": {
"text": "Reports division by zero or a remainder by zero.",
"markdown": "Reports division by zero or a remainder by zero."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DivideByZeroJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Probable bugs",
"index": 153,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ChainedEqualityJS",
"shortDescription": {
"text": "Chained equality"
},
"fullDescription": {
"text": "Reports a chained equality comparison (i.e. 'a==b==c'). Such comparisons are confusing.",
"markdown": "Reports a chained equality comparison (i.e. `a==b==c`). Such comparisons are confusing."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ChainedEqualityComparisonsJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Code style issues",
"index": 146,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSRedundantSwitchStatement",
"shortDescription": {
"text": "'switch' statement is redundant and can be replaced"
},
"fullDescription": {
"text": "Reports a 'switch' statement with an empty body, or with only one 'case' branch, or with a 'default' branch only.",
"markdown": "Reports a `switch` statement with an empty body, or with only one `case` branch, or with a `default` branch only."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "JSRedundantSwitchStatement",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Switch statement issues",
"index": 202,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BlockStatementJS",
"shortDescription": {
"text": "Unnecessary block statement"
},
"fullDescription": {
"text": "Reports a block statement that is not used as the body of 'if', 'for', 'while', 'do', 'with', or 'try' statements, or as the body of a function declaration. Starting from ECMAScript 6, JavaScript blocks introduce new scopes for 'let' and 'const' variables, but still free-standing block statements may be confusing and result in subtle bugs when used with 'var' variables.",
"markdown": "Reports a block statement that is not used as the body of `if`, `for`, `while`, `do`, `with`, or `try` statements, or as the body of a function declaration. Starting from ECMAScript 6, JavaScript blocks introduce new scopes for `let` and `const` variables, but still free-standing block statements may be confusing and result in subtle bugs when used with `var` variables."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "BlockStatementJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Potentially confusing code constructs",
"index": 123,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TextLabelInSwitchStatementJS",
"shortDescription": {
"text": "Text label in 'switch' statement"
},
"fullDescription": {
"text": "Reports a labeled statement inside a 'switch' statement, which often results from a typo. Example: 'switch(x)\n {\n case 1:\n case2: //typo!\n case 3:\n break;\n }'",
"markdown": "Reports a labeled statement inside a `switch` statement, which often results from a typo.\n\nExample:\n\n\n switch(x)\n {\n case 1:\n case2: //typo!\n case 3:\n break;\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "TextLabelInSwitchStatementJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Switch statement issues",
"index": 202,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSOctalInteger",
"shortDescription": {
"text": "Octal integer"
},
"fullDescription": {
"text": "Reports a deprecated octal integer literal prefixed with '0' instead of '0o'. Such literals are not allowed in modern ECMAScript code, and using them in the strict mode is an error. To force this inspection for ES5 and ES3 language levels, select the 'Warn about obsolete octal literals in ES5- code' checkbox below.",
"markdown": "Reports a deprecated octal integer literal prefixed with `0` instead of `0o`. \nSuch literals are not allowed in modern ECMAScript code, and using them in the strict mode is an error. \nTo force this inspection for ES5 and ES3 language levels, select the 'Warn about obsolete octal literals in ES5- code' checkbox below."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "JSOctalInteger",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Validity issues",
"index": 52,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EmptyTryBlockJS",
"shortDescription": {
"text": "Empty 'try' block"
},
"fullDescription": {
"text": "Reports an empty 'try' block, which usually indicates an error.",
"markdown": "Reports an empty `try` block, which usually indicates an error."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EmptyTryBlockJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Try statement issues",
"index": 181,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FlowJSCoverage",
"shortDescription": {
"text": "Code is not covered by Flow"
},
"fullDescription": {
"text": "Reports JavaScript code fragments that are not covered by the Flow type checker. To use this inspection, configure the Flow executable in Settings | Languages & Frameworks | JavaScript.",
"markdown": "Reports JavaScript code fragments that are not covered by the Flow type checker. To use this inspection, configure the Flow executable in [Settings \\| Languages \\& Frameworks \\| JavaScript](settings://Settings.JavaScript)."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "FlowJSCoverage",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Flow type checker",
"index": 31,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSIgnoredPromiseFromCall",
"shortDescription": {
"text": "Result of method call returning a promise is ignored"
},
"fullDescription": {
"text": "Reports a function call that returns a 'Promise' that is not used later. Such calls are usually unintended and indicate an error.",
"markdown": "Reports a function call that returns a `Promise` that is not used later. Such calls are usually unintended and indicate an error."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "JSIgnoredPromiseFromCall",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Async code and promises",
"index": 195,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StringLiteralBreaksHTMLJS",
"shortDescription": {
"text": "String literal which breaks HTML parsing"
},
"fullDescription": {
"text": "Reports a string literal that contains a '</' sequence. Such strings may result in incorrect parsing of any HTML in which the JavaScript code is embedded.",
"markdown": "Reports a string literal that contains a `</` sequence. Such strings may result in incorrect parsing of any HTML in which the JavaScript code is embedded."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "StringLiteralBreaksHTMLJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Validity issues",
"index": 52,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSComparisonWithNaN",
"shortDescription": {
"text": "Comparison with NaN"
},
"fullDescription": {
"text": "Reports a comparison with NaN. Comparisons like 'expr == NaN' or 'expr === NaN' are always evaluated to 'false'.",
"markdown": "Reports a comparison with NaN. Comparisons like `expr == NaN` or `expr === NaN` are always evaluated to `false`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSComparisonWithNaN",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Probable bugs",
"index": 153,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSConstructorReturnsPrimitive",
"shortDescription": {
"text": "Constructor returns primitive value"
},
"fullDescription": {
"text": "Reports a constructor function that returns a primitive value. When called with 'new', this value will be lost and an object will be returned instead. To avoid warnings, use the '@return' tag to specify the return of the function.",
"markdown": "Reports a constructor function that returns a primitive value. When called with `new`, this value will be lost and an object will be returned instead. To avoid warnings, use the `@return` tag to specify the return of the function."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSConstructorReturnsPrimitive",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Probable bugs",
"index": 153,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSUnresolvedReference",
"shortDescription": {
"text": "Unresolved reference"
},
"fullDescription": {
"text": "Reports an unresolved reference in JavaScript code. In TypeScript code, a problem is reported if the part of the reference before the dot is of the type 'any'.",
"markdown": "Reports an unresolved reference in JavaScript code. In TypeScript code, a problem is reported if the part of the reference before the dot is of the type `any`."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "JSUnresolvedReference",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PlatformDetectionJS",
"shortDescription": {
"text": "Inaccurate platform detection"
},
"fullDescription": {
"text": "Reports a common JavaScript pattern for detecting the browser or operating system in which the script is run. In addition to pointing out non-portable constructs, these platform detection patterns are often incomplete and easily fooled. For most cases, detection of individual environment features is preferable to attempting to detect the entire platform. Patterns detected include: 'document.all' 'document.layers' 'navigator.userAgent' 'navigator.oscpu' 'navigator.appName' 'navigator.appCodeName' 'navigator.platform'",
"markdown": "Reports a common JavaScript pattern for detecting the browser or operating system in which the script is run. In addition to pointing out non-portable constructs, these platform detection patterns are often incomplete and easily fooled. For most cases, detection of individual environment features is preferable to attempting to detect the entire platform.\n\nPatterns detected include:\n\n* `document.all`\n* `document.layers`\n* `navigator.userAgent`\n* `navigator.oscpu`\n* `navigator.appName`\n* `navigator.appCodeName`\n* `navigator.platform`"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PlatformDetectionJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/DOM issues",
"index": 108,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TypeScriptDuplicateUnionOrIntersectionType",
"shortDescription": {
"text": "Duplicate union or intersection type component"
},
"fullDescription": {
"text": "Reports a duplicate type inside a union or intersection.",
"markdown": "Reports a duplicate type inside a union or intersection."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "TypeScriptDuplicateUnionOrIntersectionType",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/TypeScript",
"index": 111,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "VoidExpressionJS",
"shortDescription": {
"text": "'void' expression"
},
"fullDescription": {
"text": "Reports a 'void' expression.",
"markdown": "Reports a `void` expression."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "VoidExpressionJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Potentially undesirable code constructs",
"index": 76,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSVoidFunctionReturnValueUsed",
"shortDescription": {
"text": "Void function return value used"
},
"fullDescription": {
"text": "Reports a return value of a function that doesn't return anything. Calling of such functions always produces an 'undefined' value and such assignment may indicate an error. Example: 'let a = console.log('foo');' The following usages are ignored: Inside a return statement In some binary operations For overridden non-void functions",
"markdown": "Reports a return value of a function that doesn't return anything. Calling of such functions always produces an `undefined` value and such assignment may indicate an error.\n\nExample:\n\n\n let a = console.log('foo');\n\n<br />\n\nThe following usages are ignored:\n\n* Inside a return statement\n* In some binary operations\n* For overridden non-void functions"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSVoidFunctionReturnValueUsed",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Probable bugs",
"index": 153,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReturnFromFinallyBlockJS",
"shortDescription": {
"text": "'return' inside 'finally' block"
},
"fullDescription": {
"text": "Reports a 'return' statement inside a 'finally' block. Such 'return' statements may mask exceptions thrown, and complicate debugging.",
"markdown": "Reports a `return` statement inside a `finally` block. Such `return` statements may mask exceptions thrown, and complicate debugging."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ReturnInsideFinallyBlockJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Try statement issues",
"index": 181,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StatementsPerFunctionJS",
"shortDescription": {
"text": "Overly long function"
},
"fullDescription": {
"text": "Reports an overly long function. Function length is calculated by counting up the number of non-empty statements in the function. Functions that are too long are error-prone and difficult to test. Use the field below to specify the maximum acceptable number of statements in a function.",
"markdown": "Reports an overly long function. Function length is calculated by counting up the number of non-empty statements in the function. Functions that are too long are error-prone and difficult to test.\n\n\nUse the field below to specify the maximum acceptable number of statements in a function."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FunctionTooLongJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Function metrics",
"index": 144,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ContinueStatementWithLabelJS",
"shortDescription": {
"text": "'continue' statement with label"
},
"fullDescription": {
"text": "Reports a labeled 'continue' statement.",
"markdown": "Reports a labeled `continue` statement."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ContinueStatementWithLabelJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Potentially undesirable code constructs",
"index": 76,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TypeScriptMissingConfigOption",
"shortDescription": {
"text": "Missing tsconfig.json option "
},
"fullDescription": {
"text": "Reports a usage that requires an explicit option in 'tsconfig.json'. For example, to use JSX in '.tsx' files, 'tsconfig.json' must contain '\"jsx\"' property.",
"markdown": "Reports a usage that requires an explicit option in `tsconfig.json`. For example, to use JSX in `.tsx` files, `tsconfig.json` must contain `\"jsx\"` property."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "TypeScriptMissingConfigOption",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/TypeScript",
"index": 111,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ES6ShorthandObjectProperty",
"shortDescription": {
"text": "Property can be replaced with shorthand"
},
"fullDescription": {
"text": "Reports an object property that can be converted to ES6 shorthand style and provides a quick-fix to do it. Example: 'var obj = {foo:foo}' After applying the quick-fix the code looks as follows: 'var obj = {foo}'",
"markdown": "Reports an object property that can be converted to ES6 shorthand style and provides a quick-fix to do it.\n\nExample:\n\n\n var obj = {foo:foo}\n\nAfter applying the quick-fix the code looks as follows:\n\n\n var obj = {foo}\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ES6ShorthandObjectProperty",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSPotentiallyInvalidConstructorUsage",
"shortDescription": {
"text": "Potentially invalid constructor usage"
},
"fullDescription": {
"text": "Reports a usage of a potentially invalid constructor function, for example: a function that is not a constructor after 'new', using a constructor's prototype or calling a constructor without 'new'. A constructor function is assumed to have an upper case name (optional) or have an explicit JSDoc '@constructor' tag.",
"markdown": "Reports a usage of a potentially invalid constructor function, for example: a function that is not a constructor after `new`, using a constructor's prototype or calling a constructor without `new`. A constructor function is assumed to have an upper case name (optional) or have an explicit JSDoc `@constructor` tag."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSPotentiallyInvalidConstructorUsage",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Probable bugs",
"index": 153,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NodeCoreCodingAssistance",
"shortDescription": {
"text": "Unresolved Node.js APIs"
},
"fullDescription": {
"text": "Suggests configuring coding assistance for Node.js, for example, 'require' and/or core modules ('path', 'http', 'fs', etc.). See https://nodejs.org/api/ for the complete list.",
"markdown": "Suggests configuring coding assistance for Node.js, for example, `require` and/or core modules ('path', 'http', 'fs', etc.).\n\n\nSee <https://nodejs.org/api/> for the complete list."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NodeCoreCodingAssistance",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Node.js",
"index": 262,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSPrimitiveTypeWrapperUsage",
"shortDescription": {
"text": "Primitive type object wrapper used"
},
"fullDescription": {
"text": "Reports an improper usage of a wrapper for primitive types or a property of a primitive type being modified, as in the latter case the assigned value will be lost.",
"markdown": "Reports an improper usage of a wrapper for primitive types or a property of a primitive type being modified, as in the latter case the assigned value will be lost."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSPrimitiveTypeWrapperUsage",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSLastCommaInArrayLiteral",
"shortDescription": {
"text": "Unneeded last comma in array literal"
},
"fullDescription": {
"text": "Reports a usage of a trailing comma in an array literal. The warning is reported only when the JavaScript language version is set to ECMAScript 5.1. Although trailing commas in arrays are allowed by the specification, some browsers may throw an error when a trailing comma is used. You can configure formatting options for trailing commas in Code Style | JavaScript or TypeScript | Punctuation.",
"markdown": "Reports a usage of a trailing comma in an array literal.\n\nThe warning is reported only when the JavaScript language version is set to ECMAScript 5.1.\n\nAlthough trailing commas in arrays are allowed by the specification, some browsers may throw an error when a trailing comma is used.\n\nYou can configure formatting options for trailing commas in **Code Style** \\| **JavaScript** or **TypeScript** \\| **Punctuation**."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSLastCommaInArrayLiteral",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NegatedConditionalExpressionJS",
"shortDescription": {
"text": "Negated conditional expression"
},
"fullDescription": {
"text": "Reports a conditional expression whose condition is negated. Suggests flipping the order of branches in the conditional expression to increase the clarity of the statement. Example: '!condition ? 2 : 1'",
"markdown": "Reports a conditional expression whose condition is negated. Suggests flipping the order of branches in the conditional expression to increase the clarity of the statement. Example: `!condition ? 2 : 1`"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NegatedConditionalExpressionJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Potentially confusing code constructs",
"index": 123,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LabeledStatementJS",
"shortDescription": {
"text": "Labeled statement"
},
"fullDescription": {
"text": "Reports a labeled statement.",
"markdown": "Reports a labeled statement."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LabeledStatementJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Potentially undesirable code constructs",
"index": 76,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "WithStatementJS",
"shortDescription": {
"text": "'with' statement"
},
"fullDescription": {
"text": "Reports a 'with' statements. Such statements result in potentially confusing implicit bindings, and may behave strangely in setting new variables.",
"markdown": "Reports a `with` statements. Such statements result in potentially confusing implicit bindings, and may behave strangely in setting new variables."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "WithStatementJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Potentially undesirable code constructs",
"index": 76,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSConstantReassignment",
"shortDescription": {
"text": "Attempt to assign to const or readonly variable"
},
"fullDescription": {
"text": "Reports reassigning a value to a constant or a readonly variable.",
"markdown": "Reports reassigning a value to a constant or a readonly variable."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "JSConstantReassignment",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Validity issues",
"index": 52,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MagicNumberJS",
"shortDescription": {
"text": "Magic number"
},
"fullDescription": {
"text": "Reports a \"magic number\" that is a numeric literal used without being named by a constant declaration. Magic numbers can result in code whose intention is unclear, and may result in errors if a magic number is changed in one code location but remains unchanged in another. The numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 100, 1000, 0.0 and 1.0 are ignored.",
"markdown": "Reports a \"magic number\" that is a numeric literal used without being named by a constant declaration. Magic numbers can result in code whose intention is unclear, and may result in errors if a magic number is changed in one code location but remains unchanged in another. The numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 100, 1000, 0.0 and 1.0 are ignored."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MagicNumberJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Potentially confusing code constructs",
"index": 123,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TypeScriptLibrary",
"shortDescription": {
"text": "Missing global library"
},
"fullDescription": {
"text": "Reports a TypeScript library file that is required for a symbol but is not listed under the 'lib' compiler option in 'tsconfig.json'.",
"markdown": "Reports a TypeScript library file that is required for a symbol but is not listed under the `lib` compiler option in `tsconfig.json`."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "TypeScriptLibrary",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/TypeScript",
"index": 111,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TypeScriptMissingAugmentationImport",
"shortDescription": {
"text": "Missing augmentation import"
},
"fullDescription": {
"text": "Reports a usage from augmentation module without an explicit import.",
"markdown": "Reports a usage from [augmentation module](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation) without an explicit import."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "TypeScriptMissingAugmentationImport",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/TypeScript",
"index": 111,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Eslint",
"shortDescription": {
"text": "ESLint"
},
"fullDescription": {
"text": "Reports a discrepancy detected by the ESLint linter. The highlighting is based on the rule severity specified in the ESLint configuration file for each individual rule. Clear the 'Use rule severity from the configuration file' checkbox to use the severity configured in this inspection for all ESLint rules.",
"markdown": "Reports a discrepancy detected by the [ESLint](https://eslint.org) linter. \n\nThe highlighting is based on the rule severity specified in the [ESLint configuration file](https://eslint.org/docs/user-guide/configuring) for each individual rule. \n\nClear the 'Use rule severity from the configuration file' checkbox to use the severity configured in this inspection for all ESLint rules."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "Eslint",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Code quality tools",
"index": 134,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSEqualityComparisonWithCoercion.TS",
"shortDescription": {
"text": "Equality operator may cause type coercion"
},
"fullDescription": {
"text": "Reports a usage of equality operators may cause unexpected type coercions. Suggests replacing '==' or '!=' equality operators with type-safe '===' or '!==' operators. Depending on the option selected, one of the following cases will be reported: All usages of '==' and '!=' operators. All usages except comparison with null. Some code styles allow using 'x == null' as a replacement for 'x === null || x === undefined'. Only suspicious expressions, such as: '==' or '!=' comparisons with '0', '''', 'null', 'true', 'false', or 'undefined'.",
"markdown": "Reports a usage of equality operators may cause unexpected type coercions. Suggests replacing `==` or `!=` equality operators with type-safe `===` or `!==` operators.\n\nDepending on the option selected, one of the following cases will be reported:\n\n* All usages of `==` and `!=` operators.\n* All usages except comparison with null. Some code styles allow using `x == null` as a replacement for `x === null || x === undefined`.\n* Only suspicious expressions, such as: `==` or `!=` comparisons with `0`, `''`, `null`, `true`, `false`, or `undefined`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EqualityComparisonWithCoercionJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/TypeScript",
"index": 111,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PackageJsonMismatchedDependency",
"shortDescription": {
"text": "Mismatched dependencies in package.json"
},
"fullDescription": {
"text": "Reports a dependency from package.json that is not installed or doesn't match the specified version range.",
"markdown": "Reports a dependency from package.json that is not installed or doesn't match the specified [version range](https://docs.npmjs.com/about-semantic-versioning)."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PackageJsonMismatchedDependency",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Imports and dependencies",
"index": 218,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InfiniteLoopJS",
"shortDescription": {
"text": "Infinite loop statement"
},
"fullDescription": {
"text": "Reports a 'for', 'while', or 'do' statement which can only exit by throwing an exception. Such statements often indicate coding errors.",
"markdown": "Reports a `for`, `while`, or `do` statement which can only exit by throwing an exception. Such statements often indicate coding errors."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "InfiniteLoopJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Probable bugs",
"index": 153,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSArrowFunctionBracesCanBeRemoved",
"shortDescription": {
"text": "Redundant braces around arrow function body"
},
"fullDescription": {
"text": "Reports an arrow function whose body only consists of braces and exactly one statement. Suggests converting to concise syntax without braces. 'let incrementer = (x) => {return x + 1};' After the quick-fix is applied, the code fragment looks as follows: 'let incrementer = (x) => x + 1;'",
"markdown": "Reports an arrow function whose body only consists of braces and exactly one statement. Suggests converting to concise syntax without braces.\n\n\n let incrementer = (x) => {return x + 1};\n\nAfter the quick-fix is applied, the code fragment looks as follows:\n\n\n let incrementer = (x) => x + 1;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "JSArrowFunctionBracesCanBeRemoved",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Code style issues",
"index": 146,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSClassNamingConvention",
"shortDescription": {
"text": "Class naming convention"
},
"fullDescription": {
"text": "Reports a class or a function that is annotated with a JSDoc '@constructor' or '@class' tag whose names are too short, too long, or do not follow the specified regular expression pattern. Use the fields provided below to specify minimum length, maximum length, and a regular expression expected for classes names. Use the standard 'java.util.regex' format for regular expressions.",
"markdown": "Reports a class or a function that is annotated with a JSDoc `@constructor` or `@class` tag whose names are too short, too long, or do not follow the specified regular expression pattern.\n\n\nUse the fields provided below to specify minimum length, maximum length, and a regular expression\nexpected for classes names. Use the standard `java.util.regex` format for regular expressions."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSClassNamingConvention",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Naming conventions",
"index": 196,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSUndefinedPropertyAssignment",
"shortDescription": {
"text": "Undefined property assignment"
},
"fullDescription": {
"text": "Reports an assignment to a property that is not defined in the type of a variable. Example: '/**\n * @type {{ property1: string, property2: number }}\n */\nlet myVariable = create();\n\nmyVariable.newProperty = 3; // bad'",
"markdown": "Reports an assignment to a property that is not defined in the type of a variable.\n\nExample:\n\n\n /**\n * @type {{ property1: string, property2: number }}\n */\n let myVariable = create();\n\n myVariable.newProperty = 3; // bad\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "JSUndefinedPropertyAssignment",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Code style issues",
"index": 146,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSDeprecatedSymbols",
"shortDescription": {
"text": "Deprecated symbol used"
},
"fullDescription": {
"text": "Reports a usage of a deprecated function variable.",
"markdown": "Reports a usage of a deprecated function variable."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "JSDeprecatedSymbols",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LocalVariableNamingConventionJS",
"shortDescription": {
"text": "Local variable naming convention"
},
"fullDescription": {
"text": "Reports a local variable whose name is too short, too long, or doesn't follow the specified regular expression pattern. Use the fields provided below to specify minimum length, maximum length, and a regular expression expected for local variables names. Use the standard 'java.util.regex' format regular expressions.",
"markdown": "Reports a local variable whose name is too short, too long, or doesn't follow the specified regular expression pattern.\n\n\nUse the fields provided below to specify minimum length, maximum length, and a regular expression\nexpected for local variables names. Use the standard `java.util.regex` format regular expressions."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LocalVariableNamingConventionJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Naming conventions",
"index": 196,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSUnresolvedExtXType",
"shortDescription": {
"text": "Unresolved Ext JS xtype"
},
"fullDescription": {
"text": "Reports an Ext JS 'xtype' reference that doesn't have a corresponding class.",
"markdown": "Reports an Ext JS `xtype` reference that doesn't have a corresponding class."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSUnresolvedExtXType",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ES6RedundantNestingInTemplateLiteral",
"shortDescription": {
"text": "Redundant nesting in template literal"
},
"fullDescription": {
"text": "Reports nested instances of a string or a template literal. Suggests inlining the nested instances into the containing template string. Example: 'let a = `Hello, ${`Brave ${\"New\"}`} ${\"World\"}!`' After applying the quick-fix the code looks as follows: 'let a = `Hello, Brave New World!`'",
"markdown": "Reports nested instances of a string or a template literal. Suggests inlining the nested instances into the containing template string.\n\nExample:\n\n\n let a = `Hello, ${`Brave ${\"New\"}`} ${\"World\"}!`\n\nAfter applying the quick-fix the code looks as follows:\n\n\n let a = `Hello, Brave New World!`\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ES6RedundantNestingInTemplateLiteral",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NestingDepthJS",
"shortDescription": {
"text": "Overly nested function"
},
"fullDescription": {
"text": "Reports a function whose body contains statements that are too deeply nested within other statements. Such functions may be confusing and indicate that refactoring may be necessary. Use the field provided below to specify the maximum acceptable nesting depth allowed in a function.",
"markdown": "Reports a function whose body contains statements that are too deeply nested within other statements. Such functions may be confusing and indicate that refactoring may be necessary.\n\n\nUse the field provided below to specify the maximum acceptable nesting depth allowed in a function."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OverlyNestedFunctionJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Function metrics",
"index": 144,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TypeScriptSuspiciousConstructorParameterAssignment",
"shortDescription": {
"text": "Assigned constructor field parameter"
},
"fullDescription": {
"text": "Reports a common mistake in TypeScript code, when a class field is declared as a constructor parameter, and then this parameter is assigned. In this case, the corresponding field won't be assigned, only the local parameter value is modified. 'class Foo {\n constructor(private p: number) {\n p = 1; //must be this.p = 1;\n }\n}'",
"markdown": "Reports a common mistake in TypeScript code, when a class field is declared as a constructor parameter, and then this parameter is assigned. \nIn this case, the corresponding field *won't* be assigned, only the local parameter value is modified.\n\n\n class Foo {\n constructor(private p: number) {\n p = 1; //must be this.p = 1;\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "TypeScriptSuspiciousConstructorParameterAssignment",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/TypeScript",
"index": 111,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NestedSwitchStatementJS",
"shortDescription": {
"text": "Nested 'switch' statement"
},
"fullDescription": {
"text": "Reports a 'switch' statement that is nested in another 'switch' statement. Nested 'switch' statements may be very confusing, particularly if indenting is inconsistent.",
"markdown": "Reports a `switch` statement that is nested in another `switch` statement. Nested `switch` statements may be very confusing, particularly if indenting is inconsistent."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NestedSwitchStatementJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Switch statement issues",
"index": 202,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSMissingSwitchBranches",
"shortDescription": {
"text": "'switch' statement has missing branches"
},
"fullDescription": {
"text": "Reports a 'switch' statement on a variable of the type 'enum' or 'union' when the statement doesn't cover some value options from the type.",
"markdown": "Reports a `switch` statement on a variable of the type `enum` or `union` when the statement doesn't cover some value options from the type."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "JSMissingSwitchBranches",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Switch statement issues",
"index": 202,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSJQueryEfficiency",
"shortDescription": {
"text": "JQuery selector can be optimized"
},
"fullDescription": {
"text": "Reports a duplicated jQuery selector that can be cached or a usage of an attribute or a pseudo-selector (optional).",
"markdown": "Reports a duplicated jQuery selector that can be cached or a usage of an attribute or a pseudo-selector (optional)."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSJQueryEfficiency",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnreachableCodeJS",
"shortDescription": {
"text": "Unreachable code"
},
"fullDescription": {
"text": "Reports code that can never be executed, which almost certainly indicates an error",
"markdown": "Reports code that can never be executed, which almost certainly indicates an error"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnreachableCodeJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Control flow issues",
"index": 129,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EmptyStatementBodyJS",
"shortDescription": {
"text": "Statement with empty body"
},
"fullDescription": {
"text": "Reports an 'if', 'while', 'for', or 'with' statement with an empty body. Such statements often result from typos, and may cause confusion. Use the checkbox below to specify whether the statements with empty block statements as bodies should be reported.",
"markdown": "Reports an `if`, `while`, `for`, or `with` statement with an empty body. Such statements often result from typos, and may cause confusion.\n\n\nUse the checkbox below to specify whether the statements with empty block statements as bodies\nshould be reported."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "StatementWithEmptyBodyJS",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Potentially confusing code constructs",
"index": 123,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JSUnusedLocalSymbols",
"shortDescription": {
"text": "Unused local symbol"
},
"fullDescription": {
"text": "Reports an unused locally accessible parameter, local variable, function, class, or private member declaration.",
"markdown": "Reports an unused locally accessible parameter, local variable, function, class, or private member declaration."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JSUnusedLocalSymbols",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Unused symbols",
"index": 216,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.java-i18n",
"version": "232.8660.185",
"rules": [
{
"id": "UnusedMessageFormatParameter",
"shortDescription": {
"text": "Missing message format parameter"
},
"fullDescription": {
"text": "Reports properties values that look like 'java.text.MessageFormat' format strings but do not use some the parameters of the '{xx}' kind. Example: '# parameter {0} is not used\nerror.message=Something happened in line {1}'",
"markdown": "Reports properties values that look like `java.text.MessageFormat` format strings but do not use some the parameters of the `{xx}` kind.\n\nExample:\n\n\n # parameter {0} is not used\n error.message=Something happened in line {1}\n \n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnusedMessageFormatParameter",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Properties files",
"index": 33,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InconsistentResourceBundle",
"shortDescription": {
"text": "Inconsistent resource bundle"
},
"fullDescription": {
"text": "Reports problems in the properties files contained in the resource bundle. Report missing translations Use this option to report properties contained in the parent properties file that are missing in inherited ones (unless it's a language dialect). Example: '# messages.properties\n abc=xxx\n\n # messages_fr.properties\n # Empty file' Property 'abc' will be reported as untranslated. Report inconsistent properties Use this option to report properties contained in inherited properties file that are missing in the parent one (or in siblings if there is no parent). Example: '# messages.properties\n # Empty file\n\n # messages_fr.properties\n abc=xxx' Property 'abc' translation is not available here for any language except French, and, thus, will be reported as missing in the (default) properties file 'messages.properties'. Report properties overridden with the same value Use this option to report properties copy-pasted into several properties files verbatim. Example: '# messages.properties\n abc=xxx\n\n # messages_fr.properties\n abc=xxx' Property 'abc' will be reported as unnecessarily inherited in the file 'messages_fr.properties' . Report properties overridden with different placeholders Use this option to check for placeholder consistency in overridden properties. Example: '# messages.properties\n qwe={0}xxx{1}\n abc={0}yyy{1}\n\n # messages_fr.properties\n qwe={0}xxx{0}xxx{1}\n abc={0}yyy' Property 'abc' will be reported as a property containing message format placeholders not corresponding to 'messages.properties'. Report properties overridden with different values endings Use this option to check for ending consistency in overridden properties. Example: '# messages.properties\n abc=xxxzzz\n\n # messages_fr.properties\n abc=xxx;' Property 'abc' will be reported as ending with special signs ('!' / '?' / '.' / ':' / ';') whereas the parent value in 'messages.properties' doesn't.",
"markdown": "Reports problems in the properties files contained in the resource bundle.\n\n* **Report missing translations** \n\n Use this option to report properties contained in the parent properties file that are missing in inherited ones (unless it's a language dialect). \n\n Example:\n\n\n # messages.properties\n abc=xxx\n\n # messages_fr.properties\n # Empty file\n \n Property `abc` will be reported as untranslated. \n\n <br />\n\n* **Report inconsistent properties** \n\n Use this option to report properties contained in inherited properties file that are missing in the parent one (or in siblings if there is no parent). \n\n Example:\n\n\n # messages.properties\n # Empty file\n\n # messages_fr.properties\n abc=xxx\n \n Property `abc` translation is not available here for any language except French, and, thus, will be reported as missing in the (default) properties file `messages.properties`. \n\n <br />\n\n* **Report properties overridden with the same value** \n\n Use this option to report properties copy-pasted into several properties files verbatim. \n\n <br />\n\n Example:\n\n\n # messages.properties\n abc=xxx\n\n # messages_fr.properties\n abc=xxx\n \n Property `abc` will be reported as unnecessarily inherited in the file `messages_fr.properties` . \n\n <br />\n\n* **Report properties overridden with different placeholders** \n\n Use this option to check for placeholder consistency in overridden properties. \n\n Example:\n\n\n # messages.properties\n qwe={0}xxx{1}\n abc={0}yyy{1}\n\n # messages_fr.properties\n qwe={0}xxx{0}xxx{1}\n abc={0}yyy\n \n Property `abc` will be reported as a property containing message format placeholders not corresponding to `messages.properties`. \n\n <br />\n\n* **Report properties overridden with different values endings** \n\n Use this option to check for ending consistency in overridden properties. \n\n Example:\n\n\n # messages.properties\n abc=xxxzzz\n\n # messages_fr.properties\n abc=xxx;\n \n Property `abc` will be reported as ending with special signs (`!` / `?` / `.` / `:` / `;`) whereas the parent value in `messages.properties` doesn't."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "InconsistentResourceBundle",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Properties files",
"index": 33,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnresolvedPropertyKey",
"shortDescription": {
"text": "Invalid property key"
},
"fullDescription": {
"text": "Reports invalid arguments that are passed to methods with parameters annotated as '@PropertyKey'. These arguments should be valid property keys in corresponding properties files. Also, the inspection verifies that the 'resourceBundle' argument of the '@PropertyKey' annotation is an existing resource bundle. Use the quick-fix to create a new property or to select an existing one. Example: '@PropertyKey(resourceBundle = \"myBundle\") String value = \"invalid.key\";'",
"markdown": "Reports invalid arguments that are passed to methods with parameters annotated as `@PropertyKey`.\n\nThese arguments should be valid property keys in corresponding properties files.\nAlso, the inspection verifies that the `resourceBundle`\nargument of the `@PropertyKey` annotation is an existing resource bundle.\n\n\nUse the quick-fix to create a new property or to select an existing one.\n\nExample:\n\n\n @PropertyKey(resourceBundle = \"myBundle\") String value = \"invalid.key\";\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "UnresolvedPropertyKey",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Java/Properties files",
"index": 183,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConvertToBasicLatin",
"shortDescription": {
"text": "Non-Basic Latin character"
},
"fullDescription": {
"text": "Reports non-Basic Latin characters in literals and suggests replacing them with unicode entities. Example: '// © 2021\n char c = '©';\n String s = \"Áî\";'\n After the quick-fix is applied: '// &copy; 2021\n char c = '\\u00a9';\n String s = \"\\u00c1\\u00ee\";'",
"markdown": "Reports non-Basic Latin characters in literals and suggests replacing them with unicode entities.\n\nExample:\n\n\n // © 2021\n char c = '©';\n String s = \"Áî\";\n\nAfter the quick-fix is applied:\n\n\n // &copy; 2021\n char c = '\\u00a9';\n String s = \"\\u00c1\\u00ee\";\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ConvertToBasicLatin",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Java/Internationalization",
"index": 110,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DialogTitleCapitalization",
"shortDescription": {
"text": "Incorrect string capitalization"
},
"fullDescription": {
"text": "Reports strings in method parameters and return values annotated with '@Nls' and having the capitalization parameter to conform to capitalization rules existing in most platform UI guidelines. Example: 'void setTitle(@NlsContexts.DialogTitle String title) {}\n setTitle(\"This is sentence capitalization but should be title\");' After the quick-fix is applied: 'setTitle(\"This Is Sentence Capitalization but Should Be Title\");'",
"markdown": "Reports strings in method parameters and return values annotated with `@Nls` and having the capitalization parameter to conform to capitalization rules existing in most platform UI guidelines.\n\n**Example:**\n\n\n void setTitle(@NlsContexts.DialogTitle String title) {}\n setTitle(\"This is sentence capitalization but should be title\"); \n\nAfter the quick-fix is applied:\n\n\n setTitle(\"This Is Sentence Capitalization but Should Be Title\"); \n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "DialogTitleCapitalization",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Internationalization",
"index": 110,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DuplicateStringLiteralInspection",
"shortDescription": {
"text": "Duplicate string literal"
},
"fullDescription": {
"text": "Reports string literals that are replicated unchanged throughout the project. Two quick-fixes are provided. One to introduce a constant for a duplicated string and use it throughout the project, and one to show the location of all the duplicates of a particular string literal. Example: 'class C1 { String CONST1 = \"duplicate string\"; }\n class C2 { String CONST2 = \"duplicate string\"; }' Configure the inspection: Use the Min string length field to set the minimal string length required to detect duplicates. Use the Ignore @PropertyKey expressions option to ignore strings passed as arguments to methods annotated with 'org.jetbrains.annotations.PropertyKey'.",
"markdown": "Reports string literals that are replicated unchanged throughout the project. Two quick-fixes are provided. One to introduce a constant for a duplicated string and use it throughout the project, and one to show the location of all the duplicates of a particular string literal.\n\nExample:\n\n\n class C1 { String CONST1 = \"duplicate string\"; }\n class C2 { String CONST2 = \"duplicate string\"; }\n\nConfigure the inspection:\n\n* Use the **Min string length** field to set the minimal string length required to detect duplicates.\n* Use the **Ignore @PropertyKey expressions** option to ignore strings passed as arguments to methods annotated with `org.jetbrains.annotations.PropertyKey`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DuplicateStringLiteralInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Internationalization",
"index": 110,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HardCodedStringLiteral",
"shortDescription": {
"text": "Hardcoded strings"
},
"fullDescription": {
"text": "Reports any instances of hardcoded 'String' literals. Hardcoded 'String' literals are probably errors in an internationalized environment. This inspection won't report empty strings and strings consisting only of whitespaces. A quick-fix is available to transform a string literal into a 'java.util.ResourceBundle.getString()' method call.",
"markdown": "Reports any instances of hardcoded `String` literals.\n\nHardcoded `String` literals are probably errors in an\ninternationalized environment. This inspection won't report empty strings and strings consisting only of whitespaces. A quick-fix is available\nto transform a string literal into a `java.util.ResourceBundle.getString()` method call."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "HardCodedStringLiteral",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Internationalization",
"index": 110,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SuspiciousLocalesLanguages",
"shortDescription": {
"text": "Suspicious resource bundle locale languages"
},
"fullDescription": {
"text": "Reports locales with language codes that are not supported by Java.",
"markdown": "Reports locales with language codes that are not supported by Java."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SuspiciousLocalesLanguages",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Properties files",
"index": 33,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "org.intellij.plugins.postcss",
"version": "232.8660.185",
"rules": [
{
"id": "PostCssUnresolvedModuleValueReference",
"shortDescription": {
"text": "Unresolved CSS module value"
},
"fullDescription": {
"text": "Reports an unresolved reference to a CSS Module Value ('@value' declaration). Example: '@value foo from unknown;'",
"markdown": "Reports an unresolved reference to a [CSS Module Value](https://github.com/css-modules/postcss-modules-values) (`@value` declaration).\n\nExample:\n\n\n @value foo from unknown;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "PostCssUnresolvedModuleValueReference",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PostCSS",
"index": 36,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PostCssNesting",
"shortDescription": {
"text": "Invalid nested rule"
},
"fullDescription": {
"text": "Reports a nested style rule whose syntax doesn't comply with the PostCSS Nested or the PostCSS Nesting specification. Example: '.phone {\n &_title {}\n}'",
"markdown": "Reports a nested style rule whose syntax doesn't comply with the [PostCSS Nested](https://github.com/postcss/postcss-nested) or the [PostCSS Nesting](https://github.com/csstools/postcss-nesting) specification.\n\nExample:\n\n\n .phone {\n &_title {}\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PostCssNesting",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PostCSS",
"index": 36,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PostCssCustomMedia",
"shortDescription": {
"text": "Invalid custom media"
},
"fullDescription": {
"text": "Reports a syntax error in a PostCSS Custom Media query. Example: '@custom-media --small-viewport (max-width: 30em);'",
"markdown": "Reports a syntax error in a [PostCSS Custom Media](https://github.com/postcss/postcss-custom-media) query.\n\nExample:\n\n\n @custom-media --small-viewport (max-width: 30em);\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "PostCssCustomMedia",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PostCSS",
"index": 36,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PostCssCustomSelector",
"shortDescription": {
"text": "Invalid custom selector"
},
"fullDescription": {
"text": "Reports a syntax error in PostCSS Custom Selector. Example: '@custom-selector :--heading h1, h2, h3;'",
"markdown": "Reports a syntax error in [PostCSS Custom Selector](https://github.com/postcss/postcss-custom-selectors).\n\nExample:\n\n\n @custom-selector :--heading h1, h2, h3;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "PostCssCustomSelector",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PostCSS",
"index": 36,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PostCssMediaRange",
"shortDescription": {
"text": "Invalid media query range"
},
"fullDescription": {
"text": "Checks range context syntax, which may alternatively be used for media features with a 'range' type. Example: '@media screen and (500px <= width <= 1200px) {}'",
"markdown": "Checks [range context](https://github.com/postcss/postcss-media-minmax) syntax, which may alternatively be used for media features with a 'range' type.\n\nExample:\n\n\n @media screen and (500px <= width <= 1200px) {}\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "PostCssMediaRange",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "PostCSS",
"index": 36,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "org.intellij.groovy",
"version": "232.8660.185",
"rules": [
{
"id": "GroovyConstantNamingConvention",
"shortDescription": {
"text": "Constant naming convention"
},
"fullDescription": {
"text": "Reports constant with names which don't match the specified convention. Constants are fields of immutable type declared with 'static' and 'final' modifiers. Reports constants whose names are either too short, too long, or do not follow the specified regular expression pattern. Configure the inspection: Use the Pattern field to specify 'java.util.regex.Pattern' which a constant name is expected to match. Use the Min length field to specify the minimum length of a constant name. Use the Max length field to specify the maximum length of a constant name.",
"markdown": "Reports constant with names which don't match the specified convention.\n\nConstants are fields of immutable type declared with `static` and `final` modifiers.\nReports constants whose names are either too short, too long, or do not follow the specified regular expression pattern.\n\nConfigure the inspection:\n\n* Use the **Pattern** field to specify `java.util.regex.Pattern` which a constant name is expected to match.\n* Use the **Min length** field to specify the minimum length of a constant name.\n* Use the **Max length** field to specify the maximum length of a constant name."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyConstantNamingConvention",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Naming conventions",
"index": 39,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyInArgumentCheck",
"shortDescription": {
"text": "Incompatible 'in' argument types"
},
"fullDescription": {
"text": "Reports usages of membership operator 'in' with items and containers of incompatible types. Example: 'def list = [1, 2]\nif (\"foo\" in list) {} // list of Integers can't contain String'",
"markdown": "Reports usages of membership operator `in` with items and containers of incompatible types.\n\n**Example:**\n\n\n def list = [1, 2]\n if (\"foo\" in list) {} // list of Integers can't contain String\n\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyInArgumentCheck",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Probable bugs",
"index": 57,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyMapPutCanBeKeyedAccess",
"shortDescription": {
"text": "Call to Map.put can be keyed access"
},
"fullDescription": {
"text": "Reports calls to 'java.util.Map.put()' methods. Such calls could be replaced by the shorter and clearer keyed access form. Example: 'def map = [\"foo\": \"bar\"]\nmap.put(\"foo\", \"baz\") // map.put(\"foo\", \"baz\") could be replaced with map[\"foo\"] = \"baz\"'\n After the quick-fix is applied: 'def map = [\"foo\": \"bar\"]\nmap[\"foo\"] = \"baz\"'",
"markdown": "Reports calls to `java.util.Map.put()` methods. Such calls could be replaced by the shorter and clearer keyed access form.\n\n**Example:**\n\n\n def map = [\"foo\": \"bar\"]\n map.put(\"foo\", \"baz\") // map.put(\"foo\", \"baz\") could be replaced with map[\"foo\"] = \"baz\"\n\nAfter the quick-fix is applied:\n\n\n def map = [\"foo\": \"bar\"]\n map[\"foo\"] = \"baz\"\n\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyMapPutCanBeKeyedAccess",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/GPath",
"index": 58,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyDoubleCheckedLocking",
"shortDescription": {
"text": "Double-checked locking"
},
"fullDescription": {
"text": "Reports double-checked locking. Double-checked locking tries to initialize a field on demand and in a thread-safe manner, while avoiding the cost of synchronization. Unfortunately it is not thread-safe when used on a field that is not declared 'volatile'. When using Java 1.4 or earlier, double-checked locking doesn't work even with a 'volatile' field. Read the article linked above for a detailed explanation of the problem. Example: 'class Foo {\n private Helper helper = null\n\n Helper getHelper() {\n if (helper == null)\n synchronized(this) {\n if (helper == null) {\n helper = new Helper()\n }\n }\n }\n return helper;\n }\n }'",
"markdown": "Reports [double-checked locking](https://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html).\n\n\nDouble-checked locking tries to initialize a field on demand and in a thread-safe manner, while avoiding the cost of synchronization.\nUnfortunately it is not thread-safe when used on a field that is not declared `volatile`.\nWhen using Java 1.4 or earlier, double-checked locking doesn't work even with a `volatile` field.\nRead the article linked above for a detailed explanation of the problem.\n\n**Example:**\n\n\n class Foo {\n private Helper helper = null\n\n Helper getHelper() {\n if (helper == null)\n synchronized(this) {\n if (helper == null) {\n helper = new Helper()\n }\n }\n }\n return helper;\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyDoubleCheckedLocking",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Threading issues",
"index": 85,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyIfStatementWithIdenticalBranches",
"shortDescription": {
"text": "If statement with identical branches"
},
"fullDescription": {
"text": "Reports 'if' statements with identical \"then\" and 'else' branches. Such statements are almost certainly programmer error. Example: 'if (condition) {\n print \"foo\"\n} else {\n print \"foo\"\n}'\n After the quick-fix is applied: 'print \"foo\"'",
"markdown": "Reports `if` statements with identical \"then\" and `else` branches. Such statements are almost certainly programmer error.\n\n**Example:**\n\n\n if (condition) {\n print \"foo\"\n } else {\n print \"foo\"\n }\n\nAfter the quick-fix is applied:\n\n\n print \"foo\"\n\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyIfStatementWithIdenticalBranches",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Control flow issues",
"index": 90,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyNonShortCircuitBoolean",
"shortDescription": {
"text": "Non short-circuit boolean"
},
"fullDescription": {
"text": "Reports the non-short-circuit forms of boolean operators 'and' and 'or' ( '&' and '|' ). The non-short-circuit versions are occasionally useful, but their presence is often due to typos of the short-circuit forms ( '&&' and '||' ), and may lead to subtle bugs. Example: 'if (a & b) {}' After the quick-fix is applied: 'if (a && b) {}'",
"markdown": "Reports the non-short-circuit forms of boolean operators 'and' and 'or' ( `&` and `|` ).\n\n\nThe non-short-circuit versions are occasionally useful, but\ntheir presence is often due to typos of the short-circuit forms ( `&&`\nand `||` ), and may lead to subtle bugs.\n\n**Example:**\n\n\n if (a & b) {}\n\nAfter the quick-fix is applied:\n\n\n if (a && b) {}\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyNonShortCircuitBoolean",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Probable bugs",
"index": 57,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaStylePropertiesInvocation",
"shortDescription": {
"text": "Java-style property access"
},
"fullDescription": {
"text": "Reports properties accessed via method calls. Example: 'class Foo {\n int foo\n }\n\n def bar = new Foo()\n print(bar.getFoo())' After the quick-fix is applied: 'class Foo {\n int foo\n }\n\n def bar = new Foo()\n print(bar.foo)'",
"markdown": "Reports properties accessed via method calls.\n\n**Example:**\n\n\n class Foo {\n int foo\n }\n\n def bar = new Foo()\n print(bar.getFoo())\n\nAfter the quick-fix is applied:\n\n\n class Foo {\n int foo\n }\n\n def bar = new Foo()\n print(bar.foo)\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "JavaStylePropertiesInvocation",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Style",
"index": 92,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyTrivialConditional",
"shortDescription": {
"text": "Redundant conditional expression"
},
"fullDescription": {
"text": "Reports ternary conditional operators of the form 'x ? true : false' or similar, which can be trivially simplified. Example: 'foo() ? true : false' After the quick-fix is applied: 'foo()'",
"markdown": "Reports ternary conditional operators of the form `x ? true : false` or similar, which can be trivially simplified.\n\n**Example:**\n\n\n foo() ? true : false\n\nAfter the quick-fix is applied:\n\n\n foo()\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyTrivialConditional",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Control flow issues",
"index": 90,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GrFinalVariableAccess",
"shortDescription": {
"text": "Final variable access"
},
"fullDescription": {
"text": "Reports uninitialized final fields, invalid assignments to final variables, and parameters and fields.",
"markdown": "Reports uninitialized final fields, invalid assignments to final variables, and parameters and fields."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GrFinalVariableAccess",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Control flow issues",
"index": 90,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ChangeToOperator",
"shortDescription": {
"text": "Method call can be replaced with operator invocation"
},
"fullDescription": {
"text": "Reports method calls that can be replaced with operator invocations. Example: 'a.plus(b)' After the quick-fix is applied: 'a + b'",
"markdown": "Reports method calls that can be replaced with operator invocations.\n\n**Example:**\n\n\n a.plus(b)\n\nAfter the quick-fix is applied:\n\n\n a + b\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ChangeToOperator",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Style",
"index": 92,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyResultOfAssignmentUsed",
"shortDescription": {
"text": "Result of assignment used"
},
"fullDescription": {
"text": "Reports assignment expressions nested inside other expressions to use the assigned value immediately. Such expressions may be confusing and violating the general design principle that a given construct should do precisely one thing.",
"markdown": "Reports assignment expressions nested inside other expressions to use the assigned value immediately.\n\n\nSuch expressions may be confusing and violating the general design principle that a\ngiven construct should do precisely one thing."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyResultOfAssignmentUsed",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Assignment issues",
"index": 124,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyContinue",
"shortDescription": {
"text": "'continue' statement"
},
"fullDescription": {
"text": "Reports 'continue' statements.",
"markdown": "Reports `continue` statements."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyContinue",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Control flow issues",
"index": 90,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyUnsynchronizedMethodOverridesSynchronizedMethod",
"shortDescription": {
"text": "Unsynchronized method overrides synchronized method"
},
"fullDescription": {
"text": "Reports non-synchronized methods overriding synchronized methods. Example: 'abstract class Base {\n synchronized void foo() {\n // ...\n }\n }\n class Derived extends Base {\n @Override\n void foo() {\n super.foo()\n // ...\n }\n }' Here the non-synchronized method 'foo()' in class 'Bar' overrides synchronized method.",
"markdown": "Reports non-**synchronized** methods overriding **synchronized** methods.\n\n**Example:**\n\n\n abstract class Base {\n synchronized void foo() {\n // ...\n }\n }\n class Derived extends Base {\n @Override\n void foo() {\n super.foo()\n // ...\n }\n }\n\nHere the non-synchronized method `foo()` in class `Bar` overrides synchronized method."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyUnsynchronizedMethodOverridesSynchronizedMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Threading issues",
"index": 85,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NewGroovyClassNamingConvention",
"shortDescription": {
"text": "Class naming convention"
},
"fullDescription": {
"text": "Reports classes whose names are too short, too long, or do not follow the specified regular expression pattern. For each class type, specify the minimum length, maximum length, and the regular expression expected for class names using the provided input fields. Regular expressions should be specified in the standard 'java.util.regex' format.",
"markdown": "Reports classes whose names are too short, too long, or do not follow\nthe specified regular expression pattern.\n\nFor each class type, specify the minimum length, maximum length, and the regular expression expected for class names using the\nprovided input fields.\n\nRegular expressions should be specified in the standard `java.util.regex` format."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NewGroovyClassNamingConvention",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Naming conventions",
"index": 39,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClashingGetters",
"shortDescription": {
"text": "Clashing getters"
},
"fullDescription": {
"text": "Reports boolean methods which can be accessed via the same property name. The result of accessing such property might be unexpected. Example: 'class X {\n boolean isFoo() { true }\n boolean getFoo() { false }\n }\n\n // getFoo() will be called\n new X().foo'",
"markdown": "Reports boolean methods which can be accessed via the same property name.\n\nThe result of accessing such property might be unexpected.\n\n**Example:**\n\n\n class X {\n boolean isFoo() { true }\n boolean getFoo() { false }\n }\n\n // getFoo() will be called\n new X().foo\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ClashingGetters",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Potentially confusing code constructs",
"index": 136,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovySwitchStatementWithNoDefault",
"shortDescription": {
"text": "Switch statement with no default case"
},
"fullDescription": {
"text": "Reports 'switch' statements that do not contain 'default' labels. Some coding practices may insist on adding this label to all 'switch' statements.",
"markdown": "Reports `switch` statements that do not contain `default` labels.\n\n\nSome coding practices may insist on adding this label to all `switch` statements."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovySwitchStatementWithNoDefault",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Control flow issues",
"index": 90,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyListGetCanBeKeyedAccess",
"shortDescription": {
"text": "Call to List.get can be keyed access"
},
"fullDescription": {
"text": "Reports calls to 'java.util.List.get()' methods. Such calls could be replaced by the shorter and clearer keyed access form. Example: 'def list = [\"foo\"]\ndef str = list.get(0) // list.get(0) could be replaced with list[0]'\n After the quick-fix is applied: 'def list = [\"foo\"]\ndef str = list[0]'",
"markdown": "Reports calls to `java.util.List.get()` methods. Such calls could be replaced by the shorter and clearer keyed access form.\n\n**Example:**\n\n\n def list = [\"foo\"]\n def str = list.get(0) // list.get(0) could be replaced with list[0]\n\nAfter the quick-fix is applied:\n\n\n def list = [\"foo\"]\n def str = list[0]\n\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyListGetCanBeKeyedAccess",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/GPath",
"index": 58,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyNestedConditional",
"shortDescription": {
"text": "Nested conditional expression"
},
"fullDescription": {
"text": "Reports ternary conditional expressions that are nested inside other conditional expressions. Such nested conditionals may be very confusing. \"Elvis\" expressions are counted as conditionals for purpose of this inspection. Example: 'return (condition ? \"result\" : null) ?: \"fail\"'",
"markdown": "Reports ternary conditional expressions that are nested inside other conditional expressions. Such nested conditionals may be very confusing. \"Elvis\" expressions are counted as conditionals for purpose of this inspection.\n\n**Example:**\n\n\n return (condition ? \"result\" : null) ?: \"fail\"\n\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyNestedConditional",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Potentially confusing code constructs",
"index": 136,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyEmptyStatementBody",
"shortDescription": {
"text": "Statement with empty body"
},
"fullDescription": {
"text": "Reports 'if', 'while', 'do' or 'for' statements with empty bodies. While occasionally intended, this construction is confusing, and often the result of a typo. Example: 'if (condition) {}\nwhile(true){}'",
"markdown": "Reports `if`, `while`, `do` or `for` statements with empty bodies. While occasionally intended, this construction is confusing, and often the result of a typo.\n\n**Example:**\n\n\n if (condition) {}\n while(true){}\n\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyEmptyStatementBody",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Potentially confusing code constructs",
"index": 136,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyLabeledStatement",
"shortDescription": {
"text": "Labeled statement inspection"
},
"fullDescription": {
"text": "Reports labels already used in parent workflow. Example: 'def list = [\"foo\"]\ncycle:\nfor (element in list) {\n cycle: // confusing label repeat\n element.chars().forEach {\n }\n}'",
"markdown": "Reports labels already used in parent workflow.\n\n**Example:**\n\n\n def list = [\"foo\"]\n cycle:\n for (element in list) {\n cycle: // confusing label repeat\n element.chars().forEach {\n }\n }\n\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyLabeledStatement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Probable bugs",
"index": 57,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyAssignmentToForLoopParameter",
"shortDescription": {
"text": "Assignment to 'for' loop parameter"
},
"fullDescription": {
"text": "Reports assignments to for loop parameters inside the for loop body. While occasionally intended, this construct can be extremely confusing, and is often the result of a typo. Example: 'for (value in [1, 2, 3]) {\n value = 4 // warning\n }'",
"markdown": "Reports assignments to **for** loop parameters inside the **for** loop body.\n\nWhile occasionally intended, this construct can be extremely confusing, and is often the result of a typo.\n\n**Example:**\n\n\n for (value in [1, 2, 3]) {\n value = 4 // warning\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyAssignmentToForLoopParameter",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Assignment issues",
"index": 124,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyImplicitNullArgumentCall",
"shortDescription": {
"text": "Implicit null argument"
},
"fullDescription": {
"text": "Reports calls with no arguments to method that has exactly one parameter. This is equivalent to call with 'null', and that behavior is often confusing and unintended. Example: 'def foo(String s){}\nfoo() // this call is actually 'foo(null)' call'",
"markdown": "Reports calls with no arguments to method that has exactly one parameter. This is equivalent to call with `null`, and that behavior is often confusing and unintended.\n\n**Example:**\n\n\n def foo(String s){}\n foo() // this call is actually 'foo(null)' call\n\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "GroovyImplicitNullArgumentCall",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Potentially confusing code constructs",
"index": 136,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyConditionalWithIdenticalBranches",
"shortDescription": {
"text": "Ternary expression with identical branches"
},
"fullDescription": {
"text": "Reports ternary expressions with identical \"then\" and \"else\" branches. Such expressions are almost certainly a programmer error. The quick-fix replaces the expression with its \"then\" branch. Example: 'condition ? a.foo() : a.foo()' After the quick-fix is applied: 'a.foo()'",
"markdown": "Reports ternary expressions with identical \"then\" and \"else\" branches. Such expressions are almost certainly a programmer error.\n\nThe quick-fix replaces the expression with its \"then\" branch.\n\n**Example:**\n\n\n condition ? a.foo() : a.foo()\n\nAfter the quick-fix is applied:\n\n\n a.foo()\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyConditionalWithIdenticalBranches",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Control flow issues",
"index": 90,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GrAnnotationReferencingUnknownIdentifiers",
"shortDescription": {
"text": "@TupleConstructor and @MapConstructor"
},
"fullDescription": {
"text": "Reports unresolved identifiers in '@TupleConstructor' and '@MapConstructor' 'includes' and 'excludes' annotation attribute values. Example: '// unresolved 'c'\n @TupleConstructor(includes = ['a', 'b', 'c'])\n class X {\n def a\n def b\n }'",
"markdown": "Reports unresolved identifiers in `@TupleConstructor` and `@MapConstructor` `includes` and `excludes` annotation attribute values.\n\n**Example:**\n\n\n // unresolved 'c'\n @TupleConstructor(includes = ['a', 'b', 'c'])\n class X {\n def a\n def b\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GrAnnotationReferencingUnknownIdentifiers",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Annotations",
"index": 170,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GrUnnecessaryDefModifier",
"shortDescription": {
"text": "Unnecessary 'def'"
},
"fullDescription": {
"text": "Reports unnecessary 'def' modifiers when used with explicit type declaration. Example: 'def boolean foo() {} // modifier is unnecessary\n def Object bar // modifier is unnecessary\n\n // modifier is required and therefore not highlighted\n def (int a, String b) = []'",
"markdown": "Reports unnecessary `def` modifiers when used with explicit type declaration.\n\n**Example:**\n\n\n def boolean foo() {} // modifier is unnecessary\n def Object bar // modifier is unnecessary\n\n // modifier is required and therefore not highlighted\n def (int a, String b) = []\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GrUnnecessaryDefModifier",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Style",
"index": 92,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GrPOJO",
"shortDescription": {
"text": "@POJO without @CompileStatic"
},
"fullDescription": {
"text": "Reports annotation '@groovy.transform.stc.POJO' applied without '@groovy.transform.CompileStatic'. Annotation '@POJO' changes compilation process of Groovy classes to bytecode. It has no effect without explicitly enabled static compilation (which is done via '@CompileStatic' annotation). Example: '@POJO // reports @POJO\n class A {}'",
"markdown": "Reports annotation `@groovy.transform.stc.POJO` applied without `@groovy.transform.CompileStatic`.\n\nAnnotation `@POJO` changes compilation process of Groovy classes to bytecode. It has no effect without explicitly enabled static compilation (which is done via `@CompileStatic` annotation).\n\n**Example:**\n\n\n @POJO // reports @POJO\n class A {}\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GrPOJO",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Annotations",
"index": 170,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyConditionalCanBeElvis",
"shortDescription": {
"text": "Ternary expression can be replaced with elvis expression"
},
"fullDescription": {
"text": "Reports ternary expressions which can be replaced by an elvis expression. Example: 'def notNull(o, defaultValue) {\n o != null ? o : defaultValue\n }' After the quick-fix is applied: 'def notNull(o, defaultValue) {\n o ?: defaultValue\n }'",
"markdown": "Reports ternary expressions which can be replaced by an elvis expression.\n\n**Example:**\n\n\n def notNull(o, defaultValue) {\n o != null ? o : defaultValue\n }\n\nAfter the quick-fix is applied:\n\n\n def notNull(o, defaultValue) {\n o ?: defaultValue\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "GroovyConditionalCanBeElvis",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Control flow issues",
"index": 90,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SecondUnsafeCall",
"shortDescription": {
"text": "Second unsafe call"
},
"fullDescription": {
"text": "Reports possible NullPointerException during chain methods or properties call. Example: 'domain?.getZone().getName()' After the quick-fix is applied: 'domain?.getZone()?.getName()'",
"markdown": "Reports possible **NullPointerException** during chain methods or properties call.\n\n**Example:**\n\n\n domain?.getZone().getName()\n\nAfter the quick-fix is applied:\n\n\n domain?.getZone()?.getName()\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SecondUnsafeCall",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Probable bugs",
"index": 57,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GrPackage",
"shortDescription": {
"text": "Package mismatch"
},
"fullDescription": {
"text": "Reports files with a declared package that does not match the package expected. Also, reports files without 'package' statements if the class is not located directly in the source root directory.",
"markdown": "Reports files with a declared package that does not match the package expected. Also, reports files without `package` statements if the class is not located directly in the source root directory."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GrPackage",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Potentially confusing code constructs",
"index": 136,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovySystemRunFinalizersOnExit",
"shortDescription": {
"text": "Call to System.runFinalizersOnExit()"
},
"fullDescription": {
"text": "Reports calls to 'System.runFinalizersOnExit()'. This call is one of the most dangerous in the Java language. It is inherently non-thread-safe, may result in data corruption, deadlock, and may affect parts of the program far removed from its call point. It is deprecated, and its use is strongly discouraged.",
"markdown": "Reports calls to `System.runFinalizersOnExit()`.\n\n\nThis call is one of the most dangerous in the Java language. It is inherently non-thread-safe,\nmay result in data corruption, deadlock, and may affect parts of the program far removed from its call point.\nIt is deprecated, and its use is strongly discouraged."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovySystemRunFinalizersOnExit",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Threading issues",
"index": 85,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GrUnnecessaryPublicModifier",
"shortDescription": {
"text": "Unnecessary 'public'"
},
"fullDescription": {
"text": "Reports unnecessary 'public' modifiers as Groovy classes and methods are 'public' by default. Example: 'public class Foo{\n public void bar(){\n }\n }' After the quick-fix is applied: 'class Foo{\n void bar(){\n }\n }'",
"markdown": "Reports unnecessary `public` modifiers as Groovy classes and methods are `public` by default.\n\n**Example:**\n\n\n public class Foo{\n public void bar(){\n }\n }\n\nAfter the quick-fix is applied:\n\n\n class Foo{\n void bar(){\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GrUnnecessaryPublicModifier",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Style",
"index": 92,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SingletonConstructor",
"shortDescription": {
"text": "@Singleton constructors"
},
"fullDescription": {
"text": "Reports constructors of classes annotated by '@Singleton' unless it is declared non-strict. Example: '@Singleton\n class Foo{\n Foo(){\n }\n }' There are two possible quick-fixes: either to remove the constructor or to declare '@Singleton' non-strict. After the quick-fix is applied: '@Singleton\n class Foo{\n }' or: '@Singleton(strict = false)\n class Foo{\n Foo(){\n }\n }'",
"markdown": "Reports constructors of classes annotated by `@Singleton` unless it is declared non-strict.\n\n**Example:**\n\n\n @Singleton\n class Foo{\n Foo(){\n }\n }\n\nThere are two possible quick-fixes: either to remove the constructor or to declare `@Singleton` non-strict.\n\nAfter the quick-fix is applied:\n\n\n @Singleton\n class Foo{\n }\n\nor:\n\n\n @Singleton(strict = false)\n class Foo{\n Foo(){\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "SingletonConstructor",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Annotations",
"index": 170,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyUnusedIncOrDec",
"shortDescription": {
"text": "Unused incrementing or decrementing"
},
"fullDescription": {
"text": "Reports unused incrementing and decrementing expressions.",
"markdown": "Reports unused incrementing and decrementing expressions."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyUnusedIncOrDec",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Data flow",
"index": 193,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyEmptyCatchBlock",
"shortDescription": {
"text": "Empty 'catch' block"
},
"fullDescription": {
"text": "Reports empty 'catch' blocks. While occasionally intended, empty 'catch' blocks can make debugging extremely difficult. Example: 'try {\n throw new Exception()\n}\ncatch (Exception e) {\n}'\n After the quick-fix is applied: 'try {\n throw new Exception()\n}\ncatch (Exception ignored) {\n}'",
"markdown": "Reports empty `catch` blocks. While occasionally intended, empty `catch` blocks can make debugging extremely difficult.\n\n**Example:**\n\n\n try {\n throw new Exception()\n }\n catch (Exception e) {\n }\n\nAfter the quick-fix is applied:\n\n\n try {\n throw new Exception()\n }\n catch (Exception ignored) {\n }\n\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyEmptyCatchBlock",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Error handling",
"index": 194,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyVariableNotAssigned",
"shortDescription": {
"text": "Variable not assigned"
},
"fullDescription": {
"text": "Reports variables that might not have been initialized.",
"markdown": "Reports variables that might not have been initialized."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyVariableNotAssigned",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Data flow",
"index": 193,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyMethodWithMoreThanThreeNegations",
"shortDescription": {
"text": "Method with more than three negations"
},
"fullDescription": {
"text": "Reports methods with three or more negation operations ('!' or '!='). Such methods may be unnecessarily confusing.",
"markdown": "Reports methods with three or more negation operations (`!` or `!=`). Such methods may be unnecessarily confusing."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyMethodWithMoreThanThreeNegations",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Method metrics",
"index": 197,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GrNamedVariantLabels",
"shortDescription": {
"text": "@NamedVariant/@NamedParam/@NamedDelegate unresolved label"
},
"fullDescription": {
"text": "Reports unresolved argument labels in calls of methods annotated by '@NamedVariant'/'@NamedParam'/'@NamedDelegate'. Example: '@groovy.transform.NamedVariant\n def foo(a, b) {}\n\n // unresolved label 'c'\n foo(a: 1, b: 2, c: 3)'",
"markdown": "Reports unresolved argument labels in calls of methods annotated by `@NamedVariant`/`@NamedParam`/`@NamedDelegate`.\n\n**Example:**\n\n\n @groovy.transform.NamedVariant\n def foo(a, b) {}\n\n // unresolved label 'c'\n foo(a: 1, b: 2, c: 3)\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GrNamedVariantLabels",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Annotations",
"index": 170,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyNegatedConditional",
"shortDescription": {
"text": "Negated conditional expression"
},
"fullDescription": {
"text": "Reports conditional expressions whose conditions are negated. Flipping the order of the conditional expression branches will usually increase the clarity of such statements. Example: '~condition ? \"1\" : \"2\"'",
"markdown": "Reports conditional expressions whose conditions are negated. Flipping the order of the conditional expression branches will usually increase the clarity of such statements.\n\n**Example:**\n\n\n ~condition ? \"1\" : \"2\"\n\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyNegatedConditional",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Potentially confusing code constructs",
"index": 136,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovySillyAssignment",
"shortDescription": {
"text": "Silly assignment"
},
"fullDescription": {
"text": "Reports assignments of a variable to itself.",
"markdown": "Reports assignments of a variable to itself."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovySillyAssignment",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Assignment issues",
"index": 124,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GrUnnecessarySealedModifier",
"shortDescription": {
"text": "Unnecessary 'sealed' modifier"
},
"fullDescription": {
"text": "Reports unnecessary 'sealed' modifiers which used on methods, fields, or variables. This modifier has effect only on classes, interfaces and traits. Example: 'sealed boolean foo() {} // modifier is unnecessary\n sealed Object bar // modifier is unnecessary\n\n // modifier is required and therefore not highlighted\n sealed class A {}'",
"markdown": "Reports unnecessary `sealed` modifiers which used on methods, fields, or variables.\n\nThis modifier has effect only on classes, interfaces and traits.\n\n**Example:**\n\n\n sealed boolean foo() {} // modifier is unnecessary\n sealed Object bar // modifier is unnecessary\n\n // modifier is required and therefore not highlighted\n sealed class A {}\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GrUnnecessarySealedModifier",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Style",
"index": 92,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyMissingReturnStatement",
"shortDescription": {
"text": "Missing return statement"
},
"fullDescription": {
"text": "Reports missing 'return' statements at the end of methods with a non-void return type. The end of method should be reachable by the method's execution flow. Example: 'String foo(int a) {\n if (a > 0) {\n return \"more than zero\"\n }\n} // foo(-1) will return 'null'\n\nint bar(int a) {\n if (a > 0) {\n return a\n }\n} // bar(-1) will fall with runtime exception'",
"markdown": "Reports missing `return` statements at the end of methods with a non-**void** return type. The end of method should be reachable by the method's execution flow.\n\n**Example:**\n\n\n String foo(int a) {\n if (a > 0) {\n return \"more than zero\"\n }\n } // foo(-1) will return 'null'\n\n int bar(int a) {\n if (a > 0) {\n return a\n }\n } // bar(-1) will fall with runtime exception\n\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyMissingReturnStatement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Data flow",
"index": 193,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyPublicFieldAccessedInSynchronizedContext",
"shortDescription": {
"text": "Non-private field accessed in synchronized context"
},
"fullDescription": {
"text": "Reports non-'final', non-'private' fields which are accessed in a synchronized context. A non-private field cannot be guaranteed to always be accessed in a synchronized manner, and such \"partially synchronized\" access may result in unexpectedly inconsistent data structures. Accesses in constructors an initializers are ignored for purposes of this inspection.",
"markdown": "Reports non-`final`, non-`private` fields which are accessed in a synchronized context.\n\n\nA non-private field cannot be guaranteed to always be accessed in a synchronized manner, and such \"partially synchronized\"\naccess may result in unexpectedly inconsistent data structures. Accesses in constructors an initializers are ignored\nfor purposes of this inspection."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyPublicFieldAccessedInSynchronizedContext",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Threading issues",
"index": 85,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyUnusedAssignment",
"shortDescription": {
"text": "Unused assignment"
},
"fullDescription": {
"text": "Reports the cases where a variable is redundant as its value is never used after its assignment. If the variable is unused, we recommend removing it to shorten the code and to avoid redundant allocations. The following cases are reported: the variable never gets read after assignment the value is always overwritten with another assignment before the next variable read the variable initializer is redundant (for one of the above two reasons) For more info see the same inspection in Java.",
"markdown": "Reports the cases where a variable is redundant as its value is never used after its assignment.\n\nIf the variable is unused, we recommend removing it to shorten the code and to avoid redundant allocations.\n\nThe following cases are reported:\n\n* the variable never gets read after assignment\n* the value is always overwritten with another assignment before the next variable read\n* the variable initializer is redundant (for one of the above two reasons)\n\nFor more info see the same inspection in Java."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyUnusedAssignment",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Data flow",
"index": 193,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovySynchronizationOnVariableInitializedWithLiteral",
"shortDescription": {
"text": "Synchronization on variable initialized with literal"
},
"fullDescription": {
"text": "Reports synchronized blocks which lock on an object which is initialized with a literal. String literals are interned and 'Number' literals can be allocated from a cache. Because of this, it is possible that some other part of the system which uses an object initialized with the same literal, is actually holding a reference to the exact same object. This can create unexpected dead-lock situations, if the string was thought to be private.",
"markdown": "Reports synchronized blocks which lock on an object which is initialized with a literal.\n\n\nString literals are interned and `Number` literals can be allocated from a cache. Because of\nthis, it is possible that some other part of the system which uses an object initialized with the same\nliteral, is actually holding a reference to the exact same object. This can create unexpected dead-lock\nsituations, if the string was thought to be private."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovySynchronizationOnVariableInitializedWithLiteral",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Threading issues",
"index": 85,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyContinueOrBreakFromFinallyBlock",
"shortDescription": {
"text": "'continue' or 'break' from 'finally' block"
},
"fullDescription": {
"text": "Reports 'break' and 'continue' statements inside of 'finally' blocks. While occasionally intended, such statements are very confusing, may mask thrown exceptions, and tremendously complicate debugging.",
"markdown": "Reports `break` and `continue` statements inside of `finally` blocks.\n\nWhile occasionally intended, such statements are very confusing, may mask thrown exceptions, and tremendously complicate debugging."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyContinueOrBreakFromFinallyBlock",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Error handling",
"index": 194,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyAssignmentToMethodParameter",
"shortDescription": {
"text": "Assignment to method parameter"
},
"fullDescription": {
"text": "Reports assignment to method parameters. While occasionally intended, this construct can be extremely confusing, and is often the result of a typo. Example: 'def m(a, b, c) {\n a = [] // warning\n }'",
"markdown": "Reports assignment to method parameters.\n\nWhile occasionally intended, this construct can be extremely confusing, and is often the result of a typo.\n\n**Example:**\n\n\n def m(a, b, c) {\n a = [] // warning\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyAssignmentToMethodParameter",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Assignment issues",
"index": 124,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyStaticMethodNamingConvention",
"shortDescription": {
"text": "Static method naming convention"
},
"fullDescription": {
"text": "Reports static methods whose names are too short, too long, or do not follow the specified regular expression pattern. Use the fields provided below to specify minimum length, maximum length and regular expression expected for static method names. Regular expressions should be specified in the standard 'java.util.regex' format.",
"markdown": "Reports static methods whose names are too short, too long, or do not follow the specified regular expression pattern.\n\n\nUse the fields provided below to specify minimum length, maximum length and regular expression expected for static method names.\n\nRegular expressions should be specified in the standard `java.util.regex` format."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyStaticMethodNamingConvention",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Naming conventions",
"index": 39,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyTrivialIf",
"shortDescription": {
"text": "Redundant 'if' statement"
},
"fullDescription": {
"text": "Reports 'if' statements which can be simplified to single assignment or 'return' statements. Example: 'if (foo())\n return true;\n else\n return false;' After the quick-fix is applied: 'return foo();'",
"markdown": "Reports `if` statements which can be simplified to single assignment or `return` statements.\n\n**Example:**\n\n\n if (foo())\n return true;\n else\n return false;\n\nAfter the quick-fix is applied:\n\n\n return foo();\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyTrivialIf",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Control flow issues",
"index": 90,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyUncheckedAssignmentOfMemberOfRawType",
"shortDescription": {
"text": "Unchecked assignment from members of raw type"
},
"fullDescription": {
"text": "Reports unchecked assignments from members of raw type. Example: 'List list = new ArrayList()\n List&ltString> a = list.get(0)'",
"markdown": "Reports unchecked assignments from members of raw type.\n\n**Example:**\n\n\n List list = new ArrayList()\n List&ltString> a = list.get(0)\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyUncheckedAssignmentOfMemberOfRawType",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Assignment issues",
"index": 124,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyDivideByZero",
"shortDescription": {
"text": "Division by zero"
},
"fullDescription": {
"text": "Reports divisions by zero or remainders by zero. Example: 'def a = 42\n a / 0 // warning\n a % 0.0 // warning'",
"markdown": "Reports divisions by zero or remainders by zero.\n\n**Example:**\n\n\n def a = 42\n a / 0 // warning\n a % 0.0 // warning\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyDivideByZero",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Probable bugs",
"index": 57,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GrUnnecessarySemicolon",
"shortDescription": {
"text": "Unnecessary semicolon"
},
"fullDescription": {
"text": "Reports unnecessary semicolons. Example: 'print 2; print 3 // semicolon is required\n print 2; // semicolon is unnecessary'",
"markdown": "Reports unnecessary semicolons.\n\n**Example:**\n\n\n print 2; print 3 // semicolon is required\n print 2; // semicolon is unnecessary\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GrUnnecessarySemicolon",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Style",
"index": 92,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnnecessaryQualifiedReference",
"shortDescription": {
"text": "Unnecessary qualified reference"
},
"fullDescription": {
"text": "Reports fully qualified references, which can be replaced with import. Example: 'def swingBuilder = new groovy.swing.SwingBuilder()' After the quick-fix is applied: 'import groovy.swing.SwingBuilder\n \n def swingBuilder = new SwingBuilder()'",
"markdown": "Reports fully qualified references, which can be replaced with import.\n\n**Example:**\n\n\n def swingBuilder = new groovy.swing.SwingBuilder()\n\nAfter the quick-fix is applied:\n\n\n import groovy.swing.SwingBuilder\n \n def swingBuilder = new SwingBuilder()\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnnecessaryQualifiedReference",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Potentially confusing code constructs",
"index": 136,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ChangeToMethod",
"shortDescription": {
"text": "Operator invocation can be replaced with method call"
},
"fullDescription": {
"text": "Reports operator invocations that can be replaced with method calls. Example: 'a + b' After the quick-fix is applied: 'a.plus(b)'",
"markdown": "Reports operator invocations that can be replaced with method calls.\n\n**Example:**\n\n\n a + b\n\nAfter the quick-fix is applied:\n\n\n a.plus(b)\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ChangeToMethod",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Style",
"index": 92,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GrSwitchExhaustivenessCheck",
"shortDescription": {
"text": "Exhaustiveness check for switch expressions"
},
"fullDescription": {
"text": "Reports switch expressions that do not cover all possible outcomes of the matched expression. Groovy does not require that switch expression must be exhaustive. It acts as if an implicit 'default -> null' branch is inserted. It may cause unexpected nulls if a developer forgets to insert necessary 'case' branches. Example: 'enum A { X, Y }\n\n def foo(A a) {\n def x = switch (a) { // reports switch\n case A.X -> ...\n }\n }'",
"markdown": "Reports switch expressions that do not cover all possible outcomes of the matched expression.\n\nGroovy does not require that switch expression must be exhaustive. It acts as if an implicit `default -> null` branch is inserted.\nIt may cause unexpected nulls if a developer forgets to insert necessary `case` branches.\n\n**Example:**\n\n\n enum A { X, Y }\n\n def foo(A a) {\n def x = switch (a) { // reports switch\n case A.X -> ...\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "GrSwitchExhaustivenessCheck",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Probable bugs",
"index": 57,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyAssignabilityCheck",
"shortDescription": {
"text": "Incompatible type assignments"
},
"fullDescription": {
"text": "Reports assignments with incompatible types. Such assignments might result in various runtime exceptions. Example: 'class A {}\n class B {}\n\n // incompatible assignment\n A a = new B()'",
"markdown": "Reports assignments with incompatible types.\n\nSuch assignments might result in various runtime exceptions.\n\n**Example:**\n\n\n class A {}\n class B {}\n\n // incompatible assignment\n A a = new B()\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyAssignabilityCheck",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Assignment issues",
"index": 124,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyUntypedAccess",
"shortDescription": {
"text": "Untyped reference expression"
},
"fullDescription": {
"text": "Reports reference expressions whose type can't be determined.",
"markdown": "Reports reference expressions whose type can't be determined."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyUntypedAccess",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Probable bugs",
"index": 57,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyResultOfObjectAllocationIgnored",
"shortDescription": {
"text": "Result of object allocation ignored"
},
"fullDescription": {
"text": "Reports object allocation where the result of this operation is ignored. Such allocation expressions are legal Groovy, but are usually either inadvertent, or evidence of a complicated object initialization strategy.",
"markdown": "Reports object allocation where the result of this operation is ignored.\n\n\nSuch allocation expressions are legal Groovy, but are usually either inadvertent, or\nevidence of a complicated object initialization strategy."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyResultOfObjectAllocationIgnored",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Probable bugs",
"index": 57,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovySynchronizationOnThis",
"shortDescription": {
"text": "Synchronization on 'this'"
},
"fullDescription": {
"text": "Reports synchronization which uses 'this' as its lock expression. Constructs reported include 'synchronized' blocks which lock 'this', and calls to 'wait()' 'notify()' or 'notifyAll()' which target 'wait()'. Such constructs, like synchronized methods, make it hard to track just who is locking on a given object, and make possible \"denial of service\" attacks on objects. As an alternative, consider locking on a private instance variable, access to which can be completely controlled.",
"markdown": "Reports synchronization which uses `this` as its lock expression.\n\n\nConstructs reported include `synchronized`\nblocks which lock `this`, and calls to `wait()`\n`notify()` or `notifyAll()` which target `wait()`.\nSuch constructs, like synchronized methods, make it hard to track just who is locking on a given\nobject, and make possible \"denial of service\" attacks on objects. As an alternative, consider\nlocking on a private instance variable, access to which can be completely controlled."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovySynchronizationOnThis",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Threading issues",
"index": 85,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyNestedSynchronizedStatement",
"shortDescription": {
"text": "Nested 'synchronized' statement"
},
"fullDescription": {
"text": "Reports nested 'synchronized' statements. Nested 'synchronized' statements are either redundant (if the lock objects are identical) or prone to deadlock.",
"markdown": "Reports nested `synchronized` statements.\n\n\nNested `synchronized` statements\nare either redundant (if the lock objects are identical) or prone to deadlock."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyNestedSynchronizedStatement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Threading issues",
"index": 85,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyGStringKey",
"shortDescription": {
"text": "GString map key"
},
"fullDescription": {
"text": "Reports statements which use a 'groovy.lang.GString' object as a key to map. In general 'GString' objects are mutable and probably should not be used as keys. Also, a 'GString' entry cannot be accessed with a 'java.lang.String' object with same value. Example: 'def map = [:]\ndef key = 'foo'\nmap << [\"${key}\": 'bar']\nassert map[key] == null // confusing 'true' result of comparison'\n New in 2017.1",
"markdown": "Reports statements which use a `groovy.lang.GString` object as a key to map. In general `GString` objects are mutable and probably should not be used as keys. Also, a `GString` entry cannot be accessed with a `java.lang.String` object with same value.\n\n**Example:**\n\n\n def map = [:]\n def key = 'foo'\n map << [\"${key}\": 'bar']\n assert map[key] == null // confusing 'true' result of comparison\n\nNew in 2017.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyGStringKey",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Potentially confusing code constructs",
"index": 136,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyVariableCanBeFinal",
"shortDescription": {
"text": "Variable can be final"
},
"fullDescription": {
"text": "Reports parameters or local variables that may have a final modifier added. Example: 'def list = [1,2,3]\n return list' After the quick-fix is applied: 'final def list = [1,2,3]\n return list' For more information, see the same inspection in Java.",
"markdown": "Reports parameters or local variables that may have a final modifier added.\n\n**Example:**\n\n\n def list = [1,2,3]\n return list\n\nAfter the quick-fix is applied:\n\n\n final def list = [1,2,3]\n return list\n\nFor more information, see the same inspection in Java."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyVariableCanBeFinal",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Data flow",
"index": 193,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyWaitCallNotInLoop",
"shortDescription": {
"text": "'wait()' not in loop"
},
"fullDescription": {
"text": "Reports calls to 'wait()' not made inside a loop. 'wait()' is normally used to suspend a thread until a condition is true, and that condition should be checked after the 'wait()' returns. A loop is the clearest way to achieve this.",
"markdown": "Reports calls to `wait()` not made inside a loop.\n\n`wait()` is normally used to suspend a thread until a condition is true, and that condition should be checked after the `wait()`\nreturns. A loop is the clearest way to achieve this."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyWaitCallNotInLoop",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Threading issues",
"index": 85,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyUnnecessaryReturn",
"shortDescription": {
"text": "Unnecessary 'return' statement"
},
"fullDescription": {
"text": "Reports 'return' statements at the end of constructors and methods returning 'void'. These are unnecessary and may be safely removed. Example: 'void foo (String s){\n print(s)\n return\n }' After the quick-fix is applied: 'void foo (String s){\n print(s)\n }' For more information, see the same inspection in Java.",
"markdown": "Reports `return` statements at the end of constructors and methods returning\n`void`. These are unnecessary and may be safely removed.\n\n**Example:**\n\n\n void foo (String s){\n print(s)\n return\n }\n\nAfter the quick-fix is applied:\n\n\n void foo (String s){\n print(s)\n }\n\nFor more information, see the same inspection in Java."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyUnnecessaryReturn",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Control flow issues",
"index": 90,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyAccessToStaticFieldLockedOnInstance",
"shortDescription": {
"text": "Access to static field locked on instance data"
},
"fullDescription": {
"text": "Reports accesses to a non-constant static field which is locked on either 'this' or an instance field of 'this'. Locking a static field on instance data does not prevent the field from being modified by other instances, and thus may result in surprising race conditions. Example: 'static String s;\n def foo() {\n synchronized (this) {\n System.out.println(s); // warning\n }\n }'",
"markdown": "Reports accesses to a non-constant static field which is locked on either `this` or an instance field of `this`.\n\n\nLocking a static field on instance data does not prevent the field from being\nmodified by other instances, and thus may result in surprising race conditions.\n\n**Example:**\n\n\n static String s;\n def foo() {\n synchronized (this) {\n System.out.println(s); // warning\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyAccessToStaticFieldLockedOnInstance",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Threading issues",
"index": 85,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GrUnnecessaryAlias",
"shortDescription": {
"text": "Unnecessary import alias"
},
"fullDescription": {
"text": "Reports unnecessary import aliases. Example: 'import com.foo.Bar as Bar' After the quick-fix is applied: 'import com.foo.Bar'",
"markdown": "Reports unnecessary import aliases.\n\n**Example:**\n\n\n import com.foo.Bar as Bar\n\nAfter the quick-fix is applied:\n\n\n import com.foo.Bar\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "GrUnnecessaryAlias",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Style",
"index": 92,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GrUnresolvedAccess",
"shortDescription": {
"text": "Unresolved reference expression"
},
"fullDescription": {
"text": "Reports reference expressions which cannot be resolved.",
"markdown": "Reports reference expressions which cannot be resolved."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "GrUnresolvedAccess",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Probable bugs",
"index": 57,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyMultipleReturnPointsPerMethod",
"shortDescription": {
"text": "Method with multiple return points"
},
"fullDescription": {
"text": "Reports methods with too many return points. Methods with too many return points may be confusing, and hard to refactor. Example: 'int foo(int a) {\n if (a > 0) {\n return a\n }\n if (a < 0) return -a\n return 0\n }'\n Use the field provided below to specify the maximum acceptable number of return points a method might have.",
"markdown": "Reports methods with too many return points. Methods with too many return points may be confusing, and hard to refactor.\n\n**Example:**\n\n\n int foo(int a) {\n if (a > 0) {\n return a\n }\n if (a < 0) return -a\n return 0\n }\n\n\nUse the field provided below to specify the maximum acceptable number of return points a method\nmight have."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyMultipleReturnPointsPerMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Method metrics",
"index": 197,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GrUnnecessaryFinalModifier",
"shortDescription": {
"text": "Unnecessary 'final'"
},
"fullDescription": {
"text": "Reports unnecessary 'final' modifiers when used with the record definition. Example: 'final record R(int a) {} // modifier is unnecessary'",
"markdown": "Reports unnecessary `final` modifiers when used with the record definition.\n\n**Example:**\n\n\n final record R(int a) {} // modifier is unnecessary\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GrUnnecessaryFinalModifier",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Style",
"index": 92,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyUnreachableStatement",
"shortDescription": {
"text": "Unreachable statement"
},
"fullDescription": {
"text": "Reports statements that are unreachable. This can occur if the statement is after an infinite loop, 'return', 'break', or 'continue' statement. Example: 'void foo (int n) {\n if (n < 1) {\n return\n print('This statement is unreachable')\n }\n while (true){\n print ('Hello, world!')\n }\n print('This statement is unreachable too')\n }'",
"markdown": "Reports statements that are unreachable. This can occur if the statement is after an infinite loop,\n`return`, `break`, or `continue` statement.\n\n**Example:**\n\n\n void foo (int n) {\n if (n < 1) {\n return\n print('This statement is unreachable')\n }\n while (true){\n print ('Hello, world!')\n }\n print('This statement is unreachable too')\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyUnreachableStatement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Validity issues",
"index": 230,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyInstanceVariableNamingConvention",
"shortDescription": {
"text": "Instance variable naming convention"
},
"fullDescription": {
"text": "Reports instance variables whose names are too short, too long, or do not follow the specified regular expression pattern. Use the fields provided below to specify minimum length, maximum length and regular expression expected for instance variable names. Regular expressions should be specified in the standard 'java.util.regex' format.",
"markdown": "Reports instance variables whose names are too short, too long, or do not follow the specified regular expression pattern.\n\n\nUse the fields provided below to specify minimum length, maximum length and regular expression expected for\ninstance variable names.\n\nRegular expressions should be specified in the standard `java.util.regex` format."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyInstanceVariableNamingConvention",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Naming conventions",
"index": 39,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyParameterNamingConvention",
"shortDescription": {
"text": "Method parameter naming convention"
},
"fullDescription": {
"text": "Reports method parameters whose names are either too short, too long, or do not follow the specified regular expression pattern. Use the fields provided below to specify minimum length, maximum length and regular expression expected for method parameter names. Regular expressions should be specified in the standard 'java.util.regex' format.",
"markdown": "Reports method parameters whose names are either too short, too long, or do not follow the specified regular expression pattern.\n\n\nUse the fields provided below to specify minimum length, maximum length and regular expression\nexpected for method parameter names.\n\nRegular expressions should be specified in the standard `java.util.regex` format."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyParameterNamingConvention",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Naming conventions",
"index": 39,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyPointlessBoolean",
"shortDescription": {
"text": "Pointless boolean expression"
},
"fullDescription": {
"text": "Reports pointless or pointlessly complicated boolean expressions. Such expressions include conjunction with true, disjunction with false, equality comparison with a boolean literal, or negation of a boolean literal. Such expressions may be the result of automated refactorings not completely followed through to completion, and in any case are unlikely to be what the developer intended to do. Example: 'if (someBool && true) {}' After the quick-fix is applied: 'if (someBool) {}'",
"markdown": "Reports pointless or pointlessly complicated boolean expressions.\n\n\nSuch expressions include conjunction with true,\ndisjunction with false,\nequality comparison with a boolean literal, or negation of a boolean literal. Such expressions may be\nthe result of automated refactorings\nnot completely followed through to completion, and in any case are unlikely to be what the developer\nintended to do.\n\n**Example:**\n\n\n if (someBool && true) {}\n\nAfter the quick-fix is applied:\n\n\n if (someBool) {}\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyPointlessBoolean",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Potentially confusing code constructs",
"index": 136,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyEmptyTryBlock",
"shortDescription": {
"text": "Empty 'try' block"
},
"fullDescription": {
"text": "Reports empty 'try' blocks. Empty 'try' blocks usually indicate coding errors. Example: 'try {\n}\nfinally {\n close()\n}'",
"markdown": "Reports empty `try` blocks. Empty `try` blocks usually indicate coding errors.\n\n**Example:**\n\n\n try {\n }\n finally {\n close()\n }\n\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyEmptyTryBlock",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Error handling",
"index": 194,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ClashingTraitMethods",
"shortDescription": {
"text": "Clashing trait methods"
},
"fullDescription": {
"text": "Reports classes which implement two or more traits that contain methods with same signatures. The result of calling such methods might be unexpected. The quick-fix adds an explicit overriding method. Example: 'trait T1 {\n def foo() {}\n }\n\n trait T2 {\n def foo() {}\n }\n\n class X implements T1, T2 {}\n\n // T2.foo() will be called\n new X().foo()' After the quick-fix is applied: 'class X implements T1, T2 {\n @Override\n Object foo() {\n return T2.super.foo()\n }\n }'",
"markdown": "Reports classes which implement two or more traits that contain methods with same signatures.\n\nThe result of calling such methods might be unexpected.\n\nThe quick-fix adds an explicit overriding method.\n\n**Example:**\n\n\n trait T1 {\n def foo() {}\n }\n\n trait T2 {\n def foo() {}\n }\n\n class X implements T1, T2 {}\n\n // T2.foo() will be called\n new X().foo()\n\nAfter the quick-fix is applied:\n\n\n class X implements T1, T2 {\n @Override\n Object foo() {\n return T2.super.foo()\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ClashingTraitMethods",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Potentially confusing code constructs",
"index": 136,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyDoubleNegation",
"shortDescription": {
"text": "Double negation"
},
"fullDescription": {
"text": "Reports double negation that can be simplified. Example: 'if (!!functionCall()) {} // double negation\nif (!(a != b)) {} // double negation'\n After the quick-fix is applied: 'if (functionCall()) {}\nif (a == b) {}'",
"markdown": "Reports double negation that can be simplified.\n\n**Example:**\n\n\n if (!!functionCall()) {} // double negation\n if (!(a != b)) {} // double negation\n\nAfter the quick-fix is applied:\n\n\n if (functionCall()) {}\n if (a == b) {}\n\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyDoubleNegation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Potentially confusing code constructs",
"index": 136,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyIfStatementWithTooManyBranches",
"shortDescription": {
"text": "If statement with too many branches"
},
"fullDescription": {
"text": "Reports 'if' statements with too many branches. Such statements may be confusing, and are often the sign of inadequate levels of design abstraction. Example: 'if (a) {\n print \"foo\"\n} else if (b) {\n print \"bar\"\n} else if (c) {\n print \"baz\"\n} else if (d) {\n print \"Too many branches\"\n}'\n Use the Maximum number of branches field to specify the maximum number of branches expected.",
"markdown": "Reports `if` statements with too many branches. Such statements may be confusing, and are often the sign of inadequate levels of design abstraction.\n\n**Example:**\n\n\n if (a) {\n print \"foo\"\n } else if (b) {\n print \"bar\"\n } else if (c) {\n print \"baz\"\n } else if (d) {\n print \"Too many branches\"\n }\n\n\nUse the **Maximum number of branches** field to specify the maximum number of branches expected."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyIfStatementWithTooManyBranches",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Control flow issues",
"index": 90,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyConditionalCanBeConditionalCall",
"shortDescription": {
"text": "Ternary expression can be replaced with safe call"
},
"fullDescription": {
"text": "Reports ternary expressions which can be replaced by a safe call. Example: 'def charArray(String s) {\n s == null ? null : s.toCharArray()\n }' After the quick-fix is applied: 'def charArray(String s) {\n s?.toCharArray()\n }'",
"markdown": "Reports ternary expressions which can be replaced by a safe call.\n\n**Example:**\n\n\n def charArray(String s) {\n s == null ? null : s.toCharArray()\n }\n\nAfter the quick-fix is applied:\n\n\n def charArray(String s) {\n s?.toCharArray()\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "GroovyConditionalCanBeConditionalCall",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Control flow issues",
"index": 90,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyInfiniteRecursion",
"shortDescription": {
"text": "Infinite recursion"
},
"fullDescription": {
"text": "Reports methods which must either recurse infinitely or throw an exception. Methods reported by this inspection could not be finished correct. Example: '// this function always dive deeper\ndef fibonacci(int n) {\n return fibonacci(n-1) + fibonacci(n-2)\n}'",
"markdown": "Reports methods which must either recurse infinitely or throw an exception. Methods reported by this inspection could not be finished correct.\n\n**Example:**\n\n\n // this function always dive deeper\n def fibonacci(int n) {\n return fibonacci(n-1) + fibonacci(n-2)\n }\n\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyInfiniteRecursion",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Probable bugs",
"index": 57,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyUnnecessaryContinue",
"shortDescription": {
"text": "Unnecessary 'continue' statement"
},
"fullDescription": {
"text": "Reports 'continue' statements if they are last reachable statements in the loop. These 'continue' statements are unnecessary and can be safely removed. Example: 'for(int i in array) {\n println(i)\n continue\n }' After the quick-fix is applied: 'for(int i in array) {\n println(i)\n }' For more information, see the same inspection in Java.",
"markdown": "Reports `continue` statements if they are last reachable statements in the loop.\nThese `continue` statements are unnecessary and can be safely removed.\n\n**Example:**\n\n\n for(int i in array) {\n println(i)\n continue\n }\n\nAfter the quick-fix is applied:\n\n\n for(int i in array) {\n println(i)\n }\n\nFor more information, see the same inspection in Java."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyUnnecessaryContinue",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Control flow issues",
"index": 90,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyNotifyWhileNotSynchronized",
"shortDescription": {
"text": "'notify()' or 'notifyAll()' while not synced"
},
"fullDescription": {
"text": "Reports calls to 'notify()' and 'notifyAll()' not within a corresponding synchronized statement or synchronized method. Calling these methods on an object without holding a lock on that object will result in an 'IllegalMonitorStateException' being thrown. Such a construct is not necessarily an error, as the necessary lock may be acquired before the containing method is called, but it's worth looking at.",
"markdown": "Reports calls to `notify()` and `notifyAll()` not within a corresponding synchronized statement or synchronized method.\n\n\nCalling these methods on an object\nwithout holding a lock on that object will result in an `IllegalMonitorStateException` being thrown.\nSuch a construct is not necessarily an error, as the necessary lock may be acquired before\nthe containing method is called, but it's worth looking at."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyNotifyWhileNotSynchronized",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Threading issues",
"index": 85,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyEmptyFinallyBlock",
"shortDescription": {
"text": "Empty 'finally' block"
},
"fullDescription": {
"text": "Reports empty 'finally' blocks. Empty 'finally' blocks usually indicate coding errors. Example: 'try {\n throw new Exception()\n}\nfinally {\n}'",
"markdown": "Reports empty `finally` blocks. Empty `finally` blocks usually indicate coding errors.\n\n**Example:**\n\n\n try {\n throw new Exception()\n }\n finally {\n }\n\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyEmptyFinallyBlock",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Error handling",
"index": 194,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyLoopStatementThatDoesntLoop",
"shortDescription": {
"text": "Loop statement that doesn't loop"
},
"fullDescription": {
"text": "Reports 'for' or 'while' statements whose bodies are guaranteed to execute at most once. While such statements could be written intentionally, they are usually a symptom of error. Example: 'for (int i in 0..<10) {\n return\n }'",
"markdown": "Reports `for` or `while` statements whose bodies are guaranteed to execute at most once. While such statements could be written intentionally, they are usually a symptom of error.\n\n**Example:**\n\n\n for (int i in 0..<10) {\n return\n }\n\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyLoopStatementThatDoesntLoop",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Control flow issues",
"index": 90,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyListSetCanBeKeyedAccess",
"shortDescription": {
"text": "Call to List.set can be keyed access"
},
"fullDescription": {
"text": "Reports calls to 'java.util.List.set()' methods. Such calls could be replaced by the shorter and clearer keyed access form. Example: 'def list = [\"foo\"]\nlist.set(0, \"bar\") // list.set(0, \"bar\") could be replaced with list[0] = \"bar\"'\n After the quick-fix is applied: 'def list = [\"foo\"]\nlist[0] = \"bar\"'",
"markdown": "Reports calls to `java.util.List.set()` methods. Such calls could be replaced by the shorter and clearer keyed access form.\n\n**Example:**\n\n\n def list = [\"foo\"]\n list.set(0, \"bar\") // list.set(0, \"bar\") could be replaced with list[0] = \"bar\"\n\nAfter the quick-fix is applied:\n\n\n def list = [\"foo\"]\n list[0] = \"bar\"\n\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyListSetCanBeKeyedAccess",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/GPath",
"index": 58,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyAccessibility",
"shortDescription": {
"text": "Inaccessible element"
},
"fullDescription": {
"text": "Reports references which exceed access rights. Access to private members breaks encapsulation.",
"markdown": "Reports references which exceed access rights.\n\nAccess to private members breaks encapsulation."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyAccessibility",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Probable bugs",
"index": 57,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyFallthrough",
"shortDescription": {
"text": "Fallthrough in 'switch' statement"
},
"fullDescription": {
"text": "Reports fallthrough in switch statements. While occasionally useful, fallthrough is often unintended, and may lead to surprising bugs. Example: 'switch(n) {\n case 1:\n print 1\n case 2: // \"case 1\" fallthrough to \"case 2\". Statements from \"case 2\" will be executed immediately after \"case 1\".\n print 2\n break\n default:\n print \"Default\"\n}'",
"markdown": "Reports *fallthrough* in switch statements. While occasionally useful, fallthrough is often unintended, and may lead to surprising bugs.\n\n**Example:**\n\n\n switch(n) {\n case 1:\n print 1\n case 2: // \"case 1\" fallthrough to \"case 2\". Statements from \"case 2\" will be executed immediately after \"case 1\".\n print 2\n break\n default:\n print \"Default\"\n }\n\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyFallthrough",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Control flow issues",
"index": 90,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyLocalVariableNamingConvention",
"shortDescription": {
"text": "Local variable naming convention"
},
"fullDescription": {
"text": "Reports local variables whose names are too short, too long, or do not follow the specified regular expression pattern. Use the fields provided below to specify minimum length, maximum length and regular expression expected for local variables names. Regular expressions should be specified in the standard 'java.util.regex' format.",
"markdown": "Reports local variables whose names are too short, too long, or do not follow the specified regular expression pattern.\n\n\nUse the fields provided below to specify minimum length, maximum length and regular expression expected for local variables names.\n\nRegular expressions should be specified in the standard `java.util.regex` format."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyLocalVariableNamingConvention",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Naming conventions",
"index": 39,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DelegatesTo",
"shortDescription": {
"text": "@DelegatesTo"
},
"fullDescription": {
"text": "Reports unused '@DelegatesTo.Target' annotations and unresolved '@DelegatedTo.target' annotation attribute values. Example: '// unused target 't1' and unresolved target 't2'\n def m(\n @DelegatesTo.Target('t1') target,\n @DelegatesTo(target = 't2') Closure c\n ) {}'",
"markdown": "Reports unused `@DelegatesTo.Target` annotations and unresolved `@DelegatedTo.target` annotation attribute values.\n\n**Example:**\n\n\n // unused target 't1' and unresolved target 't2'\n def m(\n @DelegatesTo.Target('t1') target,\n @DelegatesTo(target = 't2') Closure c\n ) {}\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DelegatesTo",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Annotations",
"index": 170,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyOverlyComplexArithmeticExpression",
"shortDescription": {
"text": "Overly complex arithmetic expression"
},
"fullDescription": {
"text": "Reports arithmetic expressions with too many terms. Such expressions may be confusing and bug-prone. Use the Maximum number of terms field to specify the maximum number of terms allowed in an arithmetic expression.",
"markdown": "Reports arithmetic expressions with too many terms.\n\n\nSuch expressions may be confusing and bug-prone.\n\n\nUse the **Maximum number of terms** field to specify the maximum number of terms allowed in an arithmetic expression."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyOverlyComplexArithmeticExpression",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Potentially confusing code constructs",
"index": 136,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyThrowFromFinallyBlock",
"shortDescription": {
"text": "'throw' inside 'finally' block"
},
"fullDescription": {
"text": "Reports 'throw' statements inside of 'finally' blocks. While occasionally intended, such 'throw' statements may mask exceptions thrown and tremendously complicate debugging.",
"markdown": "Reports `throw` statements inside of `finally` blocks.\n\n\nWhile occasionally intended, such `throw` statements may mask exceptions thrown and\ntremendously complicate debugging."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyThrowFromFinallyBlock",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Error handling",
"index": 194,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyMapGetCanBeKeyedAccess",
"shortDescription": {
"text": "Call to Map.get can be keyed access"
},
"fullDescription": {
"text": "Reports calls to 'java.util.Map.get()' methods. Such calls could be replaced by the shorter and clearer keyed access form. Example: 'def map = [\"foo\": \"bar\"]\ndef str = map.get(\"foo\") // map.get(\"foo\") could be replaced with map[\"foo\"]'\n After the quick-fix is applied: 'def map = [\"foo\": \"bar\"]\ndef str = map[\"foo\"]'",
"markdown": "Reports calls to `java.util.Map.get()` methods. Such calls could be replaced by the shorter and clearer keyed access form.\n\n**Example:**\n\n\n def map = [\"foo\": \"bar\"]\n def str = map.get(\"foo\") // map.get(\"foo\") could be replaced with map[\"foo\"]\n\nAfter the quick-fix is applied:\n\n\n def map = [\"foo\": \"bar\"]\n def str = map[\"foo\"]\n\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyMapGetCanBeKeyedAccess",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/GPath",
"index": 58,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyNestedAssignment",
"shortDescription": {
"text": "Nested assignment"
},
"fullDescription": {
"text": "Reports assignment expressions nested inside other expressions. While admirably terse, such expressions may be confusing, and violate the general design principle that a given construct should do precisely one thing. Example: 'a = b = 1'",
"markdown": "Reports assignment expressions nested inside other expressions. While admirably terse, such expressions may be confusing, and violate the general design principle that a given construct should do precisely one thing.\n\n**Example:**\n\n\n a = b = 1\n\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyNestedAssignment",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Assignment issues",
"index": 124,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovySynchronizedMethod",
"shortDescription": {
"text": "Synchronized method"
},
"fullDescription": {
"text": "Reports the 'synchronized' modifier on methods. Some coding standards prohibit the use of the 'synchronized' modifier, in favor of 'synchronized' statements.",
"markdown": "Reports the `synchronized` modifier on methods.\n\n\nSome coding standards\nprohibit the use of the `synchronized` modifier, in favor of `synchronized` statements."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovySynchronizedMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Threading issues",
"index": 85,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyUnconditionalWait",
"shortDescription": {
"text": "Unconditional 'wait' call"
},
"fullDescription": {
"text": "Reports wait() being called unconditionally within a synchronized context. Normally, wait() is used to block a thread until some condition is true. If wait() is called unconditionally, that often indicates that the condition was checked before a lock was acquired. In that case, a data race may occur, with the condition becoming true between the time it was checked and the time the lock was acquired. While constructs found by this inspection are not necessarily incorrect, they are certainly worth examining.",
"markdown": "Reports **wait()**\nbeing called unconditionally within a synchronized context.\nNormally, **wait()** is\nused to block a thread until some condition is true. If **wait()**\nis called unconditionally, that often indicates that the condition was checked before a lock was\nacquired. In that case, a data race may occur, with the condition becoming true between the time\nit was checked and the time the lock was acquired. While constructs found by this inspection\nare not necessarily incorrect, they are certainly worth examining."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyUnconditionalWait",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Threading issues",
"index": 85,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyNegatedIf",
"shortDescription": {
"text": "Negated if condition expression"
},
"fullDescription": {
"text": "Reports 'if' statements which contain 'else' branches and whose conditions are negated. Flipping the order of the 'if' and 'else' branches will usually increase the clarity of such statements. Example: 'if (!condition) {\n return \"1\"\n} else {\n return \"2\"\n}'",
"markdown": "Reports `if` statements which contain `else` branches and whose conditions are negated. Flipping the order of the `if` and `else` branches will usually increase the clarity of such statements.\n\n**Example:**\n\n\n if (!condition) {\n return \"1\"\n } else {\n return \"2\"\n }\n\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyNegatedIf",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Potentially confusing code constructs",
"index": 136,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NewInstanceOfSingleton",
"shortDescription": {
"text": "New instance of class annotated with @groovy.lang.Singleton"
},
"fullDescription": {
"text": "Reports new instance creation of classes annotated with '@groovy.lang.Singleton'. Such constructions can lead to runtime exception Can't instantiate singleton. Example: '@Singleton\n class Foo{\n }\n \n Foo foo = new Foo()' After the quick-fix is applied: '@Singleton\n class Foo{\n }\n \n Foo foo = Foo.instance'",
"markdown": "Reports new instance creation of classes annotated with `@groovy.lang.Singleton`.\nSuch constructions can lead to runtime exception **Can't instantiate singleton**.\n\n**Example:**\n\n\n @Singleton\n class Foo{\n }\n \n Foo foo = new Foo()\n\nAfter the quick-fix is applied:\n\n\n @Singleton\n class Foo{\n }\n \n Foo foo = Foo.instance\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NewInstanceOfSingleton",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Potentially confusing code constructs",
"index": 136,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GrReassignedInClosureLocalVar",
"shortDescription": {
"text": "Local variable is reassigned in closure or anonymous class"
},
"fullDescription": {
"text": "Reports local variables assigned to expression with different type inside of closure or anonymous class. Example: 'int sum = 0\n [1, 2, 3].each { sum += 'as' }\n println(sum)' As a result, the 'integer' variable sum is reassigned to a 'String' expression.",
"markdown": "Reports local variables assigned to expression with different type inside of closure or anonymous class.\n\n**Example:**\n\n\n int sum = 0\n [1, 2, 3].each { sum += 'as' }\n println(sum)\n\nAs a result, the `integer` variable **sum** is reassigned to a `String` expression."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GrReassignedInClosureLocalVar",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Potentially confusing code constructs",
"index": 136,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyMethodParameterCount",
"shortDescription": {
"text": "Method with too many parameters"
},
"fullDescription": {
"text": "Reports methods with too many parameters. Method with too many parameters is a good sign that refactoring is necessary. Methods whose signatures are inherited from library classes are ignored by this inspection. Use the Maximum number of parameters: field to specify the maximum acceptable number of parameters a method might have.",
"markdown": "Reports methods with too many parameters. Method with too many parameters is a good sign that refactoring is necessary. Methods whose signatures are inherited from library classes are ignored by this inspection.\n\n\nUse the **Maximum number of parameters:** field to specify the maximum acceptable number of parameters a method might have."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyMethodParameterCount",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Method metrics",
"index": 197,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyAssignmentCanBeOperatorAssignment",
"shortDescription": {
"text": "Assignment can be replaced with operator assignment"
},
"fullDescription": {
"text": "Reports assignments which can be replaced by an operator assignment. Example: 'a = a + b' After the quick-fix is applied: 'a += b' Configure the inspection: Use the Ignore conditional operators option to ignore '&&' and '||' operators. Use the Ignore obscure operators option to ignore '^' and '%' operators.",
"markdown": "Reports assignments which can be replaced by an operator assignment.\n\n**Example:**\n\n\n a = a + b\n\nAfter the quick-fix is applied:\n\n\n a += b\n\nConfigure the inspection:\n\n* Use the **Ignore conditional operators** option to ignore `&&` and `||` operators.\n* Use the **Ignore obscure operators** option to ignore `^` and `%` operators."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "GroovyAssignmentCanBeOperatorAssignment",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Assignment issues",
"index": 124,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyWaitWhileNotSynchronized",
"shortDescription": {
"text": "'wait()' while not synced"
},
"fullDescription": {
"text": "Reports calls to 'wait()' not made inside a corresponding synchronized statement or synchronized method. Calling 'wait()' on an object without holding a lock on that object will result in an 'IllegalMonitorStateException' being thrown. Such a construct is not necessarily an error, as the necessary lock may be acquired before the containing method is called, but its worth looking at.",
"markdown": "Reports calls to `wait()` not made inside a corresponding synchronized\nstatement or synchronized method.\n\nCalling `wait()` on an object\nwithout holding a lock on that object will result in an `IllegalMonitorStateException` being thrown.\nSuch a construct is not necessarily an error, as the necessary lock may be acquired before\nthe containing method is called, but its worth looking at."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyWaitWhileNotSynchronized",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Threading issues",
"index": 85,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyOverlyLongMethod",
"shortDescription": {
"text": "Overly long method"
},
"fullDescription": {
"text": "Reports methods that are too long. Methods that are too long may be confusing, and are a good sign that refactoring is necessary. Use the Maximum statements per method field to specify the maximum acceptable number of non-comment source statements a method might have.",
"markdown": "Reports methods that are too long.\n\n\nMethods that are too long\nmay be confusing, and are a good sign that refactoring is necessary.\n\n\nUse the **Maximum statements per method** field to specify the maximum acceptable number of non-comment source\nstatements a method might have."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyOverlyLongMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Method metrics",
"index": 197,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyOverlyComplexBooleanExpression",
"shortDescription": {
"text": "Overly complex boolean expression"
},
"fullDescription": {
"text": "Reports boolean expressions with too many terms. Such expressions may be confusing and bug-prone. Use the Maximum number of terms field to specify the maximum number of terms allowed in a boolean expression.",
"markdown": "Reports boolean expressions with too many terms.\n\n\nSuch expressions may be confusing and bug-prone.\n\n\nUse the **Maximum number of terms** field to specify the maximum number of terms allowed in a boolean expression."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyOverlyComplexBooleanExpression",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Potentially confusing code constructs",
"index": 136,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyOverlyNestedMethod",
"shortDescription": {
"text": "Overly nested method"
},
"fullDescription": {
"text": "Reports methods whose bodies are too deeply nested. Methods with too much statement nesting may be confusing, and are a good sign that refactoring may be necessary. Use the Maximum nesting depth field to specify the maximum acceptable nesting depth a method might have.",
"markdown": "Reports methods whose bodies are too deeply nested.\n\n\nMethods with too much statement\nnesting may be confusing, and are a good sign that refactoring may be necessary.\n\n\nUse the **Maximum nesting depth** field to specify the maximum acceptable nesting depth a method might have."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyOverlyNestedMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Method metrics",
"index": 197,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyWhileLoopSpinsOnField",
"shortDescription": {
"text": "While loop spins on field"
},
"fullDescription": {
"text": "Reports 'while' loops, which spin on the value of a non-'volatile' field, waiting for it to be changed by another thread. In addition to being potentially extremely CPU intensive when little work is done inside the loop, such loops likely have different semantics than intended. The Java Memory Model allows that loop to never complete even if another thread changes the field's value. Example: 'class SpinsOnField {\n boolean ready = false;\n\n void run() {\n // the loop may never complete even after\n // markAsReady call from the other thread\n while (!ready) {\n }\n // do some work\n }\n\n void markAsReady() {\n ready = true;\n }\n }' Additionally since Java 9, calling 'Thread.onSpinWait()' inside spin loop on a 'volatile' field is recommended, which may significantly improve performance on some hardware. Use the checkbox below to have this inspection report only empty 'while' loops.",
"markdown": "Reports `while` loops, which spin on the\nvalue of a non-`volatile` field, waiting for it to be changed by another thread.\n\n\nIn addition to being potentially extremely CPU intensive when little work is done inside the loop, such\nloops likely have different semantics than intended. The Java Memory Model allows that loop to never complete even\nif another thread changes the field's value.\n\n**Example:**\n\n\n class SpinsOnField {\n boolean ready = false;\n\n void run() {\n // the loop may never complete even after\n // markAsReady call from the other thread\n while (!ready) {\n }\n // do some work\n }\n\n void markAsReady() {\n ready = true;\n }\n }\n\n\nAdditionally since Java 9, calling `Thread.onSpinWait()` inside spin loop\non a `volatile` field is recommended, which may significantly improve performance on some hardware.\n\n\nUse the checkbox below to have this inspection report only empty `while` loops."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyWhileLoopSpinsOnField",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Threading issues",
"index": 85,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyNestedSwitch",
"shortDescription": {
"text": "Nested switch statement"
},
"fullDescription": {
"text": "Reports 'switch' statements that are nested inside other 'switch' statements. Such nested switch statements are confusing, and may result in unexpected behaviour. Example: 'switch (outer) {\n case 1:\n switch (inner) {\n case 1:\n print \"inner 1\"\n break\n default:\n print \"inner default\"\n }\n break\n default:\n print \"default\"\n}'",
"markdown": "Reports `switch` statements that are nested inside other `switch` statements. Such nested switch statements are confusing, and may result in unexpected behaviour.\n\n**Example:**\n\n\n switch (outer) {\n case 1:\n switch (inner) {\n case 1:\n print \"inner 1\"\n break\n default:\n print \"inner default\"\n }\n break\n default:\n print \"default\"\n }\n\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyNestedSwitch",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Potentially confusing code constructs",
"index": 136,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyRangeTypeCheck",
"shortDescription": {
"text": "Incorrect range arguments"
},
"fullDescription": {
"text": "Reports types used in ranges that do not have a 'next()' or 'previous()' method or do not implement the 'java.lang.Comparable' interface.",
"markdown": "Reports types used in ranges that do not have a `next()` or `previous()` method or do not implement the `java.lang.Comparable` interface."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyRangeTypeCheck",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Probable bugs",
"index": 57,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GrDeprecatedAPIUsage",
"shortDescription": {
"text": "Deprecated API usage"
},
"fullDescription": {
"text": "Reports references to deprecated classes, fields, and methods.",
"markdown": "Reports references to deprecated classes, fields, and methods."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GrDeprecatedAPIUsage",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Potentially confusing code constructs",
"index": 136,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyBusyWait",
"shortDescription": {
"text": "Busy wait"
},
"fullDescription": {
"text": "Reports calls to 'java.lang.Thread.sleep()' that occur inside loops. Such calls are indicative of \"busy-waiting\". Busy-waiting is often inefficient, and may result in unexpected deadlocks as busy-waiting threads do not release locked resources.",
"markdown": "Reports calls to `java.lang.Thread.sleep()` that occur inside loops.\n\n\nSuch calls are indicative of \"busy-waiting\". Busy-waiting is often inefficient, and may result in unexpected deadlocks\nas busy-waiting threads do not release locked resources."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyBusyWait",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Threading issues",
"index": 85,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyOctalInteger",
"shortDescription": {
"text": "Octal integer"
},
"fullDescription": {
"text": "Reports octal integer literals. Some coding standards prohibit the use of octal literals, as they may be easily confused with decimal literals.",
"markdown": "Reports octal integer literals.\n\n\nSome coding standards prohibit the\nuse of octal literals, as they may be easily confused with decimal literals."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyOctalInteger",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Potentially confusing code constructs",
"index": 136,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyResultOfIncrementOrDecrementUsed",
"shortDescription": {
"text": "Result of increment or decrement used"
},
"fullDescription": {
"text": "Reports increment or decrement expressions nested inside other expressions. Such expressions may be confusing, and violate the general design principle that a given construct should do precisely one thing.",
"markdown": "Reports increment or decrement expressions nested inside other expressions.\n\n\nSuch expressions may be confusing, and violate the general design principle that a\ngiven construct should do precisely one thing."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyResultOfIncrementOrDecrementUsed",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Potentially confusing code constructs",
"index": 136,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovySynchronizationOnNonFinalField",
"shortDescription": {
"text": "Synchronization on non-final field"
},
"fullDescription": {
"text": "Reports 'synchronized' statements where the lock expression is a non-'final' field. Such statements are unlikely to have useful semantics, as different threads may be locking on different objects even when operating on the same object.",
"markdown": "Reports `synchronized` statements where the lock expression is a non-`final` field.\n\n\nSuch statements are unlikely to have useful semantics, as different\nthreads may be locking on different objects even when operating on the same object."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovySynchronizationOnNonFinalField",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Threading issues",
"index": 85,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyThreadStopSuspendResume",
"shortDescription": {
"text": "Call to Thread.stop(), Thread.suspend(), or Thread.resume()"
},
"fullDescription": {
"text": "Reports calls to 'Thread.stop()','Thread.suspend()', or 'Thread.resume()'. These calls are inherently prone to data corruption and deadlock, and their use is strongly discouraged.",
"markdown": "Reports calls to `Thread.stop()`,`Thread.suspend()`, or `Thread.resume()`.\n\n\nThese calls are inherently prone to data corruption and deadlock, and their use is strongly\ndiscouraged."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyThreadStopSuspendResume",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Threading issues",
"index": 85,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyPointlessArithmetic",
"shortDescription": {
"text": "Pointless arithmetic expression"
},
"fullDescription": {
"text": "Reports pointless arithmetic expressions. Such expressions include adding or subtracting zero, multiplying by zero or one, division by one, and shift by zero. Such expressions may be the result of automated refactorings not completely followed through to completion, and in any case are unlikely to be what the developer intended to do. Example: 'a + 0' After the quick-fix is applied: 'a'",
"markdown": "Reports pointless arithmetic expressions.\n\n\nSuch expressions include adding or subtracting zero, multiplying by zero or one,\ndivision by one, and shift by zero. Such expressions may be the result of automated refactorings\nnot completely followed through to completion, and in any case are unlikely to be what the developer\nintended to do.\n\n**Example:**\n\n\n a + 0\n\nAfter the quick-fix is applied:\n\n\n a\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyPointlessArithmetic",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Potentially confusing code constructs",
"index": 136,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GrMethodMayBeStatic",
"shortDescription": {
"text": "Method can be made 'static'"
},
"fullDescription": {
"text": "Reports methods which may safely be made 'static'. A method may be 'static' if it is not 'synchronized', it does not reference any of its class' instance methods and instance fields, and it is not overridden in a subclass.",
"markdown": "Reports methods which may safely be made `static`.\n\n\nA method may be `static` if it is not `synchronized`,\nit does not reference any of its class' instance methods and instance fields,\nand it is not overridden in a subclass."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GrMethodMayBeStatic",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Other",
"index": 259,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyBreak",
"shortDescription": {
"text": "'break' statement"
},
"fullDescription": {
"text": "Reports 'break' statements outside of 'switch' statements.",
"markdown": "Reports `break` statements outside of `switch` statements."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyBreak",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Control flow issues",
"index": 90,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyConstantConditional",
"shortDescription": {
"text": "Constant conditional expression"
},
"fullDescription": {
"text": "Reports conditional expressions with boolean constant as a condition. Example: 'true ? result1 : result2\n false ? result1 : result2'",
"markdown": "Reports conditional expressions with boolean constant as a condition.\n\n**Example:**\n\n\n true ? result1 : result2\n false ? result1 : result2\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyConstantConditional",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Control flow issues",
"index": 90,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyDocCheck",
"shortDescription": {
"text": "Unresolved GroovyDoc reference"
},
"fullDescription": {
"text": "Reports unresolved references inside GroovyDoc comments.",
"markdown": "Reports unresolved references inside GroovyDoc comments."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "GroovyDocCheck",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Probable bugs",
"index": 57,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyUnusedCatchParameter",
"shortDescription": {
"text": "Unused 'catch' parameter"
},
"fullDescription": {
"text": "Reports catch parameters that are unused in their corresponding blocks. This inspection will not report any catch parameters named \"ignore\" or \"ignored\". Example: 'try {\n def arr = new int[3]\n arr[5] = 5\n } catch(Exception ex) {\n println('Catching the exception')\n }' Here the parameter ex is never used in catch block. After the quick-fix is applied: 'try {\n def arr = new int[3]\n arr[5] = 5\n } catch(Exception ignored) {\n println('Catching the exception')\n }'",
"markdown": "Reports **catch** parameters that are unused in their\ncorresponding blocks. This inspection will not report any **catch** parameters\nnamed \"ignore\" or \"ignored\".\n\n**Example:**\n\n\n try {\n def arr = new int[3]\n arr[5] = 5\n } catch(Exception ex) {\n println('Catching the exception')\n }\n\nHere the parameter **ex** is never used in **catch** block.\n\nAfter the quick-fix is applied:\n\n\n try {\n def arr = new int[3]\n arr[5] = 5\n } catch(Exception ignored) {\n println('Catching the exception')\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyUnusedCatchParameter",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Error handling",
"index": 194,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyInstanceMethodNamingConvention",
"shortDescription": {
"text": "Instance method naming convention"
},
"fullDescription": {
"text": "Reports instance methods whose names are too short, too long, or do not follow the specified regular expression pattern. Instance methods that override library methods are ignored by this inspection. Use the fields provided below to specify minimum length, maximum length and regular expression expected for instance method names. Regular expressions should be specified in the standard 'java.util.regex' format.",
"markdown": "Reports instance methods whose names are too short, too long, or do not follow the specified regular expression pattern. Instance methods that override library methods are ignored by this inspection.\n\n\nUse the fields provided below to specify minimum length, maximum length and regular expression expected for instance method names.\n\nRegular expressions should be specified in the standard `java.util.regex` format."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyInstanceMethodNamingConvention",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Naming conventions",
"index": 39,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyDuplicateSwitchBranch",
"shortDescription": {
"text": "Duplicate switch case"
},
"fullDescription": {
"text": "Reports duplicated expressions in 'case' labels for 'switch' statements. Example: 'switch (n) {\n case 1: //duplicate\n break\n case 1: //duplicate\n System.out.println(\"2\")\n break\n default:\n System.out.println(\"default\");\n}'",
"markdown": "Reports duplicated expressions in `case` labels for `switch` statements.\n\n**Example:**\n\n\n switch (n) {\n case 1: //duplicate\n break\n case 1: //duplicate\n System.out.println(\"2\")\n break\n default:\n System.out.println(\"default\");\n }\n\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyDuplicateSwitchBranch",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Validity issues",
"index": 230,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyConditional",
"shortDescription": {
"text": "Ternary expression"
},
"fullDescription": {
"text": "Reports ternary expressions. Some coding standards prohibit the use of the condition operator in favor of 'if' statements.",
"markdown": "Reports ternary expressions.\n\nSome coding standards prohibit the use of the condition operator in favor of `if` statements."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyConditional",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Style",
"index": 92,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyReturnFromFinallyBlock",
"shortDescription": {
"text": "'return' inside 'finally' block"
},
"fullDescription": {
"text": "Reports 'return' statements inside of 'finally' blocks. While occasionally intended, such 'return' statements may mask exceptions thrown, and complicate debugging.",
"markdown": "Reports `return` statements inside of `finally` blocks.\n\n\nWhile occasionally intended, such `return` statements may mask exceptions thrown, and\ncomplicate debugging."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyReturnFromFinallyBlock",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Error handling",
"index": 194,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyConstructorNamedArguments",
"shortDescription": {
"text": "Named arguments of constructor call"
},
"fullDescription": {
"text": "Reports named arguments of a default class constructor call which don't correspond to properties of this class. Example: 'class Person {\n def name\n def age\n }\n\n // 'firstName' property doesn't exist\n new Person(firstName: \"John\")'",
"markdown": "Reports named arguments of a default class constructor call which don't correspond to properties of this class.\n\n**Example:**\n\n\n class Person {\n def name\n def age\n }\n\n // 'firstName' property doesn't exist\n new Person(firstName: \"John\")\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyConstructorNamedArguments",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Probable bugs",
"index": 57,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GrUnnecessaryNonSealedModifier",
"shortDescription": {
"text": "Unnecessary 'non-sealed' modifier"
},
"fullDescription": {
"text": "Reports unnecessary 'non-sealed' modifiers which used on methods, fields, or variables. This modifier has effect only on classes, interfaces and traits. Example: 'non-sealed boolean foo() {} // modifier is unnecessary\n non-sealed Object bar // modifier is unnecessary\n\n // modifier is required and therefore not highlighted\n non-sealed class A {}'",
"markdown": "Reports unnecessary `non-sealed` modifiers which used on methods, fields, or variables.\n\nThis modifier has effect only on classes, interfaces and traits.\n\n**Example:**\n\n\n non-sealed boolean foo() {} // modifier is unnecessary\n non-sealed Object bar // modifier is unnecessary\n\n // modifier is required and therefore not highlighted\n non-sealed class A {}\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GrUnnecessaryNonSealedModifier",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Style",
"index": 92,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyConstantIfStatement",
"shortDescription": {
"text": "Constant if statement"
},
"fullDescription": {
"text": "Reports 'if' statements with boolean constant as a condition. Example: 'if (true) {\n // ...\n }\n if (false) {\n // ...\n }'",
"markdown": "Reports `if` statements with boolean constant as a condition.\n\n**Example:**\n\n\n if (true) {\n // ...\n }\n if (false) {\n // ...\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyConstantIfStatement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Control flow issues",
"index": 90,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GrStringStyleViolation",
"shortDescription": {
"text": "String style violation"
},
"fullDescription": {
"text": "Reports strings with quotation that doesn't match code style. Example: 'def hw = \"Hello, world!\"' After the quick-fix is applied: 'def hw = 'Hello, world!'' Use the fields provided below to specify code style for different kinds of strings.",
"markdown": "Reports strings with quotation that doesn't match code style.\n\n**Example:**\n\n\n def hw = \"Hello, world!\"\n\nAfter the quick-fix is applied:\n\n\n def hw = 'Hello, world!'\n\nUse the fields provided below to specify code style for different kinds of strings."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "GrStringStyleViolation",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Style",
"index": 92,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyStaticVariableNamingConvention",
"shortDescription": {
"text": "Static variable naming convention"
},
"fullDescription": {
"text": "Reports 'static' variables whose names are too short, too long, or do not follow the specified regular expression pattern. Constants, i.e. variables of immutable type declared 'static final', are not checked by this inspection Use the fields provided below to specify minimum length, maximum length and regular expression expected for static variable names. Regular expressions should be specified in the standard 'java.util.regex' format.",
"markdown": "Reports `static` variables whose names are too short, too long, or do not follow the specified regular expression pattern.\n\n\nConstants, i.e. variables of immutable type declared\n`static final`, are not checked by this inspection\n\n\nUse the fields provided below to specify minimum length, maximum length and regular expression expected for static variable names.\n\nRegular expressions should be specified in the standard `java.util.regex` format."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyStaticVariableNamingConvention",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Naming conventions",
"index": 39,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyInfiniteLoopStatement",
"shortDescription": {
"text": "Infinite loop statement"
},
"fullDescription": {
"text": "Reports 'for', 'while', or 'do' statements which can only exit by throwing an exception. While such statements may be correct, they usually happen by mistake. Example: 'while(true) {\n Thread.sleep(1000)\n}'",
"markdown": "Reports `for`, `while`, or `do` statements which can only exit by throwing an exception. While such statements may be correct, they usually happen by mistake.\n\n**Example:**\n\n\n while(true) {\n Thread.sleep(1000)\n }\n\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyInfiniteLoopStatement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Probable bugs",
"index": 57,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GrPermitsClause",
"shortDescription": {
"text": "Non-extending permitted subclasses"
},
"fullDescription": {
"text": "Reports permitted classes that do not extend the sealed base class. Groovy does not require that all permitted classes should be available in compile-time and compiled along with base class. Compiler will not warn the user on dealing with non-extending permitted subclass, but it contradicts the nature of sealed classes. Example: 'class A permits B {} // reports B\n class B {}'",
"markdown": "Reports permitted classes that do not extend the sealed base class.\n\nGroovy does not require that all permitted classes should be available in compile-time and compiled along with base class. Compiler will not warn the user on dealing with non-extending permitted subclass, but it contradicts the nature of sealed classes.\n\n**Example:**\n\n\n class A permits B {} // reports B\n class B {}\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "GrPermitsClause",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Probable bugs",
"index": 57,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyOverlyComplexMethod",
"shortDescription": {
"text": "Overly complex method"
},
"fullDescription": {
"text": "Reports methods that have too high a cyclomatic complexity. Cyclomatic complexity is basically a measurement of the number of branching points in a method. Methods with too high a cyclomatic complexity may be confusing and difficult to test. Use the Method complexity limit field to specify the maximum acceptable cyclomatic complexity a method might have.",
"markdown": "Reports methods that have too high a cyclomatic complexity.\n\n\nCyclomatic\ncomplexity is basically a measurement of the number of branching points in a method. Methods with too high\na cyclomatic complexity may be confusing and difficult to test.\n\n\nUse the **Method complexity limit** field to specify the maximum acceptable cyclomatic complexity a method might have."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyOverlyComplexMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Method metrics",
"index": 197,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TypeCustomizer",
"shortDescription": {
"text": "Type customizer inspection"
},
"fullDescription": {
"text": "Reports files which can be custom type checkers and are not added to compiler resources yet.",
"markdown": "Reports files which can be custom type checkers and are not added to compiler resources yet."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "TypeCustomizer",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Other",
"index": 259,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GrEqualsBetweenInconvertibleTypes",
"shortDescription": {
"text": "'equals()' between objects of inconvertible types"
},
"fullDescription": {
"text": "Reports calls to 'equals()' where the target and argument are of incompatible types. While such a call might theoretically be useful, most likely it represents a bug. Example: 'new HashSet<String>() == new TreeSet<Integer>())'",
"markdown": "Reports calls to `equals()` where the target and argument are of incompatible types.\n\nWhile such a call might theoretically be useful, most likely it represents a bug.\n\n**Example:**\n\n\n new HashSet<String>() == new TreeSet<Integer>())\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GrEqualsBetweenInconvertibleTypes",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Probable bugs",
"index": 57,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyEmptySyncBlock",
"shortDescription": {
"text": "Empty 'synchronized' block"
},
"fullDescription": {
"text": "Reports 'synchronized' statements with empty bodies. While theoretically this may be the semantics intended, this construction is confusing, and often the result of a typo. Example: 'synchronized(lock) {\n}'",
"markdown": "Reports `synchronized` statements with empty bodies. While theoretically this may be the semantics intended, this construction is confusing, and often the result of a typo.\n\n**Example:**\n\n\n synchronized(lock) {\n }\n\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyEmptySyncBlock",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Threading issues",
"index": 85,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyUnusedDeclaration",
"shortDescription": {
"text": "Unused declaration"
},
"fullDescription": {
"text": "Reports unused classes, methods and fields. Example: 'public class Department {\n private Organization myOrganization;\n }' Here 'Department' explicitly references 'Organization' but if 'Department' class itself is unused, then inspection would report both classes. The inspection also reports parameters, which are not used by their methods and all method implementations/overriders, as well as local variables, which are declared but not used. For more information, see the same inspection in Java.",
"markdown": "Reports unused classes, methods and fields.\n\n**Example:**\n\n\n public class Department {\n private Organization myOrganization;\n }\n\nHere `Department` explicitly references `Organization` but if `Department` class itself is unused,\nthen inspection would report both classes.\n\n\nThe inspection also reports parameters, which are not used by their methods and all method implementations/overriders, as well as local\nvariables, which are declared but not used.\n\nFor more information, see the same inspection in Java."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyUnusedDeclaration",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Declaration redundancy",
"index": 268,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GroovyReturnFromClosureCanBeImplicit",
"shortDescription": {
"text": "'return' statement can be implicit"
},
"fullDescription": {
"text": "Reports return statements at the end of closures which can be made implicit. Groovy closures implicitly return the value of the last statement in them. Example: 'def foo = {\n return 1\n }' After the quick-fix is applied: 'def foo = {\n 1\n }'",
"markdown": "Reports return statements at the end of closures which can be made implicit.\n\n\nGroovy closures implicitly return the value of the last statement in them.\n\n**Example:**\n\n\n def foo = {\n return 1\n }\n\nAfter the quick-fix is applied:\n\n\n def foo = {\n 1\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "GroovyReturnFromClosureCanBeImplicit",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Groovy/Control flow issues",
"index": 90,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.reactivestreams",
"version": "232.8660.185",
"rules": [
{
"id": "ReactiveStreamsUnusedPublisher",
"shortDescription": {
"text": "Unused publisher"
},
"fullDescription": {
"text": "Reports unused 'Publisher' instances. To use an operator (a method of Mono/Flux/Flowable object that returns a Mono/Flux/Flowable) that produces a new 'Publisher' instance, you must subscribe to the created 'Publisher' via 'subscribe()'. Using a factory (for example, 'Mono.just()') without subscribing to the returned 'Publisher', creates an object that is never used and is treated as unnecessary memory allocation. For example, 'Mono.just(1, 2, 3).map(i -> i + 3)' won't be executed unless you subscribe to this 'Publisher', or unless you produce a new 'Publisher' by applying operators and subscribe to it. Example: Unused 'Flux' instance: 'Flux.just(1, 2, 3);' A 'Flux' instance used by consumer: 'Flux.just(1, 2, 3).subscribe(System.out::println);' Calls to methods annotated with Error Prone's or AssertJ's '@CanIgnoreReturnValue' annotation are not reported. New in 2019.3",
"markdown": "Reports unused `Publisher` instances.\n\n\nTo use an operator (a method of Mono/Flux/Flowable object that returns a Mono/Flux/Flowable) that produces a new `Publisher`\ninstance,\nyou must subscribe to the created `Publisher` via `subscribe()`.\n\n\nUsing a factory (for example, `Mono.just()`) without subscribing to the returned `Publisher`,\ncreates an object that is never used and is treated as unnecessary memory allocation.\n\n\nFor example, `Mono.just(1, 2, 3).map(i -> i + 3)` won't be executed unless you subscribe to this `Publisher`,\nor unless you produce a new `Publisher` by applying operators and subscribe to it.\n\n**Example:**\n\nUnused `Flux` instance:\n\n\n Flux.just(1, 2, 3);\n\nA `Flux` instance used by consumer:\n\n\n Flux.just(1, 2, 3).subscribe(System.out::println);\n\nCalls to methods annotated with Error Prone's or AssertJ's `@CanIgnoreReturnValue` annotation are not reported.\n\nNew in 2019.3"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ReactiveStreamsUnusedPublisher",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Reactive Streams/Common",
"index": 42,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReactiveStreamsThrowInOperator",
"shortDescription": {
"text": "Throw statement in Reactive operator"
},
"fullDescription": {
"text": "Reports 'throw' expressions in the Reactor/RxJava operator code. Throwing exceptions from a Reactor/RxJava operator indicates a possible problem, because you can return a \"Reactive-like\" error: 'Mono.error()' or 'Flowable.error()' from 'flatMap()', or call 'sink.error()' from the Reactor's 'handle()' operator. Also, Reactor factory methods allow returning checked exceptions without any errors, while throwing such exceptions without the 'Exceptions' class leads to a compilation error. Example: 'Flux.just(1, 2, 3).flatMap(i -> {\n throw new RuntimeException();\n })' After the quick-fix is applied: 'Flux.just(1, 2, 3).flatMap(i -> {\n return Flux.error(new RuntimeException());\n })' New in 2019.3",
"markdown": "Reports `throw` expressions in the Reactor/RxJava operator code.\n\nThrowing exceptions from a Reactor/RxJava operator indicates a possible problem, because you can return a \"Reactive-like\" error:\n`Mono.error()` or `Flowable.error()` from `flatMap()`,\nor call `sink.error()` from the Reactor's `handle()` operator.\n\n\nAlso, Reactor factory methods allow returning checked exceptions without any errors, while throwing such exceptions without\nthe `Exceptions` class leads to a compilation error.\n\n**Example:**\n\n\n Flux.just(1, 2, 3).flatMap(i -> {\n throw new RuntimeException();\n })\n\nAfter the quick-fix is applied:\n\n\n Flux.just(1, 2, 3).flatMap(i -> {\n return Flux.error(new RuntimeException());\n })\n\nNew in 2019.3"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "ReactiveStreamsThrowInOperator",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Reactive Streams/Common",
"index": 42,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReactiveStreamsPublisherImplementation",
"shortDescription": {
"text": "Class implements Publisher"
},
"fullDescription": {
"text": "Reports classes that directly implement the 'Publisher' interface. Consider using static generators from RxJava, Reactor or Mutiny, for example: 'Flux.just()', 'Flux.create()', 'Flux.generate()', 'Flux.from()' 'Mono.create()', 'Mono.from()', 'Mono.just()' 'Flowable.just()', 'Flowable.from()' 'Maybe.just()', 'Maybe.from()' 'Multi.createFrom()', 'Multi.createBy()' 'Uni.createFrom()'",
"markdown": "Reports classes that directly implement the `Publisher` interface.\n\nConsider using static generators from RxJava, Reactor or Mutiny, for example:\n\n* `Flux.just()`, `Flux.create()`, `Flux.generate()`, `Flux.from()`\n* `Mono.create()`, `Mono.from()`, `Mono.just()`\n* `Flowable.just()`, `Flowable.from()`\n* `Maybe.just()`, `Maybe.from()`\n* `Multi.createFrom()`, `Multi.createBy()`\n* `Uni.createFrom()`"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ReactiveStreamsPublisherImplementation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Reactive Streams/Common",
"index": 42,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReactiveStreamsNullableInLambdaInTransform",
"shortDescription": {
"text": "Return null or something nullable from a lambda in transformation method"
},
"fullDescription": {
"text": "Reports transform operations that may return 'null' inside a Reactive Stream chain. Reactive Streams don't support nullable values, which causes such code to fail. The quick-fix suggests replacing 'map()' with 'mapNotNull', which omits exceptions. Example: 'repository.findWithTailableCursorBy()\n .map(e -> (Person)null)\n .doOnNext(System.out::println)' After the quick-fix is applied: 'repository.findWithTailableCursorBy()\n .mapNotNull(e -> (Person)null)\n .doOnNext(System.out::println)' New in 2019.3",
"markdown": "Reports transform operations that may return `null` inside a Reactive Stream chain.\n\n\nReactive Streams don't support nullable values, which causes such code to fail.\nThe quick-fix suggests replacing `map()` with `mapNotNull`, which omits exceptions.\n\n**Example:**\n\n repository.findWithTailableCursorBy()\n .map(e -> (Person)null)\n .doOnNext(System.out::println)\n\nAfter the quick-fix is applied:\n\n repository.findWithTailableCursorBy()\n .mapNotNull(e -> (Person)null)\n .doOnNext(System.out::println)\n\nNew in 2019.3"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ReactiveStreamsNullableInLambdaInTransform",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Reactive Streams/Common",
"index": 42,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CallingSubscribeInNonBlockingScope",
"shortDescription": {
"text": "Calling 'subscribe' in \"reactive\" methods"
},
"fullDescription": {
"text": "Reports 'subscribe()' calls in \"reactive\" methods. Methods returning a 'Publisher' type (including 'Flux' and 'Mono') should not call the 'subscribe()' method directly because it can break the reactive call chain. Instead of using 'subscribe()', consider using composition operators like 'flatMap()', 'zip()', 'then()', and so on. Example: 'Flux<String> stringFlux(){\n Flux<String> flux = Flux.just(\"abc\");\n flux.subscribe(); // <- blocking 'subscribe' call in non-blocking context\n return flux;\n }'",
"markdown": "Reports `subscribe()` calls in \"reactive\" methods.\n\nMethods returning a `Publisher` type (including `Flux` and `Mono`)\nshould not call the `subscribe()` method directly because it can break the reactive call chain.\n\nInstead of using `subscribe()`, consider using composition operators like `flatMap()`,\n`zip()`, `then()`, and so on.\n\n**Example:**\n\n\n Flux<String> stringFlux(){\n Flux<String> flux = Flux.just(\"abc\");\n flux.subscribe(); // <- blocking 'subscribe' call in non-blocking context\n return flux;\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "CallingSubscribeInNonBlockingScope",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Reactive Streams/Reactor",
"index": 171,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReactorTransformationOnMonoVoid",
"shortDescription": {
"text": "Calling transformation function on receiver with Mono<Void> type"
},
"fullDescription": {
"text": "Reports transform operations called on 'Mono<Void>' value inside a Reactor chain. 'Mono<Void>' completes without any value, that's why there is nothing to invoke the transformation function on. The quick-fix suggests replacing 'map()' and 'flatMap()' with 'then()'. Example: 'Mono.when(Mono.just(1), Mono.just(2))\n .map(v -> \"New value\")\n .doFinally(System.out::println);' After the quick-fix is applied: 'Mono.when(Mono.just(1), Mono.just(2))\n .then(Mono.fromCallable(() -> \"New value\"))\n .doFinally(System.out::println);' New in 2023.1",
"markdown": "Reports transform operations called on `Mono<Void>` value inside a Reactor chain.\n\n\n`Mono<Void>` completes without any value, that's why there is nothing to invoke the transformation function on.\nThe quick-fix suggests replacing `map()` and `flatMap()` with `then()`.\n\n**Example:**\n\n Mono.when(Mono.just(1), Mono.just(2))\n .map(v -> \"New value\")\n .doFinally(System.out::println);\n\nAfter the quick-fix is applied:\n\n Mono.when(Mono.just(1), Mono.just(2))\n .then(Mono.fromCallable(() -> \"New value\"))\n .doFinally(System.out::println);\n\nNew in 2023.1"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ReactorTransformationOnMonoVoid",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Reactive Streams/Reactor",
"index": 171,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReactiveStreamsSubscriberImplementation",
"shortDescription": {
"text": "Class implements Subscriber"
},
"fullDescription": {
"text": "Reports classes that directly implement the 'Subscriber' interface. Consider using static generators from RxJava, Reactor or Mutiny, for example: 'Flux.just()', 'Flux.create()', 'Flux.generate()', 'Flux.from()' 'Mono.create()', 'Mono.from()', 'Mono.just()' 'Flowable.just()', 'Flowable.from()' 'Maybe.just()', 'Maybe.from()' 'Multi.createFrom()', 'Multi.createBy()' 'Uni.createFrom()'",
"markdown": "Reports classes that directly implement the `Subscriber` interface.\n\nConsider using static generators from RxJava, Reactor or Mutiny, for example:\n\n* `Flux.just()`, `Flux.create()`, `Flux.generate()`, `Flux.from()`\n* `Mono.create()`, `Mono.from()`, `Mono.just()`\n* `Flowable.just()`, `Flowable.from()`\n* `Maybe.just()`, `Maybe.from()`\n* `Multi.createFrom()`, `Multi.createBy()`\n* `Uni.createFrom()`"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ReactiveStreamsSubscriberImplementation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Reactive Streams/Common",
"index": 42,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnfinishedStepVerifier",
"shortDescription": {
"text": "Unfinished StepVerifier"
},
"fullDescription": {
"text": "Reports missing 'StepVerifier' terminal calls. Initiating 'Publisher' subscriptions and assertions requires calling a terminal verification method, such as 'verify()', 'verifyComplete()', and so on. Example: 'StepVerifier.create(Flux.just(1,2,3)).expectNext(1);' After the quick-fix is applied: 'StepVerifier.create(Flux.just(1,2,3)).expectNext(1).verifyComplete();'",
"markdown": "Reports missing `StepVerifier` terminal calls.\n\n\nInitiating `Publisher` subscriptions and assertions requires calling a terminal verification method,\nsuch as `verify()`, `verifyComplete()`, and so on.\n\n**Example:**\n\n\n StepVerifier.create(Flux.just(1,2,3)).expectNext(1);\n\nAfter the quick-fix is applied:\n\n\n StepVerifier.create(Flux.just(1,2,3)).expectNext(1).verifyComplete();\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "UnfinishedStepVerifier",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Reactive Streams/Reactor",
"index": 171,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReactorZipWithMonoVoid",
"shortDescription": {
"text": "Zip contains parameter with Mono<Void> type"
},
"fullDescription": {
"text": "Reports zip operations that contains arguments with 'Mono<Void>' return value inside a Reactor chain. 'Zip' completes empty as soon as incoming 'Mono<Void>' completes. The quick-fix suggests replacing 'zip()' and 'zipWhen()' and 'zipWith()' with 'when'. Example: 'Mono.zip(Mono.just(1), Mono.fromRunnable(() -> System.out.println(\"value\")))\n .map(v -> \"New value\")\n .doFinally(System.out::println);' After the quick-fix is applied: 'Mono.when(Mono.just(1), Mono.fromRunnable(() -> System.out.println(\"value\")))\n .then(Mono.fromCallable(() -> \"New value\"))\n .doFinally(System.out::println);' New in 2023.1",
"markdown": "Reports zip operations that contains arguments with `Mono<Void>` return value inside a Reactor chain.\n\n\n`Zip` completes empty as soon as incoming `Mono<Void>` completes.\nThe quick-fix suggests replacing `zip()` and `zipWhen()` and `zipWith()` with `when`.\n\n**Example:**\n\n Mono.zip(Mono.just(1), Mono.fromRunnable(() -> System.out.println(\"value\")))\n .map(v -> \"New value\")\n .doFinally(System.out::println);\n\nAfter the quick-fix is applied:\n\n Mono.when(Mono.just(1), Mono.fromRunnable(() -> System.out.println(\"value\")))\n .then(Mono.fromCallable(() -> \"New value\"))\n .doFinally(System.out::println);\n\nNew in 2023.1"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ReactorZipWithMonoVoid",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Reactive Streams/Reactor",
"index": 171,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReactiveStreamsTooLongSameOperatorsChain",
"shortDescription": {
"text": "Too long same methods chain"
},
"fullDescription": {
"text": "Reports long Reactive Streams transformation chains. Each operator method call, such as 'map()' or 'filter()', creates some objects for those operators. Calling a long chain of operators on each subscription, for each stream element, may cause performance overhead. To avoid it, combine a long chain of calls into one operator call wherever possible. Example: 'Flux.just(1, 2, 3)\n .map(it -> it + 1)\n .map(it -> it + 2)\n .map(it -> it + 3)' After the quick-fix is applied: 'Flux.just(1, 2, 3)\n .map(it -> it + 1 + 2 + 3)' New in 2019.3",
"markdown": "Reports long Reactive Streams transformation chains.\n\nEach operator method call, such as `map()` or `filter()`, creates some objects for those operators.\nCalling a long chain of operators on each subscription, for each stream element, may cause performance overhead.\nTo avoid it, combine a long chain of calls into one operator call wherever possible.\n\n**Example:**\n\n\n Flux.just(1, 2, 3)\n .map(it -> it + 1)\n .map(it -> it + 2)\n .map(it -> it + 3)\n\nAfter the quick-fix is applied:\n\n\n Flux.just(1, 2, 3)\n .map(it -> it + 1 + 2 + 3)\n\nNew in 2019.3"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "ReactiveStreamsTooLongSameOperatorsChain",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Reactive Streams/Common",
"index": 42,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MutinyCallingSubscribeInNonBlockingScope",
"shortDescription": {
"text": "Calling 'subscribe' in \"reactive\" methods"
},
"fullDescription": {
"text": "Reports 'subscribe()' calls in \"reactive\" methods. Methods returning a publisher (including 'Uni' and 'Multi') should not call the 'subscribe()' method directly because it can break the reactive call chain. Instead of using 'subscribe()', consider using composition operators like 'flatMap()', 'merge()', and so on. Example: 'Multi<String> stringMulti(){\n Multi<String> multi = Multi.createFrom().item(\"abc\");\n multi.subscribe(); // <- blocking 'subscribe' call in non-blocking context\n return multi;\n }'",
"markdown": "Reports `subscribe()` calls in \"reactive\" methods.\n\nMethods returning a publisher (including `Uni` and `Multi`)\nshould not call the `subscribe()` method directly because it can break the reactive call chain.\n\nInstead of using `subscribe()`, consider using composition operators like `flatMap()`,\n`merge()`, and so on.\n\n**Example:**\n\n\n Multi<String> stringMulti(){\n Multi<String> multi = Multi.createFrom().item(\"abc\");\n multi.subscribe(); // <- blocking 'subscribe' call in non-blocking context\n return multi;\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "MutinyCallingSubscribeInNonBlockingScope",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Reactive Streams/Mutiny",
"index": 260,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReactorAutomaticDebugger",
"shortDescription": {
"text": "Unnecessary debug initialization"
},
"fullDescription": {
"text": "Reports redundant 'ReactorDebugAgent.init()' calls. IDE can automatically initialize the Reactor Debug mode, so users don't need to call 'ReactorDebugAgent.init()' or 'Hooks.onOperatorDebug()' explicitly. Also, calling both 'ReactorDebugAgent.init()' and 'Hooks.onOperatorDebug()' causes doubled debugging stack frames generated by Reactor.",
"markdown": "Reports redundant `ReactorDebugAgent.init()` calls.\n\n\nIDE can automatically initialize the Reactor Debug mode, so users don't need to call `ReactorDebugAgent.init()` or\n`Hooks.onOperatorDebug()` explicitly.\n\nAlso, calling both `ReactorDebugAgent.init()` and `Hooks.onOperatorDebug()` causes doubled debugging stack frames\ngenerated by Reactor."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "ReactorAutomaticDebugger",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Reactive Streams/Reactor",
"index": 171,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "org.jetbrains.plugins.gradle",
"version": "232.8660.185",
"rules": [
{
"id": "ForeignDelegate",
"shortDescription": {
"text": "Possibly misplaced call to Gradle method"
},
"fullDescription": {
"text": "Detects possibly misplaced calls to Gradle methods. Gradle buildscripts comprise a lot of nested closures, making the code structure similar to a markup language. Due to the behavior of DSL languages, the methods that you can write in the outer closures are also available in the inner ones. Such methods may have no meaning when written outside their scope. Sometimes it may be hard to detect this situation. This inspection aims to detect such methods. Example: 'repositories {\n // the delegate of 'repositories' has method 'exclusiveContent', which can be written here\n maven {\n // the delegate of 'maven' has method 'content', which can be written here\n // but 'exclusiveContent' is also available\n exclusiveContent {} // reports 'exclusiveContent'\n }\n}'",
"markdown": "Detects possibly misplaced calls to Gradle methods.\nGradle buildscripts comprise a lot of nested closures, making the code structure similar to a markup language. Due to the behavior of DSL languages, the methods that you can write in the outer closures are also available in the inner ones. Such methods may have no meaning when written outside their scope. \nSometimes it may be hard to detect this situation. This inspection aims to detect such methods.\n\n**Example:**\n\n\n repositories {\n // the delegate of 'repositories' has method 'exclusiveContent', which can be written here\n maven {\n // the delegate of 'maven' has method 'content', which can be written here\n // but 'exclusiveContent' is also available\n exclusiveContent {} // reports 'exclusiveContent'\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ForeignDelegate",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Gradle/Probable bugs",
"index": 46,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnusedVersionCatalogEntry",
"shortDescription": {
"text": "Unused version catalog entry"
},
"fullDescription": {
"text": "Detects unused keys in TOML descriptors of version catalogs. Example: '// build.gradle\ndependencies {\n implementation libs.foo.bar\n}' '# libs.versions.toml\n[libraries]\nfoo-bar = \"com.gradle:example:1.0.0\"\nbar-baz = \"com.gradle:example:2.0.0\" # highlights bar-baz'",
"markdown": "Detects unused keys in TOML descriptors of version catalogs.\n\n**Example:**\n\n\n // build.gradle\n dependencies {\n implementation libs.foo.bar\n }\n\n\n # libs.versions.toml\n [libraries]\n foo-bar = \"com.gradle:example:1.0.0\"\n bar-baz = \"com.gradle:example:2.0.0\" # highlights bar-baz\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnusedVersionCatalogEntry",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Gradle/Style",
"index": 175,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MultipleRepositoryUrls",
"shortDescription": {
"text": "Multiple repository urls"
},
"fullDescription": {
"text": "Reports the usage of multiple URLs per repository (maven or ivy) block. The problem is that only one URL can be picked up for the repository, the other URLs will be ignored.",
"markdown": "Reports the usage of multiple URLs per repository (maven or ivy) block. The problem is that only one URL can be picked up for the repository, the other URLs will be ignored."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MultipleRepositoryUrls",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Gradle/Probable bugs",
"index": 46,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BintrayPublishingPlugin",
"shortDescription": {
"text": "Bintray publishing plugin may stop working on May 1st, 2021"
},
"fullDescription": {
"text": "Detects usages of Gradle plugin 'com.jfrog.bintray'. The plugin is used for publishing build results to Bintray. Publishing to Bintray service is disabled.",
"markdown": "Detects usages of Gradle plugin `com.jfrog.bintray`.\nThe plugin is used for publishing build results to Bintray.\nPublishing to\n[Bintray](https://www.jfrog.com/confluence/display/BT/Welcome+to+JFrog+Bintray) service is disabled."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "BintrayPublishingPlugin",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Gradle/Probable bugs",
"index": 46,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IncorrectPluginDslStructure",
"shortDescription": {
"text": "Plugin DSL structure"
},
"fullDescription": {
"text": "Detects disallowed statements before 'plugins {}' block. Due to the limitations of Gradle Plugin DSL, only a restricted set of Groovy statements is available before ''plugins {}'' block. The only options are ''buildscript {}'', ''pluginManagement {}'' and other ''plugins {}''. See Gradle documentation Example: 'import foo.bar.Baz\nplugins {} // reports 'plugins'\nplugins {\n foo() // reports 'foo'\n id 'java'\n}'",
"markdown": "Detects disallowed statements before 'plugins {}' block.\nDue to the limitations of Gradle Plugin DSL, only a restricted set of Groovy statements is available before '`plugins {}`' block. The only options are '`buildscript {}`', '`pluginManagement {}`' and other '`plugins {}`'. \n[See Gradle documentation](https://docs.gradle.org/current/userguide/plugins.html#plugins_dsl_limitations)\n\n**Example:**\n\n\n import foo.bar.Baz\n plugins {} // reports 'plugins'\n plugins {\n foo() // reports 'foo'\n id 'java'\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "IncorrectPluginDslStructure",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Gradle/Validity issues",
"index": 242,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DependencyNotationArgument",
"shortDescription": {
"text": "Unrecognized dependency notation"
},
"fullDescription": {
"text": "Detects incorrect dependency notations. The following types/formats are supported by Gradle: Instances of 'Dependency'; 'String' or 'CharSequence' values, for example ''org.gradle:gradle-core:1.0''; Maps, for example '[group: 'org.gradle', name: 'gradle-core', version: '1.0']'; FileCollections, for example 'files('some.jar', 'someOther.jar')'; Projects, for example 'project(':some:project:path')'; 'ClassPathNotation', for example 'gradleApi()'; Lists of dependency notations, for example '['org.gradle:gradle-core:1.0']'; (Gradle 7.0+) Version catalog accessors, for example 'libs.groovy.core'. See Gradle documentation Example: 'dependencies {\n implementation(1) // reports '1'\n}'",
"markdown": "Detects incorrect dependency notations.\nThe following types/formats are supported by Gradle:\n\n* Instances of `Dependency`;\n* `String` or `CharSequence` values, for example `'org.gradle:gradle-core:1.0'`;\n* Maps, for example `[group: 'org.gradle', name: 'gradle-core', version: '1.0']`;\n* FileCollections, for example `files('some.jar', 'someOther.jar')`;\n* Projects, for example `project(':some:project:path')`;\n* `ClassPathNotation`, for example `gradleApi()`;\n* Lists of dependency notations, for example `['org.gradle:gradle-core:1.0']`;\n* (Gradle 7.0+) [Version catalog accessors](https://docs.gradle.org/current/userguide/platforms.html), for example `libs.groovy.core`.\n\n[See Gradle documentation](https://docs.gradle.org/current/userguide/declaring_dependencies.html#sec:dependency-types)\n\n**Example:**\n\n\n dependencies {\n implementation(1) // reports '1'\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DependencyNotationArgument",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Gradle/Probable bugs",
"index": 46,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DeprecatedConfigurations",
"shortDescription": {
"text": "Deprecated configurations"
},
"fullDescription": {
"text": "Detects usage of configuration methods that were deprecated. Configuration methods may be deprecated because of two possible reasons: The Gradle API has evolved, so old method choices should be avoided; Some plugin provides a better version of the deprecated configuration method. Most likely there will be an alternative for the deprecated method. Example: 'plugins {\n id 'java'\n}\n\ndependencies {\n archive 'org.gradle.api:gradle:1.0' // reports 'archive'\n}'",
"markdown": "Detects usage of configuration methods that were deprecated.\nConfiguration methods may be deprecated because of two possible reasons:\n\n* The Gradle API has evolved, so old method choices should be avoided;\n* Some plugin provides a better version of the deprecated configuration method.\n\nMost likely there will be an alternative for the deprecated method.\n\n**Example:**\n\n\n plugins {\n id 'java'\n }\n\n dependencies {\n archive 'org.gradle.api:gradle:1.0' // reports 'archive'\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DeprecatedConfigurations",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Gradle/Validity issues",
"index": 242,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JCenterRepository",
"shortDescription": {
"text": "Builds will no longer be able to resolve artifacts from JCenter after February 1st, 2022"
},
"fullDescription": {
"text": "Detects usages of the JCenter repository to resolve dependencies. Builds will no longer be able to resolve artifacts from JCenter after February 1st, 2022.",
"markdown": "Detects usages of the JCenter repository to resolve dependencies. Builds will no longer be able to resolve artifacts from JCenter after February 1st, 2022."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JCenterRepository",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Gradle/Probable bugs",
"index": 46,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConfigurationAvoidance",
"shortDescription": {
"text": "Configuration avoidance"
},
"fullDescription": {
"text": "(Gradle 4.9+) Detects usage of API that interacts with tasks eagerly. Eager interaction with tasks implies some inconveniences: The user should manually set up all dependencies between tasks; In the configuration phase, all the tasks accessed via the eager API become configured, even if they are not executed afterwards. It results in performance degradation. Eventually, the eager API will be deprecated in favor of the lazy one. For a migration guide, see the Gradle documentation. Example: 'task foo { // reports 'task', suggests replacing it with 'task.register'\n // ...\n}'",
"markdown": "(Gradle 4.9+) Detects usage of API that interacts with tasks eagerly.\n\nEager interaction with tasks implies some inconveniences:\n\n* The user should manually set up all dependencies between tasks;\n* In the [configuration phase](https://docs.gradle.org/current/userguide/build_lifecycle.html#sec:build_phases), all the tasks accessed via the eager API become configured, even if they are not executed afterwards. It results in performance degradation.\n\nEventually, the eager API will be deprecated in favor of the lazy one.\n\nFor a migration guide, see the\n[Gradle documentation](https://docs.gradle.org/current/userguide/task_configuration_avoidance.html).\n\n**Example:**\n\n task foo { // reports 'task', suggests replacing it with 'task.register'\n // ...\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ConfigurationAvoidance",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Gradle/Best practises",
"index": 267,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "org.editorconfig.editorconfigjetbrains",
"version": "232.8660.185",
"rules": [
{
"id": "EditorConfigNumerousWildcards",
"shortDescription": {
"text": "Too many wildcards"
},
"fullDescription": {
"text": "Reports sections that contain too many wildcards. Using a lot of wildcards may lead to performance issues.",
"markdown": "Reports sections that contain too many wildcards. Using a lot of wildcards may lead to performance issues."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "EditorConfigNumerousWildcards",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "EditorConfig",
"index": 50,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EditorConfigKeyCorrectness",
"shortDescription": {
"text": "Unknown property"
},
"fullDescription": {
"text": "Reports properties that are not supported by the IDE. Note: some “ij” domain properties may require specific language plugins.",
"markdown": "Reports properties that are not supported by the IDE. Note: some \"ij\" domain properties may require specific language plugins."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EditorConfigKeyCorrectness",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "EditorConfig",
"index": 50,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EditorConfigEncoding",
"shortDescription": {
"text": "File encoding doesn't match EditorConfig charset"
},
"fullDescription": {
"text": "Checks that current file encoding matches the encoding defined in \"charset\" property of .editorconfig file.",
"markdown": "Checks that current file encoding matches the encoding defined in \"charset\" property of .editorconfig file."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EditorConfigEncoding",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "EditorConfig",
"index": 50,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EditorConfigEmptyHeader",
"shortDescription": {
"text": "Empty header"
},
"fullDescription": {
"text": "Reports sections with an empty header. Section header must contain file path globs in the format similar to one supported by 'gitignore'.",
"markdown": "Reports sections with an empty header. Section header must contain file path globs in the format similar to one supported by `gitignore`."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "EditorConfigEmptyHeader",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "EditorConfig",
"index": 50,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EditorConfigSpaceInHeader",
"shortDescription": {
"text": "Space in file pattern"
},
"fullDescription": {
"text": "Reports space characters in wildcard patterns that affect pattern matching. If these characters are not intentional, they should be removed.",
"markdown": "Reports space characters in wildcard patterns that affect pattern matching. If these characters are not intentional, they should be removed."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "EditorConfigSpaceInHeader",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "EditorConfig",
"index": 50,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EditorConfigOptionRedundancy",
"shortDescription": {
"text": "Redundant property"
},
"fullDescription": {
"text": "Reports properties that are redundant when another applicable section already contains the same property and value. For example: '[*]\nindent_size=4\n[*.java]\nindent_size=4' are both applicable to '*.java' files and define the same 'indent_size' value.",
"markdown": "Reports properties that are redundant when another applicable section already contains the same property and value.\n\n\nFor example:\n\n\n [*]\n indent_size=4\n [*.java]\n indent_size=4\n\nare both applicable to `*.java` files and define the same `indent_size` value."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EditorConfigOptionRedundancy",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "EditorConfig",
"index": 50,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EditorConfigWildcardRedundancy",
"shortDescription": {
"text": "Redundant wildcard"
},
"fullDescription": {
"text": "Reports wildcards that become redundant when the “**” wildcard is used in the same section. The “**” wildcard defines a broader set of files than any other wildcard. That is why, any other wildcard used in the same section has no affect and can be removed.",
"markdown": "Reports wildcards that become redundant when the \"\\*\\*\" wildcard is used in the same section.\n\n\nThe \"\\*\\*\" wildcard defines a broader set of files than any other wildcard.\nThat is why, any other wildcard used in the same section has no affect and can be removed."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EditorConfigWildcardRedundancy",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "EditorConfig",
"index": 50,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EditorConfigUnusedDeclaration",
"shortDescription": {
"text": "Unused declaration"
},
"fullDescription": {
"text": "Reports unused declarations. Such declarations can be removed.",
"markdown": "Reports unused declarations. Such declarations can be removed."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EditorConfigUnusedDeclaration",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "EditorConfig",
"index": 50,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EditorConfigRootDeclarationUniqueness",
"shortDescription": {
"text": "Extra top-level declaration"
},
"fullDescription": {
"text": "Reports multiple top-level declarations. There can be only one optional “root=true” top-level declaration in the EditorConfig file. Using multiple top-level declarations is not allowed.",
"markdown": "Reports multiple top-level declarations. There can be only one optional \"root=true\" top-level declaration in the EditorConfig file. Using multiple top-level declarations is not allowed."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "EditorConfigRootDeclarationUniqueness",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "EditorConfig",
"index": 50,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EditorConfigShadowedOption",
"shortDescription": {
"text": "Overridden property"
},
"fullDescription": {
"text": "Reports properties that are already defined in other sections. For example: '[*.java]\nindent_size=4\n[{*.java,*.js}]\nindent_size=2' The second section includes all '*.java' files too but it also redefines indent_size. As a result the value 2 will be used for files matching '*.java'.",
"markdown": "Reports properties that are already defined in other sections.\n\nFor example:\n\n\n [*.java]\n indent_size=4\n [{*.java,*.js}]\n indent_size=2\n\nThe second section includes all `*.java` files too but it also redefines indent_size. As a result the value 2 will be used for files matching `*.java`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EditorConfigShadowedOption",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "EditorConfig",
"index": 50,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EditorConfigValueUniqueness",
"shortDescription": {
"text": "Non-unique list value"
},
"fullDescription": {
"text": "Reports duplicates in lists of values.",
"markdown": "Reports duplicates in lists of values."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "EditorConfigValueUniqueness",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "EditorConfig",
"index": 50,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EditorConfigUnexpectedComma",
"shortDescription": {
"text": "Unexpected comma"
},
"fullDescription": {
"text": "Reports commas that cannot be used in the current context. Commas are allowed only as separators for values in lists.",
"markdown": "Reports commas that cannot be used in the current context. Commas are allowed only as separators for values in lists."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "EditorConfigUnexpectedComma",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "EditorConfig",
"index": 50,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EditorConfigShadowingOption",
"shortDescription": {
"text": "Overriding property"
},
"fullDescription": {
"text": "Reports properties that override the same properties defined earlier in the file. For example: '[*.java]\nindent_size=4\n[{*.java,*.js}]\nindent_size=2' The second section includes the same files as '[*.java]' but also sets indent_size to value 2. Thus the first declaration 'indent_size=4'will be ignored.",
"markdown": "Reports properties that override the same properties defined earlier in the file.\n\nFor example:\n\n\n [*.java]\n indent_size=4\n [{*.java,*.js}]\n indent_size=2\n\nThe second section includes the same files as `[*.java]` but also sets indent_size to value 2. Thus the first declaration `indent_size=4`will be ignored."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EditorConfigShadowingOption",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "EditorConfig",
"index": 50,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EditorConfigReferenceCorrectness",
"shortDescription": {
"text": "Invalid reference"
},
"fullDescription": {
"text": "Reports identifiers that are either unknown or have a wrong type.",
"markdown": "Reports identifiers that are either unknown or have a wrong type."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "EditorConfigReferenceCorrectness",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "EditorConfig",
"index": 50,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EditorConfigCharClassLetterRedundancy",
"shortDescription": {
"text": "Duplicate character class letter"
},
"fullDescription": {
"text": "Reports wildcard patterns in the EditorConfig section that contain a duplicate character in the character class, for example '[aa]'.",
"markdown": "Reports wildcard patterns in the EditorConfig section that contain a duplicate character in the character class, for example `[aa]`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EditorConfigCharClassLetterRedundancy",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "EditorConfig",
"index": 50,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EditorConfigMissingRequiredDeclaration",
"shortDescription": {
"text": "Required declarations are missing"
},
"fullDescription": {
"text": "Reports properties that miss the required declarations. Refer to the documentation for more information.",
"markdown": "Reports properties that miss the required declarations. Refer to the documentation for more information."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "EditorConfigMissingRequiredDeclaration",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "EditorConfig",
"index": 50,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EditorConfigPartialOverride",
"shortDescription": {
"text": "Overlapping sections"
},
"fullDescription": {
"text": "Reports subsets of files specified in the current section that overlap with other subsets in other sections. For example: '[{foo,bar}]' and '[{foo,bas}]' both contain “foo”.",
"markdown": "Reports subsets of files specified in the current section that overlap with other subsets in other sections. For example: `[{foo,bar}]` and `[{foo,bas}]` both contain \"foo\"."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "EditorConfigPartialOverride",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "EditorConfig",
"index": 50,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EditorConfigListAcceptability",
"shortDescription": {
"text": "Unexpected value list"
},
"fullDescription": {
"text": "Reports lists of values that are used in properties in which lists are not supported. In this case, only a single value can be specified.",
"markdown": "Reports lists of values that are used in properties in which lists are not supported. In this case, only a single value can be specified."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "EditorConfigListAcceptability",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "EditorConfig",
"index": 50,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EditorConfigPatternEnumerationRedundancy",
"shortDescription": {
"text": "Unnecessary braces"
},
"fullDescription": {
"text": "Reports pattern lists that are either empty '{}' or contain just one pattern, for example '{foo}' in contrast to a list containing multiple patterns, for example '{foo,bar}'. In this case braces are handled as a part of the name. For example, the pattern '*.{a}' will match the file 'my.{a}' but not 'my.a'.",
"markdown": "Reports pattern lists that are either empty `{}` or contain just one pattern, for example `{foo}` in contrast to a list containing multiple patterns, for example `{foo,bar}`. In this case braces are handled as a part of the name. For example, the pattern `*.{a}` will match the file `my.{a}` but not `my.a`."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "EditorConfigPatternEnumerationRedundancy",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "EditorConfig",
"index": 50,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EditorConfigPairAcceptability",
"shortDescription": {
"text": "Unexpected key-value pair"
},
"fullDescription": {
"text": "Reports key-value pairs that are not allowed in the current context.",
"markdown": "Reports key-value pairs that are not allowed in the current context."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "EditorConfigPairAcceptability",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "EditorConfig",
"index": 50,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EditorConfigNoMatchingFiles",
"shortDescription": {
"text": "No matching files"
},
"fullDescription": {
"text": "Reports sections with wildcard patterns that do not match any files under the directory in which the '.editorconfig' file is located.",
"markdown": "Reports sections with wildcard patterns that do not match any files under the directory in which the `.editorconfig` file is located."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EditorConfigNoMatchingFiles",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "EditorConfig",
"index": 50,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EditorConfigHeaderUniqueness",
"shortDescription": {
"text": "EditorConfig section is not unique"
},
"fullDescription": {
"text": "Reports sections that define the same file pattern as other sections.",
"markdown": "Reports sections that define the same file pattern as other sections."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EditorConfigHeaderUniqueness",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "EditorConfig",
"index": 50,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EditorConfigValueCorrectness",
"shortDescription": {
"text": "Invalid property value"
},
"fullDescription": {
"text": "Reports property values that do not meet value restrictions. For example, some properties may be only “true” or “false”, others contain only integer numbers etc. If a value has a limited set of variants, use code completion to see all of them.",
"markdown": "Reports property values that do not meet value restrictions. For example, some properties may be only \"true\" or \"false\", others contain only integer numbers etc. If a value has a limited set of variants, use code completion to see all of them."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "EditorConfigValueCorrectness",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "EditorConfig",
"index": 50,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EditorConfigRootDeclarationCorrectness",
"shortDescription": {
"text": "Unexpected top-level declaration"
},
"fullDescription": {
"text": "Reports unexpected top-level declarations. Top-level declarations other than “root=true” are not allowed in the EditorConfig file.",
"markdown": "Reports unexpected top-level declarations. Top-level declarations other than \"root=true\" are not allowed in the EditorConfig file."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "EditorConfigRootDeclarationCorrectness",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "EditorConfig",
"index": 50,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EditorConfigPatternRedundancy",
"shortDescription": {
"text": "Duplicate or redundant pattern"
},
"fullDescription": {
"text": "Reports file patterns that are redundant as there already are other patterns that define the same scope of files or even a broader one. For example, in '[{*.java,*}]' the first '*.java' pattern defines a narrower scope compared to '*'. That is why it is redundant and can be removed.",
"markdown": "Reports file patterns that are redundant as there already are other patterns that define the same scope of files or even a broader one. For example, in `[{*.java,*}]` the first `*.java` pattern defines a narrower scope compared to `*`. That is why it is redundant and can be removed."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EditorConfigPatternRedundancy",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "EditorConfig",
"index": 50,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EditorConfigDeprecatedDescriptor",
"shortDescription": {
"text": "Deprecated property"
},
"fullDescription": {
"text": "Reports EditorConfig properties that are no longer supported.",
"markdown": "Reports EditorConfig properties that are no longer supported."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EditorConfigDeprecatedDescriptor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "EditorConfig",
"index": 50,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EditorConfigCharClassRedundancy",
"shortDescription": {
"text": "Unnecessary character class"
},
"fullDescription": {
"text": "Reports character classes that consist of a single character. Such classes can be simplified to a character, for example '[a]'→'a'.",
"markdown": "Reports character classes that consist of a single character. Such classes can be simplified to a character, for example `[a]`→`a`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EditorConfigCharClassRedundancy",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "EditorConfig",
"index": 50,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EditorConfigEmptySection",
"shortDescription": {
"text": "Empty section"
},
"fullDescription": {
"text": "Reports sections that do not contain any EditorConfig properties.",
"markdown": "Reports sections that do not contain any EditorConfig properties."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EditorConfigEmptySection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "EditorConfig",
"index": 50,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EditorConfigVerifyByCore",
"shortDescription": {
"text": "Invalid .editorconfig file"
},
"fullDescription": {
"text": "Verifies the whole file using the backing EditorConfig core library and reports any failures. Any such failure would prevent EditorConfig properties from being correctly applied.",
"markdown": "Verifies the whole file using the backing EditorConfig core library and reports any failures. Any such failure would prevent EditorConfig properties from being correctly applied."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "EditorConfigVerifyByCore",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "EditorConfig",
"index": 50,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.database",
"version": "232.8660.185",
"rules": [
{
"id": "SqlMissingReturnInspection",
"shortDescription": {
"text": "Missing return statement"
},
"fullDescription": {
"text": "Reports functions that have no RETURN statements. Example (Oracle): 'CREATE FUNCTION foo RETURN int AS\nBEGIN\nEND;' The 'foo' function must return the integer value but the function body returns nothing. To fix the error, add a RETURN statement (for example, 'return 1;'). 'CREATE FUNCTION foo RETURN int AS\nBEGIN\n RETURN 1;\nEND;'",
"markdown": "Reports functions that have no RETURN statements.\n\nExample (Oracle):\n\n CREATE FUNCTION foo RETURN int AS\n BEGIN\n END;\n\nThe `foo` function must return the integer value but the function body returns nothing. To fix the error,\nadd a RETURN statement (for example, `return 1;`).\n\n CREATE FUNCTION foo RETURN int AS\n BEGIN\n RETURN 1;\n END;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "SqlMissingReturn",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlCaseVsIfInspection",
"shortDescription": {
"text": "Using CASE instead of conditional function and vice versa"
},
"fullDescription": {
"text": "Reports situations when CASE and IF are interchangeable. Example (MySQL): 'SELECT CASE\nWHEN C1 IS NULL THEN 1\nELSE 0\nEND\nFROM dual;' To keep your code short, you can replace the CASE structure with IF. You can do that by applying the Replace with 'IF' call intention action. The example code will look as follows: 'SELECT IF(C1 IS NULL, 1, 0)\nFROM dual;' To revert IF to CASE, click IF and apply the Replace with CASE expression intention action.",
"markdown": "Reports situations when CASE and IF are interchangeable.\n\nExample (MySQL):\n\n SELECT CASE\n WHEN C1 IS NULL THEN 1\n ELSE 0\n END\n FROM dual;\n\nTo keep your code short, you can replace the CASE structure with IF. You can do that by applying the **Replace with 'IF' call**\nintention action. The example code will look as follows:\n\n SELECT IF(C1 IS NULL, 1, 0)\n FROM dual;\n\nTo revert IF to CASE, click IF and apply the **Replace with CASE expression** intention action."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlCaseVsIf",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlShouldBeInGroupByInspection",
"shortDescription": {
"text": "Column should be in group by clause"
},
"fullDescription": {
"text": "Reports columns that are not in the GROUP BY clause or inside an aggregate function call. Example (Microsoft SQL Server): 'CREATE TABLE t1 (a INT, b INT);\nSELECT a, b FROM t1 GROUP BY a;' If you run the SELECT query, you will receive an error because Microsoft SQL Server expects the 'b' column in GROUP BY or used inside an aggregate function. The following two examples will fix the error. 'SELECT a, b FROM t1 GROUP BY a, b;\nSELECT a, max(b) max_b FROM t1 GROUP BY a;'",
"markdown": "Reports columns that are not in the GROUP BY clause or inside an aggregate function call.\n\nExample (Microsoft SQL Server):\n\n CREATE TABLE t1 (a INT, b INT);\n SELECT a, b FROM t1 GROUP BY a;\n\nIf you run the SELECT query, you will receive an error because Microsoft SQL Server expects the `b` column in GROUP BY or used\ninside an aggregate function. The following two examples will fix the error.\n\n SELECT a, b FROM t1 GROUP BY a, b;\n SELECT a, max(b) max_b FROM t1 GROUP BY a;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlShouldBeInGroupBy",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlMisleadingReferenceInspection",
"shortDescription": {
"text": "Misleading references"
},
"fullDescription": {
"text": "Reports ambiguous references in SQL code. For example, when a name refer to both a table column and a routine parameter. The execution of such code might lead to errors or unexpected results due to counter-intuitive resolution logic. Usually, names with a more local scope have higher priority. Example (PostgreSQL): 'CREATE TABLE foo\n(\n id INT,\n name VARCHAR(5)\n);\nCREATE FUNCTION func(name VARCHAR(5)) RETURNS INT AS\n$$\nDECLARE\n b INT;\nBEGIN\n -- `name` is ambiguous as it is used as a column name and a parameter\n SELECT COUNT(*) INTO b FROM foo t WHERE t.name = name;\n RETURN b;\nEND;\n$$ LANGUAGE plpgsql;' In PostgreSQL, you can use the '#variable_conflict' directives to explicitly specify a correct reference. For example, use '#variable_conflict use_column' to refer to a column name, or '#variable_conflict use_variable' to refer to a parameter. 'CREATE TABLE foo\n(\n id INT,\n name VARCHAR(5)\n);\nCREATE FUNCTION func(name VARCHAR(5)) RETURNS INT AS\n$$\n #variable_conflict use_column\nDECLARE\n b INT;\nBEGIN\n SELECT COUNT(*) INTO b FROM foo t WHERE t.name = name;\n RETURN b;\nEND;\n$$ LANGUAGE plpgsql;'",
"markdown": "Reports ambiguous references in SQL code.\n\nFor example, when a name refer to both a table column and a routine parameter. The execution of such code might lead to errors or unexpected\nresults due to counter-intuitive resolution logic. Usually, names with a more local scope have higher priority.\n\nExample (PostgreSQL):\n\n CREATE TABLE foo\n (\n id INT,\n name VARCHAR(5)\n );\n CREATE FUNCTION func(name VARCHAR(5)) RETURNS INT AS\n $$\n DECLARE\n b INT;\n BEGIN\n -- `name` is ambiguous as it is used as a column name and a parameter\n SELECT COUNT(*) INTO b FROM foo t WHERE t.name = name;\n RETURN b;\n END;\n $$ LANGUAGE plpgsql;\n\nIn PostgreSQL, you can use the `#variable_conflict` directives to explicitly specify a correct reference. For example,\nuse `#variable_conflict use_column` to refer to a column name, or `#variable_conflict use_variable` to refer to a\nparameter.\n\n CREATE TABLE foo\n (\n id INT,\n name VARCHAR(5)\n );\n CREATE FUNCTION func(name VARCHAR(5)) RETURNS INT AS\n $$\n #variable_conflict use_column\n DECLARE\n b INT;\n BEGIN\n SELECT COUNT(*) INTO b FROM foo t WHERE t.name = name;\n RETURN b;\n END;\n $$ LANGUAGE plpgsql;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlMisleadingReference",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlRedundantAliasInspection",
"shortDescription": {
"text": "Redundant alias expressions"
},
"fullDescription": {
"text": "Reports alias expressions that duplicate names of columns in tables and might be redundant. Example (PostgreSQL): 'CREATE TABLE foo(a INT, b INT);\n\nSELECT * FROM foo foo(a, b);\nSELECT * FROM foo foo(a);\nSELECT * FROM foo foo(x);\nSELECT * FROM foo foo(x, y);' The first two aliases use the same column names as in the 'foo' table. They are considered redundant because they column names are identical.",
"markdown": "Reports alias expressions that duplicate names of columns in tables and might be redundant.\n\nExample (PostgreSQL):\n\n CREATE TABLE foo(a INT, b INT);\n\n SELECT * FROM foo foo(a, b);\n SELECT * FROM foo foo(a);\n SELECT * FROM foo foo(x);\n SELECT * FROM foo foo(x, y);\n\nThe first two aliases use the same column names as in the `foo` table. They are considered redundant because they\ncolumn names are identical."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlRedundantAlias",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlUnusedCteInspection",
"shortDescription": {
"text": "Unused common table expression"
},
"fullDescription": {
"text": "Reports unused common table expressions (CTE) inside the query. Example (PostgreSQL): 'CREATE TABLE foo(a INT);\n\nWITH a AS (SELECT 1 AS x FROM foo)\nSELECT 1 + 2 FROM foo;' By using WITH, we create a temporary named result set with the name 'a', also known as a common table expression (CTE). But we do not use this CTE later in the code. The unused CTE is greyed out.",
"markdown": "Reports unused common table expressions (CTE) inside the query.\n\nExample (PostgreSQL):\n\n CREATE TABLE foo(a INT);\n\n WITH a AS (SELECT 1 AS x FROM foo)\n SELECT 1 + 2 FROM foo;\n\nBy using WITH, we create a temporary named result set with the name `a`, also known as a common table expression (CTE). But\nwe do not use this CTE later in the code. The unused CTE is greyed out."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlUnusedCte",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MongoJSResolveInspection",
"shortDescription": {
"text": "Resolution problems"
},
"fullDescription": {
"text": "Reports unresolved references in MongoDB and JavaScript code. Example: 'db\nuse foo\n -- a reference to a non-existing collection\ndb.non_existing_collection\ndb['non_existing_collection']\ndb['non_existing_collection'].find().hasNext()' The 'non_existing_collection' collection does not exist in the database and will be reported.",
"markdown": "Reports unresolved references in MongoDB and JavaScript code.\n\nExample:\n\n db\n use foo\n -- a reference to a non-existing collection\n db.non_existing_collection\n db['non_existing_collection']\n db['non_existing_collection'].find().hasNext()\n\nThe `non_existing_collection` collection does not exist in the database and will be reported."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MongoJSResolve",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "MongoJS",
"index": 164,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlDialectInspection",
"shortDescription": {
"text": "SQL dialect detection"
},
"fullDescription": {
"text": "Reports situations when a dialect is not assigned to an SQL file. For example, when you open a new SQL file without assigning a dialect to it, you see a notification where the best matching dialect is advised. Click the Use <dialect> link to use the advised dialect. Alternatively, click the Change dialect to link to select the other dialect.",
"markdown": "Reports situations when a dialect is not assigned to an SQL file.\n\nFor example, when you open a new SQL file without assigning a dialect\nto it, you see a notification where the best matching dialect is advised. Click the **Use \\<dialect\\>** link to use the advised\ndialect. Alternatively, click the **Change dialect to** link to select the other dialect."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlDialectInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MongoJSExtDeprecationInspection",
"shortDescription": {
"text": "Deprecated element"
},
"fullDescription": {
"text": "Reports usages of deprecated methods in MongoDB and JavaScript code. The quick-fix replaces deprecated methods with recommended alternatives. Example: 'db.my_collection.insert()' After the quick-fix is applied: 'db.my_collection.insertOne()'",
"markdown": "Reports usages of deprecated methods in MongoDB and JavaScript code.\n\nThe quick-fix replaces deprecated methods with recommended alternatives.\n\nExample:\n\n\n db.my_collection.insert()\n\nAfter the quick-fix is applied:\n\n\n db.my_collection.insertOne()\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MongoJSDeprecation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "MongoJS",
"index": 164,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MongoJSDeprecationInspection",
"shortDescription": {
"text": "Deprecated element"
},
"fullDescription": {
"text": "Reports usages of deprecated methods in MongoDB and JavaScript code. The quick-fix replaces deprecated methods with recommended alternatives. Example: 'db.my_collection.insert()' After the quick-fix is applied: 'db.my_collection.insertOne()'",
"markdown": "Reports usages of deprecated methods in MongoDB and JavaScript code.\n\nThe quick-fix replaces deprecated methods with recommended alternatives.\n\nExample:\n\n db.my_collection.insert()\n\nAfter the quick-fix is applied:\n\n db.my_collection.insertOne()\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MongoJSDeprecation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "MongoJS",
"index": 164,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MsBuiltinInspection",
"shortDescription": {
"text": "Builtin functions"
},
"fullDescription": {
"text": "Reports truncations of string arguments in ISNULL functions. The ISNULL syntax is 'ISNULL(check_expression, replacement_value)'. According to ISNULL at docs.microsoft.com, 'replacement_value' will be truncated if 'replacement_value' is longer than 'check_expression'. Example (Microsoft SQL Server): 'DECLARE @name1 VARCHAR(2) = NULL;\nDECLARE @name2 VARCHAR(10) = 'Example';\nDECLARE @name3 VARCHAR(2) = 'Hi';\n\n -- `@name2` is VARCHAR(10) and will be truncated\nSELECT ISNULL(@name1, @name2);\n\n -- `@name3` is VARCHAR(2) as `@name1` and will not be truncated\nSELECT ISNULL(@name1, @name3);'",
"markdown": "Reports truncations of string arguments in ISNULL functions.\n\nThe ISNULL syntax is `ISNULL(check_expression, replacement_value)`.\n\nAccording to [ISNULL at\ndocs.microsoft.com](https://docs.microsoft.com/en-us/sql/t-sql/functions/isnull-transact-sql), `replacement_value` will be truncated if `replacement_value` is longer than\n`check_expression`.\n\nExample (Microsoft SQL Server):\n\n DECLARE @name1 VARCHAR(2) = NULL;\n DECLARE @name2 VARCHAR(10) = 'Example';\n DECLARE @name3 VARCHAR(2) = 'Hi';\n\n -- `@name2` is VARCHAR(10) and will be truncated\n SELECT ISNULL(@name1, @name2);\n\n -- `@name3` is VARCHAR(2) as `@name1` and will not be truncated\n SELECT ISNULL(@name1, @name3);\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MssqlBuiltin",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL server",
"index": 192,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlMultipleLimitClausesInspection",
"shortDescription": {
"text": "Multiple row limiting/offset clauses in queries"
},
"fullDescription": {
"text": "Reports usages of multiple row limiting clauses in a single query. Example (Microsoft SQL Server): 'create table foo(a int);\nselect top 1 * from foo order by a offset 10 rows fetch next 20 rows only;' The SELECT TOP clause is used to specify that only 1 record must be returned. The FETCH clause specifies the number of rows to return after the OFFSET clause has been processed. But as we already have the SELECT TOP limiting clause, the FETCH clause might be redundant.",
"markdown": "Reports usages of multiple row limiting clauses in a single query.\n\nExample (Microsoft SQL Server):\n\n create table foo(a int);\n select top 1 * from foo order by a offset 10 rows fetch next 20 rows only;\n\nThe SELECT TOP clause is used to specify that only 1 record must be\nreturned. The FETCH clause specifies the number of rows to return after the OFFSET\nclause has been processed. But as we already have the SELECT TOP limiting clause, the FETCH clause might be redundant."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlMultipleLimitClauses",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlAmbiguousColumnInspection",
"shortDescription": {
"text": "Ambiguous reference"
},
"fullDescription": {
"text": "Reports columns that have identical names but belong to different tables. Example (MySQL): 'CREATE TABLE foo(id INT PRIMARY KEY);\nCREATE TABLE bar(id INT PRIMARY KEY);\n\nSELECT foo.id, bar.id FROM foo, bar WHERE id > 0;' The 'id' column appears in 'foo' and 'bar' tables. You need to qualify the column name to make the query correct. 'SELECT foo.id, bar.id FROM foo, bar WHERE foo.id > 0;'",
"markdown": "Reports columns that have identical names but belong to different tables.\n\nExample (MySQL):\n\n CREATE TABLE foo(id INT PRIMARY KEY);\n CREATE TABLE bar(id INT PRIMARY KEY);\n\n SELECT foo.id, bar.id FROM foo, bar WHERE id > 0;\n\nThe `id` column appears in `foo` and `bar` tables. You need to qualify the column name to\nmake the query correct.\n\n SELECT foo.id, bar.id FROM foo, bar WHERE foo.id > 0;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlAmbiguousColumn",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlNullComparisonInspection",
"shortDescription": {
"text": "Null comparison"
},
"fullDescription": {
"text": "Reports comparisons with NULL that can be replaced with IS NULL or IS NOT NULL operators. Example (Microsoft SQL Server): 'CREATE TABLE foo ( id int );\n\nSELECT * FROM foo WHERE NULL = NULL;\nSELECT * FROM foo WHERE NULL != NULL;' The 'NULL = NULL' can be replaced with 'IS NULL', the 'NULL != NULL' comparison with 'IS NOT NULL'. To do this replacement, you can use Use IS NULL operator or Use IS NOT NULL operator quick-fixes. 'SELECT * FROM foo WHERE NULL IS NULL;\nSELECT * FROM foo WHERE NULL IS NOT NULL;'",
"markdown": "Reports comparisons with NULL that can be replaced with IS NULL or IS NOT NULL operators.\n\nExample (Microsoft SQL Server):\n\n CREATE TABLE foo ( id int );\n\n SELECT * FROM foo WHERE NULL = NULL;\n SELECT * FROM foo WHERE NULL != NULL;\n\nThe `NULL = NULL` can be replaced with `IS NULL`, the `NULL != NULL` comparison\nwith `IS NOT NULL`. To do this replacement, you can use **Use IS NULL operator** or **Use IS NOT NULL operator**\nquick-fixes.\n\n SELECT * FROM foo WHERE NULL IS NULL;\n SELECT * FROM foo WHERE NULL IS NOT NULL;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlNullComparison",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlInsertValuesInspection",
"shortDescription": {
"text": "VALUES clause cardinality"
},
"fullDescription": {
"text": "Reports situations when a number of parameters in VALUES does not match a number of columns in a target table. Example (MySQL): 'CREATE TABLE foo(a INT, b INT, c INT);\n\nINSERT INTO foo VALUES (1,2,3,4)' The 'foo' table has three columns but in the INSERT INTO statement we pass four.",
"markdown": "Reports situations when a number of parameters in VALUES does not match a number of columns in a target table.\n\nExample (MySQL):\n\n CREATE TABLE foo(a INT, b INT, c INT);\n\n INSERT INTO foo VALUES (1,2,3,4)\n\nThe `foo` table has three columns but in the INSERT INTO statement we pass four."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlInsertValues",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlRedundantElseNullInspection",
"shortDescription": {
"text": "Redundant ELSE NULL clause"
},
"fullDescription": {
"text": "Reports redundant ELSE NULL clauses. Example (MySQL): 'SELECT CASE WHEN 2 > 1 THEN 'OK' ELSE NULL END AS alias FROM foo;' The 'ELSE NULL' part will never be executed and may be omitted.",
"markdown": "Reports redundant ELSE NULL clauses.\n\nExample (MySQL):\n\n SELECT CASE WHEN 2 > 1 THEN 'OK' ELSE NULL END AS alias FROM foo;\n\nThe `ELSE NULL` part will never be executed and may be omitted."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlRedundantElseNull",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlCurrentSchemaInspection",
"shortDescription": {
"text": "Current console schema introspected"
},
"fullDescription": {
"text": "Reports schemas and databases in the current session that are not introspected. For example, this warning might occur when you try to create a table in the schema that is not introspected. Introspection is a method of inspecting a data source. When you perform introspection, structural information in the data source is inspected to detect tables, columns, functions, and other elements with their attributes.",
"markdown": "Reports schemas and databases in the current session that are not introspected.\n\nFor example, this warning might occur when you try to create a table in the schema that is not introspected.\n\nIntrospection is a method of inspecting a data source. When you perform introspection, structural information in the data source is\ninspected to detect tables, columns, functions, and other elements with their attributes."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlCurrentSchemaInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlInsertNullIntoNotNullInspection",
"shortDescription": {
"text": "Insert NULL into NOT NULL column"
},
"fullDescription": {
"text": "Reports cases when you insert NULL values into columns that accept only NOT NULL values. Example (Microsoft SQL Server): 'CREATE TABLE br2 (\nid INT NOT NULL,\ncol1 NVARCHAR (20) NOT NULL,\ncol2 NVARCHAR (20) NOT NULL,\n);\n--\nINSERT INTO br2 (id, col1, col2)\nVALUES (1, NULL, NULL);' You cannot insert NULL values in 'col1' and 'col2' because they are defined as NOT NULL. If you run the script as is, you will receive an error. To fix this code, replace NULL in the VALUES part with some values (for example, '42' and ''bird''). INSERT INTO br2 (id, col1, col2)\nVALUES (1, 42, 'bird');",
"markdown": "Reports cases when you insert NULL values into columns that accept only NOT NULL values.\n\nExample (Microsoft SQL Server):\n\n CREATE TABLE br2 (\n id INT NOT NULL,\n col1 NVARCHAR (20) NOT NULL,\n col2 NVARCHAR (20) NOT NULL,\n );\n --\n INSERT INTO br2 (id, col1, col2)\n VALUES (1, NULL, NULL);\n\nYou cannot insert NULL values in `col1` and `col2` because they are defined as NOT NULL. If you run the script as\nis,\nyou will receive an error. To fix this code, replace NULL in the VALUES part with some values (for example, `42` and\n`'bird'`).\n\n```\nINSERT INTO br2 (id, col1, col2)\nVALUES (1, 42, 'bird');\n```"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlInsertNullIntoNotNull",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlTriggerTransitionInspection",
"shortDescription": {
"text": "Suspicious code in triggers"
},
"fullDescription": {
"text": "Reports incorrect usages of transition table variables in triggers. Example (HSQLDB): 'CREATE TABLE foo(a INT);\n\nCREATE TRIGGER trg\n AFTER DELETE ON foo\nBEGIN\n SELECT * FROM NEW;\nEND;\n\nCREATE TRIGGER trig AFTER INSERT ON foo\n REFERENCING OLD ROW AS newrow\n FOR EACH ROW WHEN (a > 1)\n INSERT INTO foo VALUES (1)' In HSQLDB, DELETE triggers may be used only with the OLD state while INSERT triggers may have only the NEW state. So, in the previous example, NEW in 'SELECT * FROM NEW;' will be highlighted as well as OLD in 'REFERENCING OLD ROW AS newrow'.",
"markdown": "Reports incorrect usages of transition table variables in triggers.\n\nExample (HSQLDB):\n\n CREATE TABLE foo(a INT);\n\n CREATE TRIGGER trg\n AFTER DELETE ON foo\n BEGIN\n SELECT * FROM NEW;\n END;\n\n CREATE TRIGGER trig AFTER INSERT ON foo\n REFERENCING OLD ROW AS newrow\n FOR EACH ROW WHEN (a > 1)\n INSERT INTO foo VALUES (1)\n\nIn HSQLDB, DELETE triggers may be used only with the OLD state while INSERT triggers may have only the NEW state. So, in the previous\nexample, NEW in `SELECT * FROM NEW;` will be highlighted as well as OLD in `REFERENCING OLD ROW AS newrow`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlTriggerTransition",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlNamedArgumentsInspection",
"shortDescription": {
"text": "Named arguments should be used"
},
"fullDescription": {
"text": "Reports arguments that are used without names in routine calls. By default, this inspection is disabled. For more information about the difference between named and unnamed parameters, see Binding Parameters by Name (Named Parameters) at docs.microsoft.com . Example (Microsoft SQL Server): 'CREATE FUNCTION foo(n INT, m INT) RETURNS INT AS\nBEGIN\n RETURN n + m;\nEND;\n\nCREATE PROCEDURE test AS\nBEGIN\n foo n = 1, m = 2;\n\n--- The following call misses parameter names and will be highlighted\n foo 1, 2;\nEND;' Parameters '1, 2' in the 'foo 1, 2;' call are highlighted because they miss names.",
"markdown": "Reports arguments that are used without names in routine calls. By default, this inspection is disabled.\n\nFor more information about the difference between named and unnamed parameters, see [Binding Parameters by Name (Named Parameters) at docs.microsoft.com](https://docs.microsoft.com/en-us/sql/odbc/reference/develop-app/binding-parameters-by-name-named-parameters).\n\nExample (Microsoft SQL Server):\n\n CREATE FUNCTION foo(n INT, m INT) RETURNS INT AS\n BEGIN\n RETURN n + m;\n END;\n\n CREATE PROCEDURE test AS\n BEGIN\n foo n = 1, m = 2;\n\n --- The following call misses parameter names and will be highlighted\n foo 1, 2;\n END;\n\nParameters `1, 2` in the `foo 1, 2;` call are highlighted because they miss names."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlNamedArguments",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlTransactionStatementInTriggerInspection",
"shortDescription": {
"text": "Use of transaction management statements in triggers"
},
"fullDescription": {
"text": "Reports usages of transaction management statements like COMMIT or ROLLBACK in trigger bodies. With COMMIT or ROLLBACK statements in a trigger body, the trigger will not compile. The fail happens because triggers start during transactions. When the trigger starts the current transaction is still not complete. As COMMIT terminates a transaction, both statements (COMMIT and ROLLBACK) would lead to an exception. Changes that are executed in a trigger should be committed (or rolled back) by the owning transaction that started the trigger. Example (Oracle): 'CREATE TABLE employee_audit\n(\n id INT NOT NULL,\n update_date DATE NOT NULL,\n old_name VARCHAR2(100),\n new_name VARCHAR2(100)\n);\n\nCREATE TABLE employees\n(\n id INT NOT NULL,\n name VARCHAR2(100) NOT NULL\n);\n\nCREATE OR REPLACE TRIGGER trig_commit\n AFTER UPDATE OF name\n ON employees\n FOR EACH ROW\nBEGIN\n INSERT INTO employee_audit VALUES (:old.id, SYSDATE, :old.name, :new.name);\n COMMIT;\nEND;\n\nCREATE OR REPLACE TRIGGER trig_rollback\n AFTER UPDATE OF name\n ON employees\n FOR EACH ROW\nBEGIN\n INSERT INTO employee_audit VALUES (:old.id, SYSDATE, :old.name, :new.name);\n ROLLBACK;\nEND;'",
"markdown": "Reports usages of transaction management statements like COMMIT or ROLLBACK in trigger bodies.\n\nWith COMMIT or ROLLBACK statements in a trigger body, the trigger will not compile.\nThe fail happens because triggers start during transactions. When the trigger starts the current transaction is still not complete. As\nCOMMIT\nterminates a transaction, both statements (COMMIT and ROLLBACK) would lead to an exception.\nChanges that are executed in a trigger should be committed (or rolled back) by the owning transaction that started the trigger.\n\nExample (Oracle):\n\n CREATE TABLE employee_audit\n (\n id INT NOT NULL,\n update_date DATE NOT NULL,\n old_name VARCHAR2(100),\n new_name VARCHAR2(100)\n );\n\n CREATE TABLE employees\n (\n id INT NOT NULL,\n name VARCHAR2(100) NOT NULL\n );\n\n CREATE OR REPLACE TRIGGER trig_commit\n AFTER UPDATE OF name\n ON employees\n FOR EACH ROW\n BEGIN\n INSERT INTO employee_audit VALUES (:old.id, SYSDATE, :old.name, :new.name);\n COMMIT;\n END;\n\n CREATE OR REPLACE TRIGGER trig_rollback\n AFTER UPDATE OF name\n ON employees\n FOR EACH ROW\n BEGIN\n INSERT INTO employee_audit VALUES (:old.id, SYSDATE, :old.name, :new.name);\n ROLLBACK;\n END;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlTransactionStatementInTrigger",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OraMissingBodyInspection",
"shortDescription": {
"text": "Missing body for package/object type specification"
},
"fullDescription": {
"text": "Reports package and object type specifications that are missing body declarations. Package specifications and object types that declare routines as well as package specifications with cursors must have body declarations where those routines and cursors are implemented. Absence of a body leads to a runtime error when routines or cursors are invoked in program code. Example (Oracle): 'CREATE OR REPLACE PACKAGE ppp IS\n FUNCTION foo(a INT) RETURN INT;\nEND;'",
"markdown": "Reports package and object type specifications that are missing body declarations.\n\nPackage specifications and object types that declare routines as well as package specifications with cursors must have body\ndeclarations where those routines and cursors are implemented. Absence of a body leads to a runtime error when routines or cursors are\ninvoked in program code.\n\nExample (Oracle):\n\n CREATE OR REPLACE PACKAGE ppp IS\n FUNCTION foo(a INT) RETURN INT;\n END;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlMissingBody",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Oracle",
"index": 224,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlCheckUsingColumnsInspection",
"shortDescription": {
"text": "Check using clause columns"
},
"fullDescription": {
"text": "Reports columns in the USING clause that does not exist in both tables. Example (MySQL): 'CREATE TABLE t1 (i INT, j INT);\nCREATE TABLE t2 (k INT, l INT);\nSELECT * FROM t1 JOIN t2 USING (j);' In USING clauses, a column name must be present in both tables, and the SELECT query will automatically join those tables by using the given column name. As we do not have the 'j' column in 't2', we can rewrite the query using ON. The ON clause can join tables where the column names do not match in both tables. 'SELECT * FROM t1 JOIN t2 ON t1.j = t2.l;'",
"markdown": "Reports columns in the USING clause that does not exist in both tables.\n\nExample (MySQL):\n\n CREATE TABLE t1 (i INT, j INT);\n CREATE TABLE t2 (k INT, l INT);\n SELECT * FROM t1 JOIN t2 USING (j);\n\nIn USING clauses, a column name must be present in both tables, and the SELECT query will automatically join\nthose tables by using the given column name. As we do not have the `j` column in `t2`, we can\nrewrite the query using ON. The ON clause can join tables where the column names do not match in both tables.\n\n SELECT * FROM t1 JOIN t2 ON t1.j = t2.l;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlCheckUsingColumns",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlConstantConditionInspection",
"shortDescription": {
"text": "Constant condition"
},
"fullDescription": {
"text": "Reports conditions in WHERE or JOIN clauses that are always TRUE or always FALSE. Example (MySQL): 'CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);\nSELECT a FROM t1 WHERE 'Cat' = 'Cat';' The ''Cat' = 'Cat'' is always true and will be reported.",
"markdown": "Reports conditions in WHERE or JOIN clauses that are always TRUE or always FALSE.\n\nExample (MySQL):\n\n CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);\n SELECT a FROM t1 WHERE 'Cat' = 'Cat';\n\nThe `'Cat' = 'Cat'` is always true and will be reported."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlConstantCondition",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlInsertIntoGeneratedColumnInspection",
"shortDescription": {
"text": "Insertion into generated columns"
},
"fullDescription": {
"text": "Reports INSERT statements that assign values to generated columns. Generated columns can be read, but their values can not be directly written. Example (PostgreSQL): 'CREATE TABLE foo\n(\n col1 INT,\n col2 INT GENERATED ALWAYS AS (col1 + 1) STORED\n);\nINSERT INTO foo(col1, col2) VALUES (1, 2);'\n You cannot insert '2' into the 'col2' column because this column is generated. For this script to work, you can change '2' to DEFAULT. 'INSERT INTO foo(col1, col2) VALUES (1, DEFAULT);'",
"markdown": "Reports INSERT statements that assign values to generated columns. Generated columns can be read, but their values can not be directly written.\n\nExample (PostgreSQL):\n\n CREATE TABLE foo\n (\n col1 INT,\n col2 INT GENERATED ALWAYS AS (col1 + 1) STORED\n );\n INSERT INTO foo(col1, col2) VALUES (1, 2);\n\nYou cannot insert `2` into the `col2` column because this column is generated.\nFor this script to work, you can change `2` to DEFAULT.\n`INSERT INTO foo(col1, col2) VALUES (1, DEFAULT);`"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlInsertIntoGeneratedColumn",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MsOrderByInspection",
"shortDescription": {
"text": "ORDER BY in queries"
},
"fullDescription": {
"text": "Reports usages when the 'ORDER BY' clause is used without 'TOP', 'OFFSET', or 'FOR XML' in views, inline functions, derived tables, subqueries, and common table expressions. For more information about usages of 'ORDER BY', see SELECT - ORDER BY Clause (Transact-SQL) at docs.microsoft.com. Example (Microsoft SQL server): 'CREATE TABLE foo (a INT NOT NULL, b INT NOT NULL);\n\nSELECT *\nFROM (SELECT a, b\nFROM foo A\nWHERE a < 89\nORDER BY b) ALIAS;' In a subquery, ORDER BY will be highlighted as an error. You can add TOP, OFFSET, or FOR XML to a subquery. Alternatively, use the Delete element quick-fix to delete the ORDER BY section. After the quick-fix is applied: 'SELECT *\nFROM (SELECT a, b\nFROM foo A\nWHERE a < 89) ALIAS;'",
"markdown": "Reports usages when the `ORDER BY` clause is used without `TOP`, `OFFSET`, or `FOR XML` in views, inline functions, derived tables, subqueries, and common table expressions.\n\nFor more information about usages of `ORDER BY`, see [SELECT - ORDER BY Clause (Transact-SQL) at\ndocs.microsoft.com](https://docs.microsoft.com/en-us/sql/t-sql/queries/select-order-by-clause-transact-sql).\n\nExample (Microsoft SQL server):\n\n CREATE TABLE foo (a INT NOT NULL, b INT NOT NULL);\n\n SELECT *\n FROM (SELECT a, b\n FROM foo A\n WHERE a < 89\n ORDER BY b) ALIAS;\n\nIn a subquery, ORDER BY will be highlighted as an error. You can add TOP, OFFSET, or FOR XML to a subquery.\nAlternatively, use the **Delete element** quick-fix to delete the ORDER BY section.\n\nAfter the quick-fix is applied:\n\n SELECT *\n FROM (SELECT a, b\n FROM foo A\n WHERE a < 89) ALIAS;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "MsOrderBy",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "SQL server",
"index": 192,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlDeprecateTypeInspection",
"shortDescription": {
"text": "Deprecated type"
},
"fullDescription": {
"text": "Reports usages of types that are deprecated and might disappear in future versions of DBMS. Reported types: LONG in Oracle (see Deprecated and Desupported Features at docs.oracle.com). TEXT, NTEXT, and IMAGE in Microsoft SQL Server (see Deprecated Database Engine Features in SQL Server 2016 at docs.microsoft.com). Example (Oracle): 'CREATE TABLE ot.foo(\na NUMBER GENERATED BY DEFAULT AS IDENTITY,\nb LONG NOT NULL\n);'",
"markdown": "Reports usages of types that are deprecated and might disappear in future versions of DBMS.\n\nReported types:\n\n* LONG in Oracle (see [Deprecated\n and Desupported Features at docs.oracle.com](https://docs.oracle.com/cd/A91202_01/901_doc/server.901/a90120/ch4_dep.htm#6690)).\n* TEXT, NTEXT, and IMAGE in Microsoft SQL Server (see [Deprecated Database Engine Features in SQL Server 2016 at docs.microsoft.com](https://docs.microsoft.com/en-us/sql/database-engine/deprecated-database-engine-features-in-sql-server-2016?view=sql-server-ver15)).\n\nExample (Oracle):\n\n CREATE TABLE ot.foo(\n a NUMBER GENERATED BY DEFAULT AS IDENTITY,\n b LONG NOT NULL\n );\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlDeprecateType",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlGotoInspection",
"shortDescription": {
"text": "Usages of GOTO statements"
},
"fullDescription": {
"text": "Reports usages of backward GOTO statements and GOTO statements used to exit a loop. The extensive use of GOTO statements is generally not recommended. For details, see GOTO statement in SQL procedures at ibm.com. Instead of jumping back to a previous statement using GOTO, consider using a loop. Instead of exiting the WHILE loop with GOTO, consider using other control-of-flow statements (for example, RETURN or BREAK). Example (Oracle): 'CREATE PROCEDURE test(n INT) AS\nDECLARE\n x INT;\nBEGIN\n x := 0;\n GOTO a;\n <<a>> x := 1;\n IF (n = 0) THEN\n GOTO a;\n END IF;\n WHILE TRUE\n LOOP\n GOTO b;\n END LOOP;\n <<b>> x := 3;\nEND;'",
"markdown": "Reports usages of backward GOTO statements and GOTO statements used to exit a loop.\n\nThe extensive use of GOTO statements is generally\nnot recommended. For details, see [GOTO statement in\nSQL\nprocedures at ibm.com](https://www.ibm.com/docs/no/db2/11.5?topic=procedures-goto-statement-in-sql).\n\nInstead of jumping back to a previous statement using GOTO, consider using a loop.\n\nInstead of exiting the WHILE loop with GOTO, consider using other control-of-flow statements (for example, RETURN or BREAK).\n\nExample (Oracle):\n\n CREATE PROCEDURE test(n INT) AS\n DECLARE\n x INT;\n BEGIN\n x := 0;\n GOTO a;\n <<a>> x := 1;\n IF (n = 0) THEN\n GOTO a;\n END IF;\n WHILE TRUE\n LOOP\n GOTO b;\n END LOOP;\n <<b>> x := 3;\n END;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlGoto",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MysqlLoadDataPathInspection",
"shortDescription": {
"text": "LOAD statement path"
},
"fullDescription": {
"text": "Reports paths that start with the tilde character in LOAD statements. Example (MySQL): 'CREATE TABLE table_name (id int);\nLOAD DATA LOCAL INFILE '~/Documents/some_file.txt'\nINTO TABLE table_name FIELDS TERMINATED BY ',' LINES TERMINATED BY '\\n'\nIGNORE 1 LINES;' Instead of the tilde character, use a full path to the file.",
"markdown": "Reports paths that start with the tilde character in LOAD statements.\n\nExample (MySQL):\n\n CREATE TABLE table_name (id int);\n LOAD DATA LOCAL INFILE '~/Documents/some_file.txt'\n INTO TABLE table_name FIELDS TERMINATED BY ',' LINES TERMINATED BY '\\n'\n IGNORE 1 LINES;\n\nInstead of the tilde character, use a full path to the file."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MysqlLoadDataPath",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "MySQL",
"index": 241,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlDtInspection",
"shortDescription": {
"text": "Ill-formed date/time literals"
},
"fullDescription": {
"text": "Reports errors in date and time literals. This inspection is available in MySQL, Oracle, Db2, and H2. Example (MySQL): 'SELECT TIME '10 -12:13:14' FROM dual;\nSELECT TIME ' 12 : 13 : 14 ' FROM dual;\nSELECT TIME '12 13 14' FROM dual;\nSELECT TIME '12-13-14' FROM dual;\nSELECT TIME '12.13.14' FROM dual;\nSELECT TIME '12:13:' FROM dual;\nSELECT TIME '12:13' FROM dual;\nSELECT TIME '12:' FROM dual;' In this example, dates ignore the MySQL standard for date and time literals. Therefore, they will be highlighted. For more information about date and time literals in MySQL, see Date and Time Literals at dev.mysql.com. The following date and type literals are valid for MySQL. 'SELECT TIME '12:13:14' FROM dual;\nSELECT TIME '12:13:14.555' FROM dual;\nSELECT TIME '12:13:14.' FROM dual;\nSELECT TIME '-12:13:14' FROM dual;\nSELECT TIME '10 12:13:14' FROM dual;\nSELECT TIME '-10 12:13:14' FROM dual;'",
"markdown": "Reports errors in date and time literals. This inspection is available in MySQL, Oracle, Db2, and H2.\n\nExample (MySQL):\n\n SELECT TIME '10 -12:13:14' FROM dual;\n SELECT TIME ' 12 : 13 : 14 ' FROM dual;\n SELECT TIME '12 13 14' FROM dual;\n SELECT TIME '12-13-14' FROM dual;\n SELECT TIME '12.13.14' FROM dual;\n SELECT TIME '12:13:' FROM dual;\n SELECT TIME '12:13' FROM dual;\n SELECT TIME '12:' FROM dual;\n\nIn this example, dates ignore the MySQL standard for date and time literals. Therefore, they will be highlighted.\nFor more information about date and time literals in MySQL, see [Date and Time Literals at dev.mysql.com](https://dev.mysql.com/doc/refman/8.0/en/date-and-time-literals.html).\n\nThe following date and type literals are valid for MySQL.\n\n SELECT TIME '12:13:14' FROM dual;\n SELECT TIME '12:13:14.555' FROM dual;\n SELECT TIME '12:13:14.' FROM dual;\n SELECT TIME '-12:13:14' FROM dual;\n SELECT TIME '10 12:13:14' FROM dual;\n SELECT TIME '-10 12:13:14' FROM dual;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlDateTime",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlNoDataSourceInspection",
"shortDescription": {
"text": "No data sources configured"
},
"fullDescription": {
"text": "Reports the absence of data sources in the Database tool window (View | Tool Windows | Database).",
"markdown": "Reports the absence of data sources in the **Database** tool window (**View \\| Tool Windows \\| Database**)."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlNoDataSourceInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlConstantExpressionInspection",
"shortDescription": {
"text": "Constant expression"
},
"fullDescription": {
"text": "Reports conditions and expressions that are always true, false or null. Example (MySQL): 'CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);\nSELECT a FROM t1 WHERE 'Cat' = 'Cat';\nSELECT a FROM t1 WHERE 'Cat' = null;' The ''Cat' = 'Cat'' is always true and will be reported. The ''Cat' = null' is always null and will be reported.",
"markdown": "Reports conditions and expressions that are always true, false or null.\n\nExample (MySQL):\n\n CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);\n SELECT a FROM t1 WHERE 'Cat' = 'Cat';\n SELECT a FROM t1 WHERE 'Cat' = null;\n\nThe `'Cat' = 'Cat'` is always true and will be reported.\n\nThe `'Cat' = null` is always null and will be reported."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlConstantExpression",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OraUnmatchedForwardDeclarationInspection",
"shortDescription": {
"text": "Forward declaration without definition"
},
"fullDescription": {
"text": "Reports declarations of procedures and functions that are missing their implementation in code. In Oracle, you can declare a procedure or a function without its body, and write the implementation later. The inspection will report names of such procedures or functions that are left without implementation. Example (Oracle): 'DECLARE PROCEDURE foo(a int, b varchar2);\nBEGIN\n NULL;\nEND;' The 'foo' procedure is declared but is missing implementation. We can add the implementation to get rid of the error. 'DECLARE PROCEDURE foo(a int, b varchar2);\n PROCEDURE foo(a int, b varchar2) IS\nBEGIN\n NULL;\nEND;\nBEGIN\n NULL;\nEND;'",
"markdown": "Reports declarations of procedures and functions that are missing their implementation in code.\n\nIn Oracle, you can declare a procedure or a function without its body, and write the implementation later. The inspection will report names\nof such procedures or functions that are left without implementation.\n\nExample (Oracle):\n\n DECLARE PROCEDURE foo(a int, b varchar2);\n BEGIN\n NULL;\n END;\n\nThe `foo` procedure is declared but is missing implementation. We can add the implementation to get rid of the error.\n\n DECLARE PROCEDURE foo(a int, b varchar2);\n PROCEDURE foo(a int, b varchar2) IS\n BEGIN\n NULL;\n END;\n BEGIN\n NULL;\n END;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "SqlUnmatchedForwardDeclaration",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Oracle",
"index": 224,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlWithoutWhereInspection",
"shortDescription": {
"text": "Delete or update statement without where clauses"
},
"fullDescription": {
"text": "Reports usages of DELETE or UPDATE statements without WHERE clauses. Without WHERE clauses, DELETE drops all the data from the table, and UPDATE overwrites values for all the table rows. Example (MySQL): 'CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);\nupdate t1 set a = 'Smith';\ndelete from t1;'",
"markdown": "Reports usages of DELETE or UPDATE statements without WHERE clauses.\n\nWithout WHERE clauses, DELETE drops all the data from the table, and UPDATE overwrites values for all the table rows.\n\nExample (MySQL):\n\n CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);\n update t1 set a = 'Smith';\n delete from t1;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlWithoutWhere",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MongoJSSideEffectsInspection",
"shortDescription": {
"text": "Statement with side effects"
},
"fullDescription": {
"text": "Reports statements that can cause side effects while the data source is in read-only mode. For more information about enabling read-only mode, see Enable read-only mode for a connection in the IDE documentation. The Disable read-only mode quick-fix turns off the read-only mode for the respective data source. Example: 'db.my_collection.insertOne()'",
"markdown": "Reports statements that can cause side effects while the data source is in read-only mode.\n\nFor more information about enabling read-only mode, see\n[Enable\nread-only mode for a connection in the IDE documentation](https://www.jetbrains.com/help/datagrip/configuring-database-connections.html#enable-read-only-mode-for-a-connection).\n\nThe **Disable read-only mode** quick-fix turns off the read-only mode for the respective data source.\n\nExample:\n\n\n db.my_collection.insertOne()\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MongoJSSideEffects",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "MongoJS",
"index": 164,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MongoJSExtSideEffectsInspection",
"shortDescription": {
"text": "Statement with side effects"
},
"fullDescription": {
"text": "Reports statements that may cause side effects while the data source is in read-only mode. The quick-fix turns off the read-only mode for the respective data source. Example: 'db.my_collection.insertOne()'",
"markdown": "Reports statements that may cause side effects while the data source is in read-only mode.\n\nThe quick-fix turns off the read-only mode for the respective data source.\n\nExample:\n\n\n db.my_collection.insertOne()\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MongoJSSideEffects",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "MongoJS",
"index": 164,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlUnusedSubqueryItemInspection",
"shortDescription": {
"text": "Unused subquery item"
},
"fullDescription": {
"text": "Reports columns, aliases, and other subquery items that are not referenced in the outer query expression. Example (PostgreSQL): 'CREATE TABLE for_subquery(id INT);\nSELECT a, q FROM (SELECT 1 AS a, 10 AS b, 2 + 3 AS q, id\n FROM for_subquery) x;' We reference 'a' and 'q' aliases from a subquery. But the 'b' alias and the 'id' column are not referenced in the outer SELECT statement. Therefore, 'b' and 'id' are grayed out.",
"markdown": "Reports columns, aliases, and other subquery items that are not referenced in the outer query expression.\n\nExample (PostgreSQL):\n\n CREATE TABLE for_subquery(id INT);\n SELECT a, q FROM (SELECT 1 AS a, 10 AS b, 2 + 3 AS q, id\n FROM for_subquery) x;\n\nWe reference `a` and `q` aliases from a subquery. But the `b` alias and the `id` column are\nnot referenced in the outer SELECT statement. Therefore, `b` and `id` are grayed out."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlUnused",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlSideEffectsInspection",
"shortDescription": {
"text": "Statement with side effects"
},
"fullDescription": {
"text": "Reports statements that might lead to modification of a database during a read-only connection. To enable read-only mode for a connection, right-click a data source in the Database tool window (View | Tool Windows | Database) and select Properties. In the Data Sources and Drivers dialog, click the Options tab and select the Read-only checkbox. Example (MySQL): 'CREATE TABLE foo(a INT);\nINSERT INTO foo VALUES (1);' As 'CREATE TABLE' and 'INSERT INTO' statements lead to a database modification, these statements will be highlighted in read-only connection mode.",
"markdown": "Reports statements that might lead to modification of a database during a read-only connection.\n\nTo enable read-only mode for a\nconnection,\nright-click a data source in the **Database** tool window (**View \\| Tool Windows \\| Database** ) and select **Properties** .\nIn the **Data Sources and Drivers** dialog, click the **Options** tab and select the **Read-only** checkbox.\n\nExample (MySQL):\n\n CREATE TABLE foo(a INT);\n INSERT INTO foo VALUES (1);\n\nAs `CREATE TABLE` and `INSERT INTO` statements lead to a database modification, these statements will be highlighted\nin read-only connection mode."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlSideEffects",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlJoinWithoutOnInspection",
"shortDescription": {
"text": "Unsafe 'join' clause in 'delete' statement"
},
"fullDescription": {
"text": "Reports missing conditional checks for statements that might modify the whole database. For example, usages of JOIN clauses inside DELETE statements without ON or WHERE. Without conditional checks on JOIN, DELETE drops contents of the entire table. Example (MySQL): 'CREATE TABLE foo (a INT,b INT,c INT);\nCREATE TABLE bar (a INT,b INT,c INT);\n\nDELETE table1 FROM foo table1 INNER JOIN bar table2;'",
"markdown": "Reports missing conditional checks for statements that might modify the whole database.\n\nFor example, usages of JOIN clauses inside DELETE statements without ON or WHERE. Without conditional checks on JOIN, DELETE drops\ncontents of the entire table.\n\nExample (MySQL):\n\n CREATE TABLE foo (a INT,b INT,c INT);\n CREATE TABLE bar (a INT,b INT,c INT);\n\n DELETE table1 FROM foo table1 INNER JOIN bar table2;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlJoinWithoutOn",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlDropIndexedColumnInspection",
"shortDescription": {
"text": "Index is dependent on column"
},
"fullDescription": {
"text": "Reports cases when you try to drop columns from indexed tables. This inspection is available in Microsoft SQL Server and Sybase ASE. Example (Microsoft SQL Server): 'CREATE TABLE test_index\n(\ncol INT NOT NULL,\ncol2 INT NOT NULL,\ncol3 INT NOT NULL UNIQUE,\ncol4 VARCHAR(200)\n);\n\nCREATE UNIQUE INDEX aaaa ON test_index (col, col2);\n\nALTER TABLE test_index\nDROP COLUMN col;' You cannot delete the 'col' column because it is in the indexed table. To delete the column, you need to delete the 'aaaa' index first (for example, DROP INDEX aaaa).",
"markdown": "Reports cases when you try to drop columns from indexed tables. This inspection is available in Microsoft SQL Server and Sybase ASE.\n\nExample (Microsoft SQL Server):\n\n CREATE TABLE test_index\n (\n col INT NOT NULL,\n col2 INT NOT NULL,\n col3 INT NOT NULL UNIQUE,\n col4 VARCHAR(200)\n );\n\n CREATE UNIQUE INDEX aaaa ON test_index (col, col2);\n\n ALTER TABLE test_index\n DROP COLUMN col;\n\nYou cannot delete the `col` column because it is in the indexed table. To delete the column, you need to delete the\n`aaaa` index first (for example, DROP INDEX aaaa)."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlDropIndexedColumn",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlTypeInspection",
"shortDescription": {
"text": "Types compatibility"
},
"fullDescription": {
"text": "Reports type-related errors.",
"markdown": "Reports type-related errors."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlType",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlUnicodeStringLiteralInspection",
"shortDescription": {
"text": "Unicode usage in SQL"
},
"fullDescription": {
"text": "Reports string literals that use national characters without the 'N' prefix. Without the N prefix, the string is converted to the default code page of the database. This default code page may not recognize certain characters. For more information, see nchar and nvarchar (Transact-SQL) at docs.microsoft.com. Example (Microsoft SQL Server): 'SELECT 'abcde' AS a;\nSELECT N'abcde' AS b;\nSELECT 'абвгд' AS c;\nSELECT N'абвгд' AS d;' The 'SELECT 'абвгд' AS c;' does not have the 'N' prefix, the ''абвгд'' part will be highlighted.",
"markdown": "Reports string literals that use national characters without the `N` prefix.\n\nWithout the N prefix, the string is converted to the default\ncode page of the database. This default code page may not recognize certain characters. For more information, see\n[nchar and nvarchar\n(Transact-SQL)\nat docs.microsoft.com](https://docs.microsoft.com/en-us/sql/t-sql/data-types/nchar-and-nvarchar-transact-sql).\n\nExample (Microsoft SQL Server):\n\n SELECT 'abcde' AS a;\n SELECT N'abcde' AS b;\n SELECT 'абвгд' AS c;\n SELECT N'абвгд' AS d;\n\nThe `SELECT 'абвгд' AS c;` does not have the `N` prefix, the `'абвгд'` part will be highlighted."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlUnicodeStringLiteral",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlUnusedVariableInspection",
"shortDescription": {
"text": "Unused variable"
},
"fullDescription": {
"text": "Reports unused arguments, variables, or parameters. Example (PostgreSQL): 'CREATE FUNCTION foo(PARAMUSED INT, PARAMUNUSED INT) RETURNS INT AS\n$$\nBEGIN\n RETURN PARAMUSED;\nEND\n$$ LANGUAGE plpgsql;' The 'PARAMUNUSED' parameter is not used in the function and might be deleted.",
"markdown": "Reports unused arguments, variables, or parameters.\n\nExample (PostgreSQL):\n\n CREATE FUNCTION foo(PARAMUSED INT, PARAMUNUSED INT) RETURNS INT AS\n $$\n BEGIN\n RETURN PARAMUSED;\n END\n $$ LANGUAGE plpgsql;\n\nThe `PARAMUNUSED` parameter is not used in the function and might be deleted."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlUnused",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PgSelectFromProcedureInspection",
"shortDescription": {
"text": "Postgres: Select from procedure call"
},
"fullDescription": {
"text": "Reports situations when you make SELECT from a function or a DBLINK without an alias with a type (for example, 'AS t1(s VARCHAR)'). This requirement does not apply to scalar functions. Example (PostgreSQL): 'CREATE FUNCTION produce_a_table() RETURNS RECORD AS $$\nSELECT 1;\n$$ LANGUAGE sql;\nSELECT * FROM produce_a_table() AS s (c1 INT);\nSELECT * FROM produce_a_table() AS s (c1);\nSELECT * FROM DBLINK('dbname=mydb', 'SELECT proname, prosrc FROM pg_proc') AS t1;' The 'AS s (c1 INT)' has a typed alias, while 'AS s (c1)' and 'AS t1' do not. In this case, the second call of 'produce_a_table()' and 'DBLINK()' will be highlighted.",
"markdown": "Reports situations when you make SELECT from a function or a DBLINK without an alias with a type (for example, `AS t1(s VARCHAR)`).\n\nThis requirement does not apply to scalar functions.\n\nExample (PostgreSQL):\n\n CREATE FUNCTION produce_a_table() RETURNS RECORD AS $$\n SELECT 1;\n $$ LANGUAGE sql;\n SELECT * FROM produce_a_table() AS s (c1 INT);\n SELECT * FROM produce_a_table() AS s (c1);\n SELECT * FROM DBLINK('dbname=mydb', 'SELECT proname, prosrc FROM pg_proc') AS t1;\n\nThe `AS s (c1 INT)` has a typed alias, while `AS s (c1)` and `AS t1` do not.\nIn this case, the second call of `produce_a_table()` and `DBLINK()` will be highlighted."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PgSelectFromProcedure",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "PostgreSQL",
"index": 252,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlStorageInspection",
"shortDescription": {
"text": "SQL source modification detection"
},
"fullDescription": {
"text": "Reports situations when source code of a database object has been changed. The inspection is triggered when you perform database or object introspection. The introspection is run when you open source code of an object, run statements, and perform code refactoring. Also, you can run introspection by right-clicking an object and selecting Refresh. The inspection covers the following situations: Object source code was changed in the database but code in the editor was not updated. Works in PostgreSQL, Microsoft SQL Server, Oracle, and Sybase ASE. You changed the object source code, introspected the database, but source code has been already changed by someone else. The database introspector was updated in the IDE and you need to download new object properties that were missing in the previous introspector version.",
"markdown": "Reports situations when source code of a database object has been changed.\n\nThe inspection is triggered when you perform database or object introspection. The introspection is run when you open source code of an\nobject, run statements, and perform code refactoring.\nAlso, you can run introspection by right-clicking an object and selecting **Refresh**.\n\nThe inspection covers the following situations:\n\n* Object source code was changed in the database but code in the editor was not updated. Works in PostgreSQL, Microsoft SQL Server, Oracle, and Sybase ASE.\n* You changed the object source code, introspected the database, but source code has been already changed by someone else.\n* The database introspector was updated in the IDE and you need to download new object properties that were missing in the previous introspector version."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlStorageInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlSignatureInspection",
"shortDescription": {
"text": "Function signature"
},
"fullDescription": {
"text": "Reports signature issues for built-in functions. The inspection will report a wrong number of arguments, invalid keywords, wrong data types, and other issues. Example (MySQL): 'CREATE TABLE foo (a INT, b INT, c INT)\n\nSELECT IFNULL() FROM foo; -- error\nSELECT IFNULL(a) FROM foo; -- error\nSELECT IFNULL(a, b) FROM foo; -- OK\nSELECT IFNULL(a, b, c) FROM foo; -- error' In MySQL, the 'IFNULL()' function accepts strictly two arguments. So, only the 'SELECT IFNULL(a, b) FROM foo;' query is correct.",
"markdown": "Reports signature issues for built-in functions.\n\nThe inspection will report a wrong number of arguments, invalid keywords, wrong data types, and other issues.\n\nExample (MySQL):\n\n CREATE TABLE foo (a INT, b INT, c INT)\n\n SELECT IFNULL() FROM foo; -- error\n SELECT IFNULL(a) FROM foo; -- error\n SELECT IFNULL(a, b) FROM foo; -- OK\n SELECT IFNULL(a, b, c) FROM foo; -- error\n\nIn MySQL, the `IFNULL()` function accepts strictly two arguments. So, only the `SELECT IFNULL(a, b) FROM foo;`\nquery is correct."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlSignature",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlRedundantOrderingDirectionInspection",
"shortDescription": {
"text": "Redundant ordering direction"
},
"fullDescription": {
"text": "Reports redundant ordering directions like ASC and DESC in ORDER BY clauses. Example (MySQL): 'CREATE TABLE foo(a INT, b INT, c INT);\nSELECT * FROM foo ORDER BY a ASC, b DESC, c ASC;' The ORDER BY keyword sorts the records in the ascending order by default. So, the 'ASC' keyword for 'a' and 'c' columns is redundant.",
"markdown": "Reports redundant ordering directions like ASC and DESC in ORDER BY clauses.\n\nExample (MySQL):\n\n CREATE TABLE foo(a INT, b INT, c INT);\n SELECT * FROM foo ORDER BY a ASC, b DESC, c ASC;\n\nThe ORDER BY keyword sorts the records in the ascending order by default. So, the `ASC` keyword for `a` and\n`c` columns is redundant."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlRedundantOrderingDirection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OraOverloadInspection",
"shortDescription": {
"text": "Overloading errors"
},
"fullDescription": {
"text": "Reports invalid cases of subprogram overloading in Oracle. Example (Oracle): 'DECLARE\n SUBTYPE fff IS BINARY_INTEGER;\n SUBTYPE ggg IS NATURAL;\n PROCEDURE foo (a IN ggg) IS BEGIN NULL; END;\n PROCEDURE foo (a IN fff) IS BEGIN NULL; END;\nBEGIN\n NULL;\nEND;' You cannot overload subprograms which parameters differ only in subtypes. For example, you cannot overload procedures where one accepts a BINARY INTEGER parameter and the other accepts a NATURAL parameter. For more information about restrictions on procedure overloading, see Restrictions on Overloading at docs.oracle.com.",
"markdown": "Reports invalid cases of subprogram overloading in Oracle.\n\nExample (Oracle):\n\n DECLARE\n SUBTYPE fff IS BINARY_INTEGER;\n SUBTYPE ggg IS NATURAL;\n PROCEDURE foo (a IN ggg) IS BEGIN NULL; END;\n PROCEDURE foo (a IN fff) IS BEGIN NULL; END;\n BEGIN\n NULL;\n END;\n\nYou cannot overload subprograms which parameters differ only in subtypes. For example, you cannot overload procedures where one accepts a\nBINARY INTEGER parameter and the other accepts a NATURAL parameter. For more information about restrictions on procedure overloading,\nsee [Restrictions on Overloading at docs.oracle.com](https://docs.oracle.com/cd/B19306_01/appdev.102/b14261/subprograms.htm)."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlOverload",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Oracle",
"index": 224,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MysqlSpaceAfterFunctionNameInspection",
"shortDescription": {
"text": "Whitespace between the function name and the open parenthesis"
},
"fullDescription": {
"text": "Reports any whitespace in a function call between the function name and the open parenthesis, which is not supported by default. Example (MySQL): 'SELECT MAX (qty) FROM orders;'",
"markdown": "Reports any whitespace in a function call between the function name and the open parenthesis, which is not supported by default.\n\nExample (MySQL):\n\n SELECT MAX (qty) FROM orders;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "MysqlSpaceAfterFunctionName",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "MySQL",
"index": 241,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlAutoIncrementDuplicateInspection",
"shortDescription": {
"text": "Auto-increment duplicate"
},
"fullDescription": {
"text": "Reports tables that contain two columns with an automatic increment. In MySQL, Microsoft SQL Server, and Db2 dialects, a table can have only one field with a auto-increment option, and this field must be a key. Example (MySQL): 'CREATE TABLE my_table\n(\n id INT AUTO_INCREMENT,\n c2 INT AUTO_INCREMENT,\n);' The AUTO_INCREMENT constraint for 'c2' will be highlighted as 'c1' already has this constraint. To fix the warning, you can make 'id' a primary key and delete AUTO_INCREMENT for 'c2'. 'CREATE TABLE my_table\n(\n id INT AUTO_INCREMENT PRIMARY KEY,\n c2 INT,\n);'",
"markdown": "Reports tables that contain two columns with an automatic increment. In MySQL, Microsoft SQL Server, and Db2 dialects, a table can have only one field with a auto-increment option, and this field must be a key.\n\nExample (MySQL):\n\n CREATE TABLE my_table\n (\n id INT AUTO_INCREMENT,\n c2 INT AUTO_INCREMENT,\n );\n\nThe AUTO_INCREMENT constraint for `c2` will be highlighted as `c1` already has this constraint. To fix the warning,\nyou can make `id` a primary key and delete AUTO_INCREMENT for `c2`.\n\n CREATE TABLE my_table\n (\n id INT AUTO_INCREMENT PRIMARY KEY,\n c2 INT,\n );\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlAutoIncrementDuplicate",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlStringLengthExceededInspection",
"shortDescription": {
"text": "Implicit string truncation"
},
"fullDescription": {
"text": "Reports variables that exceed the defined length in characters. Example (Microsoft SQL Server): 'CREATE PROCEDURE test() AS\nBEGIN\nDECLARE myVarOk VARCHAR(5) = 'abcde';\nDECLARE myVarExceeded VARCHAR(5) = 'abcde12345';\n\nSET myVarOk = 'xyz';\nSET myVarExceeded = '123456789';\nEND;' The 'myVarExceeded' variable is defined as 'VARCHAR(5)' but both assigned values (''abcde12345'' and ''123456789'') exceed this limitation. You can truncate assigned values or increase the defined length. To increase the length, use the Increase type length quick-fix. After the quick-fix is applied: 'CREATE PROCEDURE test() AS\nBEGIN\nDECLARE myVarOk VARCHAR(5) = 'abcde';\nDECLARE myVarExceeded VARCHAR(10) = 'abcde12345';\n\nSET myVarOk = 'xyz';\nSET myVarExceeded = '123456789';\nEND;'",
"markdown": "Reports variables that exceed the defined length in characters.\n\nExample (Microsoft SQL Server):\n\n CREATE PROCEDURE test() AS\n BEGIN\n DECLARE myVarOk VARCHAR(5) = 'abcde';\n DECLARE myVarExceeded VARCHAR(5) = 'abcde12345';\n\n SET myVarOk = 'xyz';\n SET myVarExceeded = '123456789';\n END;\n\nThe `myVarExceeded` variable is defined as `VARCHAR(5)` but both assigned values (`'abcde12345'` and\n`'123456789'`) exceed this limitation. You can truncate assigned values or increase the defined length.\nTo increase the length, use the **Increase type length** quick-fix.\n\nAfter the quick-fix is applied:\n\n CREATE PROCEDURE test() AS\n BEGIN\n DECLARE myVarOk VARCHAR(5) = 'abcde';\n DECLARE myVarExceeded VARCHAR(10) = 'abcde12345';\n\n SET myVarOk = 'xyz';\n SET myVarExceeded = '123456789';\n END;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlStringLengthExceeded",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlCallNotationInspection",
"shortDescription": {
"text": "Using of named and positional arguments"
},
"fullDescription": {
"text": "Reports calls in which positional arguments go after the named ones. Works in PostgreSQL, Oracle, and Db2. Example (In PostgreSQL): 'CREATE FUNCTION foo(a int, b int, c int) RETURNS int\n LANGUAGE plpgsql AS\n$$\nBEGIN\n RETURN a + b + c;\nEND\n$$;\nSELECT foo(a => 1, b => 2, c => 3);\n -- `3` goes after the named argument\nSELECT foo(1, b => 2, 3);\n -- `1` and `3` go after the named argument\nSELECT foo(b => 2, 1, 3);'",
"markdown": "Reports calls in which positional arguments go after the named ones. Works in PostgreSQL, Oracle, and Db2.\n\nExample (In PostgreSQL):\n\n CREATE FUNCTION foo(a int, b int, c int) RETURNS int\n LANGUAGE plpgsql AS\n $$\n BEGIN\n RETURN a + b + c;\n END\n $$;\n SELECT foo(a => 1, b => 2, c => 3);\n -- `3` goes after the named argument\n SELECT foo(1, b => 2, 3);\n -- `1` and `3` go after the named argument\n SELECT foo(b => 2, 1, 3);\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "SqlCallNotation",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MysqlParsingInspection",
"shortDescription": {
"text": "Unsupported syntax in pre-8.0 versions"
},
"fullDescription": {
"text": "Reports invalid usages of UNION in queries. The inspection works in MySQL versions that are earlier than 8.0. Example (MySQL): 'SELECT * FROM (SELECT 1 UNION (SELECT 1 UNION SELECT 2)) a;'",
"markdown": "Reports invalid usages of UNION in queries.\n\nThe inspection works in MySQL versions that are earlier than 8.0.\n\nExample (MySQL):\n\n\n SELECT * FROM (SELECT 1 UNION (SELECT 1 UNION SELECT 2)) a;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MysqlParsing",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "MySQL",
"index": 241,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlShadowingAliasInspection",
"shortDescription": {
"text": "Column is shadowed by alias"
},
"fullDescription": {
"text": "Reports SELECT aliases with names that match column names in the FROM clause. Example (MySQL): 'CREATE TABLE foo (a INT, b INT, c INT);\nSELECT a b, c FROM foo;' The 'a' column uses the 'b' alias but the 'b' name is also used by the column from the 'foo' table.",
"markdown": "Reports SELECT aliases with names that match column names in the FROM clause.\n\nExample (MySQL):\n\n CREATE TABLE foo (a INT, b INT, c INT);\n SELECT a b, c FROM foo;\n\nThe `a` column uses the `b` alias but the `b` name is also used by the column from the `foo`\ntable."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlShadowingAlias",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlUnreachableCodeInspection",
"shortDescription": {
"text": "Unreachable code"
},
"fullDescription": {
"text": "Reports unreachable statements inside SQL routines. Example (Microsoft SQL Server): 'CREATE FUNCTION foo() RETURNS INT AS\nBEGIN\n THROW;\n RETURN 1;\nEND;' In Microsoft SQL Server, the 'THROW' statement raises an exception and transfers execution to the CATCH block of the TRY...CATCH construct. Therefore, the 'RETURN 1;' part will never be executed.",
"markdown": "Reports unreachable statements inside SQL routines.\n\nExample (Microsoft SQL Server):\n\n CREATE FUNCTION foo() RETURNS INT AS\n BEGIN\n THROW;\n RETURN 1;\n END;\n\nIn Microsoft SQL Server, the `THROW` statement raises an exception and transfers execution to the CATCH block of the TRY...CATCH\nconstruct. Therefore, the `RETURN 1;` part will never be executed."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlUnreachable",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlResolveInspection",
"shortDescription": {
"text": "Unresolved reference"
},
"fullDescription": {
"text": "Reports unresolved SQL references. Example (MySQL): 'CREATE TABLE users(id INT, name VARCHAR(40));\nCREATE TABLE admins(id INT, col1 INT);\n\nSELECT users.id, admins.id FROM admins WHERE admins.id > 1;' The 'users.id' column is unresolved because the 'users' table is missing in the FROM clause.",
"markdown": "Reports unresolved SQL references.\n\nExample (MySQL):\n\n CREATE TABLE users(id INT, name VARCHAR(40));\n CREATE TABLE admins(id INT, col1 INT);\n\n SELECT users.id, admins.id FROM admins WHERE admins.id > 1;\n\nThe `users.id` column is unresolved because the `users` table is missing in the FROM clause."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "SqlResolve",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlRedundantLimitInspection",
"shortDescription": {
"text": "Redundant row limiting in queries"
},
"fullDescription": {
"text": "Reports redundant row limiting clauses like FETCH and LIMIT in queries. Example (PostgreSQL): 'CREATE TABLE foo(a INT);\n\nSELECT * FROM foo WHERE EXISTS(SELECT * FROM foo LIMIT 2);\nSELECT * FROM foo WHERE EXISTS(SELECT * FROM foo FETCH FIRST 2 ROWS ONLY);' To fix the warning, you can add OFFSET to limiting clauses. If OFFSET is missing, then LIMIT is redundant because the usage of LIMIT does not influence the operation result of EXISTS. In case with OFFSET, we skip first 'N' rows and this will influence the output. 'SELECT * FROM foo WHERE EXISTS(SELECT * FROM foo OFFSET 1 ROW LIMIT 2);\nSELECT * FROM foo WHERE EXISTS(SELECT * FROM foo OFFSET 1 ROW FETCH FIRST 2 ROWS ONLY);'",
"markdown": "Reports redundant row limiting clauses like FETCH and LIMIT in queries.\n\nExample (PostgreSQL):\n\n CREATE TABLE foo(a INT);\n\n SELECT * FROM foo WHERE EXISTS(SELECT * FROM foo LIMIT 2);\n SELECT * FROM foo WHERE EXISTS(SELECT * FROM foo FETCH FIRST 2 ROWS ONLY);\n\nTo fix the warning, you can add OFFSET to limiting clauses. If OFFSET is missing, then LIMIT is redundant because\nthe usage of LIMIT does not influence the operation result of EXISTS. In case with OFFSET, we skip first `N` rows and this will\ninfluence the output.\n\n SELECT * FROM foo WHERE EXISTS(SELECT * FROM foo OFFSET 1 ROW LIMIT 2);\n SELECT * FROM foo WHERE EXISTS(SELECT * FROM foo OFFSET 1 ROW FETCH FIRST 2 ROWS ONLY);\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlRedundantLimit",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlDerivedTableAliasInspection",
"shortDescription": {
"text": "Each derived table should have alias"
},
"fullDescription": {
"text": "Reports derived tables without aliases. Example (MySQL): 'CREATE TABLE table1 (id INT, name VARCHAR(20), cats FLOAT);\nCREATE TABLE table2 (id INT, age INTEGER);\n\nSELECT id AS ID, name, cats, age\nFROM (SELECT table1.id, name, cats, age\nFROM table1\nJOIN table2 ON table1.id = table2.id);' According to Derived Tables at dev.mysql.com, an alias is mandatory. You can add the alias by using the Introduce alias quick-fix. After the quick-fix is applied: 'SELECT id AS ID, name, cats, age\nFROM (SELECT table1.id, name, cats, age\nFROM table1\nJOIN table2 ON table1.id = table2.id);'",
"markdown": "Reports derived tables without aliases.\n\nExample (MySQL):\n\n CREATE TABLE table1 (id INT, name VARCHAR(20), cats FLOAT);\n CREATE TABLE table2 (id INT, age INTEGER);\n\n SELECT id AS ID, name, cats, age\n FROM (SELECT table1.id, name, cats, age\n FROM table1\n JOIN table2 ON table1.id = table2.id);\n\nAccording to [Derived Tables at dev.mysql.com](https://dev.mysql.com/doc/refman/8.0/en/derived-tables.html), an alias is\nmandatory. You can add the alias by using the **Introduce alias** quick-fix.\n\nAfter the quick-fix is applied:\n\n SELECT id AS ID, name, cats, age\n FROM (SELECT table1.id, name, cats, age\n FROM table1\n JOIN table2 ON table1.id = table2.id);\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlDerivedTableAlias",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlCaseVsCoalesceInspection",
"shortDescription": {
"text": "Using CASE instead of COALESCE function and vice versa"
},
"fullDescription": {
"text": "Reports situations when CASE and COALESCE calls are interchangeable. This inspection has the following intention actions: Replace with 'COALESCE' call and the opposite one Replace with CASE expression. Example (MySQL): 'SELECT\n -- this CASE may be replaced by COALESCE\n\tCASE\n\t\tWHEN C1 IS NOT NULL THEN C1\n\t\tELSE 0\n\t\tEND\nFROM dual;' In the example, the CASE statement can be replaced with 'SELECT COALESCE(C1, 0)' that produces the same output. If you prefer using CASE expressions, select the Prefer CASE expressions over COALESCE function option on the inspection page.",
"markdown": "Reports situations when CASE and COALESCE calls are interchangeable. This inspection has the following intention actions: **Replace\nwith 'COALESCE' call** and the opposite one **Replace with CASE expression** .\n\nExample (MySQL):\n\n SELECT\n -- this CASE may be replaced by COALESCE\n \tCASE\n \t\tWHEN C1 IS NOT NULL THEN C1\n \t\tELSE 0\n \t\tEND\n FROM dual;\n\nIn the example, the CASE statement can be replaced with `SELECT COALESCE(C1, 0)` that produces the same output.\n\nIf you prefer using CASE expressions, select the **Prefer CASE expressions over COALESCE function** option on\nthe inspection page."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlCaseVsCoalesce",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlRedundantCodeInCoalesceInspection",
"shortDescription": {
"text": "Redundant code in COALESCE call"
},
"fullDescription": {
"text": "Reports all the arguments except for the first expression that does not evaluate to NULL in COALESCE functions. Example (MySQL): 'SELECT COALESCE(NULL, NULL, NULL, 42, NULL, 'string') as a;' The first NOT NULL argument is '42', all other arguments will be grayed out.",
"markdown": "Reports all the arguments except for the first expression that does not evaluate to NULL in COALESCE functions.\n\nExample (MySQL):\n\n SELECT COALESCE(NULL, NULL, NULL, 42, NULL, 'string') as a;\n\nThe first NOT NULL argument is `42`, all other arguments will be grayed out."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlRedundantCodeInCoalesce",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlAggregatesInspection",
"shortDescription": {
"text": "Aggregate-related problems"
},
"fullDescription": {
"text": "Reports invalid usages of SQL aggregate functions. The following situations are considered: Columns that are used in HAVING and ORDER BY clauses but are missed in GROUP BY clauses. 'CREATE TABLE foo(id INT PRIMARY KEY, a INT, b INT);\nSELECT a, MAX(b) FROM foo GROUP BY a HAVING b > 0;\nSELECT * FROM foo GROUP BY a ORDER BY b;' This rule does not apply when grouping is made by the primary key. 'SELECT * FROM foo GROUP BY id ORDER BY b;' Aggregate functions in a wrong context. Usually, you can use aggregate functions in the following contexts: a list of expressions in SELECT; in HAVING and ORDER BY sections; and other dialect-specific cases. The following queries will display an error. 'SELECT a FROM foo WHERE MAX(b) > 0;\nSELECT a FROM foo GROUP BY MAX(a);' Nested calls of aggregate functions. 'SELECT MAX(SUM(a)) FROM foo GROUP BY a;' This rule does not apply to analytic functions. The following query is valid and correct. 'SELECT MAX(SUM(a) OVER ()) FROM foo;' Usages of HAVING without aggregate functions. In this case, consider rewriting your code using the WHERE section. 'SELECT a, MAX(b) FROM foo GROUP BY a HAVING a > 0;'",
"markdown": "Reports invalid usages of SQL aggregate functions.\n\nThe following situations are considered:\n\n* Columns that are used in HAVING and ORDER BY clauses but are missed in GROUP BY clauses.\n\n CREATE TABLE foo(id INT PRIMARY KEY, a INT, b INT);\n SELECT a, MAX(b) FROM foo GROUP BY a HAVING b > 0;\n SELECT * FROM foo GROUP BY a ORDER BY b;\n\n This rule does not apply when grouping is made by the primary key.\n\n SELECT * FROM foo GROUP BY id ORDER BY b;\n\n* Aggregate functions in a wrong context. Usually, you can use aggregate functions in the following contexts: a list of expressions in\n SELECT; in HAVING and ORDER BY sections; and other dialect-specific cases. The following queries will display an error.\n\n SELECT a FROM foo WHERE MAX(b) > 0;\n SELECT a FROM foo GROUP BY MAX(a);\n\n* Nested calls of aggregate functions.\n\n SELECT MAX(SUM(a)) FROM foo GROUP BY a;\n\n This rule does not apply to analytic functions. The following query is valid and correct.\n\n SELECT MAX(SUM(a) OVER ()) FROM foo;\n\n* Usages of HAVING without aggregate functions. In this case, consider rewriting your code using the WHERE section.\n\n SELECT a, MAX(b) FROM foo GROUP BY a HAVING a > 0;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlAggregates",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlMissingColumnAliasesInspection",
"shortDescription": {
"text": "Missing column aliases"
},
"fullDescription": {
"text": "Reports queries without explicit aliases in output expressions (for example, in the SELECT statement). Example (PostgreSQL): 'CREATE TABLE foo(a INT, b INT);\n\nSELECT 1, a + 1 AS A2, MAX(b) AS M\nFROM foo;'",
"markdown": "Reports queries without explicit aliases in output expressions (for example, in the SELECT statement).\n\nExample (PostgreSQL):\n\n CREATE TABLE foo(a INT, b INT);\n\n SELECT 1, a + 1 AS A2, MAX(b) AS M\n FROM foo;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlMissingColumnAliases",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlAddNotNullColumnInspection",
"shortDescription": {
"text": "Adding not null column without default value"
},
"fullDescription": {
"text": "Reports attempts to create NOT NULL columns without DEFAULT values. Example (Microsoft SQL Server): 'CREATE TABLE foo (a INT, b INT)\n\nALTER TABLE foo ADD c INT NOT NULL;' By default, a column holds NULL values. In the example, we use the NOT NULL constraint that enforces a column not to accept NULL values. If we prohibit to use NULL values, we must set the DEFAULT value that SQL can use when we create a new record. 'ALTER TABLE foo ADD c INT NOT NULL DEFAULT 42;' You can quickly add the DEFAULT value by using the Add DEFAULT value quick-fix.",
"markdown": "Reports attempts to create NOT NULL columns without DEFAULT values.\n\nExample (Microsoft SQL Server):\n\n CREATE TABLE foo (a INT, b INT)\n\n ALTER TABLE foo ADD c INT NOT NULL;\n\nBy default, a column holds NULL values. In the example, we use the NOT NULL constraint that enforces a column not to accept NULL values.\nIf we prohibit to use NULL values, we must set the DEFAULT value that SQL can use when we create a new record.\n\n ALTER TABLE foo ADD c INT NOT NULL DEFAULT 42;\n\nYou can quickly add the DEFAULT value by using the **Add DEFAULT value** quick-fix."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlAddNotNullColumn",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MongoJSExtResolveInspection",
"shortDescription": {
"text": "Resolution problems"
},
"fullDescription": {
"text": "Reports unresolved references in MongoDB and JavaScript code.",
"markdown": "Reports unresolved references in MongoDB and JavaScript code."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MongoJSResolve",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "MongoJS",
"index": 164,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlIllegalCursorStateInspection",
"shortDescription": {
"text": "Illegal cursor state"
},
"fullDescription": {
"text": "Reports illegal cursor states inside SQL routines. A routine has CLOSE or FETCH statements but a cursor might be closed. A routine has the OPEN statement but a cursor might be opened. Example (Microsoft SQL Server): 'CREATE TABLE t(col INT);\n\nCREATE PROCEDURE foo() AS\nBEGIN\nDECLARE my_cursor CURSOR FOR SELECT * FROM t;\nDECLARE a INT;\nFETCH my_cursor INTO a;\nCLOSE my_cursor;\nEND;' According to CLOSE (Transact-SQL) at docs.microsoft.com, CLOSE must be issued on an open cursor, and CLOSE is not allowed on cursors that have only been declared or are already closed. So, we need to open the cursor to fix the warning. 'CREATE PROCEDURE foo() AS\nBEGIN\nDECLARE my_cursor CURSOR FOR SELECT * FROM t;\nDECLARE a INT;\nOPEN my_cursor;\nFETCH my_cursor INTO a;\nCLOSE my_cursor;\nEND;'",
"markdown": "Reports illegal cursor states inside SQL routines.\n\n* A routine has CLOSE or FETCH statements but a cursor might be closed.\n* A routine has the OPEN statement but a cursor might be opened.\n\nExample (Microsoft SQL Server):\n\n CREATE TABLE t(col INT);\n\n CREATE PROCEDURE foo() AS\n BEGIN\n DECLARE my_cursor CURSOR FOR SELECT * FROM t;\n DECLARE a INT;\n FETCH my_cursor INTO a;\n CLOSE my_cursor;\n END;\n\nAccording to [CLOSE (Transact-SQL) at\ndocs.microsoft.com](https://docs.microsoft.com/en-us/sql/t-sql/language-elements/close-transact-sql), CLOSE must be issued on an open cursor, and CLOSE is not allowed on cursors that have only been declared or are\nalready closed. So, we need to open the cursor to fix the warning.\n\n CREATE PROCEDURE foo() AS\n BEGIN\n DECLARE my_cursor CURSOR FOR SELECT * FROM t;\n DECLARE a INT;\n OPEN my_cursor;\n FETCH my_cursor INTO a;\n CLOSE my_cursor;\n END;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlIllegalCursorState",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlDuplicateColumnInspection",
"shortDescription": {
"text": "Duplicating column name in SELECT"
},
"fullDescription": {
"text": "Reports duplicated names of column aliases in SELECT lists. Example (Sybase ASE): 'CREATE TABLE t1 (a TEXT, b INT, c INT);\n\nSELECT a AS x, b AS x FROM t1;' The 'x' alias name is used for 'a' and 'b' columns. These assignments are highlighted as errors because you cannot use identical alias names for columns in Sybase ASE.",
"markdown": "Reports duplicated names of column aliases in SELECT lists.\n\nExample (Sybase ASE):\n\n CREATE TABLE t1 (a TEXT, b INT, c INT);\n\n SELECT a AS x, b AS x FROM t1;\n\nThe `x` alias name is used for `a` and `b` columns. These assignments are highlighted as errors because\nyou cannot use identical alias names for columns in Sybase ASE."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlDuplicateColumn",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SqlIdentifierInspection",
"shortDescription": {
"text": "Identifier should be quoted"
},
"fullDescription": {
"text": "Reports situations when you use SQL reserved keywords as identifier names in your query. Example (Microsoft SQL Server): 'CREATE TABLE select (identity INT IDENTITY NOT NULL, order INT NOT NULL);' We use 'select', 'identity', and 'order' as table and column names. But they are also reserved keywords in Microsoft SQL Server. Therefore, in order to use them as object names in the query, you must quote these identifiers. To quote them, you can use the Quote identifier quick-fix. After the quick-fix is applied: 'CREATE TABLE [select] ([identity] INT IDENTITY NOT NULL, [order] INT NOT NULL);'",
"markdown": "Reports situations when you use SQL reserved keywords as identifier names in your query.\n\nExample (Microsoft SQL Server):\n\n CREATE TABLE select (identity INT IDENTITY NOT NULL, order INT NOT NULL);\n\nWe use `select`, `identity`, and `order` as table and column names.\nBut they are also reserved keywords in Microsoft SQL Server.\nTherefore, in order to use them as object names in the query, you must quote these identifiers. To quote them, you can use the\n**Quote identifier** quick-fix.\n\nAfter the quick-fix is applied:\n\n CREATE TABLE [select] ([identity] INT IDENTITY NOT NULL, [order] INT NOT NULL);\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SqlIdentifier",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "SQL",
"index": 55,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "DevKit",
"version": "232.8660.185",
"rules": [
{
"id": "WorkspaceEntityMutableField",
"shortDescription": {
"text": "Unsupported 'var' field in entity"
},
"fullDescription": {
"text": "Detects unsupported 'var' fields in the inheritors of 'WorkspaceEntity' interface Interface implementing 'WorkspaceEntity' have to have only 'val' fields because it's immutable. Implementation of 'WorkspaceEntity.Builder' will be generated for the mutation",
"markdown": "Detects unsupported `var` fields in the inheritors of `WorkspaceEntity` interface\n\n\nInterface implementing `WorkspaceEntity` have to have only `val` fields because it's immutable.\nImplementation of `WorkspaceEntity.Builder` will be generated for the mutation"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "WorkspaceEntityMutableField",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Workspace model",
"index": 60,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MigrateToOptControl",
"shortDescription": {
"text": "Migrate to getOptionPane()"
},
"fullDescription": {
"text": "Reports 'createOptionsPanel()' methods in inspection implementation, which can be automatically converted to 'getOptionsPane()'. Creating inspection options control via 'createOptionsPanel()' is deprecated, in favor of declarative control description 'getOptionsPane()'. The inspection checks 'createOptionsPanel()' implementations and if they use InspectionOptionsPanel or its descendants and are simple enough, then it suggests to convert to the new API automatically. This inspection currently supports Java and Kotlin only. It cannot convert the code that uses Kotlin methods like 'apply' or 'also'. Try to inline them. New in 2023.1",
"markdown": "Reports `createOptionsPanel()` methods in inspection implementation, which can be automatically converted to `getOptionsPane()`.\n\n\nCreating inspection options control via `createOptionsPanel()` is deprecated,\nin favor of declarative control description `getOptionsPane()`.\nThe inspection checks `createOptionsPanel()` implementations and if they use\nInspectionOptionsPanel or its descendants and are simple enough, then it suggests to convert to\nthe new API automatically.\n\n\nThis inspection currently supports Java and Kotlin only.\nIt cannot convert the code that uses Kotlin methods like `apply` or `also`. Try to inline them.\n\nNew in 2023.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MigrateToOptControl",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PresentationAnnotation",
"shortDescription": {
"text": "Invalid icon path in @Presentation"
},
"fullDescription": {
"text": "Reports invalid and deprecated value for 'icon' attribute in 'com.intellij.ide.presentation.Presentation' annotation.",
"markdown": "Reports invalid and deprecated value for `icon` attribute in `com.intellij.ide.presentation.Presentation` annotation."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "PresentationAnnotation",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IntentionDescriptionNotFoundInspection",
"shortDescription": {
"text": "Intention description checker"
},
"fullDescription": {
"text": "Reports intentions that are missing an HTML description file, 'before.template' file or 'after.template' file. These are shown in Settings | Editor | Intentions. The Create description file quick-fix creates a template HTML description file.",
"markdown": "Reports intentions that are missing an HTML description file, `before.template` file or `after.template` file. These are shown in [Settings \\| Editor \\| Intentions](settings://preferences.intentionPowerPack).\n\n\nThe **Create description file** quick-fix creates a template HTML description file."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "IntentionDescriptionNotFoundInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Description file",
"index": 141,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KotlinObjectExtensionRegistration",
"shortDescription": {
"text": "Extension class is a Kotlin object"
},
"fullDescription": {
"text": "Reports extensions which are instantiated by the IntelliJ Platform, but are declared as Kotlin objects. Extensions lifecycle is managed by the IntelliJ Platform. Using Kotlin objects for extension registration may cause creation of unnecessary extension instances and make plugin unloading impossible. Example Extension registration: '<annotator language=\"myLang\" implementationClass=\"com.example.MyAnnotator\"/>' Extension implementation: '// bad:\nobject MyAnnotator : Annotator {\n ...\n}\n\n// good:\nclass MyAnnotator : Annotator {\n ...\n}' New in 2023.1",
"markdown": "Reports extensions which are instantiated by the IntelliJ Platform, but are declared as Kotlin objects.\n\n\nExtensions lifecycle is managed by the IntelliJ Platform.\nUsing Kotlin objects for extension registration may cause creation of unnecessary extension instances and make plugin unloading\nimpossible.\n\nExample\n-------\n\nExtension registration:\n\n\n <annotator language=\"myLang\" implementationClass=\"com.example.MyAnnotator\"/>\n\nExtension implementation:\n\n\n // bad:\n object MyAnnotator : Annotator {\n ...\n }\n\n // good:\n class MyAnnotator : Annotator {\n ...\n }\n\nNew in 2023.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "KotlinObjectExtensionRegistration",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Plugin descriptor",
"index": 157,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UElementAsPsi",
"shortDescription": {
"text": "UElement as PsiElement usage"
},
"fullDescription": {
"text": "Reports usage of UAST 'UElement' as 'PsiElement'. The 'PsiElement' obtained this way is ambiguous. To obtain \"physical\" 'PsiElement' use 'UElementKt.getSourcePsiElement()', for 'PsiElement' that \"emulates\" behaviour of Java-elements ('PsiClass', 'PsiMethod', etc.) use 'UElementKt.getAsJavaPsiElement()'. See UAST - Unified Abstract Syntax Tree in SDK Docs.",
"markdown": "Reports usage of UAST `UElement` as `PsiElement`.\n\n\nThe `PsiElement` obtained this way is ambiguous.\n\n\nTo obtain \"physical\" `PsiElement` use `UElementKt.getSourcePsiElement()`,\nfor `PsiElement` that \"emulates\" behaviour of Java-elements (`PsiClass`, `PsiMethod`, etc.)\nuse `UElementKt.getAsJavaPsiElement()`.\n\n\nSee [UAST - Unified Abstract Syntax Tree](https://plugins.jetbrains.com/docs/intellij/uast.html) in SDK Docs."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UElementAsPsi",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MissingActionUpdateThread",
"shortDescription": {
"text": "ActionUpdateThread is missing"
},
"fullDescription": {
"text": "Reports actions, action groups and other 'ActionUpdateThreadAware' classes that implicitly state the deprecated and costly 'ActionUpdateThread.OLD_EDT' mode. When an action or an action group defines its own 'update()' method, IntelliJ Platform tries to mimic the old synchronous way of calling 'update()' and 'getChildren()' methods in the UI thread and supply it with all the data in 'AnActionEvent.dataContext()'. To do that, it caches all the possible data on a background thread beforehand, even if it is not needed. Provide one of the two new modes 'ActionUpdateThread.EDT' or 'ActionUpdateThread.BGT' by overriding the 'getActionUpdateThread()' method. See the documentation of 'ActionUpdateThread' for more information.",
"markdown": "Reports actions, action groups and other `ActionUpdateThreadAware` classes that implicitly state the deprecated and costly `ActionUpdateThread.OLD_EDT` mode.\n\n\nWhen an action or an action group defines its own `update()` method, IntelliJ Platform tries to mimic\nthe old synchronous way of calling `update()` and `getChildren()` methods in the UI thread and\nsupply it with all the data in `AnActionEvent.dataContext()`.\nTo do that, it caches all the possible data on a background thread beforehand, even if it is not needed.\n\n\nProvide one of the two new modes `ActionUpdateThread.EDT` or `ActionUpdateThread.BGT`\nby overriding the `getActionUpdateThread()` method.\n\n\nSee the documentation of `ActionUpdateThread` for more information."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MissingActionUpdateThread",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PluginXmlI18n",
"shortDescription": {
"text": "Plugin.xml i18n verification"
},
"fullDescription": {
"text": "Reports hardcoded texts in 'plugin.xml'. Using texts defined in resource bundles allows supporting multiple languages in the IDE. The following elements are checked: '<action>, <group>' '<separator, <override-text>' known extension points having 'bundle/key' alternative",
"markdown": "Reports hardcoded texts in `plugin.xml`.\n\n\nUsing texts defined in resource bundles allows supporting multiple languages in the IDE.\n\n\nThe following elements are checked:\n\n* `<action>, <group>`\n* `<separator, <override-text>`\n* known extension points having `bundle/key` alternative"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PluginXmlI18n",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Plugin descriptor",
"index": 157,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IncorrectProcessCanceledExceptionHandling",
"shortDescription": {
"text": "'ProcessCanceledException' handled incorrectly"
},
"fullDescription": {
"text": "Reports 'ProcessCanceledException's handled in an incorrect way. 'ProcessCanceledException' and its inheritors must not be caught, swallowed, logged, or handled in any way. Instead, it must be rethrown so that the infrastructure can handle it correctly. Inspection reports both explicit 'ProcessCanceledException' or its inheritors catching, as well as catching 'RuntimeException', 'Exception' and 'Throwable' covering 'ProcessCanceledException'. Example: '// bad:\ntry {\n // ...\n} catch (ProcessCanceledException e) { // exception should not be swallowed\n}\n\n// bad:\ntry {\n // ...\n} catch (ProcessCanceledException e) {\n LOG.error(\"Error occurred\", e); // exception should not be logged\n throw e;\n}\n\n\n// good:\ntry {\n // ...\n} catch (ProcessCanceledException e) {\n // additional actions\n throw e;\n}' New in 2023.2",
"markdown": "Reports `ProcessCanceledException`s handled in an incorrect way.\n\n\n`ProcessCanceledException` and its inheritors must not be caught, swallowed, logged, or handled in any way.\nInstead, it must be rethrown so that the infrastructure can handle it correctly.\n\n\nInspection reports both explicit `ProcessCanceledException` or its inheritors catching,\nas well as catching `RuntimeException`, `Exception` and `Throwable` covering `ProcessCanceledException`.\n\nExample:\n\n\n // bad:\n try {\n // ...\n } catch (ProcessCanceledException e) { // exception should not be swallowed\n }\n\n // bad:\n try {\n // ...\n } catch (ProcessCanceledException e) {\n LOG.error(\"Error occurred\", e); // exception should not be logged\n throw e;\n }\n\n\n // good:\n try {\n // ...\n } catch (ProcessCanceledException e) {\n // additional actions\n throw e;\n }\n\nNew in 2023.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "IncorrectProcessCanceledExceptionHandling",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ComponentNotRegistered",
"shortDescription": {
"text": "Component/Action not registered"
},
"fullDescription": {
"text": "Reports plugin components and actions that are not registered in a 'plugin.xml' descriptor. This eases developing new components when using the \"Create Class\" intention and helps keep track of potentially obsolete components. Provided quick-fix to register the component adds necessary registration in 'plugin.xml' descriptor. Configure the inspection: Use the Check Actions option to turn off the check for Actions, as they may be intentionally created and registered dynamically. Use the Ignore non-public classes option to ignore abstract and non-public classes.",
"markdown": "Reports plugin components and actions that are not registered in a `plugin.xml` descriptor.\n\n\nThis eases developing new components when using the \"Create Class\" intention and helps keep track of potentially obsolete components.\n\n\nProvided quick-fix to register the component adds necessary registration in `plugin.xml` descriptor.\n\nConfigure the inspection:\n\n* Use the **Check Actions** option to turn off the check for Actions, as they may be intentionally created and registered dynamically.\n* Use the **Ignore non-public classes** option to ignore abstract and non-public classes."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ComponentNotRegistered",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DevKitPropertiesMessageValidation",
"shortDescription": {
"text": "Message format validation in properties files"
},
"fullDescription": {
"text": "Reports the following 'MessageFormat' problems in property values: Unknown format types 'MessageFormat' supports only these format types: number date time choice Other format types will be reported. Unpaired quotes 'property.key=Shouldn't happen: {0}' A single quote is interpreted as an escape until the end of the property, and will not be present in the result string. In most cases this is not what is intended. If a single quote should be present in the result string, it has to be duplicated in the property. Unmatched braces Every placeholder must have a closing brace. Too many quotes In some cases (e.g. 'it's'), it is expected that only one quote ends up in the result string. Cases where two or more quotes are placed together in the result string are reported. Incorrect lower bounds for nested 'ChoiceFormat' Lower bounds are expected to be numbers and to be sorted in ascending order. Wrong number of quotes around parameters In 'java.text.MessageFormat' patterns single quotes are used for escaping. To keep quotes visible, they must be duplicated. For example when passing '1': ''{0}'' → '{0}' '''{0}''' → ''1'' When using choice format, nested formats are evaluated as format strings themselves, and quotes will need to be duplicated twice. For example when passing '1': '{0, choice, 0#no|#1''{0}'' files}' → '{0} files' '{0, choice, 0#no|#1''''{0}'''' files}' → ''1' files' Note Property values are verified only if they contain the literal text '{0}', '{0,', '{1}' or '{1,'. This is to make sure that these property values are actually used as 'MessageFormat' patterns. New in 2023.2",
"markdown": "Reports the following `MessageFormat` problems in property values:\n\n**Unknown format types**\n\n\n`MessageFormat` supports only these format types:\n\n* number\n* date\n* time\n* choice\n\nOther format types will be reported.\n\n**Unpaired quotes**\n\n\n property.key=Shouldn't happen: {0}\n\n\nA single quote is interpreted as an escape until the end of the property, and will not be present in the result string.\nIn most cases this is not what is intended.\nIf a single quote should be present in the result string, it has to be duplicated in the property.\n\n**Unmatched braces**\n\n\nEvery placeholder must have a closing brace.\n\n**Too many quotes**\n\n\nIn some cases (e.g. `it's`), it is expected that only one quote ends up in the result string.\nCases where two or more quotes are placed together in the result string are reported.\n\n**Incorrect lower bounds for nested `ChoiceFormat`**\n\n\nLower bounds are expected to be numbers and to be sorted in ascending order.\n\n**Wrong number of quotes around parameters**\n\n\nIn `java.text.MessageFormat` patterns single quotes are used for escaping.\nTo keep quotes visible, they must be duplicated.\nFor example when passing `1`:\n\n* `'{0}'` → `{0}`\n* `''{0}''` → `'1'`\n\n\nWhen using choice format, nested formats are evaluated as format strings themselves, and quotes will need to be duplicated twice.\nFor example when passing `1`:\n\n* `{0, choice, 0#no|#1''{0}'' files}` → `{0} files`\n* `{0, choice, 0#no|#1''''{0}'''' files}` → `'1' files`\n\n**Note**\n\n\nProperty values are verified only if they contain the literal text `{0}`, `{0,`, `{1}` or `{1,`.\nThis is to make sure that these property values are actually used as `MessageFormat` patterns.\n\nNew in 2023.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DevKitPropertiesMessageValidation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit",
"index": 59,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UseDPIAwareInsets",
"shortDescription": {
"text": "Use DPI-aware insets"
},
"fullDescription": {
"text": "Reports usages of 'java.awt.Insets' and 'JBUI.insetsXyz()' that can be simplified. The 'Insets' instances are not DPI-aware and can result in UI layout problems. Quick fix performs replacement with 'JBUI.insets()' or simplifies the expression. Example: '// bad:\nInsets insets1 = new Insets(1, 2, 3, 4);\nInsets insets2 = new Insets(1, 2, 1, 2);\nInsets insets3 = new Insets(1, 0, 0, 0);\n\n// good:\nInsets insets1 = JBUI.insets(1, 2, 3, 4);\nInsets insets2 = JBUI.insets(1, 2);\nInsets insets3 = JBUI.insetsTop(1);'",
"markdown": "Reports usages of `java.awt.Insets` and `JBUI.insetsXyz()` that can be simplified.\n\n\nThe `Insets` instances are not DPI-aware and can result in UI layout problems.\n\n\nQuick fix performs replacement with `JBUI.insets()` or simplifies the expression.\n\nExample:\n\n\n // bad:\n Insets insets1 = new Insets(1, 2, 3, 4);\n Insets insets2 = new Insets(1, 2, 1, 2);\n Insets insets3 = new Insets(1, 0, 0, 0);\n\n // good:\n Insets insets1 = JBUI.insets(1, 2, 3, 4);\n Insets insets2 = JBUI.insets(1, 2);\n Insets insets3 = JBUI.insetsTop(1);\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UseDPIAwareInsets",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ExtensionClassShouldBeFinalAndNonPublic",
"shortDescription": {
"text": "Extension class should be final and non-public"
},
"fullDescription": {
"text": "Reports extension classes that are non-final or public. New in 2023.2",
"markdown": "Reports extension classes that are non-final or public.\n\nNew in 2023.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ExtensionClassShouldBeFinalAndNonPublic",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ForbiddenInSuspectContextMethod",
"shortDescription": {
"text": "Forbidden in suspend context method usage"
},
"fullDescription": {
"text": "Reports inappropriate usages of methods in Kotlin coroutines, which uses threading context (annotated with '@RequiresBlockingContext'). Many of these methods have corresponding coroutine-friendly analogues, that can be used in 'suspend' contexts. Some examples: 'com.intellij.openapi.progress.ProgressManager.checkCanceled()' should be replaced with 'com.intellij.openapi.progress.checkCancelled()' 'com.intellij.openapi.application.Application.invokeAndWait' and e.t.c should be replaced with 'withContext(Dispatchers.EDT)'",
"markdown": "Reports inappropriate usages of methods in Kotlin coroutines, which uses threading context (annotated with `@RequiresBlockingContext`). Many of these methods have corresponding coroutine-friendly analogues, that can be used in `suspend` contexts. Some examples:\n\n* `com.intellij.openapi.progress.ProgressManager.checkCanceled()` should be replaced with `com.intellij.openapi.progress.checkCancelled()`\n* `com.intellij.openapi.application.Application.invokeAndWait` and e.t.c should be replaced with `withContext(Dispatchers.EDT)`"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ForbiddenInSuspectContextMethod",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RetrievingService",
"shortDescription": {
"text": "Incorrect or simplifiable retrieving service"
},
"fullDescription": {
"text": "Reports the following problems when retrieving services: Attempts to retrieve an unregistered service Mismatch when retrieving a service: attempting to get a project-level service as an application-level service, or vice versa. Getting service call can be replaced with a call to an existing static 'getInstance()' or 'getInstance(Project)' method. New in 2023.2",
"markdown": "Reports the following problems when retrieving services:\n\n* Attempts to retrieve an unregistered service\n* Mismatch when retrieving a service: attempting to get a project-level service as an application-level service, or vice versa.\n* Getting service call can be replaced with a call to an existing static `getInstance()` or `getInstance(Project)` method.\n\nNew in 2023.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "RetrievingService",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ActionIsNotPreviewFriendly",
"shortDescription": {
"text": "Field blocks intention preview"
},
"fullDescription": {
"text": "Reports fields in 'LocalQuickFix' and 'IntentionAction' implementations that prevent intention preview action from functioning properly. Additionally, excessive '@SafeFieldForPreview' annotations are reported on fields whose types are known to be safe. Intention preview is an IntelliJ platform feature that displays how quick-fix or intention action will change the current file when applied. To implement this in quick fixes, 'LocalQuickFix.generatePreview()' is called with a custom 'ProblemDescriptor' that points to the non-physical copy of current file. In intention actions, 'IntentionAction.generatePreview()' is called with the non-physical copy of current file and imaginary editor. Normally, these methods just delegate to 'LocalQuickFix.applyFix()' or 'IntentionAction.invoke()'. However, some quick-fixes may refer directly or indirectly to physical elements and use them for writing. As a result, preview won't work, as the quick-fix will attempt to update physical PSI instead of non-physical one. To avoid this, default implementation of 'generatePreview()' delegates only if all the instance fields of a quick fix or intention action class have safe types: primitives, Strings, etc. You may fix this problem in a number of ways: If the field does not actually store any PSI reference, or that PSI is used only for reading, you may annotate the field with '@SafeFieldForPreview'. You can also use '@SafeTypeForPreview' if the field type can never store any writable PSI reference. You may override 'getFileModifierForPreview()' method and create a copy of the quick-fix rebinding it to the non-physical file copy which is supplied as a parameter. Use 'PsiTreeUtil.findSameElementInCopy()' to find the corresponding PSI elements inside the supplied non-physical copy. Instead of storing PSI references in fields, try to extract all the necessary information from 'ProblemDescriptor.getPsiElement()' in quick fix or from the supplied file/editor in intention action. You may also inherit the abstract 'LocalQuickFixAndIntentionActionOnPsiElement' class and implement its 'invoke()' and 'isAvailable()' methods, which have 'startElement' and 'endElement' parameters. These parameters are automatically mapped to a non-physical file copy for you. You may override 'generatePreview()' method and provide completely custom preview behavior. For example, it's possible to display a custom HTML document instead of actual preview if your action does something besides modifying a current file. This inspection does not report if a custom implementation of 'getFileModifierForPreview()' or 'generatePreview()' exists. However, this doesn't mean that the implementation is correct and preview works. Please test. Also note that preview result is calculated in background thread, so you cannot start a write action during the preview or do any operation that requires a write action. Finally, no preview is generated automatically if 'startInWriteAction()' returns 'false'. In this case, having custom 'generatePreview()' implementation is desired. New in 2022.1",
"markdown": "Reports fields in `LocalQuickFix` and `IntentionAction` implementations that prevent intention preview action from functioning properly. Additionally, excessive `@SafeFieldForPreview` annotations are reported on fields whose types are known to be safe.\n\n\nIntention preview is an IntelliJ platform feature that displays how quick-fix or intention action\nwill change the current file when applied. To implement this in quick fixes,\n`LocalQuickFix.generatePreview()` is called with a custom `ProblemDescriptor`\nthat points to the non-physical copy of current file. In intention actions, `IntentionAction.generatePreview()`\nis called with the non-physical copy of current file and imaginary editor.\nNormally, these methods just delegate to `LocalQuickFix.applyFix()` or `IntentionAction.invoke()`.\nHowever, some quick-fixes may refer directly or indirectly to physical elements and use them for writing. As a result,\npreview won't work, as the quick-fix will attempt to update physical PSI instead of non-physical one.\nTo avoid this, default implementation of `generatePreview()` delegates only if all the\ninstance fields of a quick fix or intention action class have safe types: primitives, Strings, etc.\n\n\nYou may fix this problem in a number of ways:\n\n1. If the field does not actually store any PSI reference, or that PSI is used only for reading, you may annotate the field with `@SafeFieldForPreview`. You can also use `@SafeTypeForPreview` if the field type can never store any writable PSI reference.\n2. You may override `getFileModifierForPreview()` method and create a copy of the quick-fix rebinding it to the non-physical file copy which is supplied as a parameter. Use `PsiTreeUtil.findSameElementInCopy()` to find the corresponding PSI elements inside the supplied non-physical copy.\n3. Instead of storing PSI references in fields, try to extract all the necessary information from `ProblemDescriptor.getPsiElement()` in quick fix or from the supplied file/editor in intention action. You may also inherit the abstract `LocalQuickFixAndIntentionActionOnPsiElement` class and implement its `invoke()` and `isAvailable()` methods, which have `startElement` and `endElement` parameters. These parameters are automatically mapped to a non-physical file copy for you.\n4. You may override `generatePreview()` method and provide completely custom preview behavior. For example, it's possible to display a custom HTML document instead of actual preview if your action does something besides modifying a current file.\n\n\nThis inspection does not report if a custom implementation of `getFileModifierForPreview()`\nor `generatePreview()` exists. However, this doesn't mean that the implementation is correct and preview works.\nPlease test. Also note that preview result is calculated in background thread, so you cannot start a write action\nduring the preview or do any operation that requires a write action. Finally, no preview is generated automatically\nif `startInWriteAction()` returns `false`. In this case, having custom `generatePreview()`\nimplementation is desired.\n\nNew in 2022.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ActionIsNotPreviewFriendly",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LightServiceMigrationCode",
"shortDescription": {
"text": "A service can be converted to a light one"
},
"fullDescription": {
"text": "Reports classes that can be marked as light services using the '@com.intellij.openapi.components.Service' annotation instead of being registered as services in 'plugin.xml' A service that is not intended for overriding is not required to be registered in the 'plugin.xml' file. Instead, annotate the service class with the '@Service' annotation. For project-level services, specify '@Service(Service.Level.PROJECT)'. Requirements: IntelliJ Platform 2019.3 or newer. Service class must be 'final'. 'serviceInterface' is not specified. If the application-level service is a 'com.intellij.openapi.components.PersistentStateComponent', roaming must be disabled ('roamingType = RoamingType.DISABLED'). None of these attributes is specified: 'os', 'client', 'overrides', 'id', 'preload'. See Services in IntelliJ Platform Plugin SDK docs for more details. See also the 'Plugin DevKit | Plugin descriptor | A service can be converted to a light one' inspection. New in 2023.2",
"markdown": "Reports classes that can be marked as light services using the `@com.intellij.openapi.components.Service` annotation instead of being registered as services in `plugin.xml`\n\n\nA service that is not intended for overriding is not required to be registered in the `plugin.xml` file.\nInstead, annotate the service class with the `@Service` annotation. For project-level services, specify\n`@Service(Service.Level.PROJECT)`.\n\n\nRequirements:\n\n* IntelliJ Platform 2019.3 or newer.\n* Service class must be `final`.\n* `serviceInterface` is not specified.\n* If the application-level service is a `com.intellij.openapi.components.PersistentStateComponent`, roaming must be disabled (`roamingType = RoamingType.DISABLED`).\n* None of these attributes is specified: `os`, `client`, `overrides`, `id`, `preload`.\n\n\nSee [Services](https://plugins.jetbrains.com/docs/intellij/plugin-services.html) in IntelliJ Platform Plugin SDK docs for more details.\n\n\nSee also the `Plugin DevKit | Plugin descriptor | A service can be converted to a light one` inspection.\n\nNew in 2023.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LightServiceMigrationCode",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InspectionUsingGrayColors",
"shortDescription": {
"text": "Using new Color(a,a,a)"
},
"fullDescription": {
"text": "Reports usages of 'java.awt.Color' to create gray colors. The Convert to 'Gray' quick fix replaces it using 'com.intellij.ui.Gray' constants instead. Examples: '// bad:\nColor gray = new Color(37, 37, 37);\n\n// good:\nColor gray = Gray._37;'",
"markdown": "Reports usages of `java.awt.Color` to create gray colors.\n\n\nThe **Convert to 'Gray'** quick fix replaces it using `com.intellij.ui.Gray` constants instead.\n\nExamples:\n\n\n // bad:\n Color gray = new Color(37, 37, 37);\n\n // good:\n Color gray = Gray._37;\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "InspectionUsingGrayColors",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UseJBColor",
"shortDescription": {
"text": "Use Darcula aware JBColor"
},
"fullDescription": {
"text": "Reports usages of 'java.awt.Color'. These are not aware of \"dark\" themes (e.g., bundled \"Darcula\") and might result in bad looking UI. Quick-fix replaces usages with 'JBColor', which defines \"dark\" color variant. Examples: '// bad:\nColor darkGreen = new Color(12, 58, 27);\nColor blue = Color.BLUE;\n\n// good:\nColor darkGreen = new JBColor(12, 58, 27);\nColor blue = JBColor.BLUE;\nColor green = new JBColor(new Color(12, 58, 27), new Color(27, 112, 39));'",
"markdown": "Reports usages of `java.awt.Color`.\n\n\nThese are not aware of \"dark\" themes (e.g., bundled \"Darcula\") and might result in bad looking UI.\n\n\nQuick-fix replaces usages with `JBColor`, which defines \"dark\" color variant.\n\nExamples:\n\n\n // bad:\n Color darkGreen = new Color(12, 58, 27);\n Color blue = Color.BLUE;\n\n // good:\n Color darkGreen = new JBColor(12, 58, 27);\n Color blue = JBColor.BLUE;\n Color green = new JBColor(new Color(12, 58, 27), new Color(27, 112, 39));\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UseJBColor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "QuickFixGetFamilyNameViolation",
"shortDescription": {
"text": "QuickFix's getFamilyName() implementation must not depend on a specific context"
},
"fullDescription": {
"text": "Reports 'QuickFix#getFamilyName()' using contextual information. This method must not use any non-static information.",
"markdown": "Reports `QuickFix#getFamilyName()` using contextual information.\n\n\nThis method must not use any non-static information."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "QuickFixGetFamilyNameViolation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CompanionObjectInExtension",
"shortDescription": {
"text": "Companion object in extensions"
},
"fullDescription": {
"text": "Reports incorrect companion objects' usage in IDE extensions. Kotlin companion object is always created once you try to load its containing class, and IDE extensions are supposed to be cheap to create. Excessive classloading in plugins is a huge problem for IDE startup. Bad pattern: 'class KotlinDocumentationProvider : AbstractDocumentationProvider(), ExternalDocumentationProvider {\n\n companion object {\n private val LOG = Logger.getInstance(KotlinDocumentationProvider::class.java)\n private val javaDocumentProvider = JavaDocumentationProvider()\n }\n }' Here 'KotlinDocumentationProvider' is an extension registered in 'plugin.xml': '<lang.documentationProvider language=\"JAVA\"\n implementationClass=\"org.jetbrains.kotlin.idea.KotlinDocumentationProvider\"\n order=\"first\"/>' In this example 'JavaDocumentationProvider' will be loaded from disk once someone just calls 'new KotlinDocumentationProvider()'. Kotlin companion objects in extension implementations can only contain a logger and simple constants. Other declarations may cause excessive classloading or early initialization of heavy resources (e.g. TokenSet, Regex, etc.) when the extension class is loaded. Instead of being stored in companion object, these declarations must be top-level or stored in an object. FAQ How to rewrite run ConfigurationType? Move the declaration to top-level: '// DO\n internal fun mnRunConfigurationType(): MnRunConfigurationType = runConfigurationType<MnRunConfigurationType>()\n\n internal class MnRunConfigurationType : ConfigurationType {\n companion object { // DON'T\n fun getInstance(): MnRunConfigurationType = findConfigurationType(MnRunConfigurationType::class.java)\n }\n }' How to rewrite FileType? Before: 'internal class SpringBootImportsFileType : LanguageFileType(SPILanguage.INSTANCE, true) {\n companion object {\n val FILE_TYPE = SpringBootImportsFileType()\n }\n }' After: 'internal object SpringBootImportsFileType : LanguageFileType(SPILanguage.INSTANCE, true) {' Use 'INSTANCE' fieldName in 'plugin.xml': '<fileType name=\"Spring Boot Imports\"\n fieldName=\"INSTANCE\"\n implementationClass=\"com.intellij.spring.boot.spi.SpringBootImportsFileType\"/>' New in 2023.2",
"markdown": "Reports incorrect companion objects' usage in [IDE extensions](https://plugins.jetbrains.com/docs/intellij/plugin-extensions.html).\n\n\nKotlin companion object is always created once you try to load its containing class, and IDE extensions are supposed to be cheap to create.\nExcessive classloading in plugins is a huge problem for IDE startup.\n\nBad pattern:\n\n\n class KotlinDocumentationProvider : AbstractDocumentationProvider(), ExternalDocumentationProvider {\n\n companion object {\n private val LOG = Logger.getInstance(KotlinDocumentationProvider::class.java)\n private val javaDocumentProvider = JavaDocumentationProvider()\n }\n }\n\n\nHere `KotlinDocumentationProvider` is an extension registered in `plugin.xml`:\n\n\n <lang.documentationProvider language=\"JAVA\"\n implementationClass=\"org.jetbrains.kotlin.idea.KotlinDocumentationProvider\"\n order=\"first\"/>\n\n\nIn this example `JavaDocumentationProvider` will be loaded from disk once someone just calls `new KotlinDocumentationProvider()`.\n\n\nKotlin companion objects in extension implementations can only contain a logger and simple constants.\nOther declarations may cause excessive classloading or early initialization of heavy resources (e.g. TokenSet, Regex, etc.)\nwhen the extension class is loaded.\n\n\nInstead of being stored in companion object, these declarations must be top-level or stored in an object.\n\n### FAQ\n\n#### How to rewrite run ConfigurationType?\n\nMove the declaration to top-level:\n\n\n // DO\n internal fun mnRunConfigurationType(): MnRunConfigurationType = runConfigurationType<MnRunConfigurationType>()\n\n internal class MnRunConfigurationType : ConfigurationType {\n companion object { // DON'T\n fun getInstance(): MnRunConfigurationType = findConfigurationType(MnRunConfigurationType::class.java)\n }\n }\n\n#### How to rewrite FileType?\n\nBefore:\n\n\n internal class SpringBootImportsFileType : LanguageFileType(SPILanguage.INSTANCE, true) {\n companion object {\n val FILE_TYPE = SpringBootImportsFileType()\n }\n }\n\nAfter:\n\n\n internal object SpringBootImportsFileType : LanguageFileType(SPILanguage.INSTANCE, true) {\n\nUse `INSTANCE` fieldName in `plugin.xml`:\n\n\n <fileType name=\"Spring Boot Imports\"\n fieldName=\"INSTANCE\"\n implementationClass=\"com.intellij.spring.boot.spi.SpringBootImportsFileType\"/>\n\nNew in 2023.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "CompanionObjectInExtension",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PsiElementConcatenation",
"shortDescription": {
"text": "Using PsiElement string representation to generate new expression is incorrect"
},
"fullDescription": {
"text": "Reports direct usage of 'PsiElement' and 'PsiType' in strings. When building strings for 'PsiJavaParserFacade.createExpressionFromText()' (or similar methods), 'PsiElement.getText()' should be used instead.",
"markdown": "Reports direct usage of `PsiElement` and `PsiType` in strings.\n\n\nWhen building strings for `PsiJavaParserFacade.createExpressionFromText()` (or similar methods), `PsiElement.getText()` should be used\ninstead."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PsiElementConcatenation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnsafeReturnStatementVisitor",
"shortDescription": {
"text": "Unsafe return statements visitor"
},
"fullDescription": {
"text": "Reports unsafe use of 'JavaRecursiveElementVisitor.visitReturnStatement()'. Processing 'PsiReturnStatement's even if they belong to another 'PsiClass' or 'PsiLambdaExpression' is a bug in most cases, and a visitor most probably should implement 'visitClass()' and 'visitLambdaExpression()' methods.",
"markdown": "Reports unsafe use of `JavaRecursiveElementVisitor.visitReturnStatement()`.\n\n\nProcessing `PsiReturnStatement`s\neven if they belong to another `PsiClass` or `PsiLambdaExpression` is a bug in most cases, and a visitor most\nprobably should implement `visitClass()` and `visitLambdaExpression()` methods."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnsafeReturnStatementVisitor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UndesirableClassUsage",
"shortDescription": {
"text": "Undesirable class usage"
},
"fullDescription": {
"text": "Reports usages of undesirable classes (mostly Swing components). Quick-fix offers replacement with recommended IntelliJ Platform replacement.",
"markdown": "Reports usages of undesirable classes (mostly Swing components).\n\n\nQuick-fix offers replacement with recommended IntelliJ Platform replacement."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UndesirableClassUsage",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CallingMethodShouldBeRequiresBlockingContext",
"shortDescription": {
"text": "Calling method should be annotated with @RequiresBlockingContext"
},
"fullDescription": {
"text": "Highlights calls of method annotated with @RequiresBlockingMethod inside non-annotated method. The calling method should be also annotated with @RequiresBlockingMethod to clearly state its contract.",
"markdown": "Highlights calls of method annotated with @RequiresBlockingMethod inside non-annotated method.\nThe calling method should be also annotated with @RequiresBlockingMethod to clearly state its contract."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "CallingMethodShouldBeRequiresBlockingContext",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PluginXmlValidity",
"shortDescription": {
"text": "Plugin.xml validity"
},
"fullDescription": {
"text": "Reports problems in 'plugin.xml'. Invalid configuration can lead to problems at runtime.",
"markdown": "Reports problems in `plugin.xml`.\n\n\nInvalid configuration can lead to problems at runtime."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "PluginXmlValidity",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Plugin descriptor",
"index": 157,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InspectionDescriptionNotFoundInspection",
"shortDescription": {
"text": "Inspection description checker"
},
"fullDescription": {
"text": "Reports inspections that are missing an HTML description file, i.e. a file containing a text like this. The Create description file quick-fix creates a template HTML description file.",
"markdown": "Reports inspections that are missing an HTML description file, i.e. a file containing a text like this.\n\n\nThe **Create description file** quick-fix creates a template HTML description file."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "InspectionDescriptionNotFoundInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Description file",
"index": 141,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LeakableMapKey",
"shortDescription": {
"text": "Map key may leak"
},
"fullDescription": {
"text": "Reports using 'Language' or 'FileType' as a map key in plugin code. Such usages might lead to inability to unload the plugin properly. Please consider using 'String' as keys instead. See Dynamic Plugins in SDK Docs for more information.",
"markdown": "Reports using `Language` or `FileType` as a map key in plugin code.\n\n\nSuch usages might lead to inability to unload the plugin properly.\n\n\nPlease consider using `String` as keys instead.\n\n\nSee [Dynamic\nPlugins](https://plugins.jetbrains.com/docs/intellij/dynamic-plugins.html) in SDK Docs for more information."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LeakableMapKey",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnsafeVfsRecursion",
"shortDescription": {
"text": "Unsafe VFS recursion"
},
"fullDescription": {
"text": "Reports usage of 'VirtualFile.getChildren()' inside recursive methods. This may cause endless loops when iterating over cyclic symlinks. Use 'VfsUtilCore.visitChildrenRecursively()' instead. 'void processDirectory(VirtualFile dir) {\n for (VirtualFile file : dir.getChildren()) { // bad\n if (!file.isDirectory()) {\n processFile(file);\n } else {\n processDirectory(file); // recursive call\n }\n }\n}'\n 'void processDirectory(VirtualFile dir) {\n VfsUtilCore.visitChildrenRecursively(dir, new VirtualFileVisitor<Void>() { // good\n @Override\n public boolean visitFile(@NotNull VirtualFile file) {\n if (!file.isDirectory()) {\n processFile(file);\n }\n return true;\n }\n });\n}'",
"markdown": "Reports usage of `VirtualFile.getChildren()` inside recursive methods.\n\n\nThis may cause endless loops when iterating over cyclic symlinks.\nUse `VfsUtilCore.visitChildrenRecursively()` instead.\n\n\n void processDirectory(VirtualFile dir) {\n for (VirtualFile file : dir.getChildren()) { // bad\n if (!file.isDirectory()) {\n processFile(file);\n } else {\n processDirectory(file); // recursive call\n }\n }\n }\n\n\n void processDirectory(VirtualFile dir) {\n VfsUtilCore.visitChildrenRecursively(dir, new VirtualFileVisitor<Void>() { // good\n @Override\n public boolean visitFile(@NotNull VirtualFile file) {\n if (!file.isDirectory()) {\n processFile(file);\n }\n return true;\n }\n });\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnsafeVfsRecursion",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "WorkspaceImplAbsent",
"shortDescription": {
"text": "Absent entity implementation"
},
"fullDescription": {
"text": "Reports absent of implementation for the entity. Verifies that each entity in the project has the implementation. Suggests generation implementation for the whole entities in the current module.",
"markdown": "Reports absent of implementation for the entity.\n\n\nVerifies that each entity in the project has the implementation.\n\n\nSuggests generation implementation for the whole entities in the current module."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "WorkspaceImplAbsent",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Workspace model",
"index": 60,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PluginXmlCapitalization",
"shortDescription": {
"text": "Plugin.xml text capitalization"
},
"fullDescription": {
"text": "Reports text capitalization problems in 'plugin.xml'. The following elements are checked: '<name>' '<action>, <group>' '<separator, <synonym>, <override-text>' extension point properties annotated with 'org.jetbrains.annotations.Nls' specifying required 'capitalization' Please see Capitalization in IntelliJ Platform UI Guidelines for more information.",
"markdown": "Reports text capitalization problems in `plugin.xml`.\n\n\nThe following elements are checked:\n\n* `<name>`\n* `<action>, <group>`\n* `<separator, <synonym>, <override-text>`\n* extension point properties annotated with `org.jetbrains.annotations.Nls` specifying required `capitalization`\n\n\nPlease see [Capitalization](https://jetbrains.design/intellij/text/capitalization/) in IntelliJ Platform UI Guidelines for more\ninformation."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PluginXmlCapitalization",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Plugin descriptor",
"index": 157,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UseDPIAwareBorders",
"shortDescription": {
"text": "Use DPI-aware borders"
},
"fullDescription": {
"text": "Reports usages of 'javax.swing.border.EmptyBorder' and 'JBUI.Borders.emptyXyz()' that can be simplified. The 'EmptyBorder' instances are not DPI-aware and can result in UI layout problems. Quick fix performs replacement with 'JBUI.Borders.empty()' or simplifies the expression. Example: '// bad:\nBorder border1 = new EmptyBorder(1, 2, 3, 4);\nBorder border2 = new EmptyBorder(1, 2, 1, 2);\nBorder border3 = new EmptyBorder(1, 0, 0, 0);\n\n// good:\nBorder border1 = JBUI.Borders.empty(1, 2, 3, 4);\nBorder border2 = JBUI.Borders.empty(1, 2);\nBorder border3 = JBUI.Borders.emptyTop(1);'",
"markdown": "Reports usages of `javax.swing.border.EmptyBorder` and `JBUI.Borders.emptyXyz()` that can be simplified.\n\n\nThe `EmptyBorder` instances are not DPI-aware and can result in UI layout problems.\n\n\nQuick fix performs replacement with `JBUI.Borders.empty()` or simplifies the expression.\n\nExample:\n\n\n // bad:\n Border border1 = new EmptyBorder(1, 2, 3, 4);\n Border border2 = new EmptyBorder(1, 2, 1, 2);\n Border border3 = new EmptyBorder(1, 0, 0, 0);\n\n // good:\n Border border1 = JBUI.Borders.empty(1, 2, 3, 4);\n Border border2 = JBUI.Borders.empty(1, 2);\n Border border3 = JBUI.Borders.emptyTop(1);\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UseDPIAwareBorders",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ExtensionRegisteredAsServiceOrComponent",
"shortDescription": {
"text": "Extension registered as service/component"
},
"fullDescription": {
"text": "Reports extension implementation being additionally registered as a service/component. While there can be multiple extension instances, the IntelliJ Platform ensures that only one instance of a service/component is loaded, thus registering the same class as both an extension and a service/component may cause issues. New in 2023.2",
"markdown": "Reports extension implementation being additionally registered as a service/component.\n\n\nWhile there can be multiple extension instances, the IntelliJ Platform ensures that only one instance of a service/component is loaded,\nthus registering the same class as both an extension and a service/component may cause issues.\n\nNew in 2023.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "ExtensionRegisteredAsServiceOrComponent",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NonDefaultConstructor",
"shortDescription": {
"text": "Non-default constructors for service and extension class"
},
"fullDescription": {
"text": "Reports extension/service class having a non-default (empty) constructor. Other dependencies should be acquired when needed in corresponding methods only. Constructor having 'Project' for extension/service on the corresponding level is allowed.",
"markdown": "Reports extension/service class having a non-default (empty) constructor.\n\n\nOther dependencies should be acquired when needed in corresponding methods only.\nConstructor having `Project` for extension/service on the corresponding level is allowed."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "NonDefaultConstructor",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UseVirtualFileEquals",
"shortDescription": {
"text": "Use 'VirtualFile#equals(Object)'"
},
"fullDescription": {
"text": "Reports comparing 'VirtualFile' instances using '=='. Replace with 'equals()' call.",
"markdown": "Reports comparing `VirtualFile` instances using `==`.\n\n\nReplace with `equals()` call."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UseVirtualFileEquals",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MismatchedLightServiceLevelAndCtor",
"shortDescription": {
"text": "Mismatch between light service level and its constructor"
},
"fullDescription": {
"text": "Reports mismatches between light service levels and constructors. The following problems are reported: A light service class has a constructor with one parameter of type 'com.intellij.openapi.project.Project' is not annotated as project-level service. A light service class annotated as an application-level service does not have a no-arg constructor, nor a constructor with one parameter of type 'kotlinx.coroutines.CoroutineScope'. New in 2023.2",
"markdown": "Reports mismatches between light service levels and constructors.\n\nThe following problems are reported:\n\n* A light service class has a constructor with one parameter of type `com.intellij.openapi.project.Project` is not annotated as project-level service.\n* A light service class annotated as an application-level service does not have a no-arg constructor, nor a constructor with one parameter of type `kotlinx.coroutines.CoroutineScope`.\n\nNew in 2023.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MismatchedLightServiceLevelAndCtor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MissingRecentApi",
"shortDescription": {
"text": "Usage of IntelliJ API not available in older IDEs"
},
"fullDescription": {
"text": "Reports usages of IntelliJ Platform API introduced in a version newer than the one specified in '<idea-version>' '@since-build' in 'plugin.xml'. Using such API may lead to incompatibilities of the plugin with older IDE versions. To avoid possible issues when running the plugin in older IDE versions, increase 'since-build' accordingly, or remove usages of this API. See Build Number Ranges in IntelliJ Platform Plugin SDK docs for more details. Configure the inspection: If '<idea-version>' '@since/until-build' attributes are not specified in 'plugin.xml', set Since/Until explicitly.",
"markdown": "Reports usages of IntelliJ Platform API introduced in a version *newer* than the one specified in `<idea-version>` `@since-build` in `plugin.xml`.\n\n\nUsing such API may lead to incompatibilities of the plugin with older IDE versions.\n\n\nTo avoid possible issues when running the plugin in older IDE versions, increase `since-build` accordingly,\nor remove usages of this API.\n\n\nSee [Build Number Ranges](https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html) in IntelliJ Platform Plugin SDK docs for more details.\n\nConfigure the inspection:\nIf `<idea-version>` `@since/until-build` attributes are not specified in `plugin.xml`, set **Since** /**Until** explicitly."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "MissingRecentApi",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PluginXmlExtensionRegistration",
"shortDescription": {
"text": "Plugin.xml extension registration"
},
"fullDescription": {
"text": "Reports problems with extension registration in 'plugin.xml'. The following problems are reported: Missing 'language' declaration. If the extension does not target a specific language, use quick fix to create an explicit declaration for \"any language\". Inspections: missing attributes Services: redundant 'serviceInterface' declaration 'com.intellij.stubElementTypeHolder' without 'externalIdPrefix', see Stub Indexes New in 2022.3",
"markdown": "Reports problems with extension registration in `plugin.xml`.\n\n\nThe following problems are reported:\n\n* Missing `language` declaration. If the extension does not target a specific language, use quick fix to create an explicit declaration for \"any language\".\n* Inspections: missing attributes\n* Services: redundant `serviceInterface` declaration\n* `com.intellij.stubElementTypeHolder` without `externalIdPrefix`, see [Stub Indexes](https://plugins.jetbrains.com/docs/intellij/stub-indexes.html?from=?from=DevkitPluginXmlInspectionDescription)\n\n<br />\n\nNew in 2022.3"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PluginXmlExtensionRegistration",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Plugin descriptor",
"index": 157,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UsePrimitiveTypes",
"shortDescription": {
"text": "Use 'PsiType#equals(Object)' with primitive types"
},
"fullDescription": {
"text": "Reports comparing 'PsiPrimitiveType' instances using '=='. Primitive types should be compared with 'equals' as Java 8 type annotations are also applicable for them. Replace with 'equals()' call.",
"markdown": "Reports comparing `PsiPrimitiveType` instances using `==`.\n\n\nPrimitive types should be compared with `equals` as Java 8 type annotations are also applicable for them.\n\n\nReplace with `equals()` call."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UsePrimitiveTypes",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UseCouple",
"shortDescription": {
"text": "Use Couple instead of Pair"
},
"fullDescription": {
"text": "Reports usages of 'Pair<T, T>' replaceable by 'Couple<T>'. Quick-fix performs replacement.",
"markdown": "Reports usages of `Pair<T, T>` replaceable by `Couple<T>`.\n\n\nQuick-fix performs replacement."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UseCouple",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SerializableCtor",
"shortDescription": {
"text": "Non-default constructor in serializable class"
},
"fullDescription": {
"text": "Reports non-default constructor in serializable classes. The platform's 'IonObjectSerializer' requires specifying '@PropertyMapping' explicitly. Quick-fix generates necessary '@PropertyMapping' annotation for the constructor.",
"markdown": "Reports non-default constructor in serializable classes.\n\n\nThe platform's `IonObjectSerializer` requires specifying `@PropertyMapping` explicitly.\n\n\nQuick-fix generates necessary `@PropertyMapping` annotation for the constructor."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SerializableCtor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnresolvedPluginConfigReference",
"shortDescription": {
"text": "Unresolved plugin configuration reference"
},
"fullDescription": {
"text": "Reports unresolved references to plugin configuration elements. Extensions Referencing extension with an unknown 'id' might result in errors at runtime. The following extension points are supported: 'com.intellij.advancedSetting' in resource bundle 'advanced.setting.*' key 'com.intellij.experimentalFeature' in 'Experiments.isFeatureEnabled()/setFeatureEnabled()' 'com.intellij.notificationGroup' in 'Notification' constructor and 'NotificationGroupManager.getNotificationGroup()' 'com.intellij.registryKey' in 'Registry' methods 'key' parameter 'com.intellij.toolWindow' in resource bundle 'toolwindow.stripe.*' key Extension Point Extension point name referencing its corresponding '<extensionPoint>' declaration in 'plugin.xml'. 'com.intellij.openapi.extensions.ExtensionPointName' constructor and 'create()' 'com.intellij.openapi.extensions.ProjectExtensionPointName' constructor 'com.intellij.openapi.util.KeyedExtensionCollector' and inheritors constructor",
"markdown": "Reports unresolved references to plugin configuration elements.\n\n#### Extensions\n\n\nReferencing extension with an unknown `id` might result in errors at runtime.\n\n\nThe following extension points are supported:\n\n* `com.intellij.advancedSetting` in resource bundle `advanced.setting.*` key\n* `com.intellij.experimentalFeature` in `Experiments.isFeatureEnabled()/setFeatureEnabled()`\n* `com.intellij.notificationGroup` in `Notification` constructor and `NotificationGroupManager.getNotificationGroup()`\n* `com.intellij.registryKey` in `Registry` methods `key` parameter\n* `com.intellij.toolWindow` in resource bundle `toolwindow.stripe.*` key\n\n#### Extension Point\n\n\nExtension point name referencing its corresponding `<extensionPoint>` declaration in `plugin.xml`.\n\n* `com.intellij.openapi.extensions.ExtensionPointName` constructor and `create()`\n* `com.intellij.openapi.extensions.ProjectExtensionPointName` constructor\n* `com.intellij.openapi.util.KeyedExtensionCollector` and inheritors constructor\n\n<br />"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "UnresolvedPluginConfigReference",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ThreadingConcurrency",
"shortDescription": {
"text": "Threading and concurrency problems"
},
"fullDescription": {
"text": "Reports threading and concurrency issues in code using information from 'com.intellij.util.concurrency.annotations' annotations. Work in progress. Enable options below to check '@Requires(Read|Write)Lock' inside '@RequiresEdt' blocks. Additionally, non-overriding public methods having not all annotations present can be highlighted + quickfix to add missing annotations. New in 2023.2",
"markdown": "Reports threading and concurrency issues in code using information from `com.intellij.util.concurrency.annotations` annotations.\n\n\n**Work in progress**.\nEnable options below to check `@Requires(Read|Write)Lock` inside `@RequiresEdt` blocks. Additionally, non-overriding public methods having not all annotations present can be highlighted + quickfix to add missing annotations.\n\nNew in 2023.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "ThreadingConcurrency",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KotlinObjectRegisteredAsExtension",
"shortDescription": {
"text": "Kotlin object registered as extension"
},
"fullDescription": {
"text": "Reports Kotlin objects that are registered as plugin extensions. Extensions lifecycle is managed by the IntelliJ Platform. Using Kotlin objects for extension registration may cause creation of unnecessary extension instances and make plugin unloading impossible. Example Extension registration: '<annotator language=\"myLang\" implementationClass=\"com.example.MyAnnotator\"/>' Extension implementation: '// bad:\nobject MyAnnotator : Annotator {\n ...\n}\n\n// good:\nclass MyAnnotator : Annotator {\n ...\n}' New in 2023.1",
"markdown": "Reports Kotlin objects that are registered as plugin extensions.\n\n\nExtensions lifecycle is managed by the IntelliJ Platform.\nUsing Kotlin objects for extension registration may cause creation of unnecessary extension instances and make plugin unloading\nimpossible.\n\nExample\n-------\n\nExtension registration:\n\n\n <annotator language=\"myLang\" implementationClass=\"com.example.MyAnnotator\"/>\n\nExtension implementation:\n\n\n // bad:\n object MyAnnotator : Annotator {\n ...\n }\n\n // good:\n class MyAnnotator : Annotator {\n ...\n }\n\nNew in 2023.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "KotlinObjectRegisteredAsExtension",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "WorkspaceImplObsolete",
"shortDescription": {
"text": "Obsolete version of entity implementation"
},
"fullDescription": {
"text": "Reports existence of the obsolete implementation for the entity. Verifies that existing implementation for entities has the same API version as described at 'com.intellij.platform.workspace.storage.CodeGeneratorVersions' from dependencies. Suggests regenerating implementation for the whole entities in the current module.",
"markdown": "Reports existence of the obsolete implementation for the entity.\n\n\nVerifies that existing implementation for entities has the same API version as described at `com.intellij.platform.workspace.storage.CodeGeneratorVersions` from dependencies.\n\n\nSuggests regenerating implementation for the whole entities in the current module."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "WorkspaceImplObsolete",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Workspace model",
"index": 60,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CancellationCheckInLoops",
"shortDescription": {
"text": "Cancellation check in loops"
},
"fullDescription": {
"text": "Reports 'forEach' loops with missing cancellation checks. Runs only within the methods with 'com.intellij.util.concurrency.annotations.RequiresReadLock' annotation. Example: 'for (item in items) {\n ProgressManager.checkCanceled() // should be present in the first line\n ...\n }' In case of nested loops with nothing in between: 'for (item in items) {\n // nothing in between\n for (inner in item.inners) {\n ProgressManager.checkCanceled() // should be present in the first line of the inner loop only\n ...\n }\n }' In blocking context 'com.intellij.openapi.progress.ProgressManager#checkCanceled' should be used, while 'com.intellij.openapi.progress.CoroutinesKt#checkCancelled' should be used in suspending one. See Background Processes and ProcessCanceledException in IntelliJ Platform Plugin SDK docs for more details. New in 2023.1",
"markdown": "Reports `forEach` loops with missing cancellation checks.\n\nRuns only within the methods with `com.intellij.util.concurrency.annotations.RequiresReadLock` annotation.\n\n**Example:**\n\n\n for (item in items) {\n ProgressManager.checkCanceled() // should be present in the first line\n ...\n }\n\n\nIn case of nested loops with nothing in between:\n\n\n for (item in items) {\n // nothing in between\n for (inner in item.inners) {\n ProgressManager.checkCanceled() // should be present in the first line of the inner loop only\n ...\n }\n }\n\n\nIn blocking context `com.intellij.openapi.progress.ProgressManager#checkCanceled` should be used,\nwhile `com.intellij.openapi.progress.CoroutinesKt#checkCancelled` should be used in suspending one.\n\n\nSee [Background Processes and ProcessCanceledException](https://plugins.jetbrains.com/docs/intellij/general-threading-rules.html#background-processes-and-processcanceledexception) in IntelliJ Platform Plugin SDK docs for more details.\n\nNew in 2023.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CancellationCheckInLoops",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ApplicationServiceAsStaticFinalField",
"shortDescription": {
"text": "Application service assigned to a static final field/property"
},
"fullDescription": {
"text": "Reports assignments of application services to static final fields/properties. Such assignments contribute to global state and make it impossible to tear down an application and set up another one in tests, therefore, repeated tests in the same process may fail. The only exception is an explicit constructor call to store dummy/default instances. The recommended way to avoid storing services is to retrieve a service locally or to wrap it in 'java.util.function.Supplier'. Example: '// Incorrect way\n private static final ManagingFS ourInstance = ApplicationManager.getApplication().getService(ManagingFS.class);' '// Correct way\n private static final Supplier<ManagingFS> ourInstance = CachedSingletonsRegistry.lazy(() -> {\n return ApplicationManager.getApplication().getService(ManagingFS.class);\n });' '// Exception\n private static final UniqueVFilePathBuilder DUMMY_BUILDER = new UniqueVFilePathBuilder()' New in 2023.2",
"markdown": "Reports assignments of application services to static final fields/properties.\n\n\nSuch assignments contribute to global state and make it impossible to tear down an application and set up another one in tests,\ntherefore, repeated tests in the same process may fail.\nThe only exception is an explicit constructor call to store dummy/default instances.\n\n\nThe recommended way to avoid storing services is to retrieve a service locally or to wrap it in `java.util.function.Supplier`.\n\n**Example:**\n\n\n // Incorrect way\n private static final ManagingFS ourInstance = ApplicationManager.getApplication().getService(ManagingFS.class);\n\n\n // Correct way\n private static final Supplier<ManagingFS> ourInstance = CachedSingletonsRegistry.lazy(() -> {\n return ApplicationManager.getApplication().getService(ManagingFS.class);\n });\n\n\n // Exception\n private static final UniqueVFilePathBuilder DUMMY_BUILDER = new UniqueVFilePathBuilder()\n\nNew in 2023.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ApplicationServiceAsStaticFinalField",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnspecifiedActionsPlace",
"shortDescription": {
"text": "Unspecified action place"
},
"fullDescription": {
"text": "Reports passing unspecified 'place' parameter for 'ActionManager.createActionToolbar()' and 'ActionManager.createActionPopupMenu()'. Specifying proper 'place' is required to distinguish Action's usage in 'update()/actionPerformed()' via 'AnActionEvent.getPlace()'. Examples: '// bad:\nactionManager.createActionToolbar(\"\", group, false);\nactionManager.createActionToolbar(\"unknown\", group, false);\nactionManager.createActionPopupMenu(ActionPlaces.UNKNOWN, group);\n\n// good:\nactionManager.createActionToolbar(\"MyPlace\", group, false);\nactionManager.createActionPopupMenu(ActionPlaces.EDITOR_TOOLBAR, group);'",
"markdown": "Reports passing unspecified `place` parameter for `ActionManager.createActionToolbar()` and `ActionManager.createActionPopupMenu()`.\n\n\nSpecifying proper `place` is required to distinguish Action's usage in `update()/actionPerformed()` via `AnActionEvent.getPlace()`.\n\n\nExamples:\n\n\n // bad:\n actionManager.createActionToolbar(\"\", group, false);\n actionManager.createActionToolbar(\"unknown\", group, false);\n actionManager.createActionPopupMenu(ActionPlaces.UNKNOWN, group);\n\n // good:\n actionManager.createActionToolbar(\"MyPlace\", group, false);\n actionManager.createActionPopupMenu(ActionPlaces.EDITOR_TOOLBAR, group);\n\n<br />"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnspecifiedActionsPlace",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ActionPresentationInitializedInCtor",
"shortDescription": {
"text": "Eager creation of action presentation"
},
"fullDescription": {
"text": "Reports any actions that are registered in the 'plugin.xml' file and initialize their presentation (text, description, or icon) in their constructors. Loading presentation in constructor results in allocating resources, which may not be necessary. Instead, it's more efficient to utilize no-argument constructors of 'AnAction' and other base classes and follow the convention for setting the text, description, and icon in 'plugin.xml'. The IDE will load text, description, and icon only when the action is actually displayed in the UI. The convention for setting the text, description, and icon is as follows: Set the 'id' attribute for the action in the 'plugin.xml' file. Optionally, set the 'icon' attribute if an icon is needed. Set the text and description in the associated message bundle (it could be overridden in '<actions>'): 'action.<action-id>.text=Translated Action Text' 'action.<action-id>.description=Translated Action Description' Bad example: '// NewKotlinFileAction.kt\n internal class NewKotlinFileAction : AnAction(\n KotlinBundle.message(\"action.new.file.text\"),\n KotlinBundle.message(\"action.new.file.description\"),\n KotlinIcons.FILE\n )' '<action\n class=\"org.jetbrains.kotlin.idea.actions.NewKotlinFileAction\"\n </action>' Good example: '// NewKotlinFileAction.kt\n internal class NewKotlinFileAction : AnAction()' '<action\n id=\"Kotlin.NewFile\"\n class=\"org.jetbrains.kotlin.idea.actions.NewKotlinFileAction\"\n icon=\"org.jetbrains.kotlin.idea.KotlinIcons.FILE\">\n </action>' '# KotlinBundle.properties\n action.Kotlin.NewFile.text=Kotlin Class/File\n action.Kotlin.NewFile.description=Creates a new Kotlin class or file' New in 2023.2",
"markdown": "Reports any actions that are registered in the `plugin.xml` file and initialize their\npresentation (text, description, or icon) in their constructors.\n\n\nLoading presentation in constructor results in allocating resources, which may not be necessary. Instead,\nit's more efficient to utilize no-argument constructors of `AnAction` and other base classes\nand follow the convention for setting the text, description, and icon in `plugin.xml`. The IDE\nwill load text, description, and icon only when the action is actually displayed in the UI.\n\n\nThe convention for setting the text, description, and icon is as follows:\n\n* Set the `id` attribute for the action in the `plugin.xml` file.\n* Optionally, set the `icon` attribute if an icon is needed.\n* Set the text and description in the associated message bundle (it could be overridden in `<actions>`):\n * `action.<action-id>.text=Translated Action Text`\n * `action.<action-id>.description=Translated Action Description`\n\n**Bad example:**\n\n\n // NewKotlinFileAction.kt\n internal class NewKotlinFileAction : AnAction(\n KotlinBundle.message(\"action.new.file.text\"),\n KotlinBundle.message(\"action.new.file.description\"),\n KotlinIcons.FILE\n )\n\n\n \n <action\n class=\"org.jetbrains.kotlin.idea.actions.NewKotlinFileAction\"\n </action>\n\n**Good example:**\n\n\n // NewKotlinFileAction.kt\n internal class NewKotlinFileAction : AnAction()\n\n\n \n <action\n id=\"Kotlin.NewFile\"\n class=\"org.jetbrains.kotlin.idea.actions.NewKotlinFileAction\"\n icon=\"org.jetbrains.kotlin.idea.KotlinIcons.FILE\">\n </action>\n\n\n # KotlinBundle.properties\n action.Kotlin.NewFile.text=Kotlin Class/File\n action.Kotlin.NewFile.description=Creates a new Kotlin class or file\n\nNew in 2023.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ActionPresentationInitializedInCtor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PluginXmlDynamicPlugin",
"shortDescription": {
"text": "Plugin.xml dynamic plugin verification"
},
"fullDescription": {
"text": "Reports dynamic plugin problems. Dynamic plugins can be installed, updated and uninstalled without restarting the IDE (supported in 2020.1 and later). Please see Dynamic Plugins for further reference. New in 2020.1",
"markdown": "Reports dynamic plugin problems.\n\n\nDynamic plugins can be installed, updated and uninstalled without restarting the IDE (supported in 2020.1 and later).\n\n\nPlease see [Dynamic Plugins](https://plugins.jetbrains.com/docs/intellij/dynamic-plugins.html?from=PluginXmlDynamicPlugin) for further reference.\n\nNew in 2020.1"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PluginXmlDynamicPlugin",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Plugin descriptor",
"index": 157,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ComponentRegistrationProblems",
"shortDescription": {
"text": "Component type mismatch"
},
"fullDescription": {
"text": "Reports incorrect registration of plugin components (Actions and Components). The following problems are reported: Action/Component implementation class is abstract. Class is registered in plugin.xml as action but does not extend 'AnAction' class. Action class does not have a public no-argument constructor.",
"markdown": "Reports incorrect registration of plugin components (Actions and Components).\n\n\nThe following problems are reported:\n\n* Action/Component implementation class is abstract.\n* Class is registered in plugin.xml as action but does not extend `AnAction` class.\n* Action class does not have a public no-argument constructor."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "ComponentRegistrationProblems",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LightServiceMustBeFinal",
"shortDescription": {
"text": "Light service must be final"
},
"fullDescription": {
"text": "Reports classes annotated with the '@com.intellij.openapi.components.Service' annotation that are not final. Suggests making a class final if it is concrete. Example: '// MyService.kt\n @Service(Service.Level.APP)\n open class MyService' After the quick-fix is applied: '// MyService.kt\n @Service(Service.Level.APP)\n class MyService' Suggests removing the '@Service' annotation if it is an abstract class or interface. Example: '// MyService.java\n @Service(Service.Level.APP)\n abstract class MyService {}' After the quick-fix is applied: '// MyService.java\n abstract class MyService {}' New in 2023.2",
"markdown": "Reports classes annotated with the `@com.intellij.openapi.components.Service` annotation that are not final.\n\n\nSuggests making a class final if it is concrete.\n\n**Example:**\n\n\n // MyService.kt\n @Service(Service.Level.APP)\n open class MyService\n\nAfter the quick-fix is applied:\n\n\n // MyService.kt\n @Service(Service.Level.APP)\n class MyService\n\n\nSuggests removing the `@Service` annotation if it is an abstract class or interface.\n\n**Example:**\n\n\n // MyService.java\n @Service(Service.Level.APP)\n abstract class MyService {}\n\nAfter the quick-fix is applied:\n\n\n // MyService.java\n abstract class MyService {}\n\nNew in 2023.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "LightServiceMustBeFinal",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LightServiceMigrationXML",
"shortDescription": {
"text": "A service can be converted to a light one"
},
"fullDescription": {
"text": "Reports services registered in 'plugin.xml' that can be converted to light ones. A service that is not intended for overriding is not required to be registered in the 'plugin.xml' file. Instead, annotate the service class with the '@com.intellij.openapi.components.Service' annotation. For project-level services, specify '@Service(Service.Level.PROJECT)'. Requirements: IntelliJ Platform 2019.3 or newer. Service class must be 'final'. 'serviceInterface' is not specified. If the application-level service is a 'com.intellij.openapi.components.PersistentStateComponent', roaming must be disabled ('roamingType = RoamingType.DISABLED'). None of these attributes is specified: 'os', 'client', 'overrides', 'id', 'preload'. Also reports services registered in 'plugin.xml' whose classes are already annotated with '@Service'. See Services in IntelliJ Platform Plugin SDK docs for more details. See also the 'Plugin DevKit | Code | A service can be converted to a light one' inspection. New in 2023.2",
"markdown": "Reports services registered in `plugin.xml` that can be converted to light ones.\n\n\nA service that is not intended for overriding is not required to be registered in the `plugin.xml` file.\nInstead, annotate the service class with the `@com.intellij.openapi.components.Service` annotation. For\nproject-level services, specify `@Service(Service.Level.PROJECT)`.\n\n\nRequirements:\n\n* IntelliJ Platform 2019.3 or newer.\n* Service class must be `final`.\n* `serviceInterface` is not specified.\n* If the application-level service is a `com.intellij.openapi.components.PersistentStateComponent`, roaming must be disabled (`roamingType = RoamingType.DISABLED`).\n* None of these attributes is specified: `os`, `client`, `overrides`, `id`, `preload`.\n\nAlso reports services registered in `plugin.xml` whose classes are already annotated with `@Service`.\n\n\nSee [Services](https://plugins.jetbrains.com/docs/intellij/plugin-services.html) in IntelliJ Platform Plugin SDK docs for more details.\n\n\nSee also the `Plugin DevKit | Code | A service can be converted to a light one` inspection.\n\nNew in 2023.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LightServiceMigrationXML",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Plugin descriptor",
"index": 157,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MissingAccessibleContext",
"shortDescription": {
"text": "Accessible context is missing"
},
"fullDescription": {
"text": "Reports Swing components that do not provide accessibility context. This information is used by screen readers. Failing to provide it makes the component inaccessible for visually impaired users. Example: 'ListCellRenderer<String> renderer = (list, val, index, sel, cell) -> {\n JPanel panel = new JPanel();\n return panel;\n };' To fix the problem, you should either call 'setAccessibleName()' on the returned 'JPanel' or override its 'getAccessibleContext()' method. The returned text should reflect the purpose of the component. For example, in the case of 'ListCellRenderer', this would be the text of the menu item.",
"markdown": "Reports Swing components that do not provide accessibility context.\n\n\nThis information is used by screen readers. Failing to provide it makes the component inaccessible for\nvisually impaired users.\n\n**Example:**\n\n\n ListCellRenderer<String> renderer = (list, val, index, sel, cell) -> {\n JPanel panel = new JPanel();\n return panel;\n };\n\n\nTo fix the problem, you should either call `setAccessibleName()` on the returned `JPanel`\nor override its `getAccessibleContext()` method.\n\n\nThe returned text should reflect the purpose\nof the component. For example, in the case of `ListCellRenderer`, this would be the text of the menu\nitem."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MissingAccessibleContext",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UsePluginIdEquals",
"shortDescription": {
"text": "Use 'PluginId#equals(Object)'"
},
"fullDescription": {
"text": "Reports comparing 'PluginId' instances using '=='. Replace with 'equals()' call.",
"markdown": "Reports comparing `PluginId` instances using `==`.\n\n\nReplace with `equals()` call."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UsePluginIdEquals",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "StatefulEp",
"shortDescription": {
"text": "Stateful extension"
},
"fullDescription": {
"text": "Reports extensions and quick-fixes holding potentially leaking state. Keeping references to 'PsiElement', 'PsiReference', or 'Project' instances can result in memory leaks. Ideally, these should be stateless. For quick-fix, see 'LocalQuickFixOnPsiElement' as a convenient base class.",
"markdown": "Reports extensions and quick-fixes holding potentially leaking state.\n\n\nKeeping references to `PsiElement`, `PsiReference`, or `Project` instances can result in memory leaks.\n\n\nIdeally, these should be stateless.\nFor quick-fix, see `LocalQuickFixOnPsiElement` as a convenient base class."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "StatefulEp",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IncorrectParentDisposable",
"shortDescription": {
"text": "Incorrect parentDisposable parameter"
},
"fullDescription": {
"text": "Reports using 'Application' or 'Project' as a parent 'Disposable' in plugin code. Such usages will lead to plugins not being unloaded correctly. Please see Choosing a Disposable Parent in SDK Docs.",
"markdown": "Reports using `Application` or `Project` as a parent `Disposable` in plugin code.\n\n\nSuch usages will lead to plugins not being unloaded correctly.\nPlease see [Choosing a\nDisposable Parent](https://plugins.jetbrains.com/docs/intellij/disposers.html?from=IncorrectParentDisposable#choosing-a-disposable-parent) in SDK Docs."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "IncorrectParentDisposable",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TokenSetInParserDefinition",
"shortDescription": {
"text": "Non-platform TokenSet declared in ParserDefinition"
},
"fullDescription": {
"text": "Reports 'TokenSet' field declarations referencing non-platform element types in 'ParserDefinition' classes. All languages 'ParserDefinition' are created on the application startup. Declaring a 'TokenSet' referencing non-platform language element types may cause creating and registering all the language element types in the holder class of the referenced type, even if a project doesn't contain any files in this language. Example: '// element types holder:\npublic interface MyLangTokenTypes {\n IElementType COMMENT = new MyLangTokenType(\"COMMENT\");\n IElementType TYPE1 = new MyLangTokenType(\"TYPE1\");\n IElementType TYPE2 = new MyLangTokenType(\"TYPE2\");\n // more types...\n}\n\n\n// bad:\n\npublic class MyLangParserDefinition implements ParserDefinition {\n // this field causes initializing and registering all the types from MyLangTokenTypes:\n private static final TokenSet COMMENTS = TokenSet.create(MyLangTokenTypes.COMMENT);\n\n @NotNull\n @Override\n public TokenSet getCommentTokens() {\n return COMMENTS;\n }\n ...\n}\n\n\n// good:\n\npublic final class MyLangTokenSets {\n public static final TokenSet COMMENTS = TokenSet.create(MyLangTokenTypes.COMMENT);\n}\n\npublic class MyLangParserDefinition implements ParserDefinition {\n @NotNull\n @Override\n public TokenSet getCommentTokens() {\n // types are referenced and registered only when this method is called:\n return MyLangTokenSets.COMMENTS;\n }\n ...\n}\n\n// good (Kotlin):\n\n// top-level declaration is not loaded until getCommentTokens() method is called:\nprivate val COMMENTS = TokenSet.create(MyLangTokenTypes.COMMENT);\n\nclass MyLangParserDefinition : ParserDefinition {\n override getCommentTokens(): TokenSet {\n return COMMENTS;\n }\n ...\n}\n\n// good:\n\npublic class MyLangParserDefinition implements ParserDefinition {\n // allowed platform TokenSet:\n private static final TokenSet COMMENTS1 = TokenSet.EMPTY;\n // allowed platform TokenType:\n private static final TokenSet COMMENTS2 = TokenSet.create(TokenType.WHITE_SPACE);\n\n @NotNull\n @Override\n public TokenSet getCommentTokens() {\n ...\n }\n ...\n}' New in 2023.2",
"markdown": "Reports `TokenSet` field declarations referencing non-platform element types in `ParserDefinition` classes.\n\n\nAll languages `ParserDefinition` are created on the application startup.\nDeclaring a `TokenSet` referencing non-platform language element types may cause creating and registering\nall the language element types in the holder class of the referenced type, even if a project doesn't contain any files in this language.\n\nExample:\n\n\n // element types holder:\n public interface MyLangTokenTypes {\n IElementType COMMENT = new MyLangTokenType(\"COMMENT\");\n IElementType TYPE1 = new MyLangTokenType(\"TYPE1\");\n IElementType TYPE2 = new MyLangTokenType(\"TYPE2\");\n // more types...\n }\n\n\n // bad:\n\n public class MyLangParserDefinition implements ParserDefinition {\n // this field causes initializing and registering all the types from MyLangTokenTypes:\n private static final TokenSet COMMENTS = TokenSet.create(MyLangTokenTypes.COMMENT);\n\n @NotNull\n @Override\n public TokenSet getCommentTokens() {\n return COMMENTS;\n }\n ...\n }\n\n\n // good:\n\n public final class MyLangTokenSets {\n public static final TokenSet COMMENTS = TokenSet.create(MyLangTokenTypes.COMMENT);\n }\n\n public class MyLangParserDefinition implements ParserDefinition {\n @NotNull\n @Override\n public TokenSet getCommentTokens() {\n // types are referenced and registered only when this method is called:\n return MyLangTokenSets.COMMENTS;\n }\n ...\n }\n\n // good (Kotlin):\n\n // top-level declaration is not loaded until getCommentTokens() method is called:\n private val COMMENTS = TokenSet.create(MyLangTokenTypes.COMMENT);\n\n class MyLangParserDefinition : ParserDefinition {\n override getCommentTokens(): TokenSet {\n return COMMENTS;\n }\n ...\n }\n\n // good:\n\n public class MyLangParserDefinition implements ParserDefinition {\n // allowed platform TokenSet:\n private static final TokenSet COMMENTS1 = TokenSet.EMPTY;\n // allowed platform TokenType:\n private static final TokenSet COMMENTS2 = TokenSet.create(TokenType.WHITE_SPACE);\n\n @NotNull\n @Override\n public TokenSet getCommentTokens() {\n ...\n }\n ...\n }\n\nNew in 2023.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "TokenSetInParserDefinition",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PostfixTemplateDescriptionNotFound",
"shortDescription": {
"text": "Postfix template description checker"
},
"fullDescription": {
"text": "Reports postfix templates missing an HTML description file, 'before.template' file or 'after.template' file. These are shown in Settings | Editor | General | Postfix Completion. The Create description file quick-fix creates a template HTML description file.",
"markdown": "Reports postfix templates missing an HTML description file, `before.template` file or `after.template` file. These are shown in [Settings \\| Editor \\| General \\| Postfix Completion](settings://reference.settingsdialog.IDE.editor.postfix.templates).\n\n\nThe **Create description file** quick-fix creates a template HTML description file."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PostfixTemplateDescriptionNotFound",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Description file",
"index": 141,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FileEqualsUsage",
"shortDescription": {
"text": "File.equals() usage"
},
"fullDescription": {
"text": "Reports usages of 'java.io.File.equals()/hashCode()/compareTo()' methods. These do not honor case-insensitivity on macOS. Use 'com.intellij.openapi.util.io.FileUtil.filesEquals()/fileHashCode()/compareFiles()' methods instead.",
"markdown": "Reports usages of `java.io.File.equals()/hashCode()/compareTo()` methods.\n\n\nThese do not honor case-insensitivity on macOS.\n\n\nUse `com.intellij.openapi.util.io.FileUtil.filesEquals()/fileHashCode()/compareFiles()` methods instead."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FileEqualsUsage",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Plugin DevKit/Code",
"index": 66,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "intellij.ktor",
"version": "232.8660.185",
"rules": [
{
"id": "KtorOpenApi",
"shortDescription": {
"text": "OpenAPI documentation for current module is missing"
},
"fullDescription": {
"text": "Reports that there is no OpenAPI documentation for the current Ktor module.",
"markdown": "Reports that there is no OpenAPI documentation for the current Ktor module."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "KtorOpenApi",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Ktor",
"index": 62,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ExtractKtorModule",
"shortDescription": {
"text": "Extract Application module from the current embeddedServer block"
},
"fullDescription": {
"text": "Reports that there is no distinct Application module that is used for the whole Ktor application.",
"markdown": "Reports that there is no distinct Application module that is used for the whole Ktor application."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ExtractKtorModule",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Ktor",
"index": 62,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KtorOpenAPIUpdate",
"shortDescription": {
"text": "OpenAPI documentation for current module is outdated"
},
"fullDescription": {},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "KtorOpenAPIUpdate",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Ktor",
"index": 62,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KtorYamlConfig",
"shortDescription": {
"text": "Ktor application.yaml"
},
"fullDescription": {
"text": "Reports deprecated configuration keys and invalid values in Ktor application '.yaml' configuration files.",
"markdown": "Reports deprecated configuration keys and invalid values in Ktor application `.yaml` configuration files."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "KtorYamlConfig",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Ktor",
"index": 62,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.velocity",
"version": "232.8660.185",
"rules": [
{
"id": "VtlInterpolationsInspection",
"shortDescription": {
"text": "Well-formedness inspection"
},
"fullDescription": {
"text": "Reports illegal usages of formal notation within '#macro' and '#set' directives.",
"markdown": "Reports illegal usages of formal notation within `#macro` and `#set` directives."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "VtlInterpolationsInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Velocity",
"index": 63,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "VtlDirectiveArgsInspection",
"shortDescription": {
"text": "Directive arguments inspection"
},
"fullDescription": {
"text": "Reports illegal values or argument types of Velocity directives.",
"markdown": "Reports illegal values or argument types of Velocity directives."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "VtlDirectiveArgsInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Velocity",
"index": 63,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "VtlFileReferencesInspection",
"shortDescription": {
"text": "File references inspection"
},
"fullDescription": {
"text": "Reports if Velocity file references in '#include' and '#parse' directives are resolved incorrectly.",
"markdown": "Reports if Velocity file references in `#include` and `#parse` directives are resolved incorrectly."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "VtlFileReferencesInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Velocity",
"index": 63,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "VtlReferencesInspection",
"shortDescription": {
"text": "References inspection"
},
"fullDescription": {
"text": "Reports if Velocity references are resolved incorrectly.",
"markdown": "Reports if Velocity references are resolved incorrectly."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "VtlReferencesInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Velocity",
"index": 63,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "VtlTypesInspection",
"shortDescription": {
"text": "Types inspection"
},
"fullDescription": {
"text": "Reports if binary and unary expressions have operands with incorrect types.",
"markdown": "Reports if binary and unary expressions have operands with incorrect types."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "VtlTypesInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Velocity",
"index": 63,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.haulmont.jpab",
"version": "2023.3.1-232",
"rules": [
{
"id": "com.haulmont.jpb.DuplicateVersionAnnotationInspection",
"shortDescription": {
"text": "Only a single Version property or field should be used per class"
},
"fullDescription": {
"text": "This inspection checks for the duplicates of @Version annotation",
"markdown": "This inspection checks for the duplicates of @Version annotation"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "com.haulmont.jpb.DuplicateVersionAnnotationInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JPA Buddy",
"index": 64,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "com.haulmont.jpb.UnsupportedTypeWithoutConverterInspection",
"shortDescription": {
"text": "Attribute with unsupported type should either be @Transient or have custom type or converter declaration"
},
"fullDescription": {
"text": "This inspection checks for the presence of a specified converter for the unknown attribute type.",
"markdown": "This inspection checks for the presence of a specified converter for the unknown attribute type."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "com.haulmont.jpb.UnsupportedTypeWithoutConverterInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JPA Buddy",
"index": 64,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "com.haulmont.jpb.ConverterNotAnnotatedInspection",
"shortDescription": {
"text": "JPA converter must be annotated with @Converter annotation"
},
"fullDescription": {
"text": "This inspection checks for presence @Converter annotation on JPA converter.",
"markdown": "This inspection checks for presence @Converter annotation on JPA converter."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "com.haulmont.jpb.ConverterNotAnnotatedInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JPA Buddy",
"index": 64,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "com.haulmont.jpb.SpringDataModifyingAnnotationMissing",
"shortDescription": {
"text": "Update/Delete queries must be annotated with @Modifying, otherwise an InvalidDataAccessApiUsageException will be thrown."
},
"fullDescription": {
"text": "This inspection checks that delete/update queries are annotated with @Modifying",
"markdown": "This inspection checks that delete/update queries are annotated with @Modifying"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "com.haulmont.jpb.SpringDataModifyingAnnotationMissing",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JPA Buddy",
"index": 64,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "com.haulmont.jpb.IncompatibleTableAnnotationInspection",
"shortDescription": {
"text": "@Table annotation should not be used together with SINGLE_TABLE inheritance strategy."
},
"fullDescription": {
"text": "This inspection checks that child entity of parent that have SINGLE_TABLE inheritance strategy doesn't have @Table annotation.",
"markdown": "This inspection checks that child entity of parent that have SINGLE_TABLE inheritance strategy doesn't have @Table annotation."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "com.haulmont.jpb.IncompatibleTableAnnotationInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JPA Buddy",
"index": 64,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "com.haulmont.jpb.LombokBuilderAllArgsInspection",
"shortDescription": {
"text": "Lombok @Builder needs a proper constructor for this class"
},
"fullDescription": {
"text": "This inspection checks that all-args constructor exists for @lombok.Builder in JPA entities",
"markdown": "This inspection checks that all-args constructor exists for @lombok.Builder in JPA entities"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "com.haulmont.jpb.LombokBuilderAllArgsInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JPA Buddy",
"index": 64,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "com.haulmont.jpb.AssociationFieldHasColumnAnnotation",
"shortDescription": {
"text": "Association field marked with @Column"
},
"fullDescription": {
"text": "This inspection detect incorrect use @Column annotation for association attributes with @OneToOne and @ManyToOne annotations",
"markdown": "This inspection detect incorrect use @Column annotation for association attributes with @OneToOne and @ManyToOne annotations"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "com.haulmont.jpb.AssociationFieldHasColumnAnnotation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JPA Buddy",
"index": 64,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "com.haulmont.jpb.CompositeIdClassSerializable",
"shortDescription": {
"text": "Composite id class must implement Serializable"
},
"fullDescription": {
"text": "This inspection checks composite-key class implement Serializable.",
"markdown": "This inspection checks composite-key class implement Serializable."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "com.haulmont.jpb.CompositeIdClassSerializable",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JPA Buddy",
"index": 64,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "com.haulmont.jpb.LombokEqualsAndHashCodeInspection",
"shortDescription": {
"text": "Using @EqualsAndHashCode for JPA entities is not recommended. It can cause severe performance and memory consumption issues."
},
"fullDescription": {
"text": "This inspection checks that @lombok.EqualsAndHashCode used in JPA entities",
"markdown": "This inspection checks that @lombok.EqualsAndHashCode used in JPA entities"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "com.haulmont.jpb.LombokEqualsAndHashCodeInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JPA Buddy",
"index": 64,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "com.haulmont.jpb.MoreThanOneIdInspection",
"shortDescription": {
"text": "Entity has more than one id attribute."
},
"fullDescription": {
"text": "This inspection checks for multiple id attributes in one entity.",
"markdown": "This inspection checks for multiple id attributes in one entity."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "com.haulmont.jpb.MoreThanOneIdInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JPA Buddy",
"index": 64,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "com.haulmont.jpb.EqualsDoesntCheckParameterClass",
"shortDescription": {
"text": "Equals() method should check the class of its parameter"
},
"fullDescription": {
"text": "This inspection checks that equals() method checks class of it's parameter.",
"markdown": "This inspection checks that equals() method checks class of it's parameter."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "com.haulmont.jpb.EqualsDoesntCheckParameterClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JPA Buddy",
"index": 64,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "com.haulmont.jpb.NoArgsConstructorInspection",
"shortDescription": {
"text": "Entities are required to have a public or protected no-argument constructor"
},
"fullDescription": {
"text": "This inspection checks no-arg constructor for class.",
"markdown": "This inspection checks no-arg constructor for class."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "com.haulmont.jpb.NoArgsConstructorInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JPA Buddy",
"index": 64,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "com.haulmont.jpb.DataClassEqualsAndHashCodeInspection",
"shortDescription": {
"text": "The data class implementations of equals(), hashCode() and toString() are not recommended for JPA entities. They can cause severe performance and memory consumption issues. "
},
"fullDescription": {
"text": "This inspection checks for the presence of overridden equals() and hashCode() for data classes, used as entities",
"markdown": "This inspection checks for the presence of overridden equals() and hashCode() for data classes, used as entities"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "com.haulmont.jpb.DataClassEqualsAndHashCodeInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JPA Buddy",
"index": 64,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "com.haulmont.jpb.LombokAllArgsInspection",
"shortDescription": {
"text": "Using @AllArgsConstructor for JPA entities without defined no-argument constructor breaks JPA specification."
},
"fullDescription": {
"text": "This inspection checks that @lombok.AllArgsConstructor used in JPA entities",
"markdown": "This inspection checks that @lombok.AllArgsConstructor used in JPA entities"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "com.haulmont.jpb.LombokAllArgsInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JPA Buddy",
"index": 64,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "com.haulmont.jpb.LombokBuilderInspection",
"shortDescription": {
"text": "Using @Builder for JPA entities without defined no-argument constructor breaks JPA specification."
},
"fullDescription": {
"text": "This inspection checks that @lombok.Builder used in JPA entities",
"markdown": "This inspection checks that @lombok.Builder used in JPA entities"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "com.haulmont.jpb.LombokBuilderInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JPA Buddy",
"index": 64,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "com.haulmont.jpb.LombokToStringIncludeInspection",
"shortDescription": {
"text": "This field is loaded lazily but is included into the @ToString. It can cause performance and memory consumption issues."
},
"fullDescription": {
"text": "This inspection checks that lazy fields used in pair with @lombok.ToString in JPA entities",
"markdown": "This inspection checks that lazy fields used in pair with @lombok.ToString in JPA entities"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "com.haulmont.jpb.LombokToStringIncludeInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JPA Buddy",
"index": 64,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "com.haulmont.jpb.EntityIdMissingInspection",
"shortDescription": {
"text": "Entity does not have primary key"
},
"fullDescription": {
"text": "This inspection checks for the presence of a primary key attribute of the entity",
"markdown": "This inspection checks for the presence of a primary key attribute of the entity"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "com.haulmont.jpb.EntityIdMissingInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JPA Buddy",
"index": 64,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "com.haulmont.jpb.SpringDataPageableParameterMissing",
"shortDescription": {
"text": "Query returning Page must have a Pageable parameter."
},
"fullDescription": {
"text": "This inspection verifies that a Pageable parameter is present in queries returning Page.",
"markdown": "This inspection verifies that a Pageable parameter is present in queries returning Page."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "com.haulmont.jpb.SpringDataPageableParameterMissing",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JPA Buddy",
"index": 64,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "com.haulmont.jpb.OneToOneWithLazy",
"shortDescription": {
"text": "Specifying FetchType.LAZY for the non-owning side of the @OneToOne association will not affect the loading. The related entity will still be loaded as if the FetchType.EAGER is defined."
},
"fullDescription": {
"text": "This inspection checks for the non-owning side of the @OneToOne associations with the FetchType.Lazy attribute. Specifying FetchType.LAZY for the non-owning side of the @OneToOne association will not affect the loading. The related entity will still be loaded as if the FetchType.EAGER is defined. For more info see the documentation.",
"markdown": "This inspection checks for the non-owning side of the @OneToOne associations with the FetchType.Lazy attribute. Specifying FetchType.LAZY for the non-owning side of the @OneToOne association will not affect the loading. The related entity will still be loaded as if the FetchType.EAGER is defined. For more info see [the documentation](https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_User_Guide.html#associations-one-to-one-bidirectional-lazy)."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "com.haulmont.jpb.OneToOneWithLazy",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JPA Buddy",
"index": 64,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "com.haulmont.jpb.LombokToStringInspection",
"shortDescription": {
"text": "@ToString includes lazy loaded fields and/or associations. This can cause performance and memory consumption issues."
},
"fullDescription": {
"text": "This inspection checks that lazy fields used in pair with @lombok.ToString in JPA entities",
"markdown": "This inspection checks that lazy fields used in pair with @lombok.ToString in JPA entities"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "com.haulmont.jpb.LombokToStringInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JPA Buddy",
"index": 64,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "com.haulmont.jpb.ConverterSpecifiedIncorrectlyInspection",
"shortDescription": {
"text": "Converter's type doesn't match with the attribute type"
},
"fullDescription": {
"text": "This inspection checks that specified JPA converter type matches with attribute type",
"markdown": "This inspection checks that specified JPA converter type matches with attribute type"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "com.haulmont.jpb.ConverterSpecifiedIncorrectlyInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JPA Buddy",
"index": 64,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "com.haulmont.jpb.LombokDataInspection",
"shortDescription": {
"text": "Using @Data for JPA entities is not recommended. It can cause severe performance and memory consumption issues."
},
"fullDescription": {
"text": "This inspection checks that @lombok.Data used in JPA entities",
"markdown": "This inspection checks that @lombok.Data used in JPA entities"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "com.haulmont.jpb.LombokDataInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JPA Buddy",
"index": 64,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "com.haulmont.jpb.ManyToManyCascadeRemove",
"shortDescription": {
"text": "For @ManyToMany associations, the REMOVE entity state transition doesn't make sense to be cascaded because it will propagate beyond the link table."
},
"fullDescription": {
"text": "This inspection checks for @ManyToMany associations with the CascadeType.REMOVE attribute. Specifying CascadeType.REMOVE for @ManyTOMany doesnt make sense to be cascaded because it will propagate beyond the link table. Since the other side might be referenced by other entities on the parent-side, the automatic removal might end up in a ConstraintViolationException. For example, if @ManyToMany(cascade = CascadeType.ALL) was defined and the first person would be deleted, Hibernate would throw an exception because another person is still associated with the address thats being deleted. For more info see the article.",
"markdown": "This inspection checks for @ManyToMany associations with the CascadeType.REMOVE attribute. Specifying CascadeType.REMOVE for @ManyTOMany doesn't make sense to be cascaded because it will propagate beyond the link table. Since the other side might be referenced by other entities on the parent-side, the automatic removal might end up in a ConstraintViolationException. For example, if @ManyToMany(cascade = CascadeType.ALL) was defined and the first person would be deleted, Hibernate would throw an exception because another person is still associated with the address that's being deleted. For more info see [the article](https://vladmihalcea.com/hypersistence-optimizer/docs/user-guide/#ManyToManyCascadeRemoveEvent)."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "com.haulmont.jpb.ManyToManyCascadeRemove",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JPA Buddy",
"index": 64,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "com.haulmont.jpb.AssociationNotMarkedInspection",
"shortDescription": {
"text": "Entity attribute is not marked with association annotation"
},
"fullDescription": {
"text": "This inspection checks for associations that are not marked with corresponding annotations.",
"markdown": "This inspection checks for associations that are not marked with corresponding annotations."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "com.haulmont.jpb.AssociationNotMarkedInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JPA Buddy",
"index": 64,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "mobi.hsz.idea.gitignore",
"version": "4.5.1",
"rules": [
{
"id": "IgnoreDuplicateEntry",
"shortDescription": {
"text": "Duplicate entry"
},
"fullDescription": {
"text": "Checks if entry is duplicated.",
"markdown": "Checks if entry is duplicated."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "IgnoreDuplicateEntry",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Ignore",
"index": 72,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IgnoreCoverEntry",
"shortDescription": {
"text": "Cover entry"
},
"fullDescription": {
"text": "Checks if entry is covered by another entry.",
"markdown": "Checks if entry is covered by another entry."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "IgnoreCoverEntry",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Ignore",
"index": 72,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IgnoreRelativeEntry",
"shortDescription": {
"text": "Relative entry"
},
"fullDescription": {
"text": "Checks if entry is a relative path.",
"markdown": "Checks if entry is a relative path."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "IgnoreRelativeEntry",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Ignore",
"index": 72,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IgnoreSyntaxEntry",
"shortDescription": {
"text": "Syntax entry"
},
"fullDescription": {
"text": "Checks if syntax entry has correct value.",
"markdown": "Checks if syntax entry has correct value."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "IgnoreSyntaxEntry",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Ignore",
"index": 72,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IgnoreIncorrectEntry",
"shortDescription": {
"text": "Incorrect entry"
},
"fullDescription": {
"text": "Checks if entry has correct form in specific according to the specific syntax.",
"markdown": "Checks if entry has correct form in specific according to the specific syntax."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "IgnoreIncorrectEntry",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Ignore",
"index": 72,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.css",
"version": "232.8660.185",
"rules": [
{
"id": "CssInvalidFunction",
"shortDescription": {
"text": "Invalid function"
},
"fullDescription": {
"text": "Reports an unknown CSS function or an incorrect function parameter.",
"markdown": "Reports an unknown [CSS function](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Functions) or an incorrect function parameter."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "CssInvalidFunction",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "CSS/Invalid elements",
"index": 74,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CssConvertColorToRgbInspection",
"shortDescription": {
"text": "Color could be replaced with rgb()"
},
"fullDescription": {
"text": "Reports an 'hsl()' or 'hwb()' color function or a hexadecimal color notation. Suggests replacing such color value with an equivalent 'rgb()' or 'rgba()' color function. Example: '#0c0fff' After the quick-fix is applied: 'rgb(12, 15, 255)'.",
"markdown": "Reports an `hsl()` or `hwb()` color function or a hexadecimal color notation.\n\nSuggests replacing such color value with an equivalent `rgb()` or `rgba()` color function.\n\n**Example:**\n\n #0c0fff\n\nAfter the quick-fix is applied:\n\n rgb(12, 15, 255).\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CssConvertColorToRgbInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "CSS",
"index": 73,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CssOverwrittenProperties",
"shortDescription": {
"text": "Overwritten property"
},
"fullDescription": {
"text": "Reports a duplicated CSS property within a ruleset. Respects shorthand properties. Example: '.foo {\n margin-bottom: 1px;\n margin-bottom: 1px; /* duplicates margin-bottom */\n margin: 0; /* overrides margin-bottom */\n}'",
"markdown": "Reports a duplicated CSS property within a ruleset. Respects shorthand properties.\n\n**Example:**\n\n\n .foo {\n margin-bottom: 1px;\n margin-bottom: 1px; /* duplicates margin-bottom */\n margin: 0; /* overrides margin-bottom */\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CssOverwrittenProperties",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "CSS",
"index": 73,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CssInvalidNestedSelector",
"shortDescription": {
"text": "Invalid nested selector"
},
"fullDescription": {
"text": "Reports a nested selector starting with an identifier or a functional notation.",
"markdown": "Reports a nested selector starting with an identifier or a functional notation."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CssInvalidNestedSelector",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "CSS/Invalid elements",
"index": 74,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CssInvalidHtmlTagReference",
"shortDescription": {
"text": "Invalid type selector"
},
"fullDescription": {
"text": "Reports a CSS type selector that matches an unknown HTML element.",
"markdown": "Reports a CSS [type selector](https://developer.mozilla.org/en-US/docs/Web/CSS/Type_selectors) that matches an unknown HTML element."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CssInvalidHtmlTagReference",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "CSS/Invalid elements",
"index": 74,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CssMissingSemicolon",
"shortDescription": {
"text": "Missing semicolon"
},
"fullDescription": {
"text": "Reports a missing semicolon at the end of a declaration.",
"markdown": "Reports a missing semicolon at the end of a declaration."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CssMissingSemicolon",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "CSS/Code style issues",
"index": 213,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CssUnknownTarget",
"shortDescription": {
"text": "Unresolved file reference"
},
"fullDescription": {
"text": "Reports an unresolved file reference, for example, an incorrect path in an '@import' statement.",
"markdown": "Reports an unresolved file reference, for example, an incorrect path in an `@import` statement."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "CssUnknownTarget",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "CSS/Invalid elements",
"index": 74,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CssInvalidCharsetRule",
"shortDescription": {
"text": "Misplaced or incorrect @charset"
},
"fullDescription": {
"text": "Reports a misplaced '@charset' at-rule or an incorrect charset value.",
"markdown": "Reports a misplaced `@charset` at-rule or an incorrect charset value."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CssInvalidCharsetRule",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "CSS/Invalid elements",
"index": 74,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CssInvalidPseudoSelector",
"shortDescription": {
"text": "Invalid pseudo-selector"
},
"fullDescription": {
"text": "Reports an incorrect CSS pseudo-class pseudo-element.",
"markdown": "Reports an incorrect CSS [pseudo-class](https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes) [pseudo-element](https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements)."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "CssInvalidPseudoSelector",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "CSS/Invalid elements",
"index": 74,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CssBrowserCompatibilityForProperties",
"shortDescription": {
"text": "Property is incompatible with selected browsers"
},
"fullDescription": {
"text": "Reports a CSS property that is not supported by the specified browsers. Based on the MDN Compatibility Data.",
"markdown": "Reports a CSS property that is not supported by the specified browsers. Based on the [MDN Compatibility Data](https://github.com/mdn/browser-compat-data)."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CssBrowserCompatibilityForProperties",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "CSS",
"index": 73,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CssInvalidMediaFeature",
"shortDescription": {
"text": "Invalid media feature"
},
"fullDescription": {
"text": "Reports an unknown CSS media feature or an incorrect media feature value.",
"markdown": "Reports an unknown [CSS media feature](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries) or an incorrect media feature value."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "CssInvalidMediaFeature",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "CSS/Invalid elements",
"index": 74,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CssUnresolvedCustomProperty",
"shortDescription": {
"text": "Unresolved custom property"
},
"fullDescription": {
"text": "Reports an unresolved reference to a custom property among the arguments of the 'var()' function.",
"markdown": "Reports an unresolved reference to a [custom property](https://developer.mozilla.org/en-US/docs/Web/CSS/--*) among the arguments of the `var()` function."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "CssUnresolvedCustomProperty",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "CSS/Invalid elements",
"index": 74,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CssUnknownProperty",
"shortDescription": {
"text": "Unknown property"
},
"fullDescription": {
"text": "Reports an unknown CSS property or a property used in a wrong context. Add the unknown property to the 'Custom CSS properties' list to skip validation.",
"markdown": "Reports an unknown CSS property or a property used in a wrong context.\n\nAdd the unknown property to the 'Custom CSS properties' list to skip validation."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CssUnknownProperty",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "CSS/Invalid elements",
"index": 74,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CssMissingComma",
"shortDescription": {
"text": "Missing comma in selector list"
},
"fullDescription": {
"text": "Reports a multi-line selector. Most likely this means that several single-line selectors are actually intended but a comma is missing at the end of one or several lines. Example: 'input /* comma has probably been forgotten */\n.button {\n margin: 1px;\n}'",
"markdown": "Reports a multi-line selector. Most likely this means that several single-line selectors are actually intended but a comma is missing at the end of one or several lines.\n\n**Example:**\n\n\n input /* comma has probably been forgotten */\n .button {\n margin: 1px;\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CssMissingComma",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "CSS/Probable bugs",
"index": 243,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CssUnusedSymbol",
"shortDescription": {
"text": "Unused selector"
},
"fullDescription": {
"text": "Reports a CSS class or an element IDs that appears in selectors but is not used in HTML. Note that complete inspection results are available only when running it via Code | Inspect Code or Code | Analyze Code | Run Inspection by Name. Due to performance reasons, style sheet files are not inspected on the fly.",
"markdown": "Reports a CSS class or an element IDs that appears in selectors but is not used in HTML.\n\n\nNote that complete inspection results are available only when running it via **Code \\| Inspect Code** or\n**Code \\| Analyze Code \\| Run Inspection by Name**.\nDue to performance reasons, style sheet files are not inspected on the fly."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CssUnusedSymbol",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "CSS",
"index": 73,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CssNonIntegerLengthInPixels",
"shortDescription": {
"text": "Non-integer length in pixels"
},
"fullDescription": {
"text": "Reports a non-integer length in pixels. Example: 'width: 3.14px'",
"markdown": "Reports a non-integer length in pixels.\n\n**Example:**\n\n width: 3.14px\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "CssNonIntegerLengthInPixels",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "CSS/Probable bugs",
"index": 243,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CssConvertColorToHexInspection",
"shortDescription": {
"text": "Color could be replaced with #-hex"
},
"fullDescription": {
"text": "Reports an 'rgb()', 'hsl()', or other color function. Suggests replacing a color function with an equivalent hexadecimal notation. Example: 'rgb(12, 15, 255)' After the quick-fix is applied: '#0c0fff'.",
"markdown": "Reports an `rgb()`, `hsl()`, or other color function.\n\nSuggests replacing a color function with an equivalent hexadecimal notation.\n\n**Example:**\n\n rgb(12, 15, 255)\n\nAfter the quick-fix is applied:\n\n #0c0fff.\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CssConvertColorToHexInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "CSS",
"index": 73,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CssInvalidAtRule",
"shortDescription": {
"text": "Unknown at-rule"
},
"fullDescription": {
"text": "Reports an unknown CSS at-rule.",
"markdown": "Reports an unknown [CSS at-rule](https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule)."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "CssInvalidAtRule",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "CSS/Invalid elements",
"index": 74,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CssNegativeValue",
"shortDescription": {
"text": "Negative property value"
},
"fullDescription": {
"text": "Reports a negative value of a CSS property that is not expected to be less than zero, for example, object width or height.",
"markdown": "Reports a negative value of a CSS property that is not expected to be less than zero, for example, object width or height."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "CssNegativeValue",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "CSS/Invalid elements",
"index": 74,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CssNoGenericFontName",
"shortDescription": {
"text": "Missing generic font family name"
},
"fullDescription": {
"text": "Verifies that the 'font-family' property contains a generic font family name as a fallback alternative. Generic font family names are: 'serif', 'sans-serif', 'cursive', 'fantasy', and 'monospace'.",
"markdown": "Verifies that the [font-family](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family) property contains a generic font family name as a fallback alternative.\n\n\nGeneric font family names are: `serif`, `sans-serif`, `cursive`, `fantasy`,\nand `monospace`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CssNoGenericFontName",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "CSS/Probable bugs",
"index": 243,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CssRedundantUnit",
"shortDescription": {
"text": "Redundant measure unit"
},
"fullDescription": {
"text": "Reports a measure unit of a zero value where units are not required by the specification. Example: 'width: 0px'",
"markdown": "Reports a measure unit of a zero value where units are not required by the specification.\n\n**Example:**\n\n width: 0px\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CssRedundantUnit",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "CSS/Code style issues",
"index": 213,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CssInvalidPropertyValue",
"shortDescription": {
"text": "Invalid property value"
},
"fullDescription": {
"text": "Reports an incorrect CSS property value.",
"markdown": "Reports an incorrect CSS property value."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "CssInvalidPropertyValue",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "CSS/Invalid elements",
"index": 74,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CssReplaceWithShorthandUnsafely",
"shortDescription": {
"text": "Properties may probably be replaced with a shorthand"
},
"fullDescription": {
"text": "Reports a set of longhand CSS properties and suggests replacing an incomplete set of longhand CSS properties with a shorthand form, which is however not 100% equivalent in this case. For example, 2 properties: 'outline-color' and 'outline-style' may be replaced with a single 'outline'. Such replacement is not 100% equivalent because shorthands reset all omitted sub-values to their initial states. In this example, switching to the 'outline' shorthand means that 'outline-width' is also set to its initial value, which is 'medium'. This inspection doesn't handle full sets of longhand properties (when switching to shorthand is 100% safe). For such cases see the 'Properties may be safely replaced with a shorthand' inspection instead.",
"markdown": "Reports a set of longhand CSS properties and suggests replacing an incomplete set of longhand CSS properties with a shorthand form, which is however not 100% equivalent in this case.\n\n\nFor example, 2 properties: `outline-color` and `outline-style` may be replaced with a single `outline`.\nSuch replacement is not 100% equivalent because shorthands reset all omitted sub-values to their initial states.\nIn this example, switching to the `outline` shorthand means that `outline-width` is also set to its initial value,\nwhich is `medium`.\n\n\nThis inspection doesn't handle full sets of longhand properties (when switching to shorthand is 100% safe).\nFor such cases see the 'Properties may be safely replaced with a shorthand' inspection instead."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "CssReplaceWithShorthandUnsafely",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "CSS",
"index": 73,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CssInvalidImport",
"shortDescription": {
"text": "Misplaced @import"
},
"fullDescription": {
"text": "Reports a misplaced '@import' statement. According to the specification, '@import' rules must precede all other types of rules, except '@charset' rules.",
"markdown": "Reports a misplaced `@import` statement.\n\n\nAccording to the [specification](https://developer.mozilla.org/en-US/docs/Web/CSS/@import),\n`@import` rules must precede all other types of rules, except `@charset` rules."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CssInvalidImport",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "CSS/Invalid elements",
"index": 74,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CssUnresolvedClassInComposesRule",
"shortDescription": {
"text": "Unresolved class in 'composes' rule"
},
"fullDescription": {
"text": "Reports a CSS class reference in the 'composes' rule that cannot be resolved to any valid target. Example: '.className {/* ... */}\n\n .otherClassName {\n composes: className;\n }'",
"markdown": "Reports a CSS class reference in the ['composes'](https://github.com/css-modules/css-modules#composition) rule that cannot be resolved to any valid target.\n\n**Example:**\n\n\n .className {/* ... */}\n\n .otherClassName {\n composes: className;\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "CssUnresolvedClassInComposesRule",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "CSS/Invalid elements",
"index": 74,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CssReplaceWithShorthandSafely",
"shortDescription": {
"text": "Properties may be safely replaced with a shorthand"
},
"fullDescription": {
"text": "Reports a set of longhand properties. Suggests replacing a complete set of longhand CSS properties with an equivalent shorthand form. For example, 4 properties: 'padding-top', 'padding-right', 'padding-bottom', and 'padding-left' can be safely replaced with a single 'padding' property. Note that this inspection doesn't show up if the set of longhand properties is incomplete (e.g. only 3 'padding-xxx' properties in a ruleset) because switching to a shorthand may change the result. For such cases consider the 'Properties may probably be replaced with a shorthand' inspection.",
"markdown": "Reports a set of longhand properties. Suggests replacing a complete set of longhand CSS properties with an equivalent shorthand form.\n\n\nFor example, 4 properties: `padding-top`, `padding-right`, `padding-bottom`, and\n`padding-left`\ncan be safely replaced with a single `padding` property.\n\n\nNote that this inspection doesn't show up if the set of longhand properties is incomplete\n(e.g. only 3 `padding-xxx` properties in a ruleset)\nbecause switching to a shorthand may change the result.\nFor such cases consider the 'Properties may probably be replaced with a shorthand'\ninspection."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "CssReplaceWithShorthandSafely",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "CSS",
"index": 73,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "Pythonid",
"version": "232.8660.185",
"rules": [
{
"id": "PyProtocolInspection",
"shortDescription": {
"text": "Invalid protocol definitions and usages"
},
"fullDescription": {
"text": "Reports invalid definitions and usages of protocols introduced in PEP-544. Example: 'from typing import Protocol\n\n\nclass MyProtocol(Protocol):\n def method(self, p: int) -> str:\n pass\n\n\nclass MyClass(MyProtocol):\n def method(self, p: str) -> int: # Type of 'method' is not compatible with 'MyProtocol'\n pass\n\n\nclass MyAnotherProtocol(MyClass, Protocol): # All bases of a protocol must be protocols\n pass'",
"markdown": "Reports invalid definitions and usages of protocols introduced in\n[PEP-544](https://www.python.org/dev/peps/pep-0544/).\n\n**Example:**\n\n\n from typing import Protocol\n\n\n class MyProtocol(Protocol):\n def method(self, p: int) -> str:\n pass\n\n\n class MyClass(MyProtocol):\n def method(self, p: str) -> int: # Type of 'method' is not compatible with 'MyProtocol'\n pass\n\n\n class MyAnotherProtocol(MyClass, Protocol): # All bases of a protocol must be protocols\n pass\n\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyProtocol",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyMethodMayBeStaticInspection",
"shortDescription": {
"text": "Method is not declared static"
},
"fullDescription": {
"text": "Reports any methods that do not require a class instance creation and can be made static. Example: 'class MyClass(object):\n def my_method(self, x):\n print(x)' If a Make function from method quick-fix is applied, the code changes to: 'def my_method(x):\n print(x)\n\n\nclass MyClass(object):\n pass' If you select the Make method static quick-fix, the '@staticmethod' decorator is added: 'class MyClass(object):\n @staticmethod\n def my_method(x):\n print(x)'",
"markdown": "Reports any methods that do not require a class instance creation and can be\nmade static.\n\n**Example:**\n\n\n class MyClass(object):\n def my_method(self, x):\n print(x)\n\nIf a **Make function from method** quick-fix is applied, the code changes to:\n\n\n def my_method(x):\n print(x)\n\n\n class MyClass(object):\n pass\n\nIf you select the **Make method static** quick-fix, the `@staticmethod` decorator is added:\n\n\n class MyClass(object):\n @staticmethod\n def my_method(x):\n print(x)\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PyMethodMayBeStatic",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyAssignmentToLoopOrWithParameterInspection",
"shortDescription": {
"text": "Assignments to 'for' loop or 'with' statement parameter"
},
"fullDescription": {
"text": "Reports the cases when you rewrite a loop variable with an inner loop. Example: 'for i in range(5):\n for i in range(20, 25):\n print(\"Inner\", i)\n print(\"Outer\", i)' It also warns you if a variable declared in the 'with' statement is redeclared inside the statement body: 'with open(\"file\") as f:\n f.read()\n with open(\"file\") as f:'",
"markdown": "Reports the cases when you rewrite a loop variable with an inner loop.\n\n**Example:**\n\n\n for i in range(5):\n for i in range(20, 25):\n print(\"Inner\", i)\n print(\"Outer\", i)\n \nIt also warns you if a variable declared in the `with` statement is redeclared inside the statement body:\n\n\n with open(\"file\") as f:\n f.read()\n with open(\"file\") as f:\n \n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PyAssignmentToLoopOrWithParameter",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DjangoUnresolvedFilterInspection",
"shortDescription": {
"text": "Unresolved filter"
},
"fullDescription": {
"text": "Reports unresolved filters in Django templates. Example: '{{ my_value|cool_filter:\"arg\" }}'",
"markdown": "Reports unresolved filters in Django templates.\n\n**Example:**\n\n\n {{ my_value|cool_filter:\"arg\" }}\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DjangoUnresolvedFilterInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Django",
"index": 87,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AppEngineThreadsafeCGIHandlerInspection",
"shortDescription": {
"text": "Threadsafe cannot be enabled with the CGI handler"
},
"fullDescription": {
"text": "Reports cases when threadsafe is not enabled with the CGI handler.",
"markdown": "Reports cases when threadsafe is not enabled with the CGI handler."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AppEngineThreadsafeCGIHandler",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Google App Engine (Python)",
"index": 88,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PySuperArgumentsInspection",
"shortDescription": {
"text": "Wrong arguments to call super"
},
"fullDescription": {
"text": "Reports cases when any call to 'super(A, B)' does not meet the following requirements: 'B' is an instance of 'A' 'B' a subclass of 'A' Example: 'class Figure:\n def color(self):\n pass\n\n\nclass Rectangle(Figure):\n def color(self):\n pass\n\n\nclass Square(Figure):\n def color(self):\n return super(Rectangle, self).color() # Square is not an instance or subclass of Rectangle' As a fix, you can make the 'Square' an instance of the 'Rectangle' class.",
"markdown": "Reports cases when any call to `super(A, B)` does not meet the\nfollowing requirements:\n\n* `B` is an instance of `A`\n* `B` a subclass of `A`\n\n**Example:**\n\n\n class Figure:\n def color(self):\n pass\n\n\n class Rectangle(Figure):\n def color(self):\n pass\n\n\n class Square(Figure):\n def color(self):\n return super(Rectangle, self).color() # Square is not an instance or subclass of Rectangle\n\nAs a fix, you can make the `Square` an instance of the `Rectangle` class."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PySuperArguments",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DjangoOrmInspection",
"shortDescription": {
"text": "Django ORM error"
},
"fullDescription": {
"text": "Reports several methods that may not be called due to some ORM reasons. Example: 'class Choice:\n question = ForeignKey(Question, null=False)\n\n\nchoice_set = Question.objects.get(id=1).choice_set.remove()' The 'remove' function can not be called if the foreign key has 'null=False'.",
"markdown": "Reports several methods that may not be called due to some ORM reasons.\n\n**Example:**\n\n\n class Choice:\n question = ForeignKey(Question, null=False)\n\n\n choice_set = Question.objects.get(id=1).choice_set.remove()\n\nThe `remove` function can not be called if the foreign key has `null=False`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DjangoOrm",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Django",
"index": 87,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyAttributeOutsideInitInspection",
"shortDescription": {
"text": "An instance attribute is defined outside `__init__`"
},
"fullDescription": {
"text": "Reports a problem when instance attribute definition is outside '__init__' method. Example: 'class Book:\n def __init__(self):\n self.author = 'Mark Twain'\n\n def release(self):\n self.year = '1889'' When the quick-fix is applied, the code sample changes to: 'class Book:\n def __init__(self):\n self.year = '1889'\n self.author = 'Mark Twain'\n\n def release(self):\n pass'",
"markdown": "Reports a problem when instance attribute definition is outside `__init__` method.\n\n**Example:**\n\n\n class Book:\n def __init__(self):\n self.author = 'Mark Twain'\n\n def release(self):\n self.year = '1889'\n\n\nWhen the quick-fix is applied, the code sample changes to:\n\n\n class Book:\n def __init__(self):\n self.year = '1889'\n self.author = 'Mark Twain'\n\n def release(self):\n pass\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PyAttributeOutsideInit",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyMissingTypeHintsInspection",
"shortDescription": {
"text": "Missing type hinting for function definition"
},
"fullDescription": {
"text": "Reports missing type hints for function declaration in one of the two formats: parameter annotations or a type comment. Select the Only when types are known checkbox if you want the inspection check the types collected from runtime or inferred.",
"markdown": "Reports missing type hints for function declaration in\none of the two formats: parameter annotations or a type comment.\n\nSelect the **Only when types are known** checkbox if you want the inspection check\nthe types collected from runtime or inferred."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PyMissingTypeHints",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyComparisonWithNoneInspection",
"shortDescription": {
"text": "Using equality operators to compare with None"
},
"fullDescription": {
"text": "Reports comparisons with 'None'. That type of comparisons should always be done with 'is' or 'is not', never the equality operators. Example: 'a = 2\n\n\nif a == None:\n print(\"Success\")' Once the quick-fix is applied, the code changes to: 'a = 2\n\n\nif a is None:\n print(\"Success\")'",
"markdown": "Reports comparisons with `None`. That type of comparisons\nshould always be done with `is` or `is not`, never\nthe equality operators.\n\n**Example:**\n\n\n a = 2\n\n\n if a == None:\n print(\"Success\")\n\nOnce the quick-fix is applied, the code changes to:\n\n\n a = 2\n\n\n if a is None:\n print(\"Success\")\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PyComparisonWithNone",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyMethodParametersInspection",
"shortDescription": {
"text": "Improper first parameter"
},
"fullDescription": {
"text": "Reports methods that lack the first parameter that is usually named 'self'. Example: 'class Movie:\n\n def show():\n pass' When the quick-fix is applied, the code changes to: 'class Movie:\n\n def show(self):\n pass' The inspection also reports naming issues in class methods. Example: 'class Movie:\n @classmethod\n def show(abc):\n pass' Since the first parameter of a class method should be 'cls', the IDE provides a quick-fix to rename it.",
"markdown": "Reports methods that lack the first parameter that is usually\nnamed `self`.\n\n**Example:**\n\n\n class Movie:\n\n def show():\n pass\n\nWhen the quick-fix is applied, the code changes to:\n\n\n class Movie:\n\n def show(self):\n pass\n\nThe inspection also reports naming issues in class methods.\n\n**Example:**\n\n\n class Movie:\n @classmethod\n def show(abc):\n pass\n\nSince the first parameter of a class method should be `cls`, the IDE provides a quick-fix\nto rename it."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PyMethodParameters",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyNamedTupleInspection",
"shortDescription": {
"text": "Invalid definition of 'typing.NamedTuple'"
},
"fullDescription": {
"text": "Reports invalid definition of a typing.NamedTuple. Example: 'import typing\n\n\nclass FullName(typing.NamedTuple):\n first: str\n last: str = \"\"\n middle: str' As a fix, place the field with the default value after the fields without default values: 'import typing\n\n\nclass FullName(typing.NamedTuple):\n first: str\n middle: str\n last: str = \"\"'",
"markdown": "Reports invalid definition of a\n[typing.NamedTuple](https://docs.python.org/3/library/typing.html#typing.NamedTuple).\n\n**Example:**\n\n\n import typing\n\n\n class FullName(typing.NamedTuple):\n first: str\n last: str = \"\"\n middle: str\n\nAs a fix, place the field with the default value after the fields without default values:\n\n\n import typing\n\n\n class FullName(typing.NamedTuple):\n first: str\n middle: str\n last: str = \"\"\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyNamedTuple",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyPropertyDefinitionInspection",
"shortDescription": {
"text": "Incorrect property definition"
},
"fullDescription": {
"text": "Reports problems with the arguments of 'property()' and functions annotated with '@property'. 'class C:\n @property\n def abc(self): # Getter should return or yield something\n pass\n\n @abc.setter\n def foo(self, value): # Names of function and decorator don't match\n pass\n\n @abc.setter\n def abc(self, v1, v2): # Setter signature should be (self, value)\n pass\n\n @abc.deleter\n def abc(self, v1): # Delete signature should be (self)\n pass' A quick-fix offers to update parameters.",
"markdown": "Reports problems with the arguments of `property()` and functions\nannotated with `@property`.\n\n\n class C:\n @property\n def abc(self): # Getter should return or yield something\n pass\n\n @abc.setter\n def foo(self, value): # Names of function and decorator don't match\n pass\n\n @abc.setter\n def abc(self, v1, v2): # Setter signature should be (self, value)\n pass\n\n @abc.deleter\n def abc(self, v1): # Delete signature should be (self)\n pass\n\nA quick-fix offers to update parameters."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyPropertyDefinition",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyIncorrectDocstringInspection",
"shortDescription": {
"text": "Incorrect docstring"
},
"fullDescription": {
"text": "Reports mismatched parameters in a docstring. For example, 'b' is highlighted, because there is no such a parameter in the 'add' function. 'def add(a, c):\n \"\"\"\n @param a:\n @param b:\n @return:\n \"\"\"\n pass' The inspection does not warn you of missing parameters if none of them is mentioned in a docstring: 'def mult(a, c):\n \"\"\"\n @return:\n \"\"\"\n pass'",
"markdown": "Reports mismatched parameters in a docstring. For example, `b` is highlighted, because there is no\nsuch a parameter in the `add` function.\n\n\n def add(a, c):\n \"\"\"\n @param a:\n @param b:\n @return:\n \"\"\"\n pass\n\nThe inspection does not warn you of missing parameters if none of them is mentioned in a docstring:\n\n\n def mult(a, c):\n \"\"\"\n @return:\n \"\"\"\n pass\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PyIncorrectDocstring",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyStringFormatInspection",
"shortDescription": {
"text": "Errors in string formatting operations"
},
"fullDescription": {
"text": "Reports errors in string formatting operations. Example 1: '\"Hello {1}\".format(\"people\")' Example 2: 'def bar():\n return 1\n\n\n\"%s %s\" % bar()' As a fix, you need to rewrite string formatting fragments to adhere to the formatting syntax.",
"markdown": "Reports errors in string formatting operations.\n\n**Example 1:**\n\n\n \"Hello {1}\".format(\"people\")\n\n**Example 2:**\n\n\n def bar():\n return 1\n\n\n \"%s %s\" % bar()\n\nAs a fix, you need to rewrite string formatting fragments to\nadhere to the [formatting syntax](https://docs.python.org/3/library/string.html#format-string-syntax)."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyStringFormat",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DjangoUnresolvedTemplateReferenceInspection",
"shortDescription": {
"text": "Unresolved template reference"
},
"fullDescription": {
"text": "Reports unresolved file references in string literals of 'extends'> and 'include'> Django tags. Example: '{% extends \"../DjangoApp/templatetags/base.html\"%}' In this example, the 'base.html' tag is highlighted, because it is not available in the specified location.",
"markdown": "Reports unresolved file references in string literals of\n`extends`\\> and `include`\\> Django tags.\n\n**Example:**\n\n\n {% extends \"../DjangoApp/templatetags/base.html\"%}\n\nIn this example, the `base.html` tag is highlighted, because it is not available in the\nspecified location."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DjangoUnresolvedTemplateReferenceInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Django",
"index": 87,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyOldStyleClassesInspection",
"shortDescription": {
"text": "Old-style class contains new-style class features"
},
"fullDescription": {
"text": "Reports occurrences of new-style class features in old-style classes. The inspection highlights '__slots__', '__getattribute__', and 'super()' inside old-style classes.",
"markdown": "Reports occurrences of\n[new-style class features](https://www.python.org/doc/newstyle/)\nin old-style classes. The inspection highlights\n`__slots__`, `__getattribute__`, and `super()`\ninside old-style classes."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyOldStyleClasses",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Query_bound_parameters",
"shortDescription": {
"text": "Query does not have required bound parameters"
},
"fullDescription": {
"text": "Reports GQL queries with bound parameters that don't have the necessary parameters passed to the query method call.",
"markdown": "Reports GQL queries with bound parameters that don't have the necessary\nparameters passed to the query method call."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "Query_bound_parameters",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Google App Engine (Python)",
"index": 88,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyAugmentAssignmentInspection",
"shortDescription": {
"text": "Assignment can be replaced with augmented assignment"
},
"fullDescription": {
"text": "Reports assignments that can be replaced with augmented assignments. Example: 'a = 23\nb = 3\na = a + b' After the quick-fix is applied, the code changes to: 'a = 23\nb = 3\na += b'",
"markdown": "Reports assignments that can be replaced with augmented assignments.\n\n**Example:**\n\n\n a = 23\n b = 3\n a = a + b\n\nAfter the quick-fix is applied, the code changes to:\n\n\n a = 23\n b = 3\n a += b\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PyAugmentAssignment",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Query_restricted",
"shortDescription": {
"text": "Query does not comply with the query restrictions"
},
"fullDescription": {
"text": "Reports GQL queries that do not comply with the restrictions for queries allowed on the Google App Engine server. See the App Engine documentation for more information.",
"markdown": "Reports GQL queries that do not comply with the restrictions for queries allowed\non the Google App Engine server.\nSee the [App Engine documentation](http://code.google.com/appengine/docs/python/datastore/queriesandindexes.html#Restrictions_on_Queries) for more information."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "Query_restricted",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Google App Engine (Python)",
"index": 88,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyNoneFunctionAssignmentInspection",
"shortDescription": {
"text": "Assigning function calls that don't return anything"
},
"fullDescription": {
"text": "Reports cases when an assignment is done on a function that does not return anything. This inspection is similar to pylint inspection E1111. Example: 'def just_print():\n print(\"Hello!\")\n\n\naction = just_print()' As a quick-fix, the IDE offers to remove the assignment.",
"markdown": "Reports cases when an assignment is done on a function that does not return anything.\nThis inspection is similar to [pylint inspection E1111](https://docs.pylint.org/en/1.6.0/features.html#id6).\n\n**Example:**\n\n\n def just_print():\n print(\"Hello!\")\n\n\n action = just_print()\n\nAs a quick-fix, the IDE offers to remove the assignment."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PyNoneFunctionAssignment",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyDunderSlotsInspection",
"shortDescription": {
"text": "Invalid usages of classes with '__slots__' definitions"
},
"fullDescription": {
"text": "Reports invalid usages of a class with '__slots__' definitions. Example: 'class Foo:\n __slots__ = ['foo', 'bar']\n\n\nfoo = Foo()\nfoo.baz = 'spam''",
"markdown": "Reports invalid usages of a class with `__slots__` definitions.\n\n**Example:**\n\n\n class Foo:\n __slots__ = ['foo', 'bar']\n\n\n foo = Foo()\n foo.baz = 'spam'\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyDunderSlots",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyTestParametrizedInspection",
"shortDescription": {
"text": "Incorrect arguments in @pytest.mark.parametrize"
},
"fullDescription": {
"text": "Reports functions that are decorated with @pytest.mark.parametrize but do not have arguments to accept parameters of the decorator.",
"markdown": "Reports functions that are decorated with [@pytest.mark.parametrize](https://docs.pytest.org/en/stable/parametrize.html) but do not have arguments to accept\nparameters of the decorator."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyTestParametrized",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyTrailingSemicolonInspection",
"shortDescription": {
"text": "Prohibited trailing semicolon in a statement"
},
"fullDescription": {
"text": "Reports trailing semicolons in statements. Example: 'def my_func(a):\n c = a ** 2;\n return c' IDE provides a quick-fix that removes a trailing semicolon. When you apply it, the code changes to: 'def my_func(a):\n c = a ** 2\n return c'",
"markdown": "Reports trailing semicolons in statements.\n\n**Example:**\n\n\n def my_func(a):\n c = a ** 2;\n return c\n\nIDE provides a quick-fix that removes a trailing semicolon. When you\napply it, the code changes to:\n\n\n def my_func(a):\n c = a ** 2\n return c\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyTrailingSemicolon",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyPropertyAccessInspection",
"shortDescription": {
"text": "Inappropriate access to properties"
},
"fullDescription": {
"text": "Reports cases when properties are accessed inappropriately: Read-only properties are set Write-only properties are read Non-deletable properties are deleted Example: 'class MyClass:\n @property\n def read_only(self): return None\n\n def __write_only_setter(self, value): pass\n\n write_only = property(None, __write_only_setter)\n\n\na = MyClass()\na.read_only = 10 # property cannot be set\ndel a.read_only # property cannot be deleted\nprint(a.write_only) # property cannot be read'",
"markdown": "Reports cases when properties are accessed inappropriately:\n\n* Read-only properties are set\n* Write-only properties are read\n* Non-deletable properties are deleted\n\n**Example:**\n\n\n class MyClass:\n @property\n def read_only(self): return None\n\n def __write_only_setter(self, value): pass\n\n write_only = property(None, __write_only_setter)\n\n\n a = MyClass()\n a.read_only = 10 # property cannot be set\n del a.read_only # property cannot be deleted\n print(a.write_only) # property cannot be read\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyPropertyAccess",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyOverloadsInspection",
"shortDescription": {
"text": "Overloads in regular Python files"
},
"fullDescription": {
"text": "Reports cases when overloads in regular Python files are placed after the implementation or when their signatures are not compatible with the implementation. Example: 'from typing import overload\n\n\n@overload\ndef foo(p1, p2): # Overload signature is not compatible with the implementation\n pass\n\n\n@overload\ndef foo(p1): # Overload signature is not compatible with the implementation\n pass\n\n\ndef foo(p1, p2, p3):\n print(p1, p2, p3)'",
"markdown": "Reports cases when overloads in regular Python files are placed after the implementation or when their signatures are\nnot compatible with the implementation.\n\n**Example:**\n\n\n from typing import overload\n\n\n @overload\n def foo(p1, p2): # Overload signature is not compatible with the implementation\n pass\n\n\n @overload\n def foo(p1): # Overload signature is not compatible with the implementation\n pass\n\n\n def foo(p1, p2, p3):\n print(p1, p2, p3)\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyOverloads",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyprojectInspection",
"shortDescription": {
"text": "Depencencies in pyproject.toml"
},
"fullDescription": {
"text": "Reports unsatisfied dependencies, declared [project.dependencies] table in pyproject.toml. Shows a quick-fix to install missing packages.",
"markdown": "Reports unsatisfied dependencies, declared \\[project.dependencies\\] table in pyproject.toml.\n\n\nShows a quick-fix to install missing packages."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyprojectInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Query_index_required",
"shortDescription": {
"text": "Query does not have the required index"
},
"fullDescription": {
"text": "Reports GQL queries for which an index is not defined in 'index.yaml'. Such queries will fail on the production server. The quick-fix allows you to add the necessary index definitions.",
"markdown": "Reports GQL queries for which an index is not defined in `index.yaml`.\nSuch queries will fail on the production server.\nThe quick-fix allows you to add the necessary index definitions."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "Query_index_required",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Google App Engine (Python)",
"index": 88,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DjangoBrokenLineCommentInspection",
"shortDescription": {
"text": "Broken line comment"
},
"fullDescription": {
"text": "Reports '#}' line comment ends in Django templates that do not have a matching line comment start. Example: 'comment #}' The IDE highlights '#}' as it requires the corresponding '{#' token.",
"markdown": "Reports `#}` line comment ends in Django templates that do not have a\nmatching line comment start.\n\n**Example:**\n\n\n comment #}\n\nThe IDE highlights `#}` as it requires the corresponding `{#` token."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DjangoBrokenLineCommentInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Django",
"index": 87,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CythonUsageBeforeDeclarationInspection",
"shortDescription": {
"text": "Cython variable is used before its declaration"
},
"fullDescription": {
"text": "Reports Cython variables being referenced before declaration. Example: 'cdef int c_x\n\nprint(c_x, c_y) # Variable 'c_y' is used before its declaration\n\ncdef int c_y = 0'",
"markdown": "Reports Cython variables being referenced before declaration.\n\n**Example:**\n\n\n cdef int c_x\n\n print(c_x, c_y) # Variable 'c_y' is used before its declaration\n\n cdef int c_y = 0\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "CythonUsageBeforeDeclaration",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyDeprecationInspection",
"shortDescription": {
"text": "Deprecated function, class, or module"
},
"fullDescription": {
"text": "Reports usages of Python functions, or methods that are marked as deprecated and raise the 'DeprecationWarning' or 'PendingDeprecationWarning' warning. Also, this inspection highlights usages of 'abc.abstractstaticmethod', 'abc.abstractproperty', and 'abc.abstractclassmethod' decorators. Example: 'class Foo:\n @property\n def bar(self):\n import warnings\n warnings.warn(\"this is deprecated\", DeprecationWarning, 2)\n return 5\n\n\nfoo = Foo()\nprint(foo.bar)'",
"markdown": "Reports usages of Python functions, or methods that are marked as\ndeprecated and raise the `DeprecationWarning` or `PendingDeprecationWarning` warning.\n\nAlso, this inspection highlights usages of `abc.abstractstaticmethod`, `abc.abstractproperty`, and `abc.abstractclassmethod`\ndecorators.\n\n**Example:**\n\n\n class Foo:\n @property\n def bar(self):\n import warnings\n warnings.warn(\"this is deprecated\", DeprecationWarning, 2)\n return 5\n\n\n foo = Foo()\n print(foo.bar)\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyDeprecation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyUnnecessaryBackslashInspection",
"shortDescription": {
"text": "Unnecessary backslash"
},
"fullDescription": {
"text": "Reports backslashes in places where line continuation is implicit inside '()', '[]', and '{}'. Example: 'a = ('first', \\\n 'second', 'third')' When the quick-fix is applied, the redundant backslash is deleted.",
"markdown": "Reports backslashes in places where line continuation is implicit inside `()`,\n`[]`, and `{}`.\n\n**Example:**\n\n\n a = ('first', \\\n 'second', 'third')\n\nWhen the quick-fix is applied, the redundant backslash is deleted."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyUnnecessaryBackslash",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PySingleQuotedDocstringInspection",
"shortDescription": {
"text": "Single quoted docstring"
},
"fullDescription": {
"text": "Reports docstrings that do not adhere to the triple double-quoted string format. Example: 'def calc(self, balance=0):\n 'param: balance'\n self.balance = balance' When the quick-fix is applied, the code changes to: 'def calc(self, balance=0):\n \"\"\"param: balance\"\"\"\n self.balance = balance'",
"markdown": "Reports docstrings that do not adhere to the triple double-quoted string format.\n\n**Example:**\n\n\n def calc(self, balance=0):\n 'param: balance'\n self.balance = balance\n\nWhen the quick-fix is applied, the code changes to:\n\n\n def calc(self, balance=0):\n \"\"\"param: balance\"\"\"\n self.balance = balance\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PySingleQuotedDocstring",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyPep8NamingInspection",
"shortDescription": {
"text": "PEP 8 naming convention violation"
},
"fullDescription": {
"text": "Reports violations of the PEP8 naming conventions. Example: 'class mammalia(object):\n extremities = 4\n\n def feeds(self):\n print(\"milk\")' In this code fragment, IDE offers to rename 'mammalia' to 'Mammalia'. When the quick-fix is applied, the code change to: 'class Mammalia(object):\n extremities = 4\n\n def feeds(self):\n print(\"milk\")'",
"markdown": "Reports violations of the\n[PEP8](https://www.python.org/dev/peps/pep-0008/) naming conventions.\n\n**Example:**\n\n\n class mammalia(object):\n extremities = 4\n\n def feeds(self):\n print(\"milk\")\n\nIn this code fragment, IDE offers to rename `mammalia` to `Mammalia`.\nWhen the quick-fix is applied, the code change to:\n\n\n class Mammalia(object):\n extremities = 4\n\n def feeds(self):\n print(\"milk\")\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PyPep8Naming",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyTypedDictInspection",
"shortDescription": {
"text": "Invalid TypedDict definition and usages"
},
"fullDescription": {
"text": "Reports invalid definition and usage of TypedDict. Example: 'from typing import TypedDict\n\n\nclass Movie(TypedDict):\n name: str\n year: int\n rate: int = 10 # Right-hand side values are not supported\n\n def method(self): # Invalid statement in TypedDict\n pass\n\n\nm = Movie(name=\"name\", year=1000, rate=9)\nprint(m[\"director\"]) # There is no the 'director' key in 'Movie'\ndel m[\"name\"] # The 'name' key cannot be deleted\nm[\"year\"] = \"1001\" # Expected 'int', got 'str''",
"markdown": "Reports invalid definition and usage of\n[TypedDict](https://www.python.org/dev/peps/pep-0589/).\n\n**Example:**\n\n\n from typing import TypedDict\n\n\n class Movie(TypedDict):\n name: str\n year: int\n rate: int = 10 # Right-hand side values are not supported\n\n def method(self): # Invalid statement in TypedDict\n pass\n\n\n m = Movie(name=\"name\", year=1000, rate=9)\n print(m[\"director\"]) # There is no the 'director' key in 'Movie'\n del m[\"name\"] # The 'name' key cannot be deleted\n m[\"year\"] = \"1001\" # Expected 'int', got 'str'\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyTypedDict",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyPep8Inspection",
"shortDescription": {
"text": "PEP 8 coding style violation"
},
"fullDescription": {
"text": "Reports violations of the PEP 8 coding style guide by running the bundled pycodestyle.py tool.",
"markdown": "Reports violations of the [PEP 8 coding style guide](https://www.python.org/dev/peps/pep-0008/) by running the bundled [pycodestyle.py](https://github.com/PyCQA/pycodestyle) tool."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PyPep8",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PoetryPackageVersionsInspection",
"shortDescription": {
"text": "Poetry package versions"
},
"fullDescription": {
"text": "Reports outdated versions of packages in '[tool.poetry.dependencies]' and '[tool.poetry.dev-dependencies]' sections of 'pyproject.toml'.",
"markdown": "Reports outdated versions of packages in `[tool.poetry.dependencies]` and `[tool.poetry.dev-dependencies]`\nsections of `pyproject.toml`."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PoetryPackageVersions",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AppEngineThreadsafeInspection",
"shortDescription": {
"text": "Threadsafe is not available or set inappropriately"
},
"fullDescription": {
"text": "Reports cases when threadsafe is not present or it is not set to either 'yes' or 'no'.",
"markdown": "Reports cases when threadsafe is not present or it is not set to either `yes` or `no`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AppEngineThreadsafe",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Google App Engine (Python)",
"index": 88,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyBDDParametersInspection",
"shortDescription": {
"text": "Incorrect arguments in step definition functions"
},
"fullDescription": {
"text": "Reports incorrect arguments in step definition functions. Example: 'from behave import *\n\n\n@given(\"I'm ready\")\ndef step_impl(context,a):\n raise NotImplementedError(u'STEP: Given I\\'m ready')' The 'a' argument is highlighted as an inappropriate. The quick-fix removes it.",
"markdown": "Reports incorrect arguments in step definition functions.\n\n**Example:**\n\n\n from behave import *\n\n\n @given(\"I'm ready\")\n def step_impl(context,a):\n raise NotImplementedError(u'STEP: Given I\\'m ready')\n\nThe `a` argument is highlighted as an inappropriate. The quick-fix removes it."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyBDDParameters",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyCallingNonCallableInspection",
"shortDescription": {
"text": "Attempt to call a non-callable object"
},
"fullDescription": {
"text": "Reports a problem when you are trying to call objects that are not callable, like, for example, properties: Example: 'class Record:\n @property\n def as_json(self):\n\njson = Record().as_json()'",
"markdown": "Reports a problem when you are trying\nto call objects that are not callable, like, for example, properties:\n\n**Example:**\n\n\n class Record:\n @property\n def as_json(self):\n\n json = Record().as_json()\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyCallingNonCallable",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DjangoIncompatibleInspection",
"shortDescription": {
"text": "Incompatible code in Django templates"
},
"fullDescription": {
"text": "Reports features that are not available in the current Django version. Example: '{% if my_var is True %}\n{% endif %}' Available since 1.10. The IDE shows warning when discovered in the earlier versions.",
"markdown": "Reports features that are not available in the current Django version.\n\n**Example:**\n\n\n {% if my_var is True %}\n {% endif %}\n\nAvailable since 1.10. The IDE shows warning when discovered in the earlier versions."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DjangoIncompatibleInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Django",
"index": 87,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyTypeCheckerInspection",
"shortDescription": {
"text": "Incorrect type"
},
"fullDescription": {
"text": "Reports type errors in function call expressions, targets, and return values. In a dynamically typed language, this is possible in a limited number of cases. Types of function parameters can be specified in docstrings or in Python 3 function annotations. Example: 'def foo() -> int:\n return \"abc\" # Expected int, got str\n\n\na: str\na = foo() # Expected str, got int' With the quick-fix, you can modify the problematic types: 'def foo() -> str:\n return \"abc\"\n\n\na: str\na = foo()'",
"markdown": "Reports type errors in function call expressions, targets, and return values. In a dynamically typed language, this is possible in a limited number of cases.\n\nTypes of function parameters can be specified in\ndocstrings or in Python 3 function annotations.\n\n**Example:**\n\n\n def foo() -> int:\n return \"abc\" # Expected int, got str\n\n\n a: str\n a = foo() # Expected str, got int\n\nWith the quick-fix, you can modify the problematic types:\n\n\n def foo() -> str:\n return \"abc\"\n\n\n a: str\n a = foo()\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyTypeChecker",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyByteLiteralInspection",
"shortDescription": {
"text": "A byte literal contains a non-ASCII character"
},
"fullDescription": {
"text": "Reports characters in byte literals that are outside ASCII range. Example: 's = b'№5''",
"markdown": "Reports characters in byte literals that are outside ASCII range.\n\n**Example:**\n\n\n s = b'№5'\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyByteLiteral",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DjangoUnresolvedLoadInspection",
"shortDescription": {
"text": "Unresolved library inspection"
},
"fullDescription": {
"text": "Reports unresolved references in Django load tags. Example: '{% load something_nonexistent %}'",
"markdown": "Reports unresolved references in Django load tags.\n\n**Example:**\n\n\n {% load something_nonexistent %}\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DjangoUnresolvedLoadInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Django",
"index": 87,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyDecoratorInspection",
"shortDescription": {
"text": "Class-specific decorator is used outside the class"
},
"fullDescription": {
"text": "Reports usages of '@classmethod' or '@staticmethod' decorators in methods outside a class. Example: 'class State(object):\n\n @classmethod\n def my_state(cls, name):\n cls.name = name\n\n\n@classmethod\ndef change_state(self):\n pass' The 'change_state' method should not use the '@classmethod' decorator or it should be moved to the 'State' class declaration. If you apply the 'Remove decorator' action, the code changes to: 'class State(object):\n\n @classmethod\n def my_state(cls, name):\n cls.name = name\n\n\ndef change_state(self):\n pass'",
"markdown": "Reports usages of `@classmethod` or `@staticmethod` decorators\nin methods outside a class.\n\n**Example:**\n\n\n class State(object):\n\n @classmethod\n def my_state(cls, name):\n cls.name = name\n\n\n @classmethod\n def change_state(self):\n pass\n\nThe `change_state` method should not use the `@classmethod` decorator or it should be\nmoved to the `State` class declaration.\n\nIf you apply the `Remove decorator` action, the code changes to:\n\n\n class State(object):\n\n @classmethod\n def my_state(cls, name):\n cls.name = name\n\n\n def change_state(self):\n pass\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyDecorator",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyPackageRequirementsInspection",
"shortDescription": {
"text": "Unsatisfied package requirements"
},
"fullDescription": {
"text": "Reports packages mentioned in requirements files (for example, 'requirements.txt' or 'Pipfile') but not installed, or imported but not mentioned in requirements files. The IDE shows a quick-fix banner so that you can install the missing packages in one click.",
"markdown": "Reports packages mentioned in requirements files (for example, `requirements.txt` or `Pipfile`) but not installed,\nor imported but not mentioned in requirements files.\n\n\nThe IDE shows a quick-fix banner so that you can install the missing packages in one click."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyPackageRequirements",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Restricted_Python_calls",
"shortDescription": {
"text": "Feature is not supported in the App Engine sandbox"
},
"fullDescription": {
"text": "Reports usages of Python features that are restricted by the Google App Engine sandbox and will cause a failure on the production server.",
"markdown": "Reports usages of Python features that are restricted by the Google App\nEngine sandbox and will cause a failure on the production server."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "Restricted_Python_calls",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Google App Engine (Python)",
"index": 88,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyRedundantParenthesesInspection",
"shortDescription": {
"text": "Redundant parentheses"
},
"fullDescription": {
"text": "Reports about redundant parentheses in expressions. The IDE provides the quick-fix action to remove the redundant parentheses.",
"markdown": "Reports about redundant parentheses in expressions.\n\nThe IDE provides the quick-fix action to remove the redundant parentheses."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PyRedundantParentheses",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyRedeclarationInspection",
"shortDescription": {
"text": "Redeclared names without usages"
},
"fullDescription": {
"text": "Reports unconditional redeclarations of names without being used in between. Example: 'def x(): pass\n\n\nx = 2' It applies to function and class declarations, and top-level assignments. When the warning is shown, you can try a recommended action, for example, you might be prompted to rename the variable.",
"markdown": "Reports unconditional redeclarations of names without being used in between.\n\n**Example:**\n\n\n def x(): pass\n\n\n x = 2\n\nIt applies to function and class declarations, and top-level assignments.\n\nWhen the warning is shown, you can try a recommended action, for example, you might be prompted to\nrename the variable."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyRedeclaration",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyramidSetupInspection",
"shortDescription": {
"text": "Project is not installed for development"
},
"fullDescription": {
"text": "Reports cases when no 'python setup.py develop' command was executed for the Pyramid project. You need to execute this command to install the newly created project for development.",
"markdown": "Reports cases when no `python setup.py develop` command was executed for the Pyramid project.\n\nYou need to execute this command to install the newly created project for development."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PyramidSetup",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Pyramid",
"index": 238,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyProtectedMemberInspection",
"shortDescription": {
"text": "Accessing a protected member of a class or a module"
},
"fullDescription": {
"text": "Reports cases when a protected member is accessed outside the class, a descendant of the class where it is defined, or a module. Example: 'class Foo:\n def _protected_method(self):\n pass\n\n\nclass Bar(Foo):\n def public_method(self):\n self._protected_method()\n\n\nfoo = Foo()\nfoo._protected_method() # Access to a protected method'",
"markdown": "Reports cases when a protected member is accessed outside the class,\na descendant of the class where it is defined, or a module.\n\n**Example:**\n\n\n class Foo:\n def _protected_method(self):\n pass\n\n\n class Bar(Foo):\n def public_method(self):\n self._protected_method()\n\n\n foo = Foo()\n foo._protected_method() # Access to a protected method\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PyProtectedMember",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "EndBlockNamesInspection",
"shortDescription": {
"text": "Django endblock name doesn't match the block name"
},
"fullDescription": {
"text": "Reports incorrect names of the closing blocks. Example: '{% block my_block %}\n {% endblock not_correct %}'",
"markdown": "Reports incorrect names of the closing blocks.\n\n**Example:**\n\n\n {% block my_block %}\n {% endblock not_correct %}\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "EndBlockNamesInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Django",
"index": 87,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyChainedComparisonsInspection",
"shortDescription": {
"text": "Too complex chained comparisons"
},
"fullDescription": {
"text": "Reports chained comparisons that can be simplified. Example: 'def do_comparison(x):\n xmin = 10\n xmax = 100\n if x >= xmin and x <= xmax:\n pass' The IDE offers to simplify 'if x >= xmin and x <= xmax'. When the quick-fix is applied, the code changes to: 'def do_comparison(x):\n xmin = 10\n xmax = 100\n if xmin <= x <= xmax:\n pass'",
"markdown": "Reports chained comparisons that can be simplified.\n\n**Example:**\n\n\n def do_comparison(x):\n xmin = 10\n xmax = 100\n if x >= xmin and x <= xmax:\n pass\n\nThe IDE offers to simplify `if x >= xmin and x <= xmax`.\nWhen the quick-fix is applied, the code changes to:\n\n\n def do_comparison(x):\n xmin = 10\n xmax = 100\n if xmin <= x <= xmax:\n pass\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PyChainedComparisons",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyCompatibilityInspection",
"shortDescription": {
"text": "Code is incompatible with specific Python versions"
},
"fullDescription": {
"text": "Reports incompatibility with the specified versions of Python. Enable this inspection if you need your code to be compatible with a range of Python versions, for example, if you are building a library. To define the range of the inspected Python versions, select the corresponding checkboxes in the Options section. For more information about the Python versions supported by the IDE, see the web help.",
"markdown": "Reports incompatibility with the specified versions of Python.\nEnable this inspection if you need your code to be compatible with a range of Python versions, for example,\nif you are building a library.\n\nTo define the range of the inspected Python versions, select the corresponding checkboxes in the **Options**\nsection.\n\nFor more information about the Python versions supported by the IDE, see the\n[web help](https://www.jetbrains.com/help/pycharm/python.html#support)."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PyCompatibility",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyTypeHintsInspection",
"shortDescription": {
"text": "Invalid type hints definitions and usages"
},
"fullDescription": {
"text": "Reports invalid usages of type hints. Example: 'from typing import TypeVar\n\nT0 = TypeVar('T1') # Argument of 'TypeVar' must be 'T0'\n\n\ndef b(p: int) -> int: # Type specified both in a comment and annotation\n # type: (int) -> int\n pass\n\n\ndef c(p1, p2): # Type signature has too many arguments\n # type: (int) -> int\n pass' Available quick-fixes offer various actions. You can rename, remove, or move problematic elements. You can also manually modify type declarations to ensure no warning is shown.",
"markdown": "Reports invalid usages of type hints.\n\n**Example:**\n\n\n from typing import TypeVar\n\n T0 = TypeVar('T1') # Argument of 'TypeVar' must be 'T0'\n\n\n def b(p: int) -> int: # Type specified both in a comment and annotation\n # type: (int) -> int\n pass\n\n\n def c(p1, p2): # Type signature has too many arguments\n # type: (int) -> int\n pass\n\nAvailable quick-fixes offer various actions. You can rename, remove, or move problematic elements. You can also manually modify type declarations to ensure no warning is shown."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyTypeHints",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DjangoUnresolvedTagInspection",
"shortDescription": {
"text": "Unresolved tag"
},
"fullDescription": {
"text": "Reports unresolved tags in Django templates. Example: '<h1>{{ question.question_text }}</h1>\n<start>' The IDE highlights '<start>'. You can either remove the tag or apply the quick-fix to add '<start>' to custom HTML tags.",
"markdown": "Reports unresolved tags in Django templates.\n\n**Example:**\n\n\n <h1>{{ question.question_text }}</h1>\n <start>\n\nThe IDE highlights `<start>`. You can either remove the tag or apply the quick-fix to\nadd `<start>` to custom HTML tags."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DjangoUnresolvedTagInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Django",
"index": 87,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyNonAsciiCharInspection",
"shortDescription": {
"text": "File contains non-ASCII character"
},
"fullDescription": {
"text": "Reports cases in Python 2 when a file contains non-ASCII characters and does not have an encoding declaration at the top. Example: 'class A(object):\n# №5\n def __init__(self):\n pass' In this example, the IDE reports a non-ASCII symbol in a comment and a lack of encoding declaration. Apply the proposed quick-fix to add a missing encoding declaration: '# coding=utf-8\nclass A(object)\n# №5\n def __init__(self):\n pass'",
"markdown": "Reports cases in Python 2 when a file contains non-ASCII characters and does not\nhave an encoding declaration at the top.\n\n**Example:**\n\n\n class A(object):\n # №5\n def __init__(self):\n pass\n\nIn this example, the IDE reports a non-ASCII symbol in a comment and a lack of encoding\ndeclaration. Apply the proposed quick-fix to add a missing encoding declaration:\n\n\n # coding=utf-8\n class A(object)\n # №5\n def __init__(self):\n pass\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyNonAsciiChar",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyAbstractClassInspection",
"shortDescription": {
"text": "Class must implement all abstract methods"
},
"fullDescription": {
"text": "Reports cases when not all abstract properties or methods are defined in a subclass. Example: 'from abc import abstractmethod, ABC\n\n\nclass Figure(ABC):\n\n @abstractmethod\n def do_figure(self):\n pass\n\n\nclass Triangle(Figure):\n def do_triangle(self):\n pass' When the quick-fix is applied, the IDE implements an abstract method for the 'Triangle' class: 'from abc import abstractmethod, ABC\n\n\nclass Figure(ABC):\n\n @abstractmethod\n def do_figure(self):\n pass\n\n\nclass Triangle(Figure):\n def do_figure(self):\n pass\n\n def do_triangle(self):\n pass'",
"markdown": "Reports cases when not all abstract properties or methods are defined in\na subclass.\n\n**Example:**\n\n\n from abc import abstractmethod, ABC\n\n\n class Figure(ABC):\n\n @abstractmethod\n def do_figure(self):\n pass\n\n\n class Triangle(Figure):\n def do_triangle(self):\n pass\n\nWhen the quick-fix is applied, the IDE implements an abstract method for the `Triangle` class:\n\n\n from abc import abstractmethod, ABC\n\n\n class Figure(ABC):\n\n @abstractmethod\n def do_figure(self):\n pass\n\n\n class Triangle(Figure):\n def do_figure(self):\n pass\n\n def do_triangle(self):\n pass\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PyAbstractClass",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DjangoCloseTagInspection",
"shortDescription": {
"text": "Mismatched opening and closing tags"
},
"fullDescription": {
"text": "Reports cases when opening tags in Django templates are not correctly matched by closing tags. Example: '{% if error_message %}<p><strong>{{ error_message }}</p>{% endif %}' The IDE reports an error on the 'strong' tag not being closed.",
"markdown": "Reports cases when opening tags in Django templates are not correctly matched by closing tags.\n\n**Example:**\n\n\n {% if error_message %}<p><strong>{{ error_message }}</p>{% endif %}\n\nThe IDE reports an error on the `strong` tag not being closed."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DjangoCloseTagInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Django",
"index": 87,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyDefaultArgumentInspection",
"shortDescription": {
"text": "The default argument is mutable"
},
"fullDescription": {
"text": "Reports a problem when a mutable value as a list or dictionary is detected in a default value for an argument. Default argument values are evaluated only once at function definition time, which means that modifying the default value of the argument will affect all subsequent calls of that function. Example: 'def func(s, cache={}):\n cache[s] = None' When the quick-fix is applied, the code changes to: 'def func(s, cache=None):\n if cache is None:\n cache = {}\n cache[s] = None'",
"markdown": "Reports a problem when a mutable value as a list or dictionary is detected in a default value for\nan argument. \n\nDefault argument values are evaluated only once at function definition time,\nwhich means that modifying the\ndefault value of the argument will affect all subsequent calls of that function.\n\n**Example:**\n\n\n def func(s, cache={}):\n cache[s] = None\n\nWhen the quick-fix is applied, the code changes to:\n\n\n def func(s, cache=None):\n if cache is None:\n cache = {}\n cache[s] = None\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyDefaultArgument",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyMethodOverridingInspection",
"shortDescription": {
"text": "Method signature does not match signature of overridden method"
},
"fullDescription": {
"text": "Reports inconsistencies in overriding method signatures. Example: 'class Book:\n def add_title(self):\n pass\n\n\nclass Novel(Book):\n def add_title(self, text):\n pass' Parameters of the 'add_title' method in the 'Novel' class do not match the method signature specified in the 'Book' class. As a fix, the IDE offers to apply the Change Signature refactoring.",
"markdown": "Reports inconsistencies in overriding method signatures.\n\n**Example:**\n\n\n class Book:\n def add_title(self):\n pass\n\n\n class Novel(Book):\n def add_title(self, text):\n pass\n\nParameters of the `add_title` method in the `Novel` class do not match the method\nsignature specified in the `Book` class. As a fix, the IDE offers to apply the Change Signature\nrefactoring."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyMethodOverriding",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyDocstringTypesInspection",
"shortDescription": {
"text": "Type in docstring does not match inferred type"
},
"fullDescription": {
"text": "Reports types in docstring that do not match dynamically inferred types.",
"markdown": "Reports types in docstring that do not match dynamically inferred types."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PyDocstringTypes",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyTupleAssignmentBalanceInspection",
"shortDescription": {
"text": "Tuple assignment balance is incorrect"
},
"fullDescription": {
"text": "Reports cases when the number of expressions on the right-hand side and targets on the left-hand side are not the same. Example: 't = ('red', 'blue', 'green', 'white')\n(c1, c2, c3) = t' As a quick-fix, you can modify the highlighted code fragment to restore the tuple balance.",
"markdown": "Reports cases when the number of expressions on the right-hand side\nand targets on the left-hand side are not the same.\n\n**Example:**\n\n\n t = ('red', 'blue', 'green', 'white')\n (c1, c2, c3) = t\n\nAs a quick-fix, you can modify the highlighted code fragment to restore the tuple\nbalance."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyTupleAssignmentBalance",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyClassHasNoInitInspection",
"shortDescription": {
"text": "Class has no `__init__` method"
},
"fullDescription": {
"text": "Reports cases in Python 2 when a class has no '__init__' method, neither its parent classes. Example: 'class Book():\n pass' The quick-fix adds the '__init__' method: 'class Book():\n def __init__(self):\n pass'",
"markdown": "Reports cases in Python 2 when a class has no `__init__` method, neither its parent\nclasses.\n\n**Example:**\n\n\n class Book():\n pass\n\nThe quick-fix adds the `__init__` method:\n\n\n class Book():\n def __init__(self):\n pass\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PyClassHasNoInit",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyStubPackagesCompatibilityInspection",
"shortDescription": {
"text": "Incompatible stub packages"
},
"fullDescription": {
"text": "Reports stub packages that do not support the version of the corresponding runtime package. A stub package contains type information for some runtime package.",
"markdown": "Reports stub packages that do not support the version of the corresponding runtime package.\n\nA [stub package](https://www.python.org/dev/peps/pep-0561/) contains type information for some runtime package."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyStubPackagesCompatibility",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyUnboundLocalVariableInspection",
"shortDescription": {
"text": "Unbound local variables"
},
"fullDescription": {
"text": "Reports local variables referenced before assignment. Example: 'x = 0\nif x > 10:\n b = 3\nprint(b)' The IDE reports a problem for 'print(b)'. A possible fix is: 'x = 0\nif x > 10:\n b = 3\n print(b)'",
"markdown": "Reports local variables referenced before assignment.\n\n**Example:**\n\n\n x = 0\n if x > 10:\n b = 3\n print(b)\n\nThe IDE reports a problem for `print(b)`. A possible fix is:\n\n\n x = 0\n if x > 10:\n b = 3\n print(b)\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyUnboundLocalVariable",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DjangoUrlArgumentsInspection",
"shortDescription": {
"text": "Incorrect arguments in the ' {% url %}' tag"
},
"fullDescription": {
"text": "Reports missing parameters in the template file if the 'url()' function has parameters in its URL path. Example: In the 'url.py' file 'url(r'^(?P<question_id>[0-9]+)/', views.detail, name='detail')' In the template file '{% url 'polls:detail' %}'",
"markdown": "Reports missing parameters in the template file if the `url()`\nfunction has parameters in its URL path.\n\n**Example:**\n\nIn the `url.py` file\n\n\n url(r'^(?P<question_id>[0-9]+)/', views.detail, name='detail')\n\nIn the template file\n\n\n {% url 'polls:detail' %}\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DjangoUrlArgumentsInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Django",
"index": 87,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PySimplifyBooleanCheckInspection",
"shortDescription": {
"text": "Redundant boolean variable check"
},
"fullDescription": {
"text": "Reports equality comparison with a boolean literal. Example: 'def func(s):\n if s.isdigit() == True:\n return int(s)' With the quick-fix applied, the code fragment will be simplified to: 'def func(s):\n if s.isdigit():\n return int(s)'",
"markdown": "Reports equality comparison with a boolean literal.\n\n**Example:**\n\n\n def func(s):\n if s.isdigit() == True:\n return int(s)\n\nWith the quick-fix applied, the code fragment will be simplified to:\n\n\n def func(s):\n if s.isdigit():\n return int(s)\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PySimplifyBooleanCheck",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyBehaveInspection",
"shortDescription": {
"text": "Incorrect BDD Behave-specific definitions"
},
"fullDescription": {
"text": "Reports incorrect usages of Python Behave BDD framework: A step definition file has no 'from behave import *'. A directory with steps definition is not named 'steps'. If either of the cases occurred, the IDE highlights the corresponding steps in the '.feature' file. You can apply a quick-fix to create a step definition or rename the directory with the step. See more details in Creating step definitions.",
"markdown": "Reports incorrect usages of Python Behave BDD framework:\n\n* A step definition file has no `from behave import *`.\n* A directory with steps definition is not named `steps`.\n\nIf either of the cases occurred, the IDE highlights the corresponding steps in the `.feature`\nfile. You can apply a quick-fix to create a step definition or rename the directory\nwith the step.\n\nSee more details in [Creating step definitions](https://www.jetbrains.com/help/pycharm/creating-step-definition.html)."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PyBehave",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyUnreachableCodeInspection",
"shortDescription": {
"text": "Unreachable code"
},
"fullDescription": {
"text": "Reports code fragments that cannot be normally reached. Example: 'if True:\n print('Yes')\nelse:\n print('No')' As a fix, you might want to check and modify the algorithm to ensure it implements the expected logic.",
"markdown": "Reports code fragments that cannot be normally reached.\n\n**Example:**\n\n\n if True:\n print('Yes')\n else:\n print('No')\n\nAs a fix, you might want to check and modify the algorithm to ensure it implements\nthe expected logic."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyUnreachableCode",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyDictCreationInspection",
"shortDescription": {
"text": "Dictionary creation can be rewritten by dictionary literal"
},
"fullDescription": {
"text": "Reports situations when you can rewrite dictionary creation by using a dictionary literal. This approach brings performance improvements. Example: 'dic = {}\ndic['var'] = 1' When the quick-fix is applied, the code changes to: 'dic = {'var': 1}'",
"markdown": "Reports situations when you can rewrite dictionary creation\nby using a dictionary literal.\n\nThis approach brings performance improvements.\n\n**Example:**\n\n\n dic = {}\n dic['var'] = 1\n\nWhen the quick-fix is applied, the code changes to:\n\n\n dic = {'var': 1}\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PyDictCreation",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyExceptionInheritInspection",
"shortDescription": {
"text": "Exceptions do not inherit from standard 'Exception' class"
},
"fullDescription": {
"text": "Reports cases when a custom exception class is raised but does not inherit from the builtin Exception class. Example: 'class A:\n pass\n\n\ndef me_exception():\n raise A()' The proposed quick-fix changes the code to: 'class A(Exception):\n pass\n\n\ndef me_exception():\n raise A()'",
"markdown": "Reports cases when a custom exception class is\nraised but does not inherit from the\n[builtin Exception class](https://docs.python.org/3/library/exceptions.html).\n\n**Example:**\n\n\n class A:\n pass\n\n\n def me_exception():\n raise A()\n\nThe proposed quick-fix changes the code to:\n\n\n class A(Exception):\n pass\n\n\n def me_exception():\n raise A()\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyExceptionInherit",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyShadowingNamesInspection",
"shortDescription": {
"text": "Shadowing names from outer scopes"
},
"fullDescription": {
"text": "Reports shadowing names defined in outer scopes. Example: 'def outer(p):\n def inner(p):\n pass' As a quick-fix, the IDE offers to remove a parameter or rename it.",
"markdown": "Reports shadowing names defined in outer scopes.\n\n**Example:**\n\n\n def outer(p):\n def inner(p):\n pass\n\nAs a quick-fix, the IDE offers to remove a parameter or rename it."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PyShadowingNames",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyReturnFromInitInspection",
"shortDescription": {
"text": "__init__ method that returns a value"
},
"fullDescription": {
"text": "Reports occurrences of 'return' statements with a return value inside '__init__' methods of classes. Example: 'class Sum:\n def __init__(self, a, b):\n self.a = a\n self.b = b\n self.sum = a + b\n return self.sum' A constructor should not return any value. The '__init__' method should only initialize the values of instance members for news objects. As a quick-fix, the IDE offers to remove the 'return' statement.",
"markdown": "Reports occurrences of `return` statements with a return value inside\n`__init__` methods of classes.\n\n**Example:**\n\n\n class Sum:\n def __init__(self, a, b):\n self.a = a\n self.b = b\n self.sum = a + b\n return self.sum\n\nA constructor should not return any value. The `__init__` method should\nonly initialize the values of instance members for news objects.\n\nAs a quick-fix, the IDE offers to remove the `return` statement."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyReturnFromInit",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JupyterPackageInspection",
"shortDescription": {
"text": "The 'jupyter' package is not installed"
},
"fullDescription": {
"text": "Reports cases when the 'jupyter' package is not installed for the selected Python interpreter. Without a properly installed 'jupyter' package, you cannot execute Jupyter notebooks. Click the corresponding link on the warning banner to install the missing package. You can also install the package in the Project Settings/Preferences or in the Python Packages tool window. See Installing Python package for more details.",
"markdown": "Reports cases when the `jupyter` package is not installed for the selected\nPython interpreter. Without a properly installed `jupyter` package, you cannot\nexecute Jupyter notebooks.\n\nClick the corresponding link on the warning banner to install the missing\npackage. You can also install the package in the Project **Settings/Preferences** or in the\n**Python Packages** tool window.\n\nSee [Installing Python package](https://www.jetbrains.com/help/pycharm/installing-uninstalling-and-upgrading-packages.html) for more details."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JupyterPackage",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Jupyter",
"index": 251,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyInconsistentIndentationInspection",
"shortDescription": {
"text": "Inconsistent indentation"
},
"fullDescription": {
"text": "Reports inconsistent indentation in Python source files when, for example, you use a mixture of tabs and spaces in your code.",
"markdown": "Reports inconsistent indentation in Python source files when, for example,\nyou use a mixture of tabs and spaces in your code."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyInconsistentIndentation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyTupleItemAssignmentInspection",
"shortDescription": {
"text": "Tuple item assignment is prohibited"
},
"fullDescription": {
"text": "Reports assignments to a tuple item. Example: 't = ('red', 'blue', 'green', 'white')\nt[3] = 'black'' A quick-fix offers to replace the tuple with a list.",
"markdown": "Reports assignments to a tuple item.\n\n**Example:**\n\n\n t = ('red', 'blue', 'green', 'white')\n t[3] = 'black'\n\nA quick-fix offers to replace the tuple with a list."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyTupleItemAssignment",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyAsyncCallInspection",
"shortDescription": {
"text": "Missing `await` syntax in coroutine calls"
},
"fullDescription": {
"text": "Reports coroutines that were called without using the 'await' syntax. Example: 'async def bar():\n pass\n\n\nasync def foo():\n bar()' After the quick-fix is applied, the code changes to: 'async def bar():\n pass\n\n\nasync def foo():\n await bar()'",
"markdown": "Reports coroutines that were called\nwithout using the `await` syntax.\n\n**Example:**\n\n\n async def bar():\n pass\n\n\n async def foo():\n bar()\n\nAfter the quick-fix is applied, the code changes to:\n\n\n async def bar():\n pass\n\n\n async def foo():\n await bar()\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyAsyncCall",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CommandLineInspection",
"shortDescription": {
"text": "Incorrect CLI syntax"
},
"fullDescription": {
"text": "Reports the problems if the arguments of the command you type in the console are not in the proper order. The inspection also verifies that option names and arguments are correct. Do not disable the inspection if you are going to use command-line interfaces like manage.py in Django.",
"markdown": "Reports the problems if the arguments of the command you type in the console are not in the proper order. The inspection also verifies\nthat option names and arguments are correct.\n\nDo not disable the inspection if you are going to use command-line interfaces like [manage.py in Django](https://www.jetbrains.com/help/pycharm/running-manage-py.html)."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "CommandLineInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyClassVarInspection",
"shortDescription": {
"text": "Invalid usage of ClassVar variables"
},
"fullDescription": {
"text": "Reports invalid usages of ClassVar annotations. Example: 'from typing import ClassVar\n\n\nclass Cat:\n color: ClassVar[str] = \"white\"\n weight: int\n\n def __init__(self, weight: int):\n self.weight = weight\n\n\nCat.color = \"black\" # OK\nmy_cat = Cat(5)\nmy_cat.color = \"gray\" # Error, setting class variable on instance'",
"markdown": "Reports invalid usages of [ClassVar](https://docs.python.org/3/library/typing.html#typing.ClassVar) annotations.\n\n**Example:**\n\n\n from typing import ClassVar\n\n\n class Cat:\n color: ClassVar[str] = \"white\"\n weight: int\n\n def __init__(self, weight: int):\n self.weight = weight\n\n\n Cat.color = \"black\" # OK\n my_cat = Cat(5)\n my_cat.color = \"gray\" # Error, setting class variable on instance\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyClassVar",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DjangoRelationInspection",
"shortDescription": {
"text": "Incorrect comparison expression in Django templates"
},
"fullDescription": {
"text": "Reports missing whitespaces before and after comparison operators in Django templates. Example: '{% if my_var==1 %}\n{% endif %}'",
"markdown": "Reports missing whitespaces before and after comparison operators in Django templates.\n\n**Example:**\n\n\n {% if my_var==1 %}\n {% endif %}\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DjangoRelationInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Django",
"index": 87,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyUnresolvedReferencesInspection",
"shortDescription": {
"text": "Unresolved references"
},
"fullDescription": {
"text": "Reports references in your code that cannot be resolved. In a dynamically typed language, this is possible in a limited number of cases. If a reference type is unknown, then its attributes are not highlighted as unresolved even if you know that they should be: 'def print_string(s):\n print(s.abc())' In this code fragment 's' is always a string and 'abc' should be highlighted as unresolved. However, 's' type is inferred as 'Any' and no warning is reported. The IDE provides quick-fix actions to add missing references on-the-fly.",
"markdown": "Reports references in your code that cannot be resolved.\n\nIn a dynamically typed language, this is possible in a limited number of cases.\n\nIf a reference type is unknown, then its attributes are not highlighted as unresolved even if you know that they should be:\n\n\n def print_string(s):\n print(s.abc())\n\nIn this code fragment `s` is always a string and `abc` should be highlighted as unresolved. However, `s`\ntype is inferred as `Any` and no warning is reported.\n\nThe IDE provides quick-fix actions to add missing references on-the-fly."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PyUnresolvedReferences",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyArgumentListInspection",
"shortDescription": {
"text": "Incorrect call arguments"
},
"fullDescription": {
"text": "Reports discrepancies between declared parameters and actual arguments, as well as incorrect arguments, for example, duplicate named arguments, and incorrect argument order. Example: 'class Foo:\n def __call__(self, p1: int, *, p2: str = \"%\"):\n return p2 * p1\n\n\nbar = Foo()\nbar.__call__() # unfilled parameter\nbar(5, \"#\") # unexpected argument' The correct code fragment looks at follows: 'class Foo:\n def __call__(self, p1: int, *, p2: str = \"%\"):\n return p2 * p1\n\n\nbar = Foo()\nbar.__call__(5)\nbar(5, p2=\"#\")'",
"markdown": "Reports discrepancies between declared parameters and actual arguments, as well as\nincorrect arguments, for example, duplicate named arguments, and incorrect argument order.\n\n**Example:**\n\n\n class Foo:\n def __call__(self, p1: int, *, p2: str = \"%\"):\n return p2 * p1\n\n\n bar = Foo()\n bar.__call__() # unfilled parameter\n bar(5, \"#\") # unexpected argument\n\nThe correct code fragment looks at follows:\n\n\n class Foo:\n def __call__(self, p1: int, *, p2: str = \"%\"):\n return p2 * p1\n\n\n bar = Foo()\n bar.__call__(5)\n bar(5, p2=\"#\")\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyArgumentList",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyStubPackagesAdvertiser",
"shortDescription": {
"text": "Stub packages advertiser"
},
"fullDescription": {
"text": "Reports availability of stub packages. Stub package is a package that contains type information for the corresponding runtime package. Using stub packages ensures better coding assistance for the corresponding python package.",
"markdown": "Reports availability of stub packages.\n\n\n[Stub package](https://www.python.org/dev/peps/pep-0561/) is a package that contains type information for the corresponding\nruntime package.\n\nUsing stub packages ensures better coding assistance for the corresponding python package."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyStubPackagesAdvertiser",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyExceptClausesOrderInspection",
"shortDescription": {
"text": "Wrong order of 'except' clauses"
},
"fullDescription": {
"text": "Reports cases when 'except' clauses are not in the proper order, from the more specific to the more generic, or one exception class is caught twice. If you do not fix the order, some exceptions may not be caught by the most specific handler. Example: 'try:\n call()\nexcept ValueError:\n pass\nexcept UnicodeError:\n pass' The IDE recommends moving the clause up. When the quick-fix is applied, the code changes to: 'try:\n call()\nexcept UnicodeError:\n pass\nexcept ValueError:\n pass'",
"markdown": "Reports cases when `except` clauses are not in the proper order,\nfrom the more specific to the more generic, or one exception class is caught twice.\n\n\nIf you do not fix the order, some exceptions may not be caught by the most specific handler.\n\n**Example:**\n\n\n try:\n call()\n except ValueError:\n pass\n except UnicodeError:\n pass\n\nThe IDE recommends moving the clause up. When the quick-fix is applied, the code changes to:\n\n\n try:\n call()\n except UnicodeError:\n pass\n except ValueError:\n pass\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyExceptClausesOrder",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyClassicStyleClassInspection",
"shortDescription": {
"text": "Classic style class usage"
},
"fullDescription": {
"text": "Reports classic style classes usage. This inspection applies only to Python 2. Example: 'class A:\n pass' With quick-fixes provided by the IDE, this code fragment changes to: 'class A(object):\n def __init__(self):\n pass'",
"markdown": "Reports [classic style classes](https://docs.python.org/2/reference/datamodel.html#new-style-and-classic-classes) usage. This inspection applies only to Python 2.\n\n**Example:**\n\n\n class A:\n pass\n\nWith quick-fixes provided by the IDE, this code fragment changes to:\n\n\n class A(object):\n def __init__(self):\n pass\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PyClassicStyleClass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyPandasSeriesToListInspection",
"shortDescription": {
"text": "Method Series.to_list() is recommended"
},
"fullDescription": {
"text": "Reports redundant 'list' in 'list(Series.values)' statement for pandas and polars libraries. Such 'Series' values extraction can be replaced with the 'to_list()' function call. Example: list(df['column'].values)\n When the quick-fix is applied, the code changes to: df['column'].to_list()",
"markdown": "Reports redundant `list` in `list(Series.values)` statement for pandas and polars libraries.\nSuch `Series` values extraction can be replaced with the `to_list()` function call.\n\n**Example:**\n\n```\nlist(df['column'].values)\n```\n\nWhen the quick-fix is applied, the code changes to:\n\n```\ndf['column'].to_list()\n```"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyPackages",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PySetFunctionToLiteralInspection",
"shortDescription": {
"text": "Function call can be replaced with set literal"
},
"fullDescription": {
"text": "Reports calls to the 'set' function that can be replaced with the 'set' literal. Example: 'def do_mult(a, b):\n c = a * b\n return set([c, a, b])' When the quick-fix is applied, the code changes to: 'def do_mult(a, b):\n c = a * b\n return {c, a, b}'",
"markdown": "Reports calls to the `set` function that can be replaced with\nthe `set` literal.\n\n**Example:**\n\n\n def do_mult(a, b):\n c = a * b\n return set([c, a, b])\n\nWhen the quick-fix is applied, the code changes to:\n\n\n def do_mult(a, b):\n c = a * b\n return {c, a, b}\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PySetFunctionToLiteral",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyInitNewSignatureInspection",
"shortDescription": {
"text": "Incompatible signatures of __new__ and __init__"
},
"fullDescription": {
"text": "Reports incompatible signatures of the '__new__' and '__init__' methods. Example: 'class MyClass(object):\n def __new__(cls, arg1):\n return super().__new__(cls)\n\n def __init__(self):\n pass' If the '__new__' and '__init__' have different arguments, then the 'MyClass' cannot be instantiated. As a fix, the IDE offers to apply the Change Signature refactoring.",
"markdown": "Reports incompatible signatures of the `__new__` and `__init__` methods.\n\n**Example:**\n\n\n class MyClass(object):\n def __new__(cls, arg1):\n return super().__new__(cls)\n\n def __init__(self):\n pass\n\nIf the `__new__` and `__init__` have different arguments, then the `MyClass`\ncannot be instantiated.\n\nAs a fix, the IDE offers to apply the Change Signature refactoring."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyInitNewSignature",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyMissingConstructorInspection",
"shortDescription": {
"text": "Missed call to '__init__' of the super class"
},
"fullDescription": {
"text": "Reports cases when a call to the 'super' constructor in a class is missed. Example: 'class Fruit:\n def __init__(self):\n pass\n\n\nclass Pear(Fruit):\n def __init__(self):\n pass' The 'Pear' class should have a 'super' call in the '__init__' method. When the quick-fix is applied, the code changes to: 'class Fruit:\n def __init__(self):\n pass\n\n\nclass Pear(Fruit):\n def __init__(self):\n super().__init__()'",
"markdown": "Reports cases when a call to the `super` constructor in a class is missed.\n\n**Example:**\n\n\n class Fruit:\n def __init__(self):\n pass\n\n\n class Pear(Fruit):\n def __init__(self):\n pass\n\nThe `Pear` class should have a `super` call in the `__init__`\nmethod.\n\nWhen the quick-fix is applied, the code changes to:\n\n\n class Fruit:\n def __init__(self):\n pass\n\n\n class Pear(Fruit):\n def __init__(self):\n super().__init__()\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyMissingConstructor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyBroadExceptionInspection",
"shortDescription": {
"text": "Unclear exception clauses"
},
"fullDescription": {
"text": "Reports exception clauses that do not provide specific information about the problem. Example: Clauses that do not specify an exception class Clauses that are specified as 'Exception'",
"markdown": "Reports exception clauses that do not provide specific information\nabout the problem.\n\n**Example:**\n\n* Clauses that do not specify an exception class\n* Clauses that are specified as `Exception`"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PyBroadException",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyFinalInspection",
"shortDescription": {
"text": "Invalid usages of final classes, methods, and variables"
},
"fullDescription": {
"text": "Reports invalid usages of final classes, methods and variables. Example: 'from typing import final\n\n\n@final\nclass A:\n def a_method(self):\n pass\n\n\nclass B(A):\n def a_method(self):\n pass'",
"markdown": "Reports invalid usages of final classes,\nmethods and variables.\n\n**Example:**\n\n\n from typing import final\n\n\n @final\n class A:\n def a_method(self):\n pass\n\n\n class B(A):\n def a_method(self):\n pass\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyFinal",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyUnusedLocalInspection",
"shortDescription": {
"text": "Unused local symbols"
},
"fullDescription": {
"text": "Reports local variables, parameters, and functions that are locally defined, but not used name in a function.",
"markdown": "Reports local variables, parameters, and functions that are locally defined, but not used name in a function."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PyUnusedLocal",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DjangoUnresolvedUrlInspection",
"shortDescription": {
"text": "Django {% url %} tag arguments are unresolved"
},
"fullDescription": {
"text": "Reports a missing url in the 'url' tag. Example: '{% url 'url_name' %}' The IDE shows a warning if 'url_name' is not defined in the 'urls' file.",
"markdown": "Reports a missing url in the `url` tag.\n\n**Example:**\n\n\n {% url 'url_name' %}\n\nThe IDE shows a warning if `url_name` is not defined in the `urls` file."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "DjangoUnresolvedUrlInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Django",
"index": 87,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyMethodFirstArgAssignmentInspection",
"shortDescription": {
"text": "First argument of the method is reassigned"
},
"fullDescription": {
"text": "Reports cases when the first parameter, such as 'self' or 'cls', is reassigned in a method. Because in most cases, there are no objectives in such reassignment, the IDE indicates an error. Example: 'class Account:\n def calc(self, balance):\n if balance == 0:\n self = balance\n return self' As a fix, you might want to check and modify the algorithm to ensure that reassignment is needed. If everything is correct, you can invoke intention actions for this code and opt to ignore the warning.",
"markdown": "Reports cases when the first parameter,\nsuch as `self` or `cls`, is reassigned in a method.\nBecause in most cases, there are no objectives in such reassignment, the\nIDE indicates an error.\n\n**Example:**\n\n\n class Account:\n def calc(self, balance):\n if balance == 0:\n self = balance\n return self\n\nAs a fix, you might want to check and modify the algorithm to ensure that reassignment is needed. If everything is correct,\nyou can invoke intention actions for this code and opt to ignore the warning."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyMethodFirstArgAssignment",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ExtendsTagPositionInspection",
"shortDescription": {
"text": "Misplaced {% extends %} tag"
},
"fullDescription": {
"text": "Reports the '{% extends %}' tag that is not the first tag in a Django template. Example: '{% load my_custom_tags %}\n{% extends \"../DjangoApp/templatetags/my_custom_tags.py\"%}' In this example, the '{% extends %}' tag is highlighted, because it should be placed before the '{% load %}' tag.",
"markdown": "Reports the `{% extends %}` tag that is not the first tag in a\nDjango template.\n\n**Example:**\n\n\n {% load my_custom_tags %}\n {% extends \"../DjangoApp/templatetags/my_custom_tags.py\"%}\n\nIn this example, the `{% extends %}` tag is highlighted, because it should be placed before\nthe `{% load %}` tag."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ExtendsTagPositionInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Django",
"index": 87,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyRelativeImportInspection",
"shortDescription": {
"text": "Suspicious relative imports"
},
"fullDescription": {
"text": "Reports usages of relative imports inside plain directories, for example, directories neither containing '__init__.py' nor explicitly marked as namespace packages.",
"markdown": "Reports usages of relative imports inside plain directories, for example, directories neither containing `__init__.py` nor\nexplicitly marked as namespace packages."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PyPackages",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyDataclassInspection",
"shortDescription": {
"text": "Invalid definition and usage of Data Classes"
},
"fullDescription": {
"text": "Reports invalid definitions and usages of classes created with 'dataclasses' or 'attr' modules. Example: 'import dataclasses\n\n\n@dataclasses.dataclass\nclass FullName:\n first: str\n middle: str = \"\"\n last: str'",
"markdown": "Reports invalid definitions and usages of classes created with\n`dataclasses` or `attr` modules.\n\n**Example:**\n\n\n import dataclasses\n\n\n @dataclasses.dataclass\n class FullName:\n first: str\n middle: str = \"\"\n last: str\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyDataclass",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyGlobalUndefinedInspection",
"shortDescription": {
"text": "Global variable is not defined at the module level"
},
"fullDescription": {
"text": "Reports problems when a variable defined through the 'global' statement is not defined in the module scope. Example: 'def foo():\n global bar\n print(bar)\n\nfoo()' As a fix, you can move the global variable declaration: 'global bar\n\n\ndef foo():\n print(bar)'",
"markdown": "Reports problems when a variable defined through the `global`\nstatement is not defined in the module scope.\n\n**Example:**\n\n\n def foo():\n global bar\n print(bar)\n\n foo()\n\nAs a fix, you can move the global variable declaration:\n\n\n global bar\n\n\n def foo():\n print(bar)\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PyGlobalUndefined",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyMissingOrEmptyDocstringInspection",
"shortDescription": {
"text": "Missing or empty docstring"
},
"fullDescription": {
"text": "Reports missing and empty docstrings. Example of a missing docstring 'def demo(a):\n c = a ** 2' Example of an empty docstring 'def demo(a):\n \"\"\"\n \"\"\"\n c = a ** 2' When the quick-fix is applied, the code fragments change to: 'def demo(a):\n \"\"\"\n\n :param a:\n \"\"\"\n c = a ** 2' You need to provide some details about the parameter in the generated template.",
"markdown": "Reports missing and empty docstrings.\n\n**Example of a missing docstring**\n\n\n def demo(a):\n c = a ** 2\n\n**Example of an empty docstring**\n\n\n def demo(a):\n \"\"\"\n \"\"\"\n c = a ** 2\n\nWhen the quick-fix is applied, the code fragments change to:\n\n\n def demo(a):\n \"\"\"\n\n :param a:\n \"\"\"\n c = a ** 2\n\nYou need to provide some details about the parameter in the generated template."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PyMissingOrEmptyDocstring",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyDictDuplicateKeysInspection",
"shortDescription": {
"text": "Dictionary contains duplicate keys"
},
"fullDescription": {
"text": "Reports using the same value as the dictionary key twice. Example: 'dic = {\"a\": [1, 2], \"a\": [3, 4]}'",
"markdown": "Reports using the same value as the dictionary key twice.\n\n**Example:**\n\n\n dic = {\"a\": [1, 2], \"a\": [3, 4]}\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyDictDuplicateKeys",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyStatementEffectInspection",
"shortDescription": {
"text": "Statement has no effect"
},
"fullDescription": {
"text": "Reports statements that have no effect. Example: 'class Car:\n def __init__(self, speed=0):\n self.speed = speed\n self.time # has no effect\n\n2 + 3 # has no effect' In this example, you can either add a field 'time' to the 'Car' class or introduce variables for the problematic statements.",
"markdown": "Reports statements that have no effect.\n\n**Example:**\n\n\n class Car:\n def __init__(self, speed=0):\n self.speed = speed\n self.time # has no effect\n\n 2 + 3 # has no effect\n\nIn this example, you can either add a field `time` to the `Car` class or\nintroduce variables for the problematic statements."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyStatementEffect",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyMandatoryEncodingInspection",
"shortDescription": {
"text": "No encoding specified for file"
},
"fullDescription": {
"text": "Reports a missing encoding comment in Python 2. Example: 'class Book(object):\n def __init__(self):\n pass' When the quick-fix is applied, the missing comment is added: '# coding=utf-8\nclass Book(object):\n def __init__(self):\n pass'",
"markdown": "Reports a missing encoding comment in Python 2.\n\n**Example:**\n\n\n class Book(object):\n def __init__(self):\n pass\n\nWhen the quick-fix is applied, the missing comment is added:\n\n\n # coding=utf-8\n class Book(object):\n def __init__(self):\n pass\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PyMandatoryEncoding",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DjangoUnresolvedStaticReferenceInspection",
"shortDescription": {
"text": "Unresolved static reference"
},
"fullDescription": {
"text": "Reports unresolved references to static resources. Example: '{% load staticfiles %}\n<link rel=\"stylesheet\" type=\"text/css\" href=\"{% static 'polls/style.css' %}\" />' In this example, 'style.css' is highlighted if there is no such a file in the 'static/poll' directory.",
"markdown": "Reports unresolved references to static resources.\n\n**Example:**\n\n\n {% load staticfiles %}\n <link rel=\"stylesheet\" type=\"text/css\" href=\"{% static 'polls/style.css' %}\" />\n\nIn this example, `style.css` is highlighted if there is no such a file in the `static/poll`\ndirectory."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DjangoUnresolvedStaticReferenceInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Django",
"index": 87,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyShadowingBuiltinsInspection",
"shortDescription": {
"text": "Shadowing built-in names"
},
"fullDescription": {
"text": "Reports shadowing built-in names, such as 'len' or 'list'. Example: 'def len(a, b, c):\n d = a + b + c\n return d' In this code fragment, the 'len' built-in name is used. The IDE offers to apply the Rename refactoring as a fix.",
"markdown": "Reports shadowing built-in names, such as `len` or `list`.\n\n**Example:**\n\n\n def len(a, b, c):\n d = a + b + c\n return d\n\nIn this code fragment, the `len` built-in name is used. The IDE offers to\napply the Rename refactoring as a fix."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PyShadowingBuiltins",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyArgumentEqualDefaultInspection",
"shortDescription": {
"text": "The function argument is equal to the default parameter value"
},
"fullDescription": {
"text": "Reports a problem when an argument passed to the function is equal to the default parameter value. This inspection is disabled by default to avoid performance degradation. Example: 'def my_function(a: int = 2):\n print(a)\n\n\nmy_function(2)'",
"markdown": "Reports a problem when an argument\npassed to the function is equal to the default parameter value.\n\nThis inspection is disabled by default to avoid performance degradation.\n\n**Example:**\n\n\n def my_function(a: int = 2):\n print(a)\n\n\n my_function(2)\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "PyArgumentEqualDefault",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyFromFutureImportInspection",
"shortDescription": {
"text": "Improper position of from __future__ import"
},
"fullDescription": {
"text": "Reports 'from __future__ import' statements that are used not at the beginning of a file. Example: 'a = 1\nfrom __future__ import print_function\nprint()' When the quick-fix is applied, the code changes to: 'from __future__ import print_function\n\na = 1\nprint()'",
"markdown": "Reports `from __future__ import`\nstatements that are used not at\nthe beginning of a file.\n\n**Example:**\n\n\n a = 1\n from __future__ import print_function\n print()\n\nWhen the quick-fix is applied, the code changes to:\n\n\n from __future__ import print_function\n\n a = 1\n print()\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PyFromFutureImport",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyInterpreterInspection",
"shortDescription": {
"text": "An invalid interpreter"
},
"fullDescription": {
"text": "Reports problems if there is no Python interpreter configured for the project or if the interpreter is invalid. Without a properly configured interpreter, you cannot execute your Python scripts and benefit from some Python code insight features. The IDE provides quick access to the interpreter settings.",
"markdown": "Reports problems if there is no Python interpreter configured for the project or if the interpreter is invalid. Without a properly\nconfigured interpreter, you cannot execute your Python scripts and benefit from some Python code insight features.\n\nThe IDE provides quick access to the interpreter settings."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PyInterpreter",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyNestedDecoratorsInspection",
"shortDescription": {
"text": "Problematic nesting of decorators"
},
"fullDescription": {
"text": "Reports problems with nesting decorators. The inspection highlights the cases when 'classmethod' or 'staticmethod' is applied before another decorator. Example: 'def innocent(f):\n return f\n\n\nclass A:\n @innocent # Decorator will not receive a callable it may expect\n @classmethod\n def f2(cls):\n pass\n\n @innocent # Decorator will not receive a callable it may expect\n @staticmethod\n def f1():\n pass' As a quick-fix, the IDE offers to remove the decorator.",
"markdown": "Reports problems with nesting decorators. The inspection highlights the cases when `classmethod` or `staticmethod`\nis applied before another decorator.\n\n**Example:**\n\n\n def innocent(f):\n return f\n\n\n class A:\n @innocent # Decorator will not receive a callable it may expect\n @classmethod\n def f2(cls):\n pass\n\n @innocent # Decorator will not receive a callable it may expect\n @staticmethod\n def f1():\n pass\n\nAs a quick-fix, the IDE offers to remove the decorator."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PyNestedDecorators",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DuplicatedBlockNamesInspection",
"shortDescription": {
"text": "Duplicated block names"
},
"fullDescription": {
"text": "Reports duplicated block names in Django templates. Example: '<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <link rel=\"stylesheet\" href=\"style.css\">\n <title>{% block title %}My amazing site{% endblock %}</title>\n</head>\n\n<body>\n <div id=\"sidebar\">\n {% block title %}\n <ul>\n <li><a href=\"/\">Home</a></li>\n <li><a href=\"/blog/\">Blog</a></li>\n </ul>\n {% endblock %}\n </div>\n\n <div id=\"content\">\n {% block content %}{% endblock %}\n </div>\n</body>\n</html>'",
"markdown": "Reports duplicated block names in Django templates.\n\n**Example:**\n\n\n <!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <link rel=\"stylesheet\" href=\"style.css\">\n <title>{% block title %}My amazing site{% endblock %}</title>\n </head>\n\n <body>\n <div id=\"sidebar\">\n {% block title %}\n <ul>\n <li><a href=\"/\">Home</a></li>\n <li><a href=\"/blog/\">Blog</a></li>\n </ul>\n {% endblock %}\n </div>\n\n <div id=\"content\">\n {% block content %}{% endblock %}\n </div>\n </body>\n </html>\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DuplicatedBlockNamesInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Django",
"index": 87,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PyListCreationInspection",
"shortDescription": {
"text": "Non-optimal list declaration"
},
"fullDescription": {
"text": "Reports cases when a list declaration can be rewritten with a list literal. This ensures better performance of your application. Example: 'l = [1]\nl.append(2)' When the quick-fix is applied, the code changes to: 'l = [1, 2]'",
"markdown": "Reports cases when a list declaration\ncan be rewritten with a list literal.\n\nThis ensures better performance of your application.\n\n**Example:**\n\n\n l = [1]\n l.append(2)\n\nWhen the quick-fix is applied, the code changes to:\n\n\n l = [1, 2]\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "PyListCreation",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Python",
"index": 78,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.kubernetes",
"version": "232.8660.158",
"rules": [
{
"id": "KubernetesDeprecatedResources",
"shortDescription": {
"text": "Deprecated Kubernetes resources"
},
"fullDescription": {
"text": "Report deprecated Kubernetes resource types.",
"markdown": "Report deprecated Kubernetes resource types. "
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "KubernetesDeprecatedResources",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kubernetes",
"index": 80,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KubernetesNonEditableResources",
"shortDescription": {
"text": "Non-editable Kubernetes resources"
},
"fullDescription": {
"text": "Reports non-editable (read-only) Kubernetes resource types.",
"markdown": "Reports non-editable (read-only) Kubernetes resource types. "
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "KubernetesNonEditableResources",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kubernetes",
"index": 80,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KubernetesDeprecatedKeys",
"shortDescription": {
"text": "Deprecated Kubernetes resource properties"
},
"fullDescription": {
"text": "Reports deprecated keys in Kubernetes resource files.",
"markdown": "Reports deprecated keys in Kubernetes resource files. "
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "KubernetesDeprecatedKeys",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kubernetes",
"index": 80,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KubernetesNonEditableKeys",
"shortDescription": {
"text": "Non-editable Kubernetes resource properties"
},
"fullDescription": {
"text": "Reports non-editable (read-only) keys in Kubernetes resource files.",
"markdown": "Reports non-editable (read-only) keys in Kubernetes resource files. "
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "KubernetesNonEditableKeys",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kubernetes",
"index": 80,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HelmChartMissingKeys",
"shortDescription": {
"text": "Missing Chart.yaml keys"
},
"fullDescription": {
"text": "Reports missing required keys in Chart.yaml.",
"markdown": "Reports missing required keys in Chart.yaml. "
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "HelmChartMissingKeys",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Kubernetes",
"index": 80,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KubernetesUnknownValues",
"shortDescription": {
"text": "Unknown Kubernetes YAML values"
},
"fullDescription": {
"text": "Reports invalid values in Kubernetes resource files.",
"markdown": "Reports invalid values in Kubernetes resource files. "
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "KubernetesUnknownValues",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Kubernetes",
"index": 80,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KubernetesUnknownKeys",
"shortDescription": {
"text": "Unknown Kubernetes YAML keys"
},
"fullDescription": {
"text": "Reports unrecognized keys in Kubernetes resource files.",
"markdown": "Reports unrecognized keys in Kubernetes resource files. "
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "KubernetesUnknownKeys",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Kubernetes",
"index": 80,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HelmChartUnknownValues",
"shortDescription": {
"text": "Invalid Chart.yaml values"
},
"fullDescription": {
"text": "Reports unrecognized values in Chart.yaml and requirements.yaml.",
"markdown": "Reports unrecognized values in Chart.yaml and requirements.yaml. "
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "HelmChartUnknownValues",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Kubernetes",
"index": 80,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KubernetesMissingKeys",
"shortDescription": {
"text": "Missing Kubernetes YAML keys"
},
"fullDescription": {
"text": "Reports missing required keys in Kubernetes resource files.",
"markdown": "Reports missing required keys in Kubernetes resource files. "
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "KubernetesMissingKeys",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Kubernetes",
"index": 80,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KubernetesUnknownResourcesInspection",
"shortDescription": {
"text": "Unknown Kubernetes resources"
},
"fullDescription": {
"text": "Reports unrecognized Kubernetes resource types.",
"markdown": "Reports unrecognized Kubernetes resource types. "
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "KubernetesUnknownResourcesInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kubernetes",
"index": 80,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HelmChartUnknownKeys",
"shortDescription": {
"text": "Unknown Chart.yaml keys"
},
"fullDescription": {
"text": "Reports unrecognized keys in Chart.yaml.",
"markdown": "Reports unrecognized keys in Chart.yaml. "
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "HelmChartUnknownKeys",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Kubernetes",
"index": 80,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KubernetesDuplicatedEnvVars",
"shortDescription": {
"text": "Duplicated EnvVar definitions"
},
"fullDescription": {
"text": "Reports duplicate EnvVars in Kubernetes container definitions.",
"markdown": "Reports duplicate EnvVars in Kubernetes container definitions. "
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "KubernetesDuplicatedEnvVars",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Kubernetes",
"index": 80,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.hibernate",
"version": "232.8660.185",
"rules": [
{
"id": "CriteriaApiResolveInspection",
"shortDescription": {
"text": "Hibernate Criteria API unrecognized property"
},
"fullDescription": {
"text": "Reports unrecognized properties in Hibernate Criteria API usages",
"markdown": "Reports unrecognized properties in Hibernate Criteria API usages"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "CriteriaApiResolveInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Hibernate",
"index": 81,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HibernateMappingDomInspection",
"shortDescription": {
"text": "Invalid Hibernate XML mappings"
},
"fullDescription": {
"text": "Reports Hibernate XML configuration mapping errors including: References to non-instantiable classes References to classes that do not extend the required class References to classes with inappropriate scope Empty tag and attribute values Tag and attribute values that do not match the required pattern (for example, Java Identifiers) Tags that do not include the required children tags or attributes Tags that define objects with duplicate names",
"markdown": "Reports Hibernate XML configuration mapping errors including:\n\n* References to non-instantiable classes\n* References to classes that do not extend the required class\n* References to classes with inappropriate scope\n* Empty tag and attribute values\n* Tag and attribute values that do not match the required pattern (for example, Java Identifiers)\n* Tags that do not include the required children tags or attributes\n* Tags that define objects with duplicate names"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "HibernateMappingDomInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Hibernate",
"index": 81,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HibernateMappingDatasourceDomInspection",
"shortDescription": {
"text": "Invalid Hibernate DB-related XML mappings"
},
"fullDescription": {
"text": "Reports Hibernate XML configuration DB-related mapping errors including: References to unrecognized catalogs/schemas/tables References to unrecognized columns",
"markdown": "Reports Hibernate XML configuration DB-related mapping errors including:\n\n* References to unrecognized catalogs/schemas/tables\n* References to unrecognized columns"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "HibernateMappingDatasourceDomInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Hibernate",
"index": 81,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HibernateConfigDomFacetInspection",
"shortDescription": {
"text": "Hibernate configuration XML is not added to facet"
},
"fullDescription": {
"text": "Reports missing Hibernate XML configuration files. The quick-fix creates a facet if necessary and adds a configuration file to it.",
"markdown": "Reports missing Hibernate XML configuration files.\n\nThe quick-fix creates a facet if necessary and adds a configuration file to it."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "HibernateConfigDomFacetInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Hibernate",
"index": 81,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HibernateConfigDomInspection",
"shortDescription": {
"text": "Invalid Hibernate XML configuration"
},
"fullDescription": {
"text": "Reports Hibernate XML configuration errors including: References to non-instantiable classes References to classes that do not extend the required class References to classes with inappropriate scope Empty tag and attribute values Tag and attribute values that do not match the required pattern (for example, Java Identifiers) Tags that do not include the required children tags or attributes Tags that define objects with duplicate names",
"markdown": "Reports Hibernate XML configuration errors including:\n\n* References to non-instantiable classes\n* References to classes that do not extend the required class\n* References to classes with inappropriate scope\n* Empty tag and attribute values\n* Tag and attribute values that do not match the required pattern (for example, Java Identifiers)\n* Tags that do not include the required children tags or attributes\n* Tags that define objects with duplicate names"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "HibernateConfigDomInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Hibernate",
"index": 81,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.properties",
"version": "232.8660.185",
"rules": [
{
"id": "UseEllipsisInPropertyInspection",
"shortDescription": {
"text": "Three dot characters instead of the ellipsis"
},
"fullDescription": {
"text": "Reports three \"dot\" characters which are used instead of the ellipsis character for UTF-8 properties files.",
"markdown": "Reports three \"dot\" characters which are used instead of the ellipsis character for UTF-8 properties files."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UseEllipsisInPropertyInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Properties files",
"index": 33,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AlphaUnsortedPropertiesFile",
"shortDescription": {
"text": "Properties file or resource bundle is alphabetically unsorted"
},
"fullDescription": {
"text": "Reports alphabetically unsorted resource bundles or .properties files.",
"markdown": "Reports alphabetically unsorted resource bundles or .properties files."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "AlphaUnsortedPropertiesFile",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Properties files",
"index": 33,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnusedProperty",
"shortDescription": {
"text": "Unused property"
},
"fullDescription": {
"text": "Reports properties that are not referenced outside of the .properties file they are contained in.",
"markdown": "Reports properties that are not referenced outside of the .properties file they are contained in."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnusedProperty",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Properties files",
"index": 33,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TrailingSpacesInProperty",
"shortDescription": {
"text": "Trailing spaces in property"
},
"fullDescription": {
"text": "Reports properties whose keys or values end with a whitespace.",
"markdown": "Reports properties whose keys or values end with a whitespace."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "TrailingSpacesInProperty",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Properties files",
"index": 33,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "WrongPropertyKeyValueDelimiter",
"shortDescription": {
"text": "Property key/value delimiter doesn't match code style settings"
},
"fullDescription": {
"text": "Reports properties in which key or value delimiters do not match code style settings.",
"markdown": "Reports properties in which key or value delimiters do not match code style settings."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "WrongPropertyKeyValueDelimiter",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Properties files",
"index": 33,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DuplicatePropertyInspection",
"shortDescription": {
"text": "Duplicate property"
},
"fullDescription": {
"text": "Reports duplicate property keys with different values, duplicate keys, or duplicate property values. Example: 'property1=value;\nproperty2=value;' The Options list allows selecting the area in which the inspection should search for duplicates.",
"markdown": "Reports duplicate property keys with different values, duplicate keys, or duplicate property values.\n\nExample:\n\n\n property1=value;\n property2=value;\n\nThe **Options** list allows selecting the area in which the inspection should search for duplicates."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DuplicatePropertyInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Properties files",
"index": 33,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "XPathView",
"version": "232.8660.185",
"rules": [
{
"id": "XsltUnusedDeclaration",
"shortDescription": {
"text": "Unused variable or parameter"
},
"fullDescription": {
"text": "Reports local variables and parameters that are never used.",
"markdown": "Reports local variables and parameters that are never used."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "XsltUnusedDeclaration",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "XSLT",
"index": 91,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantTypeConversion",
"shortDescription": {
"text": "Redundant type conversion"
},
"fullDescription": {
"text": "Reports unnecessary type conversions. Type conversions are unnecessary when the argument type of a 'string()', 'number()', or 'boolean()' function is already the same as the function's return type or if the expected expression type is 'any'. Suggests removing the unnecessary conversion.",
"markdown": "Reports unnecessary type conversions. Type conversions are unnecessary when the argument type of a `string()`, `number()`, or `boolean()` function is already the same as the function's return type or if the expected expression type is `any`. Suggests removing the unnecessary conversion."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantTypeConversion",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "XPath",
"index": 152,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CheckNodeTest",
"shortDescription": {
"text": "Unknown element or attribute name"
},
"fullDescription": {
"text": "Reports names of elements or attributes that are used in an XPath-expression but are missing in the associated XML files and are not defined in the referenced schemas. Such names are often the result of typos and would otherwise probably only be discovered at runtime. Example: '<xsl:template match=\"h:txtarea\" />' If the 'h' is bound to the XHTML namespace, the inspection will report this part of the 'match' expression as an unknown element name because the correct name of the element is \"textarea\".",
"markdown": "Reports names of elements or attributes that are used in an XPath-expression but are missing in the associated XML files and are not defined in the referenced schemas. Such names are often the result of typos and would otherwise probably only be discovered at runtime.\n\n**Example:**\n\n\n <xsl:template match=\"h:txtarea\" />\n\n\nIf the `h` is bound to the XHTML namespace, the inspection will report this part of the `match` expression as an\nunknown element name because the correct name of the element is \"textarea\"."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CheckNodeTest",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "XPath",
"index": 152,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "XsltDeclarations",
"shortDescription": {
"text": "Incorrect declaration"
},
"fullDescription": {
"text": "Reports duplicate declarations and illegal identifiers in XSLT variables, parameters, and named templates:",
"markdown": "Reports duplicate declarations and illegal identifiers in XSLT variables, parameters, and named templates:"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "XsltDeclarations",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "XSLT",
"index": 91,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HardwiredNamespacePrefix",
"shortDescription": {
"text": "Hardcoded namespace prefix"
},
"fullDescription": {
"text": "Reports comparisons of the 'name()' function with a string that contains a colon (':'). Such usages usually indicate a hardcoded namespace prefix in the comparison. As a result, the code will break when run against XML that uses another prefix for the same namespace. Example: '<xsl:if test=\"name() = 'xlink:href'\">...<xsl:if>'",
"markdown": "Reports comparisons of the `name()` function with a string that contains a colon (`:`). Such usages usually indicate a hardcoded namespace prefix in the comparison. As a result, the code will break when run against XML that uses another prefix for the same namespace.\n\n**Example:**\n\n\n <xsl:if test=\"name() = 'xlink:href'\">...<xsl:if>\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "HardwiredNamespacePrefix",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "XPath",
"index": 152,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ImplicitTypeConversion",
"shortDescription": {
"text": "Implicit type conversion"
},
"fullDescription": {
"text": "Reports implicit conversions between the predefined XPath-types 'STRING', 'NUMBER', 'BOOLEAN', and 'NODESET'. Helps to write XSLT scripts that are more expressive about types and prevents subtle bugs: Example: '<xsl:if test=\"foo\" />' is not the same as '<xsl:if test=\"string(foo)\" />' The first test checks whether the element \"foo\" exists ('count(foo) > 0)'; the latter one however is only true if the element actually contains any text ('string-length(foo) > 0'). Suggests making the type conversion more explicit. Use the following options to configure the inspection: Enable or disable implicit conversions between certain types Always report explicit conversions that do not result in the actually expected type, for example, '<xsl:if test=\"number(foo)\" />' Ignore conversion from 'NODESET' to 'BOOLEAN' by using the 'string()' function as a shortcut for writing 'string-length() > 0'.",
"markdown": "Reports implicit conversions between the predefined XPath-types `STRING`, `NUMBER`, `BOOLEAN`, and `NODESET`. Helps to write XSLT scripts that are more expressive about types and prevents subtle bugs:\n\n**Example:**\n\n\n <xsl:if test=\"foo\" />\n\nis not the same as\n\n\n <xsl:if test=\"string(foo)\" />\n\n\nThe first test checks whether the element \"foo\" exists (`count(foo) > 0)`; the latter one however is only\ntrue if the element actually contains any text (`string-length(foo) > 0`). Suggests making\nthe type conversion more explicit.\n\n\nUse the following options to configure the inspection:\n\n* Enable or disable implicit conversions between certain types\n* Always report explicit conversions that do not result in the actually expected type, for example, `<xsl:if test=\"number(foo)\" />`\n* Ignore conversion from `NODESET` to `BOOLEAN` by using the `string()` function as a shortcut for writing `string-length() > 0`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ImplicitTypeConversion",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "XPath",
"index": 152,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IndexZeroUsage",
"shortDescription": {
"text": "XPath predicate with index 0"
},
"fullDescription": {
"text": "Reports usages of '0' in a predicate index or in a comparison with the function 'position()'. Such usage is almost always a bug because in XPath, the index starts at '1', not at '0'. Example: '//someelement[position() = 0]' or '//something[0]'",
"markdown": "Reports usages of `0` in a predicate index or in a comparison with the function `position()`. Such usage is almost always a bug because in XPath, the index starts at `1`, *not* at `0`.\n\n**Example:**\n\n\n //someelement[position() = 0] or //something[0]\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "IndexZeroUsage",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "XPath",
"index": 152,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "XsltTemplateInvocation",
"shortDescription": {
"text": "Incorrect template invocation"
},
"fullDescription": {
"text": "Reports missing arguments, passing arguments that are not declared, and passing arguments for parameters more than once in named XSLT template invocations. Parameters declared with a default value are optional and will not be reported as missing.",
"markdown": "Reports missing arguments, passing arguments that are not declared, and passing arguments for parameters more than once in named XSLT template invocations.\n\n\nParameters declared with a default value are optional and will not be reported as missing."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "XsltTemplateInvocation",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "XSLT",
"index": 91,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "XsltVariableShadowing",
"shortDescription": {
"text": "Shadowed variable"
},
"fullDescription": {
"text": "Reports shadowed XSLT variables.",
"markdown": "Reports shadowed XSLT variables."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "XsltVariableShadowing",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "XSLT",
"index": 91,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "org.jetbrains.plugins.javaFX",
"version": "232.8660.185",
"rules": [
{
"id": "JavaFxEventHandler",
"shortDescription": {
"text": "Event handler method signature problems"
},
"fullDescription": {
"text": "Reports event handler issues, including incompatible argument types, ambiguous event handler methods, and incorrect return types.",
"markdown": "Reports event handler issues, including incompatible argument types, ambiguous event handler methods, and incorrect return types."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "JavaFxEventHandler",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaFX",
"index": 93,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaFxRedundantPropertyValue",
"shortDescription": {
"text": "JavaFX redundant property values"
},
"fullDescription": {
"text": "Reports properties in .fxml files (both attributes and tags) that have the default values and therefore are redundant.",
"markdown": "Reports properties in .fxml files (both attributes and tags) that have the default values and therefore are redundant."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "JavaFxRedundantPropertyValue",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaFX",
"index": 93,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaFxDefaultTag",
"shortDescription": {
"text": "Unnecessary default tag"
},
"fullDescription": {
"text": "Reports redundant tags in .fxml files. These tags correspond to a class property which is declared in the @DefaultProperty class annotation, that is why they can be omitted.",
"markdown": "Reports redundant tags in .fxml files. These tags correspond to a class property which is declared in the @DefaultProperty class annotation, that is why they can be omitted."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "JavaFxDefaultTag",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaFX",
"index": 93,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaFxUnresolvedStyleClassReference",
"shortDescription": {
"text": "Unresolved style class reference"
},
"fullDescription": {
"text": "Reports unresolved CSS style classes.",
"markdown": "Reports unresolved CSS style classes."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "JavaFxUnresolvedStyleClassReference",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaFX",
"index": 93,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaFxColorRgb",
"shortDescription": {
"text": "Color component is out of range"
},
"fullDescription": {
"text": "Reports RGB color components that are out of the valid range.",
"markdown": "Reports RGB color components that are out of the valid range."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "JavaFxColorRgb",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaFX",
"index": 93,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaFxResourcePropertyValue",
"shortDescription": {
"text": "The value from properties file is incompatible with the attribute type"
},
"fullDescription": {
"text": "Reports attribute values defined in a .properties file that do not match the type of the attribute.",
"markdown": "Reports attribute values defined in a .properties file that do not match the type of the attribute."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "JavaFxResourcePropertyValue",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaFX",
"index": 93,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaFxUnresolvedFxIdReference",
"shortDescription": {
"text": "Unresolved fx:id attribute reference"
},
"fullDescription": {
"text": "Reports unresolved fx:id references. The quick-fix creates the corresponding fields.",
"markdown": "Reports unresolved fx:id references. The quick-fix creates the corresponding fields."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "JavaFxUnresolvedFxIdReference",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaFX",
"index": 93,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaFxUnusedImports",
"shortDescription": {
"text": "JavaFX unused imports"
},
"fullDescription": {
"text": "Reports unused imports in .fxml files.",
"markdown": "Reports unused imports in .fxml files."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "JavaFxUnusedImports",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaFX",
"index": 93,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "Docker",
"version": "232.8660.185",
"rules": [
{
"id": "DockerFileRunCommandMissingContinuation",
"shortDescription": {
"text": "Missing continuation character for ''RUN'' command"
},
"fullDescription": {
"text": "Reports missing continuation characters in 'RUN' command. In the shell form of 'RUN' command you should use a '\\' (backslash) to continue a single 'RUN' instruction onto the next line. Otherwise, Docker build will fail. Examples: '# the command below will fail\n RUN /bin/bash -c 'source $HOME/.bashrc;\n echo $HOME'' After the quick-fix is applied: 'RUN /bin/bash -c 'source $HOME/.bashrc; \\\n echo $HOME''",
"markdown": "Reports missing continuation characters in `RUN` command.\n\n\nIn the *shell* form of `RUN` command you should use a '\\\\' (backslash)\nto continue a single `RUN` instruction onto the next line.\nOtherwise, Docker build will fail.\n\n**Examples:**\n\n\n # the command below will fail\n RUN /bin/bash -c 'source $HOME/.bashrc;\n echo $HOME'\n\nAfter the quick-fix is applied:\n\n\n RUN /bin/bash -c 'source $HOME/.bashrc; \\\n echo $HOME'\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "DockerFileRunCommandMissingContinuation",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Dockerfile",
"index": 94,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DockerJsonFormStringLiterals",
"shortDescription": {
"text": "A single quoted string in JSON array format"
},
"fullDescription": {
"text": "Reports a single quoted string in JSON array format. JSON array form, must use double-quotes (\") around words not single-quotes ('). Otherwise, Docker build will fail. Examples: '# all the commands below will fail\n RUN ['/bin/bash', '-c', 'echo hello']\n ADD ['binaryA.jar', 'binary2.jar', 'destination/']\n COPY ['binaryA.jar', 'binary2.jar', 'destination/']' After the quick-fix is applied: 'RUN [\"/bin/bash\", \"-c\", \"echo hello\"]\n ADD [\"binaryA.jar\", \"binary2.jar\", \"destination/\"]\n COPY [\"binaryA.jar\", \"binary2.jar\", \"destination/\"]'",
"markdown": "Reports a single quoted string in JSON array format.\n\n\nJSON array form, must use double-quotes (\") around words not single-quotes ('). Otherwise, Docker build will fail.\n\n**Examples:**\n\n\n # all the commands below will fail\n RUN ['/bin/bash', '-c', 'echo hello']\n ADD ['binaryA.jar', 'binary2.jar', 'destination/']\n COPY ['binaryA.jar', 'binary2.jar', 'destination/']\n\nAfter the quick-fix is applied:\n\n\n RUN [\"/bin/bash\", \"-c\", \"echo hello\"]\n ADD [\"binaryA.jar\", \"binary2.jar\", \"destination/\"]\n COPY [\"binaryA.jar\", \"binary2.jar\", \"destination/\"]\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DockerJsonFormStringLiterals",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Dockerfile",
"index": 94,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DockerFileArgumentCount",
"shortDescription": {
"text": "Wrong number of arguments"
},
"fullDescription": {
"text": "Reports invalid number of arguments for the Dockerfile commands. Docker build will fail after reaching the instruction with an invalid number of arguments.",
"markdown": "Reports invalid number of arguments for the Dockerfile commands.\n\n\nDocker build will fail after reaching the instruction with an invalid number of arguments."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "DockerFileArgumentCount",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Dockerfile",
"index": 94,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ComposeUnknownValues",
"shortDescription": {
"text": "Unknown docker-compose YAML values"
},
"fullDescription": {
"text": "Reports unrecognized values in Docker Compose files.",
"markdown": "Reports unrecognized values in Docker Compose files. "
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "ComposeUnknownValues",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Docker-compose",
"index": 236,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DockerFileAddOrCopyPaths",
"shortDescription": {
"text": "Invalid destination for ''ADD''/''COPY'' commands"
},
"fullDescription": {
"text": "Reports invalid destination directories in 'ADD' and 'COPY' commands. According to the Dockerfile specification, if multiple sources are specified, then the destination must be a directory, and it must end with a slash '/'. Otherwise, Docker build will fail. Examples: '# all the commands below will fail\n ADD textA.txt textB.txt relativeDir\n ADD [\"binaryA.jar\", \"binary2.jar\", \"destination\"]\n COPY text3.txt text4.txt /absolute/path' After the quick-fix is applied: 'ADD textA.txt textB.txt relativeDir/\n ADD [\"binaryA.jar\", \"binary2.jar\", \"destination/\"]\n COPY text3.txt text4.txt /absolute/path/'",
"markdown": "Reports invalid destination directories in `ADD` and `COPY` commands.\n\n\nAccording to the [Dockerfile specification](https://docs.docker.com/engine/reference/builder/#add),\nif multiple sources are specified, then the destination must be a directory, and it must end with a slash '/'.\nOtherwise, Docker build will fail.\n\n**Examples:**\n\n\n # all the commands below will fail\n ADD textA.txt textB.txt relativeDir\n ADD [\"binaryA.jar\", \"binary2.jar\", \"destination\"]\n COPY text3.txt text4.txt /absolute/path\n\nAfter the quick-fix is applied:\n\n\n ADD textA.txt textB.txt relativeDir/\n ADD [\"binaryA.jar\", \"binary2.jar\", \"destination/\"]\n COPY text3.txt text4.txt /absolute/path/\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DockerFileAddOrCopyPaths",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Dockerfile",
"index": 94,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ComposeMissingKeys",
"shortDescription": {
"text": "Missing docker-compose YAML keys"
},
"fullDescription": {
"text": "Reports missing required keys in Docker Compose files.",
"markdown": "Reports missing required keys in Docker Compose files. "
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "ComposeMissingKeys",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Docker-compose",
"index": 236,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ComposeUnquotedPorts",
"shortDescription": {
"text": "Unquoted port mappings"
},
"fullDescription": {
"text": "Reports unquoted port mappings in Docker Compose files. According to the Compose file specification, mapping ports in the 'HOST:CONTAINER' format may lead to erroneous results when using a container port lower than 60, because YAML parses numbers in the format 'xx:yy' as a base-60 value. For this reason, we recommend always explicitly specifying the port mappings as strings. Examples: 'ports:\n - 3000\n - 3000-3005\n - 22:22\n - 8080:8080' After the quick-fix is applied: 'ports:\n - \"3000\"\n - \"3000-3005\"\n - \"22:22\"\n - \"8080:8080\"'",
"markdown": "Reports unquoted port mappings in Docker Compose files.\n\n\nAccording to the [Compose file specification](https://docs.docker.com/compose/compose-file/compose-file-v3/#short-syntax-1),\nmapping ports in the `HOST:CONTAINER` format may lead to erroneous results when using a container port lower than 60,\nbecause YAML parses numbers in the format `xx:yy` as a base-60 value.\nFor this reason, we recommend always explicitly specifying the port mappings as strings.\n\n**Examples:**\n\n\n ports:\n - 3000\n - 3000-3005\n - 22:22\n - 8080:8080\n\nAfter the quick-fix is applied:\n\n\n ports:\n - \"3000\"\n - \"3000-3005\"\n - \"22:22\"\n - \"8080:8080\"\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ComposeUnquotedPorts",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Docker-compose",
"index": 236,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ComposeUnknownKeys",
"shortDescription": {
"text": "Unknown docker-compose YAML keys"
},
"fullDescription": {
"text": "Reports unrecognized keys in Docker Compose files.",
"markdown": "Reports unrecognized keys in Docker Compose files. "
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "ComposeUnknownKeys",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Docker-compose",
"index": 236,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DockerFileAssignments",
"shortDescription": {
"text": "Invalid spaces in ''key=value'' pair"
},
"fullDescription": {
"text": "Reports incorrect spacing for key-value pairs in 'ARG', 'ENV', and 'LABEL' commands. While it is not explicitly specified in the Dockerfile specification, some combinations of spacing for key-value pairs are not allowed. Docker build will fail after reaching the problem instruction. Examples: The 'ARG' command does not allow any spaces around '=' 'ENV' and 'LABEL' do not allow spaces after '=' '# all the commands below will fail\n ARG answer = 42\n ARG version= \"1.0.0\"\n LABEL \"maintained.by\"= someone@gmail.com\n ENV JAVA_HOME= \"/docker-java-home\"' After the quick-fix is applied: 'ARG answer=2\n ARG version=\"1.0.0\"\n LABEL \"maintained.by\"=someone@gmail.com\n ENV JAVA_HOME=\"/docker-java-home\"'",
"markdown": "Reports incorrect spacing for key-value pairs in `ARG`, `ENV`, and `LABEL` commands.\n\n\nWhile it is not explicitly specified in the [Dockerfile specification](https://docs.docker.com/engine/reference/builder/#arg),\nsome combinations of spacing for key-value pairs are not allowed.\nDocker build will fail after reaching the problem instruction.\n\n**Examples:**\n\n* The `ARG` command does not allow any spaces around '='\n* `ENV` and `LABEL` do not allow spaces after '='\n\n\n # all the commands below will fail\n ARG answer = 42\n ARG version= \"1.0.0\"\n LABEL \"maintained.by\"= someone@gmail.com\n ENV JAVA_HOME= \"/docker-java-home\"\n\nAfter the quick-fix is applied:\n\n\n ARG answer=2\n ARG version=\"1.0.0\"\n LABEL \"maintained.by\"=someone@gmail.com\n ENV JAVA_HOME=\"/docker-java-home\"\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "DockerFileAssignments",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Dockerfile",
"index": 94,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.jsp",
"version": "232.8660.185",
"rules": [
{
"id": "ELDeferredExpressionsInspection",
"shortDescription": {
"text": "EL deferred expressions inspection"
},
"fullDescription": {
"text": "Reports dynamic expressions where deferred expressions are expected and vice versa. Example: '<jsp:useBean id=\"exampleBean\" scope=\"request\" type=\"java.util.Date\"/>\n\n<h:outputText id=\"${exampleBean.day}\" value=\"#{exampleBean.day}\" /> // Good\n<h:outputText id=\"#{exampleBean.day}\" value=\"${exampleBean.day}\" /> // Error: `id` attribute requires dynamic expression, `value` - deferred'",
"markdown": "Reports dynamic expressions where deferred expressions are expected and vice versa.\n\n**Example:**\n\n\n <jsp:useBean id=\"exampleBean\" scope=\"request\" type=\"java.util.Date\"/>\n\n <h:outputText id=\"${exampleBean.day}\" value=\"#{exampleBean.day}\" /> // Good\n <h:outputText id=\"#{exampleBean.day}\" value=\"${exampleBean.day}\" /> // Error: `id` attribute requires dynamic expression, `value` - deferred \n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ELDeferredExpressionsInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JSP",
"index": 96,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnhandledExceptionInJSP",
"shortDescription": {
"text": "Unhandled Exception in JSP"
},
"fullDescription": {
"text": "Reports exceptions that are thrown by top-level JSP scriptlets. Example: '<%!\n String getFormattedDate() {\n ...\n throw new IllegalArgumentException(...); // Error\n }\n %>\n <html>\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n <title>Hello, JSP!</title>\n </head>\n <body>\n <i>Today is <%= getFormattedDate() %></i>\n </body>\n </html>' NOTE: Such JSP pages will compile, because the servlet container wraps all JSP code in a try {} catch() {} block, but they will produce runtime exceptions when deployed on the server.",
"markdown": "Reports exceptions that are thrown by top-level JSP scriptlets. \n\n**Example:**\n\n\n <%!\n String getFormattedDate() {\n ...\n throw new IllegalArgumentException(...); // Error\n }\n %>\n <html>\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n <title>Hello, JSP!</title>\n </head>\n <body>\n <i>Today is <%= getFormattedDate() %></i>\n </body>\n </html>\n\n<br />\n\n\n**NOTE:** Such JSP pages will compile, because the servlet container wraps\nall JSP code in a **try {} catch() {}** block,\nbut they will produce runtime exceptions when deployed on the server."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UnhandledExceptionInJSP",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JSP",
"index": 96,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JspDirectiveInspection",
"shortDescription": {
"text": "Jsp directive inspection"
},
"fullDescription": {
"text": "Reports JSP import directives without a URI or tagdir attributes. Example: '<html>\n <body>\n <%@ taglib prefix=\"html\"%> // Error: either `uri` or `tagdir` attribute should be specified\n ...\n </body>\n</html>'",
"markdown": "Reports JSP import directives without a URI or tagdir attributes.\n\n**Example:**\n\n\n <html>\n <body>\n <%@ taglib prefix=\"html\"%> // Error: either `uri` or `tagdir` attribute should be specified\n ...\n </body>\n </html>\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "JspDirectiveInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JSP",
"index": 96,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JspTagBodyContent",
"shortDescription": {
"text": "Tag body content type"
},
"fullDescription": {
"text": "Reports JSP tag body content that does not conform to the TLD body-content specification. If empty body content is specified, the tag should have an empty body. If scriptless body content is specified, the tag's body should not contain JSP scriptlets. The quick-fix removes a tag's body for empty content type, and removes scriptlets if scriptless content type is specified. Example: '<s:empty>body not allowed here</s:empty>\n<s:scriptless>say: <% System.out.println(\"hey\"); %></s:scriptless>' After the quick-fix is applied: '<s:empty/>\n<s:scriptless>say: </s:scriptless>'",
"markdown": "Reports JSP tag body content that does not conform to the TLD body-content specification.\n\nIf empty body content is specified, the tag should have an empty body.\n\nIf scriptless body content is specified, the tag's body should not contain JSP scriptlets.\n\nThe quick-fix removes a tag's body for empty content type, and removes scriptlets if scriptless content type is specified.\n\n**Example:**\n\n\n <s:empty>body not allowed here</s:empty>\n <s:scriptless>say: <% System.out.println(\"hey\"); %></s:scriptless>\n\nAfter the quick-fix is applied:\n\n\n <s:empty/>\n <s:scriptless>say: </s:scriptless>\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JspTagBodyContent",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JSP",
"index": 96,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JspPropertiesInspection",
"shortDescription": {
"text": "Jsp properties inspection"
},
"fullDescription": {
"text": "Reports unresolved properties from '*.properties' files. Example JSP file: '<%@ page contentType=\"text/html;charset=UTF-8\" language=\"java\" %>\n<%@ taglib uri=\"/tags/fmt\" prefix=\"fmt\" %>\n\n<fmt:message bundle=\"bundle.properties\" key=\"unknown.property\"/> // Error: no such property inside referenced file'",
"markdown": "Reports unresolved properties from `*.properties` files.\n\n**Example JSP file:**\n\n\n <%@ page contentType=\"text/html;charset=UTF-8\" language=\"java\" %>\n <%@ taglib uri=\"/tags/fmt\" prefix=\"fmt\" %>\n\n <fmt:message bundle=\"bundle.properties\" key=\"unknown.property\"/> // Error: no such property inside referenced file\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "JspPropertiesInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JSP",
"index": 96,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ELMethodSignatureInspection",
"shortDescription": {
"text": "EL method signature inspection"
},
"fullDescription": {
"text": "Reports method calls in EL that don't match 'method-signature' constraints in TLD files. Example Java class: 'public class ExampleAction {\n public void goodAction() { ... }\n public void badAction(String str) { ... }\n}' Example JSP file: '<jsp:useBean id=\"example\" scope=\"request\" type=\"org.example.ExampleAction\"/>\n<f:view>\n <h:commandButton action=\"#{example.goodAction}\"/> // Good: method accepts zero arguments and returns `void`\n <h:commandButton action=\"#{example.badAction}\"/> // Error: method `void badAction(String)` returns `java.lang.String` type instead of `void`\n</f:view>'",
"markdown": "Reports method calls in EL that don't match `method-signature` constraints in TLD files.\n\n**Example Java class:**\n\n\n public class ExampleAction {\n public void goodAction() { ... }\n public void badAction(String str) { ... }\n }\n\n**Example JSP file:**\n\n\n <jsp:useBean id=\"example\" scope=\"request\" type=\"org.example.ExampleAction\"/>\n <f:view>\n <h:commandButton action=\"#{example.goodAction}\"/> // Good: method accepts zero arguments and returns `void`\n <h:commandButton action=\"#{example.badAction}\"/> // Error: method `void badAction(String)` returns `java.lang.String` type instead of `void`\n </f:view>\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ELMethodSignatureInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JSP",
"index": 96,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FunctionELReferenceInspection",
"shortDescription": {
"text": "EL method function parameters count"
},
"fullDescription": {
"text": "Reports different number of formal and actual parameters in EL function call.",
"markdown": "Reports different number of formal and actual parameters in EL function call."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "FunctionELReferenceInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JSP",
"index": 96,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TaglibDomModelInspection",
"shortDescription": {
"text": "Tag library descriptor inspection"
},
"fullDescription": {
"text": "Reports problems in JSP TLD files. TLD files should conform to the JSP tag library schema.",
"markdown": "Reports problems in JSP TLD files.\n\nTLD files should conform to the JSP tag library schema."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "TaglibDomModelInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JSP",
"index": 96,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JspUnescapedEl",
"shortDescription": {
"text": "Unescaped EL Expressions"
},
"fullDescription": {
"text": "Reports unescaped EL expressions in JSP pages. Unescaped EL expressions may lead to cross-site scripting (XSS) vulnerability. The quick-fix wraps raw a EL expression with the JSTL '<out>' tag. Example: '${foo}' After the quick-fix is applied: '<%@ taglib prefix=\"c\" uri=\"http://java.sun.com/jsp/jstl/core\" %>\n<c:out value=\"${foo}\"/>'",
"markdown": "Reports unescaped EL expressions in JSP pages.\n\nUnescaped EL expressions may lead to [cross-site scripting\n(XSS)](http://en.wikipedia.org/wiki/Cross-site_scripting) vulnerability.\n\nThe quick-fix wraps raw a EL expression with the JSTL `<out>` tag.\n\n**Example:**\n\n\n ${foo}\n\nAfter the quick-fix is applied:\n\n\n <%@ taglib prefix=\"c\" uri=\"http://java.sun.com/jsp/jstl/core\" %>\n <c:out value=\"${foo}\"/>\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JspUnescapedEl",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JSP",
"index": 96,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ReferencesToClassesFromDefaultPackagesInJSPFile",
"shortDescription": {
"text": "References to classes from the default package in JSP files"
},
"fullDescription": {
"text": "Reports any references to classes from the default package in JSP files. Example: '<%!\n Integer countSomeUsefulStuff() {\n ...\n new ClassFromDefaultPackage(...); // Error\n new com.example.GoodClass(...); // Good\n }\n %>\n <html>\n <head>\n <title>Hello, JSP!</title>\n </head>\n </html>' NOTE: Such references will not be resolved during compilation of the JSP because a compiled class for the JSP will be usually placed in non-default package (for example, \"org.apache.jsp\" in case of Tomcat, \"com.ibm._jsp\" in case of WebSphere), but importing from the default package is not allowed in Java.",
"markdown": "Reports any references to classes from the default package in JSP files.\n\n**Example:**\n\n\n <%!\n Integer countSomeUsefulStuff() {\n ...\n new ClassFromDefaultPackage(...); // Error\n new com.example.GoodClass(...); // Good\n }\n %>\n <html>\n <head>\n <title>Hello, JSP!</title>\n </head>\n </html>\n\n<br />\n\n\n**NOTE:** Such references will not be resolved during compilation of the JSP\nbecause a compiled class for the JSP will be usually placed in non-default package\n(for example, \"org.apache.jsp\" in case of Tomcat, \"com.ibm._jsp\" in case of WebSphere),\nbut importing from the default package is not allowed in Java."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "ReferencesToClassesFromDefaultPackagesInJSPFile",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JSP",
"index": 96,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SelfIncludingJspFiles",
"shortDescription": {
"text": "Self-including JSP files"
},
"fullDescription": {
"text": "Reports any include directives in a JSP file which refer to the containing JSP file. Example JSP file named main.jsp: '<jsp:include page=\"./main.jsp\" /> // Error: attempt to include the containing file\n ...' NOTE: Such self-including leads to infinite recursion and so the JSP file cannot be compiled.",
"markdown": "Reports any include directives in a JSP file which refer to the containing JSP file. \n\n**Example JSP file named main.jsp:**\n\n\n <jsp:include page=\"./main.jsp\" /> // Error: attempt to include the containing file\n ...\n\n<br />\n\n\n**NOTE:** Such self-including leads to infinite recursion and so the JSP file cannot be compiled."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "SelfIncludingJspFiles",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JSP",
"index": 96,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JspAbsolutePathInspection",
"shortDescription": {
"text": "Absolute paths"
},
"fullDescription": {
"text": "Reports absolute paths in JSP files. Absolute paths are prohibited in JSP, because they won't be resolved if your application context is not empty. The quick-fix adds a dynamic prefix to your path. Example: '<%@page contentType=\"text/html; ISO-8859-1\" %>\n\n <a href=\"/hey.jsp\">hey</a>' After the quick-fix is applied: '<%@page contentType=\"text/html; ISO-8859-1\" %>\n\n <a href=\"${pageContext.request.contextPath}/hey.jsp\">hey</a>'",
"markdown": "Reports absolute paths in JSP files.\n\nAbsolute paths are prohibited in JSP, because they won't be resolved if your application context is not empty.\n\nThe quick-fix adds a dynamic prefix to your path.\n\n**Example:**\n\n\n <%@page contentType=\"text/html; ISO-8859-1\" %>\n\n <a href=\"/hey.jsp\">hey</a>\n\nAfter the quick-fix is applied:\n\n\n <%@page contentType=\"text/html; ISO-8859-1\" %>\n\n <a href=\"${pageContext.request.contextPath}/hey.jsp\">hey</a>\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JspAbsolutePathInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JSP",
"index": 96,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ELSpecValidationInJSP",
"shortDescription": {
"text": "JSP EL specification validation"
},
"fullDescription": {
"text": "Reports possible problems caused by non-standard EL extensions: JSF EL expressions outside attributes, non-standard EL expressions, and so on. Example: '<f:view>\n <h:form>\n <f:loadBundle var=\"example\"/>\n <h:commandButton action=\"${example.size()}\"/> // Warning: method call is nonstandard extension\n </h:form>\n</f:view>'",
"markdown": "Reports possible problems caused by non-standard EL extensions: JSF EL expressions outside attributes, non-standard EL expressions, and so on.\n\n**Example:**\n\n\n <f:view>\n <h:form>\n <f:loadBundle var=\"example\"/>\n <h:commandButton action=\"${example.size()}\"/> // Warning: method call is nonstandard extension\n </h:form>\n </f:view>\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ELSpecValidationInJSP",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JSP",
"index": 96,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.javaee.web",
"version": "232.8660.185",
"rules": [
{
"id": "MimeType",
"shortDescription": {
"text": "MIME type"
},
"fullDescription": {
"text": "Lets you control MIME type name validity.",
"markdown": "Lets you control MIME type name validity."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "MimeType",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Java EE",
"index": 102,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "WebWarnings",
"shortDescription": {
"text": "Web.xml warnings"
},
"fullDescription": {
"text": "Reports duplicated welcome-files listed in the descriptor for deploying a Web Module to a server. Example: '<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n <!DOCTYPE web-app PUBLIC \"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN\" \"http://java.sun.com/dtd/web-app_2_3.dtd\">\n <web-app>\n <welcome-file-list>\n <welcome-file>\n Welcome1.jsp\n </welcome-file>\n <welcome-file>\n /Welcome1.jsp // Error: duplicated welcome-file\n </welcome-file>\n <welcome-file>\n Welcome3.jsp\n </welcome-file>\n </welcome-file-list>\n </web-app>'",
"markdown": "Reports duplicated welcome-files listed in the descriptor for deploying a Web Module to a server.\n\n**Example:**\n\n\n <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n <!DOCTYPE web-app PUBLIC \"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN\" \"http://java.sun.com/dtd/web-app_2_3.dtd\">\n <web-app>\n <welcome-file-list>\n <welcome-file>\n Welcome1.jsp\n </welcome-file>\n <welcome-file>\n /Welcome1.jsp // Error: duplicated welcome-file\n </welcome-file>\n <welcome-file>\n Welcome3.jsp\n </welcome-file>\n </welcome-file-list>\n </web-app>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "WebWarnings",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java EE",
"index": 102,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ServletWithoutMappingInspection",
"shortDescription": {
"text": "Servlet mapping"
},
"fullDescription": {
"text": "Reports servlets without associated mappings. Example: '<web-app>\n <servlet>\n <servlet-name>foo</servlet-name> // Error: servlet should have a mapping\n <servlet-class>javax.servlet.Servlet</servlet-class>\n </servlet>\n \n <filter>\n <filter-name>bar</filter-name> // Error: filter should have a mapping\n <filter-class>java.lang.String</filter-class>\n </filter>\n </web-app>'",
"markdown": "Reports servlets without associated mappings.\n\n**Example:**\n\n\n <web-app>\n <servlet>\n <servlet-name>foo</servlet-name> // Error: servlet should have a mapping\n <servlet-class>javax.servlet.Servlet</servlet-class>\n </servlet>\n \n <filter>\n <filter-name>bar</filter-name> // Error: filter should have a mapping\n <filter-class>java.lang.String</filter-class>\n </filter>\n </web-app>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "ServletWithoutMappingInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Java EE",
"index": 102,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "WebProperties",
"shortDescription": {
"text": "Web.xml errors"
},
"fullDescription": {
"text": "Reports the following problems in descriptors that are used to deploy your Web Module to a server: References to non-instantiable classes References to classes that do not extend required class References to classes with inappropriate scope Empty tag and attribute values Tag and attribute values that do not match required pattern (for example, Java Identifiers) Tags that do not include required children tags or attributes Tags that define objects with duplicate names Example: '<web-app>\n <filter-mapping>\n <filter-name>CustomFilter</filter-name> // Error: either servlet-name or url-pattern child tag should be defined\n </filter-mapping>\n <servlet-mapping>\n <servlet-name>CustomServletName</servlet-name>\n <url-pattern>/ baseUrl</url-pattern> // Error: URI-pattern must not contain white spaces\n </servlet-mapping>\n</web-app>'",
"markdown": "Reports the following problems in descriptors that are used to deploy your Web Module to a server:\n\n* References to non-instantiable classes\n* References to classes that do not extend required class\n* References to classes with inappropriate scope\n* Empty tag and attribute values\n* Tag and attribute values that do not match required pattern (for example, Java Identifiers)\n* Tags that do not include required children tags or attributes\n* Tags that define objects with duplicate names\n\n**Example:**\n\n\n <web-app>\n <filter-mapping>\n <filter-name>CustomFilter</filter-name> // Error: either servlet-name or url-pattern child tag should be defined\n </filter-mapping>\n <servlet-mapping>\n <servlet-name>CustomServletName</servlet-name>\n <url-pattern>/ baseUrl</url-pattern> // Error: URI-pattern must not contain white spaces\n </servlet-mapping>\n </web-app>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "WebProperties",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Java EE",
"index": 102,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.micronaut",
"version": "232.8660.185",
"rules": [
{
"id": "MnUnresolvedPathVariable",
"shortDescription": {
"text": "Unresolved @PathVariable reference"
},
"fullDescription": {
"text": "Reports '@PathVariable' parameters that are declared in a method signature and missing in the URL path or vise versa. The quick-fix adds the missing parameter. Example: '@Get(\"/path/{myVariable}/\")\n public String handler(@PathVariable String name_is_not_equal_to_myVariable) {\n return \"...\";\n }' After the quick-fix is applied the result looks like: '@Get(\"/path/{myVariable}/\")\n public String handler(@PathVariable String myVariable) {\n return \"...\";\n }'",
"markdown": "Reports `@PathVariable` parameters that are declared in a method signature and missing in the URL path or vise versa.\nThe quick-fix adds the missing parameter.\n\n**Example:**\n\n\n @Get(\"/path/{myVariable}/\")\n public String handler(@PathVariable String name_is_not_equal_to_myVariable) {\n return \"...\";\n }\n\nAfter the quick-fix is applied the result looks like:\n\n\n @Get(\"/path/{myVariable}/\")\n public String handler(@PathVariable String myVariable) {\n return \"...\";\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MnUnresolvedPathVariable",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Micronaut",
"index": 103,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MicronautDataRepositoryMethodReturnType",
"shortDescription": {
"text": "Incorrect repository method return type"
},
"fullDescription": {
"text": "Reports incorrect Micronaut Data repository method return types. The following return types are supported: void Primitive types Simple types 'java.util.List' or any common 'Iterable' type 'java.util.stream.Stream' 'java.util.Optional' 'io.micronaut.data.model.Page' 'io.micronaut.data.model.Slice' 'java.util.concurrent.Future' or 'java.util.concurrent.CompletableFuture' A Reactive Streams compatible type, such as 'Publisher', 'Single', 'Maybe', 'Flux', 'Mono', and so on",
"markdown": "Reports incorrect Micronaut Data [repository method\nreturn types.](https://micronaut-projects.github.io/micronaut-data/latest/guide/#querying)\n\nThe following return types are supported:\n* void\n* Primitive types\n* Simple types\n* `java.util.List` or any common `Iterable` type\n* `java.util.stream.Stream`\n* `java.util.Optional`\n* `io.micronaut.data.model.Page`\n* `io.micronaut.data.model.Slice`\n* `java.util.concurrent.Future` or `java.util.concurrent.CompletableFuture`\n* A Reactive Streams compatible type, such as `Publisher`, `Single`, `Maybe`, `Flux`, `Mono`, and so on"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MicronautDataRepositoryMethodReturnType",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Micronaut/Micronaut Data",
"index": 126,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MnInjectionPoints",
"shortDescription": {
"text": "Unresolved cache annotation parameter reference"
},
"fullDescription": {
"text": "Reports injection points in bean classes that have missing or ambiguous dependencies. Example: 'interface Engine {}\n\n @Singleton\n class GasEngine implements Engine {}\n\n @Singleton\n class ElectricEngine implements Engine {}\n\n @Singleton\n class Car {\n\n @Inject\n Engine engine; // Ambiguous dependency: there are multiple beans that match the injection point\n }'",
"markdown": "Reports injection points in bean classes that have missing or ambiguous dependencies.\n\n**Example:**\n\n\n interface Engine {}\n\n @Singleton\n class GasEngine implements Engine {}\n\n @Singleton\n class ElectricEngine implements Engine {}\n\n @Singleton\n class Car {\n\n @Inject\n Engine engine; // Ambiguous dependency: there are multiple beans that match the injection point\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MnInjectionPoints",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Micronaut",
"index": 103,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MicronautDataMethodInconsistency",
"shortDescription": {
"text": "Incorrect repository method declaration"
},
"fullDescription": {
"text": "Reports Micronaut Data repository methods that do not match the query pattern criteria.",
"markdown": "Reports Micronaut Data repository methods that do not match the [query pattern criteria](https://micronaut-projects.github.io/micronaut-data/latest/guide/#criteria)."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "MicronautDataMethodInconsistency",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Micronaut/Micronaut Data",
"index": 126,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MnYamlConfig",
"shortDescription": {
"text": "Micronaut application.yaml"
},
"fullDescription": {
"text": "Reports deprecated configuration keys and invalid values in Micronaut application '.yaml' configuration files.",
"markdown": "Reports deprecated configuration keys and invalid values in Micronaut application `.yaml` configuration files."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MnYamlConfig",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Micronaut",
"index": 103,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MnCacheAnnotationParameters",
"shortDescription": {
"text": "Unresolved cache annotation parameter reference"
},
"fullDescription": {
"text": "Reports Micronaut Cache annotations where the value of the 'parameters' attribute contains names of undefined method parameters. The following annotations are supported: 'io.micronaut.cache.annotation.Cacheable' 'io.micronaut.cache.annotation.CachePut' 'io.micronaut.cache.annotation.CacheInvalidate' Example: '@CachePut(parameters = \"myParameter\") // Error: Cannot resolve symbol 'myParameter'\n public String cachedMethod(String name_is_not_equal_to_myParameter) {\n return \"...\";\n }'",
"markdown": "Reports Micronaut Cache annotations where the value of the `parameters` attribute contains names of undefined method\nparameters.\n\nThe following annotations are supported:\n\n* `io.micronaut.cache.annotation.Cacheable`\n* `io.micronaut.cache.annotation.CachePut`\n* `io.micronaut.cache.annotation.CacheInvalidate`\n\n**Example:**\n\n\n @CachePut(parameters = \"myParameter\") // Error: Cannot resolve symbol 'myParameter'\n public String cachedMethod(String name_is_not_equal_to_myParameter) {\n return \"...\";\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "MnCacheAnnotationParameters",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Micronaut",
"index": 103,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MicronautDataRepositoryMethodParameters",
"shortDescription": {
"text": "Incorrect repository method parameter"
},
"fullDescription": {
"text": "Reports incorrect Micronaut Data repository method parameter types. Example: 'public class Person {\n private int id;\n private String lastname;\n private Address address;\n }\n\n public class Address {\n private int zipCode;\n }\n\n public interface CustomerRepository extends CrudRepository<Person, Integer> {\n List<Person> findByAddress(String lastname); // 'Address' type expected\n List<Person> findByAddressZipCode(String str); // 'int' type expected\n }'",
"markdown": "Reports incorrect Micronaut Data repository method parameter types.\n\n**Example:**\n\n\n public class Person {\n private int id;\n private String lastname;\n private Address address;\n }\n\n public class Address {\n private int zipCode;\n }\n\n public interface CustomerRepository extends CrudRepository<Person, Integer> {\n List<Person> findByAddress(String lastname); // 'Address' type expected\n List<Person> findByAddressZipCode(String str); // 'int' type expected\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MicronautDataRepositoryMethodParameters",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Micronaut/Micronaut Data",
"index": 126,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MnPropertiesConfig",
"shortDescription": {
"text": "Micronaut application.properties"
},
"fullDescription": {
"text": "Reports deprecated configuration keys and invalid values in Micronaut application '.properties' configuration files.",
"markdown": "Reports deprecated configuration keys and invalid values in Micronaut application `.properties` configuration files."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MnPropertiesConfig",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Micronaut",
"index": 103,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.uiDesigner",
"version": "232.8660.185",
"rules": [
{
"id": "InvalidPropertyKeyForm",
"shortDescription": {
"text": "Invalid property key in a UI form"
},
"fullDescription": {
"text": "Reports unresolved references to .properties files.",
"markdown": "Reports unresolved references to .properties files."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "InvalidPropertyKeyForm",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "UI form",
"index": 104,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MissingMnemonic",
"shortDescription": {
"text": "Missing mnemonics"
},
"fullDescription": {
"text": "Reports focusable components with the 'text' property or labels with the assigned 'labelFor' property that do not have a mnemonic character. The quick-fix assigns a unique mnemonic to such a component.",
"markdown": "Reports focusable components with the `text` property or labels with the assigned `labelFor` property that do not have a mnemonic character. The quick-fix assigns a unique mnemonic to such a component."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MissingMnemonic",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "UI form",
"index": 104,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FormSpellChecking",
"shortDescription": {
"text": "Typo in a UI form"
},
"fullDescription": {
"text": "Reports typos and misspelling in your UI forms (for example, in a 'JLabel' text or 'JPanel' title) and fixes them with one click.",
"markdown": "Reports typos and misspelling in your UI forms (for example, in a `JLabel` text or `JPanel` title) and fixes them\nwith one click."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FormSpellChecking",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "UI form",
"index": 104,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "I18nForm",
"shortDescription": {
"text": "Hardcoded string literal in a UI form"
},
"fullDescription": {
"text": "Reports any instances of hardcoded strings in your UI forms. Hardcoded string literals are usually errors in an internationalized environment. This inspection does not report empty strings and strings consisting of only whitespace. The quick-fix transforms a string literal into a reference to a property in a resource bundle.",
"markdown": "Reports any instances of hardcoded strings in your UI forms.\n\nHardcoded string literals are usually errors in\nan internationalized environment.\nThis inspection does not report empty strings and strings consisting of only whitespace.\n\nThe quick-fix transforms a string literal\ninto a reference to a property in a resource bundle."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "I18nForm",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "UI form",
"index": 104,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "OneButtonGroup",
"shortDescription": {
"text": "Button group with one button"
},
"fullDescription": {
"text": "Reports 'ButtonGroup' instances that contain only one 'JRadioButton'.",
"markdown": "Reports `ButtonGroup` instances that contain only one `JRadioButton`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "OneButtonGroup",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "UI form",
"index": 104,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DuplicateMnemonic",
"shortDescription": {
"text": "Duplicate mnemonics"
},
"fullDescription": {
"text": "Reports components that have duplicated mnemonic characters. The quick-fix assigns a unique mnemonic character to each of the components.",
"markdown": "Reports components that have duplicated mnemonic characters.\n\nThe quick-fix assigns a unique mnemonic character to each of the components."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "DuplicateMnemonic",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "UI form",
"index": 104,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NoScrollPane",
"shortDescription": {
"text": "Scrollable component not in JScrollPane"
},
"fullDescription": {
"text": "Reports 'Scrollable' components, except for 'JTextField', that are not placed in 'JScrollPane'. The quick-fix surrounds the problematic component with a scroll pane.",
"markdown": "Reports `Scrollable` components, except for `JTextField`, that are not placed in `JScrollPane`. The quick-fix surrounds the problematic component with a scroll pane."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NoScrollPane",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "UI form",
"index": 104,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BoundFieldAssignment",
"shortDescription": {
"text": "Assignment to UI-bound field"
},
"fullDescription": {
"text": "Reports assignments to fields which are bound to components in UI Designer forms. Such assignments will cause the component setup code generated by UI Designer for such fields to be ignored.",
"markdown": "Reports assignments to fields which are bound to components in UI Designer forms.\n\nSuch assignments will cause the component setup code generated by UI Designer\nfor such fields to be ignored."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "BoundFieldAssignment",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "UI form",
"index": 104,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NoLabelFor",
"shortDescription": {
"text": "No label for component"
},
"fullDescription": {
"text": "Reports components that do not have any static text and do not have any label marked with 'setLabelFor' for this component. Components that do not have static text include edit fields and combo boxes. Such components cannot be activated with a keyboard shortcut. The quick-fix for this inspection allows you to automatically associate an adjacent label with the problematic component.",
"markdown": "Reports components that do not have any static text and do not have any label marked with `setLabelFor` for this component.\n\nComponents that do not have static text include edit fields and combo boxes.\nSuch components cannot be activated with a keyboard shortcut. The quick-fix for this inspection\nallows you to automatically associate an adjacent label with the problematic component."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NoLabelFor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "UI form",
"index": 104,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "NoButtonGroup",
"shortDescription": {
"text": "Radio button not in a group"
},
"fullDescription": {
"text": "Reports 'JRadioButton' components that are not placed in 'ButtonGroup'. A quick-fix is available to group radio buttons placed in adjacent grid cells.",
"markdown": "Reports `JRadioButton` components that are not placed in `ButtonGroup`. A quick-fix is available to group radio buttons placed in adjacent grid cells."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "NoButtonGroup",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "UI form",
"index": 104,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "org.intellij.qodana",
"version": "232.8660.185",
"rules": [
{
"id": "JsCoverageInspection",
"shortDescription": {
"text": "Check JavaScript and TypeScript source code coverage"
},
"fullDescription": {
"text": "Reports methods, classes and files whose coverage is below a certain threshold.",
"markdown": "Reports methods, classes and files whose coverage is below a certain threshold."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JsCoverageInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Code Coverage",
"index": 109,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JvmCoverageInspection",
"shortDescription": {
"text": "Check Kotlin and Java source code coverage"
},
"fullDescription": {
"text": "Reports methods and classes whose coverage is below a certain threshold.",
"markdown": "Reports methods and classes whose coverage is below a certain threshold."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "JvmCoverageInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Code Coverage",
"index": 109,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PhpCoverageInspection",
"shortDescription": {
"text": "Check the PHP source code coverage"
},
"fullDescription": {
"text": "Reports methods, classes and files whose coverage is below a certain threshold.",
"markdown": "Reports methods, classes and files whose coverage is below a certain threshold."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "PhpCoverageInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Code Coverage",
"index": 109,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "KotlinAnnotator",
"shortDescription": {
"text": "Kotlin annotator"
},
"fullDescription": {
"text": "Allows viewing the problems reported by the Kotlin annotator: compilation problems, references unresolved by the IDE, and so on.",
"markdown": "Allows viewing the problems reported by the Kotlin annotator: compilation problems, references unresolved by the IDE, and so on."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "KotlinAnnotator",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "General",
"index": 44,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JavaAnnotator",
"shortDescription": {
"text": "Java annotator"
},
"fullDescription": {
"text": "Allows viewing the problems reported by the Java annotator: compilation problems, unresolved by IDEA references, and so on.",
"markdown": "Allows viewing the problems reported by the Java annotator: compilation problems, unresolved by IDEA references, and so on."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "JavaAnnotator",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "General",
"index": 44,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "QodanaSanity",
"shortDescription": {
"text": "Sanity"
},
"fullDescription": {
"text": "Reports issues essential to this file like syntax errors, unresolved methods and variables, etc...",
"markdown": "Reports issues essential to this file like syntax errors, unresolved methods and variables, etc..."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "QodanaSanity",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Qodana",
"index": 254,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "org.jetbrains.idea.maven",
"version": "232.8660.185",
"rules": [
{
"id": "MavenDuplicateDependenciesInspection",
"shortDescription": {
"text": "Duplicate Dependencies"
},
"fullDescription": {
"text": "Reports duplicate dependencies",
"markdown": "Reports duplicate dependencies"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MavenDuplicateDependenciesInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Maven",
"index": 114,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MavenModelInspection",
"shortDescription": {
"text": "Maven Model Inspection"
},
"fullDescription": {
"text": "Reports resolution problems in a Maven model",
"markdown": "Reports resolution problems in a Maven model"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "MavenModelInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Maven",
"index": 114,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MavenRedundantGroupId",
"shortDescription": {
"text": "Redundant groupId"
},
"fullDescription": {
"text": "Reports the unnecessary <groupId> definition since it is already defined in the parent pom.xml",
"markdown": "Reports the unnecessary \\<groupId\\> definition since it is already defined in the parent pom.xml"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MavenRedundantGroupId",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Maven",
"index": 114,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MavenDuplicatePluginInspection",
"shortDescription": {
"text": "Duplicate plugin declaration"
},
"fullDescription": {
"text": "Reports the duplication of the plugin declaration in pom.xml",
"markdown": "Reports the duplication of the plugin declaration in pom.xml"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MavenDuplicatePluginInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Maven",
"index": 114,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MavenPropertyInParent",
"shortDescription": {
"text": "Usage of properties in parent description"
},
"fullDescription": {
"text": "Reports that the usage of properties in modules parent definition is prohibited",
"markdown": "Reports that the usage of properties in modules parent definition is prohibited"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MavenPropertyInParent",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Maven",
"index": 114,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MavenParentMissedVersionInspection",
"shortDescription": {
"text": "Parent version missed"
},
"fullDescription": {
"text": "Reports the absence of the parent version element for versions that do not support consumer POM feature",
"markdown": "Reports the absence of the parent version element for versions that do not support consumer POM feature"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "MavenParentMissedVersionInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Maven",
"index": 114,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "AntSupport",
"version": "232.8660.185",
"rules": [
{
"id": "AntMissingPropertiesFileInspection",
"shortDescription": {
"text": "Missing properties file"
},
"fullDescription": {
"text": "Reports missing '.properties' files.",
"markdown": "Reports missing `.properties` files."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AntMissingPropertiesFileInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Ant",
"index": 116,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AntResolveInspection",
"shortDescription": {
"text": "Ant references resolve problems"
},
"fullDescription": {
"text": "Reports unresolved references on properties and custom type definitions that cannot be resolved.",
"markdown": "Reports unresolved references on properties and custom type definitions that cannot be resolved."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AntResolveInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Ant",
"index": 116,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AntDuplicateTargetsInspection",
"shortDescription": {
"text": "Duplicate targets"
},
"fullDescription": {
"text": "Reports duplicate 'targets' in the current build file.",
"markdown": "Reports duplicate `targets` in the current build file."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AntDuplicateTargetsInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Ant",
"index": 116,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "AngularJS",
"version": "232.8660.185",
"rules": [
{
"id": "AngularInvalidImportedOrDeclaredSymbol",
"shortDescription": {
"text": "Invalid imported or declared symbol"
},
"fullDescription": {
"text": "Reports any symbol that is declared, imported or exported by an Angular module that is not a module, component, directive, or pipe or cant be used in the context of the property.",
"markdown": "Reports any symbol that is declared, imported or exported by an Angular module that is not a module, component, directive, or pipe or can't be used in the context of the property."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AngularInvalidImportedOrDeclaredSymbol",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Angular",
"index": 118,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AngularRecursiveModuleImportExport",
"shortDescription": {
"text": "Recursive import or export of Angular module"
},
"fullDescription": {
"text": "Reports a cyclic dependency between Angular modules.",
"markdown": "Reports a cyclic dependency between Angular modules."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AngularRecursiveModuleImportExport",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Angular",
"index": 118,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AngularNgOptimizedImage",
"shortDescription": {
"text": "Issues with ngSrc usage in img tags"
},
"fullDescription": {
"text": "Reports issues related to usage of 'ngSrc' (NgOptimizedDirective) on 'img' tags. Following issues are reported: 'img' tags, which use 'src' instead of 'ngSrc' lack of 'width' and 'height', or 'fill' attributes when 'ngSrc' is used 'width' or 'height', and 'fill' attributes being present on the same element when 'ngSrc' is used",
"markdown": "Reports issues related to usage of `ngSrc` ([NgOptimizedDirective](https://angular.io/guide/image-directive)) on `img` tags.\n\n\nFollowing issues are reported:\n\n* `img` tags, which use `src` instead of `ngSrc`\n* lack of `width` and `height`, or `fill` attributes when `ngSrc` is used\n* `width` or `height`, and `fill` attributes being present on the same element when `ngSrc` is used"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "AngularNgOptimizedImage",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Angular",
"index": 118,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AngularInvalidTemplateReferenceVariable",
"shortDescription": {
"text": "Unbound or ambiguous template reference variable"
},
"fullDescription": {
"text": "Reports a template reference variable that is not assigned to a directive when using 'exportAs' or is assigned to multiple directives.",
"markdown": "Reports a template reference variable that is not assigned to a directive when using `exportAs` or is assigned to multiple directives."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AngularInvalidTemplateReferenceVariable",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Angular",
"index": 118,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AngularMultipleStructuralDirectives",
"shortDescription": {
"text": "Multiple structural directives on one element"
},
"fullDescription": {
"text": "Reports multiple structural directives ('*ngIf', '*ngFor', etc.) on one element.",
"markdown": "Reports multiple structural directives (`*ngIf`, `*ngFor`, etc.) on one element."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AngularMultipleStructuralDirectives",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Angular",
"index": 118,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AngularInvalidSelector",
"shortDescription": {
"text": "Missing or invalid selector"
},
"fullDescription": {
"text": "Reports an invalid 'selector' property of a component or directive.",
"markdown": "Reports an invalid `selector` property of a component or directive."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AngularInvalidSelector",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Angular",
"index": 118,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AngularNonEmptyNgContent",
"shortDescription": {
"text": "Content inside <ng-content> tag"
},
"fullDescription": {
"text": "Reports a text or tag occurrence inside a '<ng-content>' tag used for content projection.",
"markdown": "Reports a text or tag occurrence inside a `<ng-content>` tag used for content projection."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AngularNonEmptyNgContent",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Angular",
"index": 118,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AngularInsecureBindingToEvent",
"shortDescription": {
"text": "Insecure binding to event"
},
"fullDescription": {
"text": "Reports a binding to an event property or attribute, for example, '[onclick]' or '[attr.onclick]' instead of '(click)'.",
"markdown": "Reports a binding to an event property or attribute, for example, `[onclick]` or `[attr.onclick]` instead of `(click)`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AngularInsecureBindingToEvent",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Angular",
"index": 118,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AngularMissingEventHandler",
"shortDescription": {
"text": "Missing event handler"
},
"fullDescription": {
"text": "Reports a missing event handler statement for an event binding.",
"markdown": "Reports a missing event handler statement for an event binding."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AngularMissingEventHandler",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Angular",
"index": 118,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AngularUndefinedBinding",
"shortDescription": {
"text": "Undefined binding"
},
"fullDescription": {
"text": "Reports an undefined property, event, or structural directive bindings on elements.",
"markdown": "Reports an undefined property, event, or structural directive bindings on elements."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AngularUndefinedBinding",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Angular",
"index": 118,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AngularUndefinedTag",
"shortDescription": {
"text": "Undefined tag"
},
"fullDescription": {
"text": "Reports a tag defined by a component or directive out of the current scope.",
"markdown": "Reports a tag defined by a component or directive out of the current scope."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AngularUndefinedTag",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Angular",
"index": 118,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AngularAmbiguousComponentTag",
"shortDescription": {
"text": "Ambiguous component tag"
},
"fullDescription": {
"text": "Reports a component that is matched on an embedded template element '<ng-template>' or multiple components matched on any other element.",
"markdown": "Reports a component that is matched on an embedded template element `<ng-template>` or multiple components matched on any other element."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AngularAmbiguousComponentTag",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Angular",
"index": 118,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AngularUndefinedModuleExport",
"shortDescription": {
"text": "Undefined export from Angular module"
},
"fullDescription": {
"text": "Reports an export of an undeclared or unimported component, directive, or pipes from an Angular module.",
"markdown": "Reports an export of an undeclared or unimported component, directive, or pipes from an Angular module."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AngularUndefinedModuleExport",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Angular",
"index": 118,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AngularInvalidI18nAttribute",
"shortDescription": {
"text": "Invalid i18n attribute"
},
"fullDescription": {
"text": "Reports a problem with a 'i18n-*' attribute.",
"markdown": "Reports a problem with a `i18n-*` attribute."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AngularInvalidI18nAttribute",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Angular",
"index": 118,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AngularInvalidAnimationTriggerAssignment",
"shortDescription": {
"text": "Invalid animation trigger assignment"
},
"fullDescription": {
"text": "Reports an invalid assignment of an animation trigger. To attach an animation to an element, use '[@triggerName]=\"expression\"' or an attribute without a value '@triggerName'.",
"markdown": "Reports an invalid assignment of an animation trigger. To attach an animation to an element, use `[@triggerName]=\"expression\"` or an attribute without a value `@triggerName`."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AngularInvalidAnimationTriggerAssignment",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Angular",
"index": 118,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AngularCliAddDependency",
"shortDescription": {
"text": "Angular CLI add dependency"
},
"fullDescription": {
"text": "Suggests using the 'ng add' command to install the dependency. 'ng add' will use the package manager to download it and invoke a schematic which can update your project with configuration changes, add additional dependencies (e.g. polyfills), or scaffold package-specific initialization code.",
"markdown": "Suggests using the `ng add` command to install the dependency.\n\n`ng add` will use the package manager to download it and invoke a schematic\nwhich can update your project with configuration changes, add additional dependencies (e.g. polyfills),\nor scaffold package-specific initialization code."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AngularCliAddDependency",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Angular",
"index": 118,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AngularInaccessibleComponentMemberInAotMode",
"shortDescription": {
"text": "Inaccessible component member in AOT mode"
},
"fullDescription": {
"text": "Reports accessing a private or protected member of a component from the component's template. Such usages result in AOT compilation failure.",
"markdown": "Reports accessing a private or protected member of a component from the component's template. Such usages result in AOT compilation failure."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AngularInaccessibleComponentMemberInAotMode",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Angular",
"index": 118,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AngularIncorrectTemplateDefinition",
"shortDescription": {
"text": "Incorrect component template definition"
},
"fullDescription": {
"text": "Reports a component that doesnt have an associated template or uses both 'template' and 'templateUrl' properties.",
"markdown": "Reports a component that doesn't have an associated template or uses both `template` and `templateUrl` properties."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AngularIncorrectTemplateDefinition",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Angular",
"index": 118,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AngularMissingRequiredDirectiveInputBinding",
"shortDescription": {
"text": "Missing required directive input"
},
"fullDescription": {
"text": "Reports a missing binding for a required directive input.",
"markdown": "Reports a missing binding for a required directive input."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AngularMissingRequiredDirectiveInputBinding",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Angular",
"index": 118,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AngularMissingOrInvalidDeclarationInModule",
"shortDescription": {
"text": "Missing or invalid component, directive or pipe declaration in a module"
},
"fullDescription": {
"text": "Reports a non-standalone Angular component, directive, or pipe that is not declared in any module or is declared in multiple modules.",
"markdown": "Reports a non-standalone Angular component, directive, or pipe that is not declared in any module or is declared in multiple modules."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AngularMissingOrInvalidDeclarationInModule",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Angular",
"index": 118,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AngularInvalidEntryComponent",
"shortDescription": {
"text": "Invalid entry component"
},
"fullDescription": {
"text": "Reports an invalid Angular component specified in the modules 'bootstrap' or 'entryComponents' property.",
"markdown": "Reports an invalid Angular component specified in the module's `bootstrap` or `entryComponents` property."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "AngularInvalidEntryComponent",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Angular",
"index": 118,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.android.tools.design",
"version": "232.8660.185",
"rules": [
{
"id": "LocaleText",
"shortDescription": {
"text": "Locale text"
},
"fullDescription": {
"text": "Detects layouts with text that behaves differently in different locales.",
"markdown": "Detects layouts with text that behaves differently in different locales."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LocaleText",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Screen sizes",
"index": 122,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ButtonSize",
"shortDescription": {
"text": "Button size"
},
"fullDescription": {
"text": "Detects layouts where a button is wider than the recommended 320dp.",
"markdown": "Detects layouts where a button is wider than the recommended 320dp."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ButtonSize",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Screen sizes",
"index": 122,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UpdateTransitionLabel",
"shortDescription": {
"text": "Transition label parameter not set"
},
"fullDescription": {
"text": "Checks that the 'label' parameter is set for updateTransition calls that create Compose transition animations.",
"markdown": "Checks that the `label` parameter is set for updateTransition calls that create Compose transition animations."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UpdateTransitionLabel",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Compose preview",
"index": 135,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "WearMargin",
"shortDescription": {
"text": "Wear margins"
},
"fullDescription": {
"text": "Detects layouts where views are too close to the side of Wear OS devices.",
"markdown": "Detects layouts where views are too close to the side of Wear OS devices."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "WearMargin",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Screen sizes",
"index": 122,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PreviewDimensionRespectsLimit",
"shortDescription": {
"text": "Preview dimension has a maximum limit"
},
"fullDescription": {
"text": "Checks that Preview dimensions (width and height) have a maximum limit.",
"markdown": "Checks that Preview dimensions (width and height) have a maximum limit."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PreviewDimensionRespectsLimit",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Compose preview",
"index": 135,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PreviewPickerAnnotation",
"shortDescription": {
"text": "Preview device parameter must have valid syntax"
},
"fullDescription": {
"text": "Checks that preview device parameter has valid syntax.",
"markdown": "Checks that preview device parameter has valid syntax."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "PreviewPickerAnnotation",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Compose preview",
"index": 135,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AccessibilityTestFramework",
"shortDescription": {
"text": "Accessibility"
},
"fullDescription": {
"text": "Detects layouts with accessibility issues.",
"markdown": "Detects layouts with accessibility issues."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AccessibilityTestFramework",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Screen sizes",
"index": 122,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BottomAppBar",
"shortDescription": {
"text": "Bottom app bar"
},
"fullDescription": {
"text": "Detects layouts where a BottomAppBar is used on non-compact screens.",
"markdown": "Detects layouts where a BottomAppBar is used on non-compact screens."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "BottomAppBar",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Screen sizes",
"index": 122,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PreviewApiLevelMustBeValid",
"shortDescription": {
"text": "Preview apiLevel must correspond to a supported API level"
},
"fullDescription": {
"text": "Checks that preview 'apiLevel' corresponds to a supported API level.",
"markdown": "Checks that preview `apiLevel` corresponds to a supported API level."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "PreviewApiLevelMustBeValid",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Compose preview",
"index": 135,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BottomNav",
"shortDescription": {
"text": "Bottom nav"
},
"fullDescription": {
"text": "Detects layouts where a BottomNavigationView is wider than 600dp.",
"markdown": "Detects layouts where a BottomNavigationView is wider than 600dp."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "BottomNav",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Screen sizes",
"index": 122,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AnimatedContentLabel",
"shortDescription": {
"text": "AnimatedContent label parameter not set"
},
"fullDescription": {},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AnimatedContentLabel",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Compose preview",
"index": 135,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PreviewMustBeTopLevelFunction",
"shortDescription": {
"text": "Preview must be a top level declarations or in a top level class with a default constructor."
},
"fullDescription": {
"text": "Checks that Preview is only used with a top level declarations or in a top level class with a default constructor.",
"markdown": "Checks that Preview is only used with a top level declarations or in a top level class with a default constructor."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "PreviewMustBeTopLevelFunction",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Compose preview",
"index": 135,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LongText",
"shortDescription": {
"text": "Long text"
},
"fullDescription": {
"text": "Detects layouts where a line of text is longer than 120 characters.",
"markdown": "Detects layouts where a line of text is longer than 120 characters."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LongText",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Screen sizes",
"index": 122,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TransitionPropertiesLabel",
"shortDescription": {
"text": "Transition property label parameter not set"
},
"fullDescription": {
"text": "Checks that the label parameter is set for 'animate*' (e.g. 'animateFloat', 'animateColor') calls that create Compose transition properties.",
"markdown": "Checks that the label parameter is set for `animate*` (e.g. `animateFloat`, `animateColor`) calls that create Compose transition properties."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "TransitionPropertiesLabel",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Compose preview",
"index": 135,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CrossfadeLabel",
"shortDescription": {
"text": "Crossfade label parameter not set"
},
"fullDescription": {},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CrossfadeLabel",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Compose preview",
"index": 135,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Bounds",
"shortDescription": {
"text": "Bounds"
},
"fullDescription": {
"text": "Detects layouts where a child view is not fully contained within the bounds of its parent.",
"markdown": "Detects layouts where a child view is not fully contained within the bounds of its parent."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "Bounds",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Screen sizes",
"index": 122,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InfinitePropertiesLabel",
"shortDescription": {
"text": "InfiniteTransition property label parameter not set"
},
"fullDescription": {},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "InfinitePropertiesLabel",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Compose preview",
"index": 135,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PreviewMultipleParameterProviders",
"shortDescription": {
"text": "Multiple @PreviewParameter are not allowed."
},
"fullDescription": {
"text": "Detects multiple @PreviewParameter annotations. Multiple @PreviewParameter are not allowed.",
"markdown": "Detects multiple @PreviewParameter annotations. Multiple @PreviewParameter are not allowed."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "PreviewMultipleParameterProviders",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Compose preview",
"index": 135,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PreviewAnnotationInFunctionWithParameters",
"shortDescription": {
"text": "Preview used on a Composable function with parameters"
},
"fullDescription": {
"text": "Checks that Preview is not used with Composable functions with parameters. Composable functions with parameters are not supported in Preview.",
"markdown": "Checks that Preview is not used with Composable functions with parameters. Composable functions with parameters are not supported in Preview."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "PreviewAnnotationInFunctionWithParameters",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Compose preview",
"index": 135,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AnimateAsStateLabel",
"shortDescription": {
"text": "animate*AsState label parameter not set"
},
"fullDescription": {},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AnimateAsStateLabel",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Compose preview",
"index": 135,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PreviewFontScaleMustBeGreaterThanZero",
"shortDescription": {
"text": "Non-positive fontScale parameter"
},
"fullDescription": {
"text": "Checks that preview 'fontScale' value is greater than zero.",
"markdown": "Checks that preview `fontScale` value is greater than zero."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "PreviewFontScaleMustBeGreaterThanZero",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Compose preview",
"index": 135,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PreviewNeedsComposableAnnotation",
"shortDescription": {
"text": "Preview used on a non-Composable function"
},
"fullDescription": {
"text": "Checks that Preview is only used with Composable functions.",
"markdown": "Checks that Preview is only used with Composable functions."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "PreviewNeedsComposableAnnotation",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Compose preview",
"index": 135,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PreviewNotSupportedInUnitTestFiles",
"shortDescription": {
"text": "Preview is not supported in unit test files."
},
"fullDescription": {
"text": "Checks that preview is not used in unit test files.",
"markdown": "Checks that preview is not used in unit test files."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "PreviewNotSupportedInUnitTestFiles",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Compose preview",
"index": 135,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "InfiniteTransitionLabel",
"shortDescription": {
"text": "rememberInfiniteTransition label parameter not set"
},
"fullDescription": {},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "InfiniteTransitionLabel",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Compose preview",
"index": 135,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Overlap",
"shortDescription": {
"text": "Overlap"
},
"fullDescription": {
"text": "Detects layouts where a view is at least 50% covered by another sibling view. The analysis is restricted to covered text views as they are the most likely to be wrongly covered by another view.",
"markdown": "Detects layouts where a view is at least 50% covered by another sibling view. The analysis is restricted to covered text views as they are the most likely to be wrongly covered by another view."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "Overlap",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Screen sizes",
"index": 122,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "TextFieldSize",
"shortDescription": {
"text": "Text field size"
},
"fullDescription": {
"text": "Detects layouts where a text field is wider than the recommended 488dp.",
"markdown": "Detects layouts where a text field is wider than the recommended 488dp."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "TextFieldSize",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Screen sizes",
"index": 122,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.swagger",
"version": "232.8660.185",
"rules": [
{
"id": "SwYamlMaybeSpecificationInspection",
"shortDescription": {
"text": "Possible OpenAPI/Swagger specification candidate"
},
"fullDescription": {
"text": "Detects YAML files that can be interpreted as a part of OpenAPI/Swagger specification. Such files do not contain explicit specification attributes, but they are referenced from primary specification files located nearby. The following example contains two files located in the same directory. First one is a plain primary specification file. Second is referenced from the first one and thus is suggested to be considered a specification too. Primary specification file 'openapi.yaml': 'openapi: 3.1.0\ncomponents:\n schemas:\n CustomSchema:\n description: Custom schema object\n properties:\n foo:\n $ref: 'common.components.yaml#/components/schemas/CommonSchema'' Specification file candidate 'common.components.yaml': 'components: # 'Mark file as OpenAPI specification' highlighting\n schemas:\n CommonSchema:\n description: Common schema object reused in several specifications'",
"markdown": "Detects YAML files that can be interpreted as a part of OpenAPI/Swagger specification.\n\n\nSuch files do not contain explicit specification attributes, but they are referenced from primary specification files located nearby.\n\n\nThe following example contains two files located in the same directory. First one is a plain primary specification file.\nSecond is referenced from the first one and thus is suggested to be considered a specification too.\n\n**Primary specification file `openapi.yaml`:**\n\n\n openapi: 3.1.0\n components:\n schemas:\n CustomSchema:\n description: Custom schema object\n properties:\n foo:\n $ref: 'common.components.yaml#/components/schemas/CommonSchema'\n\n**Specification file candidate `common.components.yaml`:**\n\n\n components: # 'Mark file as OpenAPI specification' highlighting\n schemas:\n CommonSchema:\n description: Common schema object reused in several specifications\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SwYamlMaybeSpecificationInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "OpenAPI specifications",
"index": 133,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SwJsonUnresolvedReferencesInspection",
"shortDescription": {
"text": "Unresolved reference"
},
"fullDescription": {
"text": "Detects unresolved references in JSON specification files.",
"markdown": "Detects unresolved references in JSON specification files."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "SwJsonUnresolvedReferencesInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "OpenAPI specifications",
"index": 133,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SwJsonMaybeSpecificationInspection",
"shortDescription": {
"text": "Possible OpenAPI/Swagger specification candidate"
},
"fullDescription": {
"text": "Detects JSON files that can be interpreted as a part of OpenAPI/Swagger specification. Such files do not contain explicit specification attributes, but they are referenced from primary specification files located nearby. The following example contains two files located in the same directory. First one is a plain primary specification file. Second is referenced from the first one and thus is suggested to be considered a specification too. Primary specification file 'openapi.yaml': 'openapi: 3.1.0\ncomponents:\n schemas:\n CustomSchema:\n description: Custom schema object\n properties:\n foo:\n $ref: 'common.components.json#/components/schemas/CommonSchema'' Specification file candidate 'common.components.json': '{\n \"components\": { // 'Mark file as OpenAPI specification' highlighting\n \"schemas\": {\n \"CommonSchema\": {\n \"description\": \"Common schema object reused in several specifications\"\n }\n }\n }\n}'",
"markdown": "Detects JSON files that can be interpreted as a part of OpenAPI/Swagger specification.\n\n\nSuch files do not contain explicit specification attributes, but they are referenced from primary specification files located nearby.\n\n\nThe following example contains two files located in the same directory. First one is a plain primary specification file.\nSecond is referenced from the first one and thus is suggested to be considered a specification too.\n\n**Primary specification file `openapi.yaml`:**\n\n\n openapi: 3.1.0\n components:\n schemas:\n CustomSchema:\n description: Custom schema object\n properties:\n foo:\n $ref: 'common.components.json#/components/schemas/CommonSchema'\n\n**Specification file candidate `common.components.json`:**\n\n\n {\n \"components\": { // 'Mark file as OpenAPI specification' highlighting\n \"schemas\": {\n \"CommonSchema\": {\n \"description\": \"Common schema object reused in several specifications\"\n }\n }\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SwJsonMaybeSpecificationInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "OpenAPI specifications",
"index": 133,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SwYamlUnresolvedReferencesInspection",
"shortDescription": {
"text": "Unresolved reference"
},
"fullDescription": {
"text": "Detects unresolved references in Yaml specification files.",
"markdown": "Detects unresolved references in Yaml specification files."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "SwYamlUnresolvedReferencesInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "OpenAPI specifications",
"index": 133,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.jetbrains.restWebServices",
"version": "232.8660.185",
"rules": [
{
"id": "RestParamTypeInspection",
"shortDescription": {
"text": "Incorrect parameter type of resource method"
},
"fullDescription": {
"text": "Reports resource method parameters (annotated with '@PathParam', '@QueryParam', and so on) with unsupported types. The type of the annotated parameter, field, or property must meet one of the following requirements: Be a primitive type Have a constructor that accepts a single 'String' argument Have a static method named 'valueOf()' or 'fromString()' that accepts a single 'String' argument, for example, 'Integer.valueOf(String)'. Have a registered implementation of 'ParamConverterProvider' JAX-RS extension SPI that returns a 'ParamConverter' instance capable of converting a string to a particular type. Be 'List<T>', 'Set<T>', or 'SortedSet<T>', where T satisfies 2, 3, or 4 above. The resulting collection is read-only.",
"markdown": "Reports resource method parameters (annotated with `@PathParam`, `@QueryParam`, and so on) with unsupported types.\n\nThe type of the annotated parameter, field, or property must meet one of the following requirements:\n\n1. Be a primitive type\n2. Have a constructor that accepts a single `String` argument\n3. Have a static method named `valueOf()` or `fromString()` that accepts a single `String` argument, for example, `Integer.valueOf(String)`.\n4. Have a registered implementation of `ParamConverterProvider` JAX-RS extension SPI that returns a `ParamConverter` instance capable of converting a string to a particular type.\n5. Be `List<T>`, `Set<T>`, or `SortedSet<T>`, where T satisfies 2, 3, or 4 above. The resulting collection is read-only."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "RestParamTypeInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "RESTful Web Service (JAX-RS)",
"index": 137,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PathAnnotation",
"shortDescription": {
"text": "Incorrect @Path URI template"
},
"fullDescription": {
"text": "Reports syntax errors and unused URI templates inside '@Path' annotations. Example: '@GET\n @Path(\"/{unused}\") // Template 'unused' is never used\n public String get() {\n return \"\";\n }'",
"markdown": "Reports syntax errors and unused URI templates inside `@Path` annotations.\n\n**Example:**\n\n\n @GET\n @Path(\"/{unused}\") // Template 'unused' is never used\n public String get() {\n return \"\";\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PathAnnotation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "RESTful Web Service (JAX-RS)",
"index": 137,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RestWrongDefaultValueInspection",
"shortDescription": {
"text": "Incorrect value of @DefaultValue parameter"
},
"fullDescription": {
"text": "Reports the value of '@DefaultValue' if it cannot be converted to the specified type of parameter. Example: '@GET\n @Path(\"/{n}\")\n public String get(@PathParam(\"n\") @DefaultValue(\"III\") int n) { // Error: Cannot convert 'III' to int\n }'",
"markdown": "Reports the value of `@DefaultValue` if it cannot be converted to the specified type of parameter.\n\n**Example:**\n\n\n @GET\n @Path(\"/{n}\")\n public String get(@PathParam(\"n\") @DefaultValue(\"III\") int n) { // Error: Cannot convert 'III' to int\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "RestWrongDefaultValueInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "RESTful Web Service (JAX-RS)",
"index": 137,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "WadlDomInspection",
"shortDescription": {
"text": "Incorrect WADL configuration"
},
"fullDescription": {
"text": "Reports configuration errors in WADL files.",
"markdown": "Reports configuration errors in WADL files."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "WadlDomInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "RESTful Web Service (JAX-RS)",
"index": 137,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MultipleMethodDesignatorsInspection",
"shortDescription": {
"text": "Resource method with multiple HTTP method annotations"
},
"fullDescription": {
"text": "Reports resource methods with multiple HTTP method annotations ('@GET', '@POST', '@PUT', and so on).",
"markdown": "Reports resource methods with multiple HTTP method annotations (`@GET`, `@POST`, `@PUT`, and so on)."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "MultipleMethodDesignatorsInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "RESTful Web Service (JAX-RS)",
"index": 137,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RestResourceMethodInspection",
"shortDescription": {
"text": "@Path class without resource methods"
},
"fullDescription": {
"text": "Reports classes annotated with '@Path' that have no resource methods. The root resource class must have at least one resource method annotated with '@Path' or with any of '@HttpMethod' annotations ('@GET', '@POST', and so on).",
"markdown": "Reports classes annotated with `@Path` that have no resource methods.\nThe root resource class must have at least one resource method annotated with `@Path`\nor with any of `@HttpMethod` annotations (`@GET`, `@POST`, and so on)."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "RestResourceMethodInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "RESTful Web Service (JAX-RS)",
"index": 137,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "VoidMethodAnnotatedWithGET",
"shortDescription": {
"text": "@GET annotated method returns void value"
},
"fullDescription": {
"text": "Reports methods annotated with '@GET' that do not return anything. Methods annotated with '@GET' must have a non-void return type.",
"markdown": "Reports methods annotated with `@GET` that do not return anything.\nMethods annotated with `@GET` must have a non-void return type."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "VoidMethodAnnotatedWithGET",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "RESTful Web Service (JAX-RS)",
"index": 137,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnresolvedRestParam",
"shortDescription": {
"text": "Unresolved @PathParam reference"
},
"fullDescription": {
"text": "Reports '@PathParam' parameters that are declared in a method signature and missing in the URL path or visa versa. Example: '@Get(\"/path/{myVariable}/\")\n public String handler(@PathParam(\"name_is_not_equal_to_myVariable\") String myVariable) { // Error\n return \"...\";\n }'",
"markdown": "Reports `@PathParam` parameters that are declared in a method signature and missing in the URL path or visa versa.\n\n**Example:**\n\n\n @Get(\"/path/{myVariable}/\")\n public String handler(@PathParam(\"name_is_not_equal_to_myVariable\") String myVariable) { // Error\n return \"...\";\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "UnresolvedRestParam",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "RESTful Web Service (JAX-RS)",
"index": 137,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.jsonpath",
"version": "232.8660.185",
"rules": [
{
"id": "JsonPathUnknownFunction",
"shortDescription": {
"text": "Unknown JSONPath function"
},
"fullDescription": {
"text": "Reports an unknown name in a JSONPath function call instead of known standard function names: 'concat', 'keys', 'length', 'min', 'max', 'avg', 'stddev', 'sum'.",
"markdown": "Reports an unknown name in a JSONPath function call instead of known standard function names: `concat`, `keys`, `length`, `min`, `max`, `avg`, `stddev`, `sum`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JsonPathUnknownFunction",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JSONPath",
"index": 145,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JsonPathUnknownOperator",
"shortDescription": {
"text": "Unknown JSONPath operator"
},
"fullDescription": {
"text": "Reports an unknown operator on a JSONPath expression instead of one of the standard ones: 'in', 'nin', 'subsetof', 'anyof', 'noneof', 'size', 'empty', 'contains'.",
"markdown": "Reports an unknown operator on a JSONPath expression instead of one of the standard ones: `in`, `nin`, `subsetof`, `anyof`, `noneof`, `size`, `empty`, `contains`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JsonPathUnknownOperator",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JSONPath",
"index": 145,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JsonPathEvaluateUnknownKey",
"shortDescription": {
"text": "Unknown property key used for JSONPath evaluate expression"
},
"fullDescription": {
"text": "Reports a key in a JSONPath expression that is missing in the source JSON document to evaluate.",
"markdown": "Reports a key in a JSONPath expression that is missing in the source JSON document to evaluate."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JsonPathEvaluateUnknownKey",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JSONPath",
"index": 145,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "HtmlTools",
"version": "232.8660.185",
"rules": [
{
"id": "HtmlRequiredSummaryAttribute",
"shortDescription": {
"text": "Missing required 'summary' attribute"
},
"fullDescription": {
"text": "Reports a missing 'summary' attribute in a 'table' tag. Suggests adding a'summary' attribute. Based on WCAG 2.0: H73.",
"markdown": "Reports a missing `summary` attribute in a `table` tag. Suggests adding a`summary` attribute. Based on WCAG 2.0: [H73](https://www.w3.org/TR/WCAG20-TECHS/H73.html)."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "HtmlRequiredSummaryAttribute",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "HTML/Accessibility",
"index": 148,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HtmlNonExistentInternetResource",
"shortDescription": {
"text": "Unresolved web link"
},
"fullDescription": {
"text": "Reports an unresolved web link. Works by making network requests in the background.",
"markdown": "Reports an unresolved web link. Works by making network requests in the background."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "HtmlNonExistentInternetResource",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "HTML",
"index": 28,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HtmlRequiredTitleAttribute",
"shortDescription": {
"text": "Missing required 'title' attribute"
},
"fullDescription": {
"text": "Reports a missing title attribute 'frame', 'iframe', 'dl', and 'a' tags. Suggests adding a title attribute. Based on WCAG 2.0: H33, H40, and H64.",
"markdown": "Reports a missing title attribute `frame`, `iframe`, `dl`, and `a` tags. Suggests adding a title attribute. Based on WCAG 2.0: [H33](https://www.w3.org/TR/WCAG20-TECHS/H33.html), [H40](https://www.w3.org/TR/WCAG20-TECHS/H40.html), and [H64](https://www.w3.org/TR/WCAG20-TECHS/H64.html)."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "HtmlRequiredTitleAttribute",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "HTML/Accessibility",
"index": 148,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HtmlRequiredAltAttribute",
"shortDescription": {
"text": "Missing required 'alt' attribute"
},
"fullDescription": {
"text": "Reports a missing 'alt' attribute in a 'img' or 'applet' tag or in a 'area' element of an image map. Suggests adding a required attribute with a text alternative for the contents of the tag. Based on WCAG 2.0: H24, H35, H36, H37.",
"markdown": "Reports a missing `alt` attribute in a `img` or `applet` tag or in a `area` element of an image map. Suggests adding a required attribute with a text alternative for the contents of the tag. Based on WCAG 2.0: [H24](https://www.w3.org/TR/WCAG20-TECHS/H24.html), [H35](https://www.w3.org/TR/WCAG20-TECHS/H35.html), [H36](https://www.w3.org/TR/WCAG20-TECHS/H36.html), [H37](https://www.w3.org/TR/WCAG20-TECHS/H37.html)."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "HtmlRequiredAltAttribute",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "HTML/Accessibility",
"index": 148,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HtmlPresentationalElement",
"shortDescription": {
"text": "Presentational tag"
},
"fullDescription": {
"text": "Reports a presentational HTML tag. Suggests replacing the presentational tag with a CSS or another tag.",
"markdown": "Reports a presentational HTML tag. Suggests replacing the presentational tag with a CSS or another tag."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "HtmlPresentationalElement",
"ideaSeverity": "INFORMATION",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "HTML",
"index": 28,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HtmlDeprecatedTag",
"shortDescription": {
"text": "Obsolete tag"
},
"fullDescription": {
"text": "Reports an obsolete HTML5 tag. Suggests replacing the obsolete tag with a CSS or another tag.",
"markdown": "Reports an obsolete HTML5 tag. Suggests replacing the obsolete tag with a CSS or another tag."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "HtmlDeprecatedTag",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "HTML",
"index": 28,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HtmlFormInputWithoutLabel",
"shortDescription": {
"text": "Missing associated label"
},
"fullDescription": {
"text": "Reports a form element ('input', 'textarea', or 'select') without an associated label. Suggests creating a new label. Based on WCAG 2.0: H44.",
"markdown": "Reports a form element (`input`, `textarea`, or `select`) without an associated label. Suggests creating a new label. Based on WCAG 2.0: [H44](https://www.w3.org/TR/WCAG20-TECHS/H44.html). "
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "HtmlFormInputWithoutLabel",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "HTML/Accessibility",
"index": 148,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HtmlRequiredTitleElement",
"shortDescription": {
"text": "Missing required 'title' element"
},
"fullDescription": {
"text": "Reports a missing 'title' element inside a 'head' section. Suggests adding a 'title' element. The title should describe the document. Based on WCAG 2.0: H25.",
"markdown": "Reports a missing `title` element inside a `head` section. Suggests adding a `title` element. The title should describe the document. Based on WCAG 2.0: [H25](https://www.w3.org/TR/WCAG20-TECHS/H25.html)."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "HtmlRequiredTitleElement",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "HTML/Accessibility",
"index": 148,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HtmlDeprecatedAttribute",
"shortDescription": {
"text": "Obsolete attribute"
},
"fullDescription": {
"text": "Reports an obsolete HTML5 attribute.",
"markdown": "Reports an obsolete HTML5 attribute."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "HtmlDeprecatedAttribute",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "HTML",
"index": 28,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CheckImageSize",
"shortDescription": {
"text": "Mismatched image size"
},
"fullDescription": {
"text": "Reports a 'width' and 'height' attribute value of a 'img' tag that is different from the actual width and height of the referenced image.",
"markdown": "Reports a `width` and `height` attribute value of a `img` tag that is different from the actual width and height of the referenced image."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CheckImageSize",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "HTML",
"index": 28,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HtmlRequiredLangAttribute",
"shortDescription": {
"text": "Missing required 'lang' attribute"
},
"fullDescription": {
"text": "Reports a missing 'lang' (or 'xml:lang') attribute in a 'html' tag. Suggests adding a required attribute to state the default language of the document. Based on WCAG 2.0: H57.",
"markdown": "Reports a missing `lang` (or `xml:lang`) attribute in a `html` tag. Suggests adding a required attribute to state the default language of the document. Based on WCAG 2.0: [H57](https://www.w3.org/TR/WCAG20-TECHS/H57.html)."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "HtmlRequiredLangAttribute",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "HTML/Accessibility",
"index": 148,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.freemarker",
"version": "232.8660.185",
"rules": [
{
"id": "FtlImportCallInspection",
"shortDescription": {
"text": "Unresolved external call"
},
"fullDescription": {
"text": "Reports unresolved '#macro' and '#function' directives located in other files. The quick-fix suggests using '#import' or '#include' for the required files.",
"markdown": "Reports unresolved `#macro` and `#function` directives located in other files.\n\nThe quick-fix suggests using `#import` or `#include` for the required files."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "FtlImportCallInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "FreeMarker",
"index": 149,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FtlCallsInspection",
"shortDescription": {
"text": "Invalid call directive"
},
"fullDescription": {
"text": "Reports FreeMarker calls that do not match the macro declaration (for example, missing parameters, wrong type, and so on).",
"markdown": "Reports FreeMarker calls that do not match the macro declaration (for example, missing parameters, wrong type, and so on)."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "FtlCallsInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "FreeMarker",
"index": 149,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FtlTypesInspection",
"shortDescription": {
"text": "Incorrect expression type"
},
"fullDescription": {
"text": "Reports incorrect FreeMarker expression types.",
"markdown": "Reports incorrect FreeMarker expression types."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FtlTypesInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "FreeMarker",
"index": 149,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FtlReferencesInspection",
"shortDescription": {
"text": "Unresolved reference"
},
"fullDescription": {
"text": "Reports unresolved FreeMarker references.",
"markdown": "Reports unresolved FreeMarker references."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FtlReferencesInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "FreeMarker",
"index": 149,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FtlDeprecatedBuiltInsInspection",
"shortDescription": {
"text": "Built-in is deprecated"
},
"fullDescription": {
"text": "Reports deprecated built-ins (for example, 'default', 'exists', 'if_exists', 'web_safe').",
"markdown": "Reports deprecated built-ins (for example, `default`, `exists`, `if_exists`, `web_safe`)."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "FtlDeprecatedBuiltInsInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "FreeMarker",
"index": 149,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FtlFileReferencesInspection",
"shortDescription": {
"text": "Unresolved file reference"
},
"fullDescription": {
"text": "Reports unresolved FreeMarker file references in '#include' and '#import' directives.",
"markdown": "Reports unresolved FreeMarker file references in `#include` and `#import` directives."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "FtlFileReferencesInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "FreeMarker",
"index": 149,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "FtlWellformednessInspection",
"shortDescription": {
"text": "Directive is malformed"
},
"fullDescription": {
"text": "Reports malformed FreeMarker directives (for example, wrong nesting, missing closing tags, and so on).",
"markdown": "Reports malformed FreeMarker directives (for example, wrong nesting, missing closing tags, and so on)."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "FtlWellformednessInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "FreeMarker",
"index": 149,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "org.jetbrains.security.package-checker",
"version": "232.8660.185",
"rules": [
{
"id": "VulnerableCodeUsages",
"shortDescription": {
"text": "Vulnerable API usage"
},
"fullDescription": {
"text": "Reports usages of Vulnerable APIs of imported dependencies. Fixing the reported problems helps prevent your software from being compromised by an attacker. To solve a problem, you can update to a version where the vulnerability is fixed (if available) or switch to a dependency that doesn't have the vulnerability. Vulnerability data provided by Checkmarx (c).",
"markdown": "Reports usages of Vulnerable APIs of imported dependencies.\n\nFixing the reported problems helps prevent your software from being compromised by an attacker.\n\nTo solve a problem, you can update to a version where the vulnerability is fixed (if available) or switch to a dependency that doesn't have the vulnerability.\n\nVulnerability data provided by [Checkmarx](https://checkmarx.com/) (c)."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "VulnerableCodeUsages",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Security",
"index": 154,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "VulnerableLibrariesLocal",
"shortDescription": {
"text": "Vulnerable declared dependency"
},
"fullDescription": {
"text": "Reports vulnerabilities in Gradle, Maven, NPM and PyPI dependencies declared in your project. A full list of Gradle and Maven dependencies is shown in the Project tool window under External Libraries. Fixing the reported problems helps prevent your software from being compromised by an attacker. To solve a problem, you can update to a version where the vulnerability is fixed (if available) or switch to a dependency that doesn't have the vulnerability. The quick-fixes available may suggest updating to a safe version or visiting the Checkmarx website to learn more about a particular vulnerability. Vulnerability data provided by Checkmarx (c).",
"markdown": "Reports vulnerabilities in Gradle, Maven, NPM and PyPI dependencies declared in your project.\nA full list of Gradle and Maven dependencies is shown in the Project tool window under External Libraries.\n\nFixing the reported problems helps prevent your software from being compromised by an attacker.\n\nTo solve a problem, you can update to a version where the vulnerability is fixed (if available) or switch to a dependency that doesn't have the vulnerability.\n\nThe quick-fixes available may suggest updating to a safe version or visiting the Checkmarx website to learn more about a particular vulnerability.\n\nVulnerability data provided by [Checkmarx](https://checkmarx.com/) (c)."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "VulnerableLibrariesLocal",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Security",
"index": 154,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "VulnerableLibrariesGlobal",
"shortDescription": {
"text": "Vulnerable imported dependency"
},
"fullDescription": {
"text": "Reports vulnerabilities in Gradle and Maven dependencies imported into your project. A full list of Gradle and Maven dependencies is shown in the Project tool window under External Libraries. Fixing the reported problems helps prevent your software from being compromised by an attacker. To solve a problem, you can update to a version where the vulnerability is fixed (if available) or switch to a dependency that doesn't have the vulnerability. The quick-fixes available may suggest updating to a safe version or visiting the Checkmarx website to learn more about a particular vulnerability. Vulnerability data provided by Checkmarx (c).",
"markdown": "Reports vulnerabilities in Gradle and Maven dependencies imported into your project.\nA full list of Gradle and Maven dependencies is shown in the Project tool window under External Libraries.\n\nFixing the reported problems helps prevent your software from being compromised by an attacker.\n\nTo solve a problem, you can update to a version where the vulnerability is fixed (if available) or switch to a dependency that doesn't have the vulnerability.\n\nThe quick-fixes available may suggest updating to a safe version or visiting the Checkmarx website to learn more about a particular vulnerability.\n\nVulnerability data provided by [Checkmarx](https://checkmarx.com/) (c)."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "VulnerableLibrariesGlobal",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Security",
"index": 154,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.aop",
"version": "232.8660.185",
"rules": [
{
"id": "DeclareParentsInspection",
"shortDescription": {
"text": "Introductions (declare parents) errors"
},
"fullDescription": {
"text": "Reports '@AspectJ' Introduction inconsistency: it checks whether the 'defaultImpl' is required and if yes, whether it implements the given interface.",
"markdown": "Reports `@AspectJ` Introduction inconsistency: it checks whether the `defaultImpl` is required and if yes, whether it implements the given interface."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "DeclareParentsInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "AOP",
"index": 156,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "AroundAdviceStyleInspection",
"shortDescription": {
"text": "Around advice style inspection"
},
"fullDescription": {
"text": "When using '@Around' advice, remember two things: Calling 'org.aspectj.lang.ProceedingJoinPoint#proceed' is necessary, otherwise the call won't reach the target. Returning the result value (typed 'java.lang.Object') of that call is necessary, otherwise the return value will never reach the original caller. However, the following two conditions almost always indicate a coding error: The signature for the '@Around' method does not have 'ProceedingJoinPoint' as the first argument: in this case, it's impossible for the call to reach the target. The signature for the '@Around' method does not have 'Object' as a return type: in this case, the return value of the target method is always lost.",
"markdown": "When using `@Around` advice, remember two things:\n\n* Calling `org.aspectj.lang.ProceedingJoinPoint#proceed` is necessary, otherwise the call won't reach the target.\n* Returning the result value (typed `java.lang.Object`) of that call is necessary, otherwise the return value will never reach the original caller.\n\nHowever, the following two conditions almost always indicate a coding error:\n\n* The signature for the `@Around` method does not have `ProceedingJoinPoint` as the first argument: in this case, it's impossible for the call to reach the target.\n* The signature for the `@Around` method does not have `Object` as a return type: in this case, the return value of the target method is always lost."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "AroundAdviceStyleInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "AOP",
"index": 156,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ArgNamesWarningsInspection",
"shortDescription": {
"text": "Warning: argNames not defined "
},
"fullDescription": {
"text": "Reports if an 'argNames' attribute is not defined in an '@AspectJ' annotation. Defining 'argNames' attributes in '@AspectJ' annotations is recommended since the method parameter names may not be available at runtime.",
"markdown": "Reports if an `argNames` attribute is not defined in an `@AspectJ` annotation.\n\nDefining `argNames` attributes in `@AspectJ` annotations is recommended since the method parameter names\nmay not be available at runtime."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ArgNamesWarningsInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "AOP",
"index": 156,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "PointcutMethodStyleInspection",
"shortDescription": {
"text": "Pointcut method style"
},
"fullDescription": {
"text": "Validates '@Pointcut' methods: the 'void' return type, no 'throws' clause, and an empty method body.",
"markdown": "Validates `@Pointcut` methods: the `void` return type, no `throws` clause, and an empty method body."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PointcutMethodStyleInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "AOP",
"index": 156,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ArgNamesErrorsInspection",
"shortDescription": {
"text": "Advice parameters (argNames, returning, throwing) consistency check"
},
"fullDescription": {
"text": "Reports if an '@AspectJ' 'argNames' attribute value does not correspond to the actual method parameter name.",
"markdown": "Reports if an `@AspectJ` `argNames` attribute value does not correspond to the actual method parameter name."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "ArgNamesErrorsInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "AOP",
"index": 156,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.beanValidation",
"version": "232.8660.185",
"rules": [
{
"id": "BvConfigDomInspection",
"shortDescription": {
"text": "Incorrect elements in Bean Validation <validation-config> files"
},
"fullDescription": {
"text": "Reports incorrect elements in Bean Validation '<validation-config>' files: References to non-instantiable classes References to classes that do not extend required class References to classes with inappropriate scope Empty tag and attribute values Tag and attribute values that do not match the required pattern (for example, Java Identifiers) Tags that do not include required children tags or attributes Tags that define objects with duplicate names Example: '<validation-config>\n <default-provider>foo.UnknownProvider</default-provider> <!-- Cannot resolve class or package 'UnknownProvider' -->\n <message-interpolator>my.Interpolator</message-interpolator>\n <constraint-mapping>META-INF/ConstraintMappings.xml</constraint-mapping>\n <constraint-mapping>META-INF/unknown.xml</constraint-mapping>\n</validation-config>'",
"markdown": "Reports incorrect elements in Bean Validation `<validation-config>` files:\n\n* References to non-instantiable classes\n* References to classes that do not extend required class\n* References to classes with inappropriate scope\n* Empty tag and attribute values\n* Tag and attribute values that do not match the required pattern (for example, Java Identifiers)\n* Tags that do not include required children tags or attributes\n* Tags that define objects with duplicate names\n\n**Example:**\n\n\n <validation-config>\n <default-provider>foo.UnknownProvider</default-provider> <!-- Cannot resolve class or package 'UnknownProvider' -->\n <message-interpolator>my.Interpolator</message-interpolator>\n <constraint-mapping>META-INF/ConstraintMappings.xml</constraint-mapping>\n <constraint-mapping>META-INF/unknown.xml</constraint-mapping>\n </validation-config>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "BvConfigDomInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Bean Validation",
"index": 158,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MinMaxValuesInspection",
"shortDescription": {
"text": "Incorrect 'min' and 'max' values in Bean Validation annotations"
},
"fullDescription": {
"text": "Reports incorrect values of 'max' and 'min' values in Bean Validation constraint annotations. Example: 'public class Car {\n @NotNull\n @Size(min = 14, max = 2) // 'max' value is less than 'min' value\n private String licensePlate;\n}'",
"markdown": "Reports incorrect values of `max` and `min` values in Bean Validation constraint annotations.\n\n**Example:**\n\n\n public class Car {\n @NotNull\n @Size(min = 14, max = 2) // 'max' value is less than 'min' value\n private String licensePlate;\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "MinMaxValuesInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Bean Validation",
"index": 158,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "BvConstraintMappingsInspection",
"shortDescription": {
"text": "Incorrect elements in Bean Validation <constraint-mappings> files"
},
"fullDescription": {
"text": "Reports incorrect elements in Bean Validation '<constraint-mappings>' files: References to non-instantiable classes References to classes that do not extend required class References to classes with inappropriate scope Empty tag and attribute values Tag and attribute values that do not match the required pattern (for example, Java Identifiers) Tags that do not include required children tags or attributes Tags that define objects with duplicate names Example: '<constraint-mappings version=\"1.1\">\n <bean class=\"my.UserClass\" ignore-annotations=\"false\">\n <field name=\"name\">\n <constraint annotation=\"java.lang.String\"/> <!--'java.lang.String' is not a Java Annotation -->\n </field>\n\n <field name=\"name\">\n <constraint annotation=\"javax.validation.constraints.Size\">\n <element name=\"min\">non-number</element> <!--Should be a number from '-2,147,483,648' to '2,147,483,647' -->\n </constraint>\n </field>\n\n <getter name=\"zzz\"> Cannot resolve symbol 'zzz'\n <valid/>\n </getter>\n\n </bean>\n</constraint-mappings>'",
"markdown": "Reports incorrect elements in Bean Validation `<constraint-mappings>` files:\n\n* References to non-instantiable classes\n* References to classes that do not extend required class\n* References to classes with inappropriate scope\n* Empty tag and attribute values\n* Tag and attribute values that do not match the required pattern (for example, Java Identifiers)\n* Tags that do not include required children tags or attributes\n* Tags that define objects with duplicate names\n\n**Example:**\n\n\n <constraint-mappings version=\"1.1\">\n <bean class=\"my.UserClass\" ignore-annotations=\"false\">\n <field name=\"name\">\n <constraint annotation=\"java.lang.String\"/> <!--'java.lang.String' is not a Java Annotation -->\n </field>\n\n <field name=\"name\">\n <constraint annotation=\"javax.validation.constraints.Size\">\n <element name=\"min\">non-number</element> <!--Should be a number from '-2,147,483,648' to '2,147,483,647' -->\n </constraint>\n </field>\n\n <getter name=\"zzz\"> Cannot resolve symbol 'zzz'\n <valid/>\n </getter>\n\n </bean>\n </constraint-mappings>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "BvConstraintMappingsInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Bean Validation",
"index": 158,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "org.jetbrains.plugins.vue",
"version": "232.8660.185",
"rules": [
{
"id": "VueMissingComponentImportInspection",
"shortDescription": {
"text": "Missing component import"
},
"fullDescription": {
"text": "Reports Vue components, which require to be imported in Vue templates. It provides a quick fix to add the missing import.",
"markdown": "Reports Vue components, which require to be imported in Vue templates. It provides a quick fix to add the missing import."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "VueMissingComponentImportInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Vue",
"index": 161,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "VueDeprecatedSymbol",
"shortDescription": {
"text": "Deprecated symbol"
},
"fullDescription": {
"text": "Reports a deprecated Vue symbol.",
"markdown": "Reports a deprecated Vue symbol."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "VueDeprecatedSymbol",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Vue",
"index": 161,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "VueUnrecognizedDirective",
"shortDescription": {
"text": "Unrecognized directive"
},
"fullDescription": {
"text": "Reports an unrecognized Vue directive.",
"markdown": "Reports an unrecognized Vue directive."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "VueUnrecognizedDirective",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Vue",
"index": 161,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "VueDuplicateTag",
"shortDescription": {
"text": "Duplicate template/script tag"
},
"fullDescription": {
"text": "Reports multiple usages of the 'template' or 'script' tag in a Vue file. Vue Component specification indicates that each '*.vue' file can contain at most one 'template' or 'script' block at a time.",
"markdown": "Reports multiple usages of the `template` or `script` tag in a Vue file.\n\n[Vue Component specification](https://vue-loader.vuejs.org/spec.html) indicates that each `*.vue` file can contain at most one `template` or `script` block at a time."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "VueDuplicateTag",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Vue",
"index": 161,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "VueDataFunction",
"shortDescription": {
"text": "Data function"
},
"fullDescription": {
"text": "Reports a Vue component data property that is not a function. Suggests wrapping an object literal with a function. When defining a component, 'data' must be declared as a function that returns the initial data object, because the same definition will be used for creating numerous instances. If a plain object is still used for 'data', that very object will be shared by reference across all instances created! With a 'data' function, every time a new instance is created we can simply call it to return a fresh copy of the initial data.",
"markdown": "Reports a Vue component [data](https://vuejs.org/v2/api/#data) property that is not a function. Suggests wrapping an object literal with a function.\n\nWhen defining a component, `data` must be declared as a function that returns the initial data object, because the same definition will be used for creating numerous instances. If a plain object is still used for `data`, that very object will be shared by reference across all instances created! With a `data` function, every time a new instance is created we can simply call it to return a fresh copy of the initial data."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "VueDataFunction",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Vue",
"index": 161,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "VueUnrecognizedSlot",
"shortDescription": {
"text": "Unrecognized slot"
},
"fullDescription": {
"text": "Reports an unrecognized Vue slot.",
"markdown": "Reports an unrecognized Vue slot."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "VueUnrecognizedSlot",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Vue",
"index": 161,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "org.intellij.plugins.markdown",
"version": "232.8660.185",
"rules": [
{
"id": "MarkdownOutdatedTableOfContents",
"shortDescription": {
"text": "Outdated table of contents section"
},
"fullDescription": {
"text": "Checks if a particular table of contents section corresponds to the actual structure of the document.",
"markdown": "Checks if a particular table of contents section corresponds to the actual structure of the document."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MarkdownOutdatedTableOfContents",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Markdown",
"index": 169,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MarkdownUnresolvedLinkLabel",
"shortDescription": {
"text": "Unresolved link label"
},
"fullDescription": {
"text": "Reports unresolved link labels in Markdown files.",
"markdown": "Reports unresolved link labels in Markdown files."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MarkdownUnresolvedLinkLabel",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Markdown",
"index": 169,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MarkdownNoTableBorders",
"shortDescription": {
"text": "Table doesn't have side borders"
},
"fullDescription": {
"text": "Checks if table has correct side borders. For compatibility reasons all table rows should have borders (pipe symbols) at the start and at the end.",
"markdown": "Checks if table has correct side borders. For compatibility reasons all table rows should have borders (pipe symbols) at the start and at the end."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "MarkdownNoTableBorders",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Markdown",
"index": 169,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MarkdownIncorrectlyNumberedListItem",
"shortDescription": {
"text": "Incorrectly numbered list item"
},
"fullDescription": {
"text": "Ordered list items are expected to have straight numeration starting from 1. The motivation behind this is that most of Markdown processors are ignoring the numbering of ordered lists. A processor will generate an '<ol>' element for such list, that will number items continuously from 1.",
"markdown": "Ordered list items are expected to have straight numeration starting from 1.\n\nThe motivation behind this is that most of Markdown processors are ignoring the numbering of ordered lists. A processor will generate an `<ol>` element for such list, that will number items continuously from 1."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MarkdownIncorrectlyNumberedListItem",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Markdown",
"index": 169,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MarkdownUnresolvedHeaderReference",
"shortDescription": {
"text": "Unresolved header reference"
},
"fullDescription": {
"text": "Reports unresolved header references in Markdown files.",
"markdown": "Reports unresolved header references in Markdown files."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MarkdownUnresolvedHeaderReference",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Markdown",
"index": 169,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MarkdownLinkDestinationWithSpaces",
"shortDescription": {
"text": "Links should not contain spaces"
},
"fullDescription": {
"text": "To ensure consistency between different tools, file links should not contain spaces. Example: '[Some file link](some file.md)' A quick-fix replaces spaces with their url-encoded equivalent: '[Some file link](some%20file.md)'",
"markdown": "To ensure consistency between different tools, file links should not contain spaces.\n\n**Example:**\n\n\n [Some file link](some file.md)\n\nA quick-fix replaces spaces with their url-encoded equivalent:\n\n\n [Some file link](some%20file.md)\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MarkdownLinkDestinationWithSpaces",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Markdown",
"index": 169,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MarkdownIncorrectTableFormatting",
"shortDescription": {
"text": "Incorrect table formatting"
},
"fullDescription": {
"text": "Checks if table is correctly formatted.",
"markdown": "Checks if table is correctly formatted."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "MarkdownIncorrectTableFormatting",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Markdown",
"index": 169,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MarkdownUnresolvedFileReference",
"shortDescription": {
"text": "Unresolved file references"
},
"fullDescription": {
"text": "Reports unresolved file references in Markdown files.",
"markdown": "Reports unresolved file references in Markdown files."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MarkdownUnresolvedFileReference",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Markdown",
"index": 169,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "org.jetbrains.plugins.yaml",
"version": "232.8660.185",
"rules": [
{
"id": "YAMLIncompatibleTypes",
"shortDescription": {
"text": "Suspicious type mismatch"
},
"fullDescription": {
"text": "Reports a mismatch between a scalar value type in YAML file and types of the values in the similar positions. Example: 'myElements:\n - value1\n - value2\n - false # <- reported, because it is a boolean value, while other values are strings'",
"markdown": "Reports a mismatch between a scalar value type in YAML file and types of the values in the similar positions.\n\n**Example:**\n\n\n myElements:\n - value1\n - value2\n - false # <- reported, because it is a boolean value, while other values are strings\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "YAMLIncompatibleTypes",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "YAML",
"index": 176,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "YAMLUnresolvedAlias",
"shortDescription": {
"text": "Unresolved alias"
},
"fullDescription": {
"text": "Reports unresolved aliases in YAML files. Example: 'some_key: *unknown_alias'",
"markdown": "Reports unresolved aliases in YAML files.\n\n**Example:**\n\n\n some_key: *unknown_alias\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "YAMLUnresolvedAlias",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "YAML",
"index": 176,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "YAMLDuplicatedKeys",
"shortDescription": {
"text": "Duplicated YAML keys"
},
"fullDescription": {
"text": "Reports duplicated keys in YAML files. Example: 'same_key: some value\n same_key: another value'",
"markdown": "Reports duplicated keys in YAML files.\n\n**Example:**\n\n\n same_key: some value\n same_key: another value\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "YAMLDuplicatedKeys",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "YAML",
"index": 176,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "YAMLSchemaValidation",
"shortDescription": {
"text": "Validation by JSON Schema"
},
"fullDescription": {
"text": "Reports inconsistencies between a YAML file and a JSON Schema if the schema is specified. Scheme example: '{\n \"properties\": {\n \"SomeNumberProperty\": {\n \"type\": \"number\"\n }\n }\n }' The following is an example with the corresponding warning: 'SomeNumberProperty: hello world'",
"markdown": "Reports inconsistencies between a YAML file and a JSON Schema if the schema is specified.\n\n**Scheme example:**\n\n\n {\n \"properties\": {\n \"SomeNumberProperty\": {\n \"type\": \"number\"\n }\n }\n }\n\n**The following is an example with the corresponding warning:**\n\n\n SomeNumberProperty: hello world\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "YAMLSchemaValidation",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "YAML",
"index": 176,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "YAMLSchemaDeprecation",
"shortDescription": {
"text": "Deprecated YAML key"
},
"fullDescription": {
"text": "Reports deprecated keys in YAML files. Deprecation is checked only if there exists a JSON schema associated with the corresponding YAML file. Note that the deprecation mechanism is not defined in the JSON Schema specification yet, and this inspection uses a non-standard 'deprecationMessage' extension. Scheme deprecation example: '{\n \"properties\": {\n \"SomeDeprecatedProperty\": {\n \"deprecationMessage\": \"Baz\",\n \"description\": \"Foo bar\"\n }\n }\n }' The following is an example with the corresponding warning: 'SomeDeprecatedProperty: some value'",
"markdown": "Reports deprecated keys in YAML files.\n\nDeprecation is checked only if there exists a JSON schema associated with the corresponding YAML file.\n\nNote that the deprecation mechanism is not defined in the JSON Schema specification yet,\nand this inspection uses a non-standard `deprecationMessage` extension.\n\n**Scheme deprecation example:**\n\n\n {\n \"properties\": {\n \"SomeDeprecatedProperty\": {\n \"deprecationMessage\": \"Baz\",\n \"description\": \"Foo bar\"\n }\n }\n }\n\n**The following is an example with the corresponding warning:**\n\n\n SomeDeprecatedProperty: some value\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "YAMLSchemaDeprecation",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "YAML",
"index": 176,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "YAMLRecursiveAlias",
"shortDescription": {
"text": "Recursive alias"
},
"fullDescription": {
"text": "Reports recursion in YAML aliases. Alias can't be recursive and be used inside the data referenced by a corresponding anchor. Example: 'some_key: &some_anchor\n sub_key1: value1\n sub_key2: *some_anchor'",
"markdown": "Reports recursion in YAML aliases.\n\nAlias can't be recursive and be used inside the data referenced by a corresponding anchor.\n\n**Example:**\n\n\n some_key: &some_anchor\n sub_key1: value1\n sub_key2: *some_anchor\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "YAMLRecursiveAlias",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "YAML",
"index": 176,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "YAMLUnusedAnchor",
"shortDescription": {
"text": "Unused anchor"
},
"fullDescription": {
"text": "Reports unused anchors. Example: 'some_key: &some_anchor\n key1: value1'",
"markdown": "Reports unused anchors.\n\n**Example:**\n\n\n some_key: &some_anchor\n key1: value1\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "YAMLUnusedAnchor",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "YAML",
"index": 176,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "Lombook Plugin",
"version": "232.8660.185",
"rules": [
{
"id": "SpringQualifierCopyableLombok",
"shortDescription": {
"text": "@Qualifier not copyable by lombok"
},
"fullDescription": {
"text": "Reports Spring '@Qualifier' annotations on class fields that are ignored by the corresponding Lombok '@RequiredArgsConstructor' and '@AllArgsConstructor' annotations. The generated constructors will not receive the '@Qualifier' annotation without a 'lombok.copyableAnnotations' definition inside the 'lombok.config' file.",
"markdown": "Reports Spring `@Qualifier` annotations on class fields that are ignored by the corresponding Lombok `@RequiredArgsConstructor` and `@AllArgsConstructor` annotations. The generated constructors will not receive the `@Qualifier` annotation without a `lombok.copyableAnnotations` definition inside the `lombok.config` file."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringQualifierCopyableLombok",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Lombok",
"index": 177,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantSlf4jDefinition",
"shortDescription": {
"text": "@Slf4j"
},
"fullDescription": {
"text": "Reports explicitly defined Slf4j Loggers. The '@Slf4j' annotation can be used instead.",
"markdown": "Reports explicitly defined *Slf4j* Loggers. The `@Slf4j` annotation can be used instead."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantSlf4jDefinition",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Lombok/Redundant definitions",
"index": 210,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "Lombok",
"shortDescription": {
"text": "Lombok annotations"
},
"fullDescription": {
"text": "Offers general inspections for Lombok annotations.",
"markdown": "Offers general inspections for Lombok annotations."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "Lombok",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Lombok",
"index": 177,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DeprecatedLombok",
"shortDescription": {
"text": "Deprecated Lombok annotations"
},
"fullDescription": {
"text": "Reports deprecated Lombok annotations and suggests quick-fixes to replace them with the ones promoted to the main package.",
"markdown": "Reports deprecated Lombok annotations and suggests quick-fixes to replace them with the ones promoted to the main package."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "DeprecatedLombok",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Lombok",
"index": 177,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantModifiersUtilityClassLombok",
"shortDescription": {
"text": "@UtilityClass modifiers"
},
"fullDescription": {
"text": "Reports unneeded modifiers for classes annotated with '@UtilityClass'.",
"markdown": "Reports unneeded modifiers for classes annotated with `@UtilityClass`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantModifiersUtilityClassLombok",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Lombok/Redundant modifiers",
"index": 244,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantModifiersValLombok",
"shortDescription": {
"text": "Unnecessary final before 'val'"
},
"fullDescription": {
"text": "Reports unneeded 'final' modifiers before 'val'.",
"markdown": "Reports unneeded `final` modifiers before `val`."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantModifiersValLombok",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Lombok/Redundant modifiers",
"index": 244,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LombokGetterMayBeUsed",
"shortDescription": {
"text": "Lombok @Getter may be used"
},
"fullDescription": {
"text": "Reports standard getter method that can be replaced by the lombok '@Getter' annotation. Example: 'import java.util.Date;\n\n public class MyClass {\n /**\n * The process date.\n */\n private Date processDate;\n\n /**\n * Returns the date.\n *\n * @return The date\n */\n public Date getProcessDate() {\n return processDate;\n }\n }' After the quick-fix/cleanup is applied: 'import lombok.Getter;\n import java.util.Date;\n\n @Getter\n public class MyClass {\n /**\n * The process date.\n * -- GETTER --\n * Returns the date.\n *\n * @return The date\n */\n private Date processDate;\n }' It only reports when the lombok library is configured. To unlombok, see the lombok site. New in 2023.2",
"markdown": "Reports standard getter method that can be replaced by the lombok `@Getter` annotation.\n\nExample:\n\n\n import java.util.Date;\n\n public class MyClass {\n /**\n * The process date.\n */\n private Date processDate;\n\n /**\n * Returns the date.\n *\n * @return The date\n */\n public Date getProcessDate() {\n return processDate;\n }\n }\n\nAfter the quick-fix/cleanup is applied:\n\n\n import lombok.Getter;\n import java.util.Date;\n\n @Getter\n public class MyClass {\n /**\n * The process date.\n * -- GETTER --\n * Returns the date.\n *\n * @return The date\n */\n private Date processDate;\n }\n\nIt only reports when the lombok library is configured. To unlombok, see the lombok site.\n\nNew in 2023.2"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LombokGetterMayBeUsed",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Verbose or redundant code constructs",
"index": 89,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "RedundantModifiersValueLombok",
"shortDescription": {
"text": "@Value modifiers"
},
"fullDescription": {
"text": "Reports unneeded modifiers for classes annotated with '@Value'.",
"markdown": "Reports unneeded modifiers for classes annotated with `@Value`."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "RedundantModifiersValueLombok",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/Lombok/Redundant modifiers",
"index": 244,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.jetbrains.restClient",
"version": "232.8660.185",
"rules": [
{
"id": "HttpRequestContentLengthIsIgnored",
"shortDescription": {
"text": "Redundant 'Content-Length'"
},
"fullDescription": {
"text": "Reports an explicitly set 'Content-Length' header. The header is redundant because HTTP Client uses the actual request body length.",
"markdown": "Reports an explicitly set `Content-Length` header. The header is redundant because HTTP Client uses the actual request body length."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "HttpRequestContentLengthIsIgnored",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "HTTP Client",
"index": 180,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HttpClientUnresolvedVariable",
"shortDescription": {
"text": "Unresolved environment variable"
},
"fullDescription": {
"text": "Reports variables undeclared in the current environment HTTP Client. Executing requests with undeclared variables probably fail. Consider adding a variable to the environment or selecting an environment with this variable. Inspection doesn't report variables in request bodies, because it can be a valid syntax of the body. Some variables may be not reported as unresolved, because they are declared in response or pre-request handler scripts via 'client.global.set' or 'request.variables.set' functions call.",
"markdown": "Reports variables undeclared in the current environment HTTP Client.\n\n\nExecuting requests with undeclared variables probably fail.\nConsider adding a variable to the environment or selecting an environment with this variable.\n\nInspection doesn't report variables in request bodies, because it can be a valid syntax of the body.\n\n\nSome variables may be not reported as unresolved, because they are declared in response or pre-request handler scripts via\n`client.global.set` or `request.variables.set` functions call."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "HttpClientUnresolvedVariable",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "HTTP Client",
"index": 180,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "IncorrectHttpHeaderInspection",
"shortDescription": {
"text": "Incorrect HTTP header"
},
"fullDescription": {
"text": "Reports unknown HTTP headers that do not match any publicly known headers. The quick fix suggests adding the header to the list of custom headers when the Use custom HTTP headers option is enabled. HTTP headers from the list of custom headers will not trigger the inspection.",
"markdown": "Reports unknown HTTP headers that do not match any [publicly\nknown headers](https://www.iana.org/assignments/message-headers/message-headers.xml). The quick fix suggests adding the header to the list of custom headers when the **Use custom HTTP headers** option\nis enabled. HTTP headers from the list of custom headers will not trigger the inspection."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "IncorrectHttpHeaderInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "HTTP Client",
"index": 180,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HttpUrlsUsage",
"shortDescription": {
"text": "Link with unencrypted protocol"
},
"fullDescription": {
"text": "Reports the links that use unencrypted protocols (such as HTTP), which can expose your data to man-in-the-middle attacks. These attacks are dangerous in general and may be especially harmful for artifact repositories. Use protocols with encryption, such as HTTPS, instead. See HTTPS: Difference from HTTP (wikipedia.org).",
"markdown": "Reports the links that use unencrypted protocols (such as HTTP), which can expose your data to man-in-the-middle attacks. These attacks\nare dangerous in general and may be especially harmful for artifact repositories. Use protocols with encryption, such as HTTPS,\ninstead.\n\nSee [HTTPS: Difference from HTTP (wikipedia.org)](https://en.wikipedia.org/wiki/HTTPS#Difference_from_HTTP)."
},
"defaultConfiguration": {
"enabled": true,
"level": "note",
"parameters": {
"suppressToolId": "HttpUrlsUsage",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Security",
"index": 154,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HttpRequestPlaceholder",
"shortDescription": {
"text": "'$placeholder' in HTTP Request"
},
"fullDescription": {
"text": "Reports a '$placeholder' inside a request. A '$placeholder' to be replaced by the user is created automatically when a tool cannot recognize a part of a request. For example, a request mapping '/aaaa/*/bbb' will be generated as 'GET localhost/aaaa/{{$placeholder}}/bbb'.",
"markdown": "Reports a `$placeholder` inside a request.\n\nA `$placeholder` to be replaced by the user is created automatically when a tool cannot recognize a part of a request. For example, a request mapping `/aaaa/*/bbb` will be generated as `GET localhost/aaaa/{{$placeholder}}/bbb`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "HttpRequestPlaceholder",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "HTTP Client",
"index": 180,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "HttpRequestWhitespaceInsideRequestTargetPath",
"shortDescription": {
"text": "Whitespace in URL"
},
"fullDescription": {
"text": "Highlights spaces inside URL path segments. HTTP Client will ignore them. For better composing use Split Lines action.",
"markdown": "Highlights spaces inside URL path segments. HTTP Client will ignore them. For better composing use Split Lines action."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "HttpRequestWhitespaceInsideRequestTargetPath",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "HTTP Client",
"index": 180,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.cdi",
"version": "232.8660.185",
"rules": [
{
"id": "CdiManagedBeanInconsistencyInspection",
"shortDescription": {
"text": "Incorrect managed bean definition"
},
"fullDescription": {
"text": "Reports incorrect bean definition rules. Top-level Java class can be a simple bean if: It is not a parameterized type. It is not a non-static inner class. It is a concrete class, or is annotated with '@Decorator'. It has an appropriate constructor: either the class has a constructor with no parameters, or the class declares a constructor annotated with '@Initializer'. It does not implement any of the following interfaces: 'javax.servlet.Servlet', 'javax.servlet.Filter', 'javax.servlet.ServletContextListener', 'javax.servlet.http.HttpSessionListener', 'javax.servlet.ServletRequestListener', 'javax.ejb.EnterpriseBean'. It does not extend 'javax.faces.component.UIComponent'.",
"markdown": "Reports incorrect bean definition rules.\n\nTop-level Java class can be a simple bean if:\n\n* It is not a parameterized type.\n* It is not a non-static inner class.\n* It is a concrete class, or is annotated with `@Decorator`.\n* It has an appropriate constructor: either the class has a constructor with no parameters, or the class declares a constructor annotated with `@Initializer`.\n* It does not implement any of the following interfaces: `javax.servlet.Servlet`, `javax.servlet.Filter`, `javax.servlet.ServletContextListener`, `javax.servlet.http.HttpSessionListener`, `javax.servlet.ServletRequestListener`, `javax.ejb.EnterpriseBean`.\n* It does not extend `javax.faces.component.UIComponent`."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "CdiManagedBeanInconsistencyInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "CDI (Contexts and Dependency Injection)",
"index": 189,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CdiDecoratorInspection",
"shortDescription": {
"text": "Incorrect @Decorator class"
},
"fullDescription": {
"text": "Reports incorrect '@Decorator' bean definitions. Cannot be final. Must have exactly one delegate attribute (field or parameter) annotated with '@Delegate'.",
"markdown": "Reports incorrect `@Decorator` bean definitions.\n\n* Cannot be final.\n* Must have exactly one delegate attribute (field or parameter) annotated with `@Delegate`."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "CdiDecoratorInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "CDI (Contexts and Dependency Injection)",
"index": 189,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CdiSpecializesInspection",
"shortDescription": {
"text": "Incorrect @Specializes usage"
},
"fullDescription": {
"text": "Reports incorrect usages of the '@Specializes' annotation. Specializing bean must extend another bean Specializing method must override a '@Produces' method of its direct superclass '@Named' annotation cannot be used on the specializing and specialized class Two or more classes cannot specialize the same superclass Specializing method cannot be static",
"markdown": "Reports incorrect usages of the `@Specializes` annotation.\n\n* Specializing bean must extend another bean\n* Specializing method must override a `@Produces` method of its direct superclass\n* `@Named` annotation cannot be used on the specializing and specialized class\n* Two or more classes cannot specialize the same superclass\n* Specializing method cannot be static"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "CdiSpecializesInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "CDI (Contexts and Dependency Injection)",
"index": 189,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CdiObservesInspection",
"shortDescription": {
"text": "Incorrect observer method"
},
"fullDescription": {
"text": "Reports incorrect observer method definitions. Must contain only one '@Observes' parameter Cannot have parameters annotated with '@Disposes' Cannot be annotated with '@Inject' and '@Produces'",
"markdown": "Reports incorrect observer method definitions.\n\n* Must contain only one `@Observes` parameter\n* Cannot have parameters annotated with `@Disposes`\n* Cannot be annotated with `@Inject` and `@Produces`"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "CdiObservesInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "CDI (Contexts and Dependency Injection)",
"index": 189,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CdiStereotypeInspection",
"shortDescription": {
"text": "Incorrect @Stereotype annotation class"
},
"fullDescription": {
"text": "Reports incorrect '@Stereotype' annotation classes: Non-empty '@Named' annotation is not allowed for stereotypes Qualifier annotations are not allowed for stereotypes",
"markdown": "Reports incorrect `@Stereotype` annotation classes:\n\n* Non-empty `@Named` annotation is not allowed for stereotypes\n* Qualifier annotations are not allowed for stereotypes"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "CdiStereotypeInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "CDI (Contexts and Dependency Injection)",
"index": 189,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CdiUnknownProducersForDisposerMethodInspection",
"shortDescription": {
"text": "Disposer method parameter without producers"
},
"fullDescription": {
"text": "Reports disposer methods without the corresponding producer method. Each disposer method must have exactly one disposed parameter of the same type as the corresponding producer method or the producer field return type. When searching the disposer methods for a producer method or producer field, the container considers the type and qualifiers of the disposed parameter. If the disposed parameter resolves to a producer method or producer field declared by the same bean class, the container must call this method when destroying any instance returned by that producer method or producer field.",
"markdown": "Reports disposer methods without the corresponding producer method.\n\nEach disposer method must have exactly one disposed parameter of the same type as the corresponding producer method or\nthe producer field return type. When searching the disposer methods for a producer method or producer field, the container\nconsiders the type and qualifiers of the disposed parameter. If the disposed parameter resolves to a producer method or\nproducer field declared by the same bean class, the container must call this method when destroying any instance returned by\nthat producer method or producer field."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "CdiUnknownProducersForDisposerMethodInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "CDI (Contexts and Dependency Injection)",
"index": 189,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CdiTypedAnnotationInspection",
"shortDescription": {
"text": "Incorrect @Typed annotation usage"
},
"fullDescription": {
"text": "Reports '@Typed' annotation usages that violate the following rules: Only producer methods can have the '@Typed' annotation Bean type must correspond to the types mentioned in the '@Typed' annotation",
"markdown": "Reports `@Typed` annotation usages that violate the following rules:\n\n* Only producer methods can have the `@Typed` annotation\n* Bean type must correspond to the types mentioned in the `@Typed` annotation"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "CdiTypedAnnotationInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "CDI (Contexts and Dependency Injection)",
"index": 189,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CdiDomBeans",
"shortDescription": {
"text": "Incorrect bean definitions in beans.xml"
},
"fullDescription": {
"text": "Reports incorrect bean definitions in 'beans.xml' configuration files.",
"markdown": "Reports incorrect bean definitions in `beans.xml` configuration files."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "CdiDomBeans",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "CDI (Contexts and Dependency Injection)",
"index": 189,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CdiDisposerMethodInspection",
"shortDescription": {
"text": "Incorrect disposer method"
},
"fullDescription": {
"text": "Reports incorrect disposer methods. Cannot be abstract. Must have exactly only one disposed parameter annotated with '@Disposes'.",
"markdown": "Reports incorrect disposer methods.\n\n* Cannot be abstract.\n* Must have exactly only one disposed parameter annotated with `@Disposes`."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "CdiDisposerMethodInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "CDI (Contexts and Dependency Injection)",
"index": 189,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CdiScopeInspection",
"shortDescription": {
"text": "Incorrect bean scope"
},
"fullDescription": {
"text": "Reports incorrect bean scopes: Singleton bean must be either '@ApplicationScoped' or '@Dependent' Session stateless bean must be '@Dependent'",
"markdown": "Reports incorrect bean scopes:\n\n* Singleton bean must be either `@ApplicationScoped` or `@Dependent`\n* Session stateless bean must be `@Dependent`"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "CdiScopeInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "CDI (Contexts and Dependency Injection)",
"index": 189,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CdiAlternativeInspection",
"shortDescription": {
"text": "Vetoed @Alternative bean"
},
"fullDescription": {
"text": "Reports vetoed '@Alternative' beans. A bean is considered vetoed when it is annotated with '@Vetoed' or it is declared in a vetoed package.",
"markdown": "Reports vetoed `@Alternative` beans.\nA bean is considered vetoed when it is annotated with `@Vetoed` or it is declared in a vetoed package."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "CdiAlternativeInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "CDI (Contexts and Dependency Injection)",
"index": 189,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CdiStereotypeRestrictionsInspection",
"shortDescription": {
"text": "Bean has collision of scope in stereotypes"
},
"fullDescription": {
"text": "Reports classes with multiple stereotypes in different scopes or if a scope is not specified",
"markdown": "Reports classes with multiple stereotypes in different scopes or if a scope is not specified"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "CdiStereotypeRestrictionsInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "CDI (Contexts and Dependency Injection)",
"index": 189,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CdiInjectionPointsInspection",
"shortDescription": {
"text": "Injection point with ambiguous dependencies"
},
"fullDescription": {
"text": "Reports injection points in bean classes that have ambiguous dependencies. Example: 'interface Engine {}\n\n @Singleton\n class GasEngine implements Engine {}\n\n @Singleton\n class ElectricEngine implements Engine {}\n\n @Singleton\n class Car {\n @Inject Engine engine; // Ambiguous dependency: there are multiple beans that match the injection point\n }'",
"markdown": "Reports injection points in bean classes that have ambiguous dependencies.\n\n**Example:**\n\n\n interface Engine {}\n\n @Singleton\n class GasEngine implements Engine {}\n\n @Singleton\n class ElectricEngine implements Engine {}\n\n @Singleton\n class Car {\n @Inject Engine engine; // Ambiguous dependency: there are multiple beans that match the injection point\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "CdiInjectionPointsInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "CDI (Contexts and Dependency Injection)",
"index": 189,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CdiNormalScopeInspection",
"shortDescription": {
"text": "Bean with non-default scope declares public fields"
},
"fullDescription": {
"text": "Reports managed beans with public instance fields that are not in the default '@Dependent' scope. According to the CDI specification, contextual scopes ('@RequestScoped', '@ApplicationScoped', '@SessionScoped', and 'ConversationScoped') are not allowed for managed beans with public instance fields. Example: '@ApplicationScoped // Warning: Bean with non-default scope must not have public fields\n class Car {\n public String engine;\n }'",
"markdown": "Reports managed beans with public instance fields that are not in the default `@Dependent` scope.\nAccording to the CDI specification, contextual scopes\n(`@RequestScoped`, `@ApplicationScoped`, `@SessionScoped`, and `ConversationScoped`)\nare not allowed for managed beans with public instance fields.\n\n**Example:**\n\n\n @ApplicationScoped // Warning: Bean with non-default scope must not have public fields\n class Car {\n public String engine;\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "CdiNormalScopeInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "CDI (Contexts and Dependency Injection)",
"index": 189,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CdiInterceptorInspection",
"shortDescription": {
"text": "@Interceptor class without binding types"
},
"fullDescription": {
"text": "Reports '@Interceptor' classes without binding types. An interceptor must specify at least one interceptor binding.",
"markdown": "Reports `@Interceptor` classes without binding types. An interceptor must specify at least one interceptor binding."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "CdiInterceptorInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "CDI (Contexts and Dependency Injection)",
"index": 189,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CdiInjectInspection",
"shortDescription": {
"text": "Incorrect dependency injection place"
},
"fullDescription": {
"text": "Reports incorrect injection points: fields, methods, and parameters annotated with '@Inject' that violate the CDI specification. Requirements for fields: Cannot be static or final Cannot be annotated with '@Produces' Requirements for methods with injection: Cannot be static or abstract Cannot have parameters with '@Disposes' and '@Observes' annotations",
"markdown": "Reports incorrect injection points: fields, methods, and parameters annotated with `@Inject` that violate the CDI specification.\n\nRequirements for fields:\n\n* Cannot be static or final\n* Cannot be annotated with `@Produces`\n\nRequirements for methods with injection:\n\n* Cannot be static or abstract\n* Cannot have parameters with `@Disposes` and `@Observes` annotations"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "CdiInjectInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "CDI (Contexts and Dependency Injection)",
"index": 189,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CdiUnproxyableBeanTypesInspection",
"shortDescription": {
"text": "Incorrect usage of bean type that cannot be proxied"
},
"fullDescription": {
"text": "Reports incorrect usages of bean types that cannot be proxied. The container can't proxy certain legal bean types: classes which don't have a non-private constructor with no parameters, classes which are declared final, or have final methods, primitive types, and array types. The inspection reports the following violations for such bean types: Managed bean declaring a passivating scope must be 'java.io.Serializable' Bean of non-serializable type cannot be injected into a bean of passivating scope The container must be able to proxy tha injected normal scoped bean",
"markdown": "Reports incorrect usages of bean types that cannot be proxied.\n\nThe container can't proxy certain legal bean types:\nclasses which don't have a non-private constructor with no parameters,\nclasses which are declared final,\nor have final methods, primitive types, and array types.\n\nThe inspection reports the following violations for such bean types:\n\n* Managed bean declaring a passivating scope must be `java.io.Serializable`\n* Bean of non-serializable type cannot be injected into a bean of passivating scope\n* The container must be able to proxy tha injected normal scoped bean"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "CdiUnproxyableBeanTypesInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "CDI (Contexts and Dependency Injection)",
"index": 189,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.microservices.jvm",
"version": "232.8660.185",
"rules": [
{
"id": "UastIncorrectMimeTypeInspection",
"shortDescription": {
"text": "Incorrect MIME Type declaration"
},
"fullDescription": {
"text": "Reports incorrect MIME types (for example, in 'Content-Type' strings) for HTTP servers and clients.",
"markdown": "Reports incorrect MIME types (for example, in `Content-Type` strings) for HTTP servers and clients."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "UastIncorrectMimeTypeInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "JVM languages",
"index": 47,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UastIncorrectHttpHeaderInspection",
"shortDescription": {
"text": "Unknown HTTP header"
},
"fullDescription": {
"text": "Reports unknown HTTP headers that do not match any publicly known headers. The quick fix suggests adding the header to the list of custom headers to avoid triggering this inspection in the future. Custom HTTP headers are listed for the inspection with the same name in the HTTP Client group.",
"markdown": "Reports unknown HTTP headers that do not match any [publicly\nknown headers](https://www.iana.org/assignments/message-headers/message-headers.xml). The quick fix suggests adding the header to the list of custom headers to avoid triggering this inspection in the\nfuture.\n\nCustom HTTP headers are listed for the inspection with the same name in the HTTP Client group."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "UastIncorrectHttpHeaderInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JVM languages",
"index": 47,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "intellij.webpack",
"version": "232.8660.185",
"rules": [
{
"id": "WebpackConfigHighlighting",
"shortDescription": {
"text": "Webpack config compliance with JSON Schema"
},
"fullDescription": {
"text": "Validates options in webpack config files (which name should start with `webpack`, e.g. `webpack.config.js`) against webpack options schema. Disable this inspection to turn off validation and code completion inside the configuration object.",
"markdown": "Validates options in webpack config files (which name should start with \\`webpack\\`, e.g. \\`webpack.config.js\\`) against [webpack options schema](https://github.com/webpack/webpack/blob/master/schemas/WebpackOptions.json). \n\nDisable this inspection to turn off validation and code completion inside the configuration object."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "WebpackConfigHighlighting",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/General",
"index": 40,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.grpc",
"version": "232.8660.185",
"rules": [
{
"id": "GrpcSchemes",
"shortDescription": {
"text": "GRPC request schema can be substituted or omitted"
},
"fullDescription": {
"text": "Reports unnecessary `grpc` or standard `http[s]` schemes usage in gRPC requests Example requests: '# `grpc` scheme may be omitted since insecure connection is assumed by default\nGRPC grpc://localhost/TestService/testRpc\n\n# `http` scheme may be omitted: prefer empty schema for insecure connection an a dedicated `grpcs` schema for a secure one\nGRPC http://localhost/TestService/testRpc\n\n# `https` scheme should be replaced by `grpcs`: prefer a dedicated `grpcs` schema to indicate that transport layer security should be enabled to execute the request\nGRPC https://localhost/TestService/testRpc' To avoid confusion, it is recommended to use dedicated `grpcs` scheme in a gRPC request, when the request should use secure channel underneath. Otherwise, the schema might be completely omitted",
"markdown": "Reports unnecessary \\`grpc\\` or standard \\`http\\[s\\]\\` schemes usage in gRPC requests\n\n\nExample requests:\n\n\n # `grpc` scheme may be omitted since insecure connection is assumed by default\n GRPC grpc://localhost/TestService/testRpc\n\n # `http` scheme may be omitted: prefer empty schema for insecure connection an a dedicated `grpcs` schema for a secure one\n GRPC http://localhost/TestService/testRpc\n\n # `https` scheme should be replaced by `grpcs`: prefer a dedicated `grpcs` schema to indicate that transport layer security should be enabled to execute the request\n GRPC https://localhost/TestService/testRpc\n\nTo avoid confusion, it is recommended to use dedicated \\`grpcs\\` scheme in a gRPC request, when the request should use secure channel\nunderneath. Otherwise, the schema might be completely omitted"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "GrpcSchemes",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "GRPC requests validity",
"index": 198,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.spring.boot",
"version": "232.8660.185",
"rules": [
{
"id": "ConfigurationProperties",
"shortDescription": {
"text": "Invalid @ConfigurationProperties"
},
"fullDescription": {
"text": "Reports invalid prefixes defined in the '@ConfigurationProperties' annotations: Missing prefix Empty prefix Duplicate prefix Prefix in notation other than kebab-case The inspection triggers in classes that are annotated with '@ConfigurationProperties' and not registered via '@EnableConfigurationProperties', marked as Spring component, or scanned via '@ConfigurationPropertiesScan'. This inspection only triggers in classes annotated with '@ConfigurationProperties' that are not scanned via '@ConfigurationPropertiesScan' when the Spring Boot version for the project or module is set to 2.2.0 or later. New in 2018.3",
"markdown": "Reports invalid prefixes defined in the `@ConfigurationProperties` annotations:\n\n* Missing prefix\n* Empty prefix\n* Duplicate prefix\n* Prefix in notation other than kebab-case\n\n\nThe inspection triggers in classes that are annotated with `@ConfigurationProperties` and not registered via `@EnableConfigurationProperties`,\nmarked as Spring component, or scanned via `@ConfigurationPropertiesScan`.\n\n\nThis inspection only triggers in classes annotated with `@ConfigurationProperties` that are not scanned via `@ConfigurationPropertiesScan`\nwhen the Spring Boot version for the project or module is set to 2.2.0 or later.\n\nNew in 2018.3"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "ConfigurationProperties",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Boot",
"index": 199,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringBootApplicationYaml",
"shortDescription": {
"text": "Invalid YAML configuration"
},
"fullDescription": {
"text": "Reports unresolved and deprecated configuration keys and invalid values in Spring Boot application '.yaml' configuration files, which can lead to runtime errors. Example: 'server:\n port: invalid # Reports 'Cannot convert 'invalid' to java.lang.Integer'' If a deprecated configuration key has a replacement key, you can apply the 'Use replacement key' quick-fix. Example: 'logging:\n path: ${path} # Reports 'Deprecated configuration property 'logging.path''' After the quick-fix is applied: 'logging:\n file:\n path: ${path}' If a configuration key is not defined in 'spring-configuration-metadata.json', you can apply the 'Define configuration key' quick-fix that creates the 'META-INF/spring-additional-configuration-metadata.json' file and defines the necessary key. Example: 'new:\n key: value # Reports 'Cannot resolve configuration property 'new.key''' After the quick-fix is applied, the following is added to 'META-INF/spring-additional-configuration-metadata.json': '{\n \"properties\": [\n {\n \"name\": \"new.key\",\n \"type\": \"java.lang.String\",\n \"description\": \"Description for new.key.\"\n }\n] }' Use the Replacement tokens option to define tokens used for value placeholders in configuration files. These tokens are specified in the form 'beginToken*endToken'. Without the '*', the token is assumed to be the same for start and end. For example, the default is '@' for both start and end token, which enables you to define placeholders, such as 'some.property=@another.property@'. Values inside the replacement token ('@property.key@') will not be highlighted.",
"markdown": "Reports unresolved and deprecated configuration keys and invalid values in Spring Boot application `.yaml` configuration files,\nwhich can lead to runtime errors.\n\n**Example:**\n\n\n server:\n port: invalid # Reports 'Cannot convert 'invalid' to java.lang.Integer'\n\nIf a deprecated configuration key has a replacement key, you can apply the 'Use replacement key' quick-fix.\n\n**Example:**\n\n\n logging:\n path: ${path} # Reports 'Deprecated configuration property 'logging.path''\n\nAfter the quick-fix is applied:\n\n\n logging:\n file:\n path: ${path}\n\n\nIf a configuration key is not defined in `spring-configuration-metadata.json`, you can apply the 'Define configuration key' quick-fix\nthat creates the `META-INF/spring-additional-configuration-metadata.json` file and defines the necessary key.\n\n**Example:**\n\n\n new:\n key: value # Reports 'Cannot resolve configuration property 'new.key''\n\nAfter the quick-fix is applied, the following is added to `META-INF/spring-additional-configuration-metadata.json`:\n\n\n {\n \"properties\": [\n {\n \"name\": \"new.key\",\n \"type\": \"java.lang.String\",\n \"description\": \"Description for new.key.\"\n }\n ] }\n\n\nUse the **Replacement tokens** option to define tokens used for value placeholders in configuration files.\nThese tokens are specified in the form `beginToken*endToken`.\nWithout the `*`, the token is assumed to be the same for start and end.\n\n\nFor example, the default is `@` for both start and end token,\nwhich enables you to define placeholders, such as `some.property=@another.property@`.\n\nValues inside the replacement token (`@property.key@`) will not be highlighted."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringBootApplicationYaml",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Boot",
"index": 199,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringBootApplicationSetup",
"shortDescription": {
"text": "Invalid Spring Boot application setup"
},
"fullDescription": {
"text": "Reports '@SpringBootApplication' in the default package and redundant '@EnableAutoConfiguration' or '@ComponentScan' annotations. The quick-fix removes the redundant annotations. Example: '@SpringBootApplication\n@ComponentScan // Reports 'Redundant declaration: @SpringBootApplication already implies @ComponentScan'\npublic class DemoApplication {\n public static void main(String[] args) {\n SpringApplication.run(DemoApplication.class, args);\n }\n}' After the quick-fix is applied: '@SpringBootApplication\n public class DemoApplication {\n public static void main(String[] args) {\n SpringApplication.run(DemoApplication.class, args);\n }\n }' New in 2018.2",
"markdown": "Reports `@SpringBootApplication` in the default package and redundant `@EnableAutoConfiguration` or `@ComponentScan` annotations.\n\nThe quick-fix removes the redundant annotations.\n\n**Example:**\n\n\n @SpringBootApplication\n @ComponentScan // Reports 'Redundant declaration: @SpringBootApplication already implies @ComponentScan'\n public class DemoApplication {\n public static void main(String[] args) {\n SpringApplication.run(DemoApplication.class, args);\n }\n }\n\nAfter the quick-fix is applied:\n\n\n @SpringBootApplication\n public class DemoApplication {\n public static void main(String[] args) {\n SpringApplication.run(DemoApplication.class, args);\n }\n }\n\nNew in 2018.2"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringBootApplicationSetup",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Boot",
"index": 199,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringBootAdditionalConfig",
"shortDescription": {
"text": "Invalid additional-spring-configuration-metadata.json"
},
"fullDescription": {
"text": "Reports missing and deprecated properties, unresolved references, and invalid values in the 'additional-spring-configuration-metadata.json' configuration file. Example: '{\n \"properties\": [\n {\n \"name\": \"old.key\",\n \"type\": \"com.Unknown\", // Reports 'Cannot resolve class 'Unknown''\n \"description\": \"Description for old.key\", // Reports 'Text should end with '.''\n \"deprecation\": {\n \"replacement\": \"new.key\", // Reports 'Cannot resolve configuration key reference 'new.key''\n \"reason\": \"Reason\", // Reports 'Text should end with '.''\n \"level\": \"warning\"\n }\n },\n {\n \"name\": \"duplicate\", // Reports 'Duplicate entry for 'duplicate''\n \"type\": \"java.lang.String\"\n },\n {\n \"name\": \"duplicate\", // Reports 'Duplicate entry for 'duplicate''\n \"type\": \"java.lang.String\"\n },\n {\n // Reports 'Missing required 'name''\n \"type\": \"java.lang.String\"\n }\n ]\n }'",
"markdown": "Reports missing and deprecated properties, unresolved references, and invalid values\nin the `additional-spring-configuration-metadata.json` configuration file.\n\n**Example:**\n\n\n {\n \"properties\": [\n {\n \"name\": \"old.key\",\n \"type\": \"com.Unknown\", // Reports 'Cannot resolve class 'Unknown''\n \"description\": \"Description for old.key\", // Reports 'Text should end with '.''\n \"deprecation\": {\n \"replacement\": \"new.key\", // Reports 'Cannot resolve configuration key reference 'new.key''\n \"reason\": \"Reason\", // Reports 'Text should end with '.''\n \"level\": \"warning\"\n }\n },\n {\n \"name\": \"duplicate\", // Reports 'Duplicate entry for 'duplicate''\n \"type\": \"java.lang.String\"\n },\n {\n \"name\": \"duplicate\", // Reports 'Duplicate entry for 'duplicate''\n \"type\": \"java.lang.String\"\n },\n {\n // Reports 'Missing required 'name''\n \"type\": \"java.lang.String\"\n }\n ]\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringBootAdditionalConfig",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Boot",
"index": 199,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringBootReactorHooksOnDebug",
"shortDescription": {
"text": "Suspicious Hooks.onOperatorDebug() usage"
},
"fullDescription": {
"text": "Reports the usage of 'Hooks.onOperatorDebug()' when 'ReactorDebugAgent.init()' is called. If 'ReactorDebugAgent' is in the classpath, and 'spring.reactor.debug-agent.enabled' is 'true' (default value), 'ReactorDebugAgent.init()' is called automatically at startup. Using both 'Hooks.onOperatorDebug()' and 'ReactorDebugAgent.init()' cause doubled debugging stack frames generated by Reactor. Also, 'Hooks.onOperatorDebug()' can cause performance overhead. The quick-fix removes the invocation of 'Hooks.onOperatorDebug()'. Example: 'public void hook() {\n Hooks.onOperatorDebug(); // Reports 'Call Hooks.onOperatorDebug() while ReactorDebugAgent is initialized'\n }' After the quick-fix is applied: 'public void hook() {\n }' This inspection only triggers when Spring Boot version for the project or module is 2.2.0 or higher.",
"markdown": "Reports the usage of `Hooks.onOperatorDebug()` when `ReactorDebugAgent.init()` is called.\n\n\nIf `ReactorDebugAgent` is in the classpath, and `spring.reactor.debug-agent.enabled`\nis `true` (default value), `ReactorDebugAgent.init()` is called automatically at startup.\nUsing both `Hooks.onOperatorDebug()` and `ReactorDebugAgent.init()` cause doubled debugging stack frames generated by Reactor.\nAlso, `Hooks.onOperatorDebug()` can cause performance overhead.\n\nThe quick-fix removes the invocation of `Hooks.onOperatorDebug()`.\n\n**Example:**\n\n\n public void hook() {\n Hooks.onOperatorDebug(); // Reports 'Call Hooks.onOperatorDebug() while ReactorDebugAgent is initialized'\n }\n\nAfter the quick-fix is applied:\n\n\n public void hook() {\n }\n\nThis inspection only triggers when Spring Boot version for the project or module is 2.2.0 or higher."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringBootReactorHooksOnDebug",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Boot",
"index": 199,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringBootApplicationProperties",
"shortDescription": {
"text": "Invalid properties configuration"
},
"fullDescription": {
"text": "Reports unresolved and deprecated configuration keys and invalid values in Spring Boot application '.properties' configuration files, which can lead to runtime errors. Example: 'server.port=invalid # Reports 'Cannot convert 'invalid' to java.lang.Integer'' If a deprecated configuration key has a replacement key, you can apply the 'Use replacement key' quick-fix. Example: 'logging.path=${path} # Reports 'Deprecated configuration property 'logging.path''' After the quick-fix is applied: 'logging.file.path=${path}' If a configuration key is not defined in 'spring-configuration-metadata.json', you can apply the 'Define configuration key' quick-fix that creates the 'META-INF/spring-additional-configuration-metadata.json' file and defines the necessary key. Example: 'new.key=value #Reports 'Cannot resolve configuration property 'new.key''' After the quick-fix is applied, the following is added to 'META-INF/spring-additional-configuration-metadata.json': '{\n \"properties\": [\n {\n \"name\": \"new.key\",\n \"type\": \"java.lang.String\",\n \"description\": \"Description for new.key.\"\n }\n] }' The inspection also highlights index notation errors in list and map configuration keys. Example: 'spring.datasource.schema[]=${schema} #Reports 'Missing index value'' Use the Replacement tokens option to define tokens used for value placeholders in configuration files. These tokens are specified in the form 'beginToken*endToken'. Without the '*', the token is assumed to be the same for start and end. For example, the default is '@' for both start and end token, which enables you to define placeholders, such as 'some.property=@another.property@'. Values inside the replacement token ('@property.key@') will not be highlighted.",
"markdown": "Reports unresolved and deprecated configuration keys and invalid values in Spring Boot application `.properties` configuration files,\nwhich can lead to runtime errors.\n\n**Example:**\n\n\n server.port=invalid # Reports 'Cannot convert 'invalid' to java.lang.Integer'\n\nIf a deprecated configuration key has a replacement key, you can apply the 'Use replacement key' quick-fix.\n\n**Example:**\n\n\n logging.path=${path} # Reports 'Deprecated configuration property 'logging.path''\n\nAfter the quick-fix is applied:\n\n\n logging.file.path=${path}\n\n\nIf a configuration key is not defined in `spring-configuration-metadata.json`, you can apply the 'Define configuration key' quick-fix\nthat creates the `META-INF/spring-additional-configuration-metadata.json` file and defines the necessary key.\n\n**Example:**\n\n\n new.key=value #Reports 'Cannot resolve configuration property 'new.key''\n\nAfter the quick-fix is applied, the following is added to `META-INF/spring-additional-configuration-metadata.json`:\n\n\n {\n \"properties\": [\n {\n \"name\": \"new.key\",\n \"type\": \"java.lang.String\",\n \"description\": \"Description for new.key.\"\n }\n ] }\n\nThe inspection also highlights index notation errors in list and map configuration keys.\n\n**Example:**\n\n\n spring.datasource.schema[]=${schema} #Reports 'Missing index value'\n\n\nUse the **Replacement tokens** option to define tokens used for value placeholders in configuration files.\nThese tokens are specified in the form `beginToken*endToken`.\nWithout the `*`, the token is assumed to be the same for start and end.\n\n\nFor example, the default is `@` for both start and end token,\nwhich enables you to define placeholders, such as `some.property=@another.property@`.\n\nValues inside the replacement token (`@property.key@`) will not be highlighted."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringBootApplicationProperties",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Boot",
"index": 199,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.jetbrains.sh",
"version": "232.8660.185",
"rules": [
{
"id": "ShellCheck",
"shortDescription": {
"text": "ShellCheck"
},
"fullDescription": {
"text": "Reports shell script bugs detected by the integrated ShellCheck static analysis tool.",
"markdown": "Reports shell script bugs detected by the integrated [ShellCheck](https://github.com/koalaman/shellcheck) static analysis tool."
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "ShellCheck",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Shell script",
"index": 206,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.spring.data",
"version": "232.8660.185",
"rules": [
{
"id": "SpringDataRepositoryMethodReturnTypeInspection",
"shortDescription": {
"text": "Spring Data repository method return type errors"
},
"fullDescription": {
"text": "Reports Spring Data CRUD repository methods with incorrect return types. The following return types are supported: 'void' Primitive types Wrapper types 'T' when the query method is expected to return one result at most. Returns 'null' if there are no results and throws 'IncorrectResultSizeDataAccessException' if there is more than one result. 'java.util.List' or any common 'Iterable' type 'java.util.stream.Stream' 'java.util.Optional' or 'scala.Option' when the query method is expected to return one result at most. Returns 'Optional.empty()' or 'Optional.absent()' if there are no results and throws 'IncorrectResultSizeDataAccessException' if there is more than one result. 'io.micronaut.data.model.Page' 'io.micronaut.data.model.Slice' 'java.util.concurrent.Future', 'java.util.concurrent.CompletableFuture', or 'ListenableFuture' if the method is annotated with '@Async' and Spring asynchronous method execution is enabled 'GeoResults<T>', 'GeoResult<T>', or 'GeoPage<T>'",
"markdown": "Reports Spring Data CRUD repository methods with incorrect return types.\n\nThe following return types are supported:\n* `void`\n* Primitive types\n* Wrapper types\n* `T` when the query method is expected to return one result at most. Returns `null` if there are no results and throws `IncorrectResultSizeDataAccessException` if there is more than one result.\n* `java.util.List` or any common `Iterable` type\n* `java.util.stream.Stream`\n* `java.util.Optional` or `scala.Option` when the query method is expected to return one result at most. Returns `Optional.empty()` or `Optional.absent()` if there are no results and throws `IncorrectResultSizeDataAccessException` if there is more than one result.\n* `io.micronaut.data.model.Page`\n* `io.micronaut.data.model.Slice`\n* `java.util.concurrent.Future`, `java.util.concurrent.CompletableFuture`, or `ListenableFuture` if the method is annotated with `@Async` and Spring asynchronous method execution is enabled\n* `GeoResults<T>`, `GeoResult<T>`, or `GeoPage<T>`"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringDataRepositoryMethodReturnTypeInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Data",
"index": 208,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringDataMongoDBJsonFieldInspection",
"shortDescription": {
"text": "Spring Data MongoDB JSON unresolved fields"
},
"fullDescription": {
"text": "Reports unresolved document fields specified inside of 'org.springframework.data.mongodb.repository.Query' annotation. Example: '@Document\nclass User {\n @Field\n String name;\n}\n\ninterface UserRepository extends Repository<User, Long> {\n @Query(\"{ age: { $gt: ?0 } }\") // 'age' is highlighted as unresolved\n List<User> findUsersOlderThan(Integer age);\n}'",
"markdown": "Reports unresolved document fields specified inside of `org.springframework.data.mongodb.repository.Query` annotation.\n\n**Example:**\n\n\n @Document\n class User {\n @Field\n String name;\n }\n\n interface UserRepository extends Repository<User, Long> {\n @Query(\"{ age: { $gt: ?0 } }\") // 'age' is highlighted as unresolved\n List<User> findUsersOlderThan(Integer age);\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringDataMongoDBJsonFieldInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Data",
"index": 208,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringDataMethodInconsistencyInspection",
"shortDescription": {
"text": "Spring Data repository method errors"
},
"fullDescription": {
"text": "Reports Spring Data CRUD repository methods for which the Spring Data Query builder cannot generate the corresponding query. Example: 'interface PersonRepository extends Repository<Person, Long> {\n List<Person> findByEmailAddressAndLastname(EmailAddress emailAddress, String lastname);\n List<Person> findByEmailUnknownAndLastname(EmailAddress emailAddress, String lastname); // Cannot resolve property 'Unknown'\n List<Person> findByAndLastname(EmailAddress emailAddress, String lastname); // Missing property name\n\n List<Person> findDistinctPeopleByLastnameOrFirstname(String lastname, String firstname);\n List<Person> findPeopleDistinctByUnknownOrFirstname(String lastname, String firstname); // Cannot resolve property 'Unknown'\n\n List<Person> findByLastnameOrderByFirstnameAsc(String lastname);\n List<Person> findByLastnameOrderByUnknownDesc(String lastname); // Cannot resolve property 'Unknown'\n}'",
"markdown": "Reports Spring Data CRUD repository methods for which the\n[Spring Data Query](https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#repositories.query-methods.query-creation)\nbuilder cannot generate the corresponding query.\n\n**Example:**\n\n\n interface PersonRepository extends Repository<Person, Long> {\n List<Person> findByEmailAddressAndLastname(EmailAddress emailAddress, String lastname);\n List<Person> findByEmailUnknownAndLastname(EmailAddress emailAddress, String lastname); // Cannot resolve property 'Unknown'\n List<Person> findByAndLastname(EmailAddress emailAddress, String lastname); // Missing property name\n\n List<Person> findDistinctPeopleByLastnameOrFirstname(String lastname, String firstname);\n List<Person> findPeopleDistinctByUnknownOrFirstname(String lastname, String firstname); // Cannot resolve property 'Unknown'\n\n List<Person> findByLastnameOrderByFirstnameAsc(String lastname);\n List<Person> findByLastnameOrderByUnknownDesc(String lastname); // Cannot resolve property 'Unknown'\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringDataMethodInconsistencyInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Data",
"index": 208,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringDataRepositoryMethodParametersInspection",
"shortDescription": {
"text": "Spring Data repository method parameters errors"
},
"fullDescription": {
"text": "Reports Spring Data CRUD repository method parameters with incorrect types. Example: 'public class Person {\n private int id;\n private String lastname;\n private Address address;\n }\n\n public class Address {\n private int zipCode;\n }\n\n public interface CustomerRepository extends CrudRepository<Person, Integer> {\n List<Person> findByAddress(String lastname); // 'Address' type expected\n List<Person> findByAddressZipCode(String str); // 'int' type expected\n }'",
"markdown": "Reports Spring Data CRUD repository method parameters with incorrect types.\n\n**Example:**\n\n\n public class Person {\n private int id;\n private String lastname;\n private Address address;\n }\n\n public class Address {\n private int zipCode;\n }\n\n public interface CustomerRepository extends CrudRepository<Person, Integer> {\n List<Person> findByAddress(String lastname); // 'Address' type expected\n List<Person> findByAddressZipCode(String str); // 'int' type expected\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringDataRepositoryMethodParametersInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Data",
"index": 208,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.spring.mvc",
"version": "232.8660.185",
"rules": [
{
"id": "SpringMVCViewInspection",
"shortDescription": {
"text": "Unresolved view reference"
},
"fullDescription": {
"text": "Reports unresolved Spring MVC View references. Example: '@RequestMapping\n public String viewHandler() {\n return \"viewName\"; // will be highlighted if no view with \"viewName\" can be found\n }'",
"markdown": "Reports unresolved Spring MVC View references.\n\nExample:\n\n\n @RequestMapping\n public String viewHandler() {\n return \"viewName\"; // will be highlighted if no view with \"viewName\" can be found\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringMVCViewInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring MVC",
"index": 212,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringMVCInitBinder",
"shortDescription": {
"text": "Non-void @InitBinder method"
},
"fullDescription": {
"text": "Reports Spring MVC Controller methods annotated with '@InitBinder' that are not declared as 'void'. According to the specification, init-binder methods should be declared as 'void'.",
"markdown": "Reports Spring MVC Controller methods annotated with `@InitBinder` that are not declared as `void`.\n\nAccording to the [specification](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/bind/annotation/InitBinder.html),\ninit-binder methods should be declared as `void`."
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringMVCInitBinder",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring MVC",
"index": 212,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MVCPathVariableInspection",
"shortDescription": {
"text": "Mismatch in @PathVariable declarations and usages"
},
"fullDescription": {
"text": "Reports '@PathVariable' parameters that are declared in the method signature but are absent in the URL path or vice versa. The quick-fix adds the missing parameter. Example: '@RequestMapping(\"/path/{myVariable}/\")\n public String handler(@PathVariable String name_is_not_equal_to_myVariable) {\n return \"...\";\n }' After the quick-fix is applied the result looks like: '@RequestMapping(\"/path/{myVariable}/\")\n public String handler(@PathVariable String myVariable) {\n return \"...\";\n }'",
"markdown": "Reports `@PathVariable` parameters that are declared in the method signature but are absent in the URL path or vice versa.\nThe quick-fix adds the missing parameter.\n\n**Example:**\n\n\n @RequestMapping(\"/path/{myVariable}/\")\n public String handler(@PathVariable String name_is_not_equal_to_myVariable) {\n return \"...\";\n }\n\nAfter the quick-fix is applied the result looks like:\n\n\n @RequestMapping(\"/path/{myVariable}/\")\n public String handler(@PathVariable String myVariable) {\n return \"...\";\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "MVCPathVariableInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring MVC",
"index": 212,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "TestNG-J",
"version": "232.8660.185",
"rules": [
{
"id": "groupsTestNG",
"shortDescription": {
"text": "Undefined group name"
},
"fullDescription": {
"text": "Reports undefined group names passed to the 'dependsOnGroups' or 'groups' attributes in the '@Test' annotation. The quick-fix adds an undefined name to a list of known groups. Use the Defined Groups field to define a comma-separated list of known groups.",
"markdown": "Reports undefined group names passed to the `dependsOnGroups` or `groups` attributes in the `@Test` annotation.\n\nThe quick-fix adds an undefined name to a list of known groups.\n\nUse the **Defined Groups** field to define a comma-separated list of known groups."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "groupsTestNG",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/TestNG",
"index": 214,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "JUnitTestNG",
"shortDescription": {
"text": "JUnit Test can be converted to TestNG"
},
"fullDescription": {
"text": "Reports any JUnit-based test class that can be converted into TestNG based unit test. Example: 'import org.junit.Test;\nimport static org.junit.Assert.*;\n\npublic class ExampleTest {\n @Test\n public void testExample(){\n assertEquals(2 + 2, 4);\n }\n}' After the quick-fix is applied: 'import org.testng.Assert;\nimport org.testng.annotations.Test;\n\npublic class ExampleTest {\n @Test\n public void testExample(){\n Assert.assertEquals(4, 2 + 2);\n }\n}'",
"markdown": "Reports any JUnit-based test class that can be converted into TestNG based unit test.\n\nExample:\n\n\n import org.junit.Test;\n import static org.junit.Assert.*;\n\n public class ExampleTest {\n @Test\n public void testExample(){\n assertEquals(2 + 2, 4);\n }\n }\n\nAfter the quick-fix is applied:\n\n\n import org.testng.Assert;\n import org.testng.annotations.Test;\n\n public class ExampleTest {\n @Test\n public void testExample(){\n Assert.assertEquals(4, 2 + 2);\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "JUnitTestNG",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/TestNG",
"index": 214,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UndeclaredTests",
"shortDescription": {
"text": "Undeclared test"
},
"fullDescription": {
"text": "Reports test classes that are not registered in 'testing.xml'. This is often a mistake because such tests won't be executed.",
"markdown": "Reports test classes that are not registered in `testing.xml`. This is often a mistake because such tests won't be executed."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "UndeclaredTests",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/TestNG",
"index": 214,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConvertJavadoc",
"shortDescription": {
"text": "TestNG Javadoc can be converted to annotations"
},
"fullDescription": {
"text": "Asserts your TestNG tests with Javadoc annotations and converts them to JDK annotations. Example: '/**\n * @testng.before-test\n */\n public void sample() {}' After the quick-fix is applied: '@BeforeTest\n public void sample() {}'",
"markdown": "Asserts your TestNG tests with Javadoc annotations and converts them to JDK annotations.\n\nExample:\n\n\n /**\n * @testng.before-test\n */\n public void sample() {}\n\nAfter the quick-fix is applied:\n\n\n @BeforeTest\n public void sample() {}\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ConvertJavadoc",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/TestNG",
"index": 214,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DataProviderReturnType",
"shortDescription": {
"text": "Invalid data provider return type"
},
"fullDescription": {
"text": "Reports methods marked with '@DataProvider' annotation that doesn't return 'Object[][]' or 'Iterator<Object>'. If another type is returned, TestNG throws an exception. Example: 'public class TestNgTest {\n @DataProvider(name = \"Languages\")\n List<String> getData() {\n return List.of(\"Java\", \"Kotlin\");\n }\n\n @Test(dataProvider = \"Languages\")\n public void testData(String language) {\n System.out.println(language);\n }\n}'",
"markdown": "Reports methods marked with `@DataProvider` annotation that doesn't return `Object[][]` or `Iterator<Object>`. If another type is returned, TestNG throws an exception.\n\nExample:\n\n\n public class TestNgTest {\n @DataProvider(name = \"Languages\")\n List<String> getData() {\n return List.of(\"Java\", \"Kotlin\");\n }\n\n @Test(dataProvider = \"Languages\")\n public void testData(String language) {\n System.out.println(language);\n }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "DataProviderReturnType",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/TestNG",
"index": 214,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "dependsOnMethodTestNG",
"shortDescription": {
"text": "Illegal method name passed to 'dependsOnMethods'"
},
"fullDescription": {
"text": "Reports illegal method names passed to the 'dependsOnMethods' attribute in the '@Test' annotation. A method name is considered illegal if it can't be resolved into a valid, accessible '@Test' annotated method in the current class or any of its parent classes. Example: 'public class SampleTest {\n @Test(dependsOnMethods = \"testSpellignError\")\n public void testSample() {}\n @Test\n public void testSpellingError(){}\n }'",
"markdown": "Reports illegal method names passed to the `dependsOnMethods` attribute in the `@Test` annotation.\n\nA method name is considered illegal if it can't be resolved into a valid, accessible `@Test` annotated method in the current class\nor any of its parent classes.\n\nExample:\n\n\n public class SampleTest {\n @Test(dependsOnMethods = \"testSpellignError\")\n public void testSample() {}\n @Test\n public void testSpellingError(){}\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "dependsOnMethodTestNG",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/TestNG",
"index": 214,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MalformedDataProvider",
"shortDescription": {
"text": "Data provider problems"
},
"fullDescription": {
"text": "Reports references to data provider methods that do not exist or are not accessible. Example: 'public class InstanceDataProviderFromForeignClass {\n // method data() doesn't exist in class A\n @Test(dataProvider = \"data\", dataProviderClass = A.class)\n public void test() {\n }\n}\nclass A { }' After the quick-fix is applied: '//the needed data() method is created in class A\nclass A {\n @DataProvider\n public Object[][] data() {\n return new Object[][]{};\n }\n}'",
"markdown": "Reports references to data provider methods that do not exist or are not accessible.\n\nExample:\n\n\n public class InstanceDataProviderFromForeignClass {\n // method data() doesn't exist in class A\n @Test(dataProvider = \"data\", dataProviderClass = A.class)\n public void test() {\n }\n }\n class A { }\n\nAfter the quick-fix is applied:\n\n\n //the needed data() method is created in class A\n class A {\n @DataProvider\n public Object[][] data() {\n return new Object[][]{};\n }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "MalformedDataProvider",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/TestNG",
"index": 214,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ExpectedExceptionNeverThrownTestNG",
"shortDescription": {
"text": "Expected exception never thrown in test method body"
},
"fullDescription": {
"text": "Reports checked exceptions expected by a TestNG test method that are never thrown inside the method body. Example: '@Test(expectedExceptions = Exception.class) // warning: Expected 'Exception' never thrown\n public void testEngineIsRunning() {\n assertTrue(engine.isRunning());\n }'",
"markdown": "Reports checked exceptions expected by a TestNG test method that are never thrown inside the method body.\n\n**Example:**\n\n\n @Test(expectedExceptions = Exception.class) // warning: Expected 'Exception' never thrown\n public void testEngineIsRunning() {\n assertTrue(engine.isRunning());\n }\n \n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ExpectedExceptionNeverThrownTestNG",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/TestNG",
"index": 214,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ConvertOldAnnotations",
"shortDescription": {
"text": "Old TestNG annotation @Configuration is used"
},
"fullDescription": {
"text": "Reports TestNG 'org.testng.annotations.Configuration' annotations. It's better to configure a test suite with the modern '@BeforeXXX'/'@AfterXXX' annotations. Example: 'public class Test {\n @Configuration(beforeSuite = true, afterTest = true)\n public void afterBefore(){\n }\n }' After the quick-fix is applied: 'public class Test {\n @AfterTest()\n @BeforeSuite()\n public void afterBefore(){\n }\n }'",
"markdown": "Reports TestNG `org.testng.annotations.Configuration` annotations.\n\nIt's better to configure a test suite with the modern `@BeforeXXX`/`@AfterXXX` annotations.\n\nExample:\n\n\n public class Test {\n @Configuration(beforeSuite = true, afterTest = true)\n public void afterBefore(){\n }\n }\n\nAfter the quick-fix is applied:\n\n\n public class Test {\n @AfterTest()\n @BeforeSuite()\n public void afterBefore(){\n }\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ConvertOldAnnotations",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/TestNG",
"index": 214,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "DuplicatedDataProviderNames",
"shortDescription": {
"text": "Duplicated data provider names"
},
"fullDescription": {
"text": "Reports 'TestNG' data providers with equal names if 'org.testng.TestNGException' has occurred. Example: 'public class DuplicatedDataProviders {\n @DataProvider\n public Object[][] intTestData() { // duplicate 1\n return new Integer[][]{\n new Integer[]{1, 1},\n };\n }\n\n @DataProvider(name = \"intTestData\")\n public Object[][] someTestData() { // duplicate 2\n return new Integer[][]{\n new Integer[]{1, 1},\n };\n }\n\n @Test(dataProvider = \"intTestData\")\n public void testIsOK(Integer key, Integer value) {\n assertEquals(key, value);\n }\n }'",
"markdown": "Reports `TestNG` data providers with equal names if `org.testng.TestNGException` has occurred.\n\nExample:\n\n\n public class DuplicatedDataProviders {\n @DataProvider\n public Object[][] intTestData() { // duplicate 1\n return new Integer[][]{\n new Integer[]{1, 1},\n };\n }\n\n @DataProvider(name = \"intTestData\")\n public Object[][] someTestData() { // duplicate 2\n return new Integer[][]{\n new Integer[]{1, 1},\n };\n }\n\n @Test(dataProvider = \"intTestData\")\n public void testIsOK(Integer key, Integer value) {\n assertEquals(key, value);\n }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "DuplicatedDataProviderNames",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Java/TestNG",
"index": 214,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.persistence",
"version": "232.8660.185",
"rules": [
{
"id": "SqlSourceToSinkFlow",
"shortDescription": {
"text": "Non-safe string is used as SQL"
},
"fullDescription": {
"text": "Reports cases for Java and Kotlin languages when a non-safe string is passed to a method as a SQL query. It can be a cause of SQL injections. The list of methods is taken from Settings - Language Injections for 'SQL', 'JPA QL', 'Hibernate QL' and 'PostgreSQL' A safe object is: a string literal, interface instance, or enum object, int and its wrapper, boolean and its wrapper, class object a result of a call of a method, whose receiver and arguments are safe a private field in the same file, which is assigned only with a string literal and has a safe initializer a final field in the same file, which has a safe initializer a local variable which is assigned from safe-objects This field, local variable, or parameter must not be passed as arguments to methods or used as a qualifier or must be a primitive, its wrapper or immutable. Static final fields are considered as safe. The analysis is performed only inside one file. Example: 'public void save(String sql) {\n JdbcTemplate jdbcTemplate = new JdbcTemplate();\n jdbcTemplate.queryForList(sql);\n }'\n New in 2023.2",
"markdown": "Reports cases for Java and Kotlin languages when a non-safe string is passed to a method as a SQL query. It can be a cause of SQL injections. The list of methods is taken from **Settings** - **Language Injections** for `SQL`, `JPA QL`, `Hibernate QL` and `PostgreSQL`\n\n\nA safe object is:\n\n* a string literal, interface instance, or enum object, int and its wrapper, boolean and its wrapper, class object\n* a result of a call of a method, whose receiver and arguments are safe\n* a private field in the same file, which is assigned only with a string literal and has a safe initializer\n* a final field in the same file, which has a safe initializer\n* a local variable which is assigned from safe-objects\nThis field, local variable, or parameter must not be passed as arguments to methods or used as a qualifier or must be a primitive, its wrapper or immutable.\n\nStatic final fields are considered as safe.\n\n\nThe analysis is performed only inside one file.\nExample:\n\n\n public void save(String sql) {\n JdbcTemplate jdbcTemplate = new JdbcTemplate();\n jdbcTemplate.queryForList(sql);\n }\n\nNew in 2023.2"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SqlSourceToSinkFlow",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JVM languages",
"index": 47,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "MongoDBJsonDuplicatePropertyKeys",
"shortDescription": {
"text": "Duplicate keys in object literals"
},
"fullDescription": {
"text": "Reports a duplicate key in an object literal.",
"markdown": "Reports a duplicate key in an object literal."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "MongoDBJsonDuplicatePropertyKeys",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JSON and JSON5",
"index": 150,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.quarkus",
"version": "232.8660.185",
"rules": [
{
"id": "QsUndeclaredPathMimeTypesInspection",
"shortDescription": {
"text": "Undeclared '@Produces' / '@Consumes' MIME types for '@Path'"
},
"fullDescription": {
"text": "Reports endpoint methods without the '@Produces' or '@Consumes' annotations. Quarkus analyzes these annotations and restricts the number of JAX-RS providers included in the native executable to the minimum required by the application. This reduces the size of the native executable. Annotate methods or the whole class with '@Produces' or '@Consumes' (if supported by the HTTP method) and specify the target MIME types.",
"markdown": "Reports endpoint methods without the `@Produces` or `@Consumes` annotations.\n\n\nQuarkus analyzes these annotations and restricts the number of JAX-RS providers included in the native executable to the minimum required\nby the application. This reduces the size of the native executable.\n\n\nAnnotate methods or the whole class with `@Produces` or `@Consumes` (if supported by the HTTP method) and specify\nthe target MIME types."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "QsUndeclaredPathMimeTypesInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Quarkus",
"index": 220,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "QsPrivateBeanMembersInspection",
"shortDescription": {
"text": "Wrong access modifier of bean members with CDI annotations"
},
"fullDescription": {
"text": "Reports injected fields, observer methods, and bean constructors with private access. Private access levels on CDI members increase the amount of reflection manipulations necessary to set up a bean. Use package-private or protected access levels instead.",
"markdown": "Reports injected fields, observer methods, and bean constructors with private access.\n\n\nPrivate access levels on CDI members increase the amount of reflection manipulations necessary to set up a bean.\nUse package-private or protected access levels instead."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "QsPrivateBeanMembersInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Quarkus",
"index": 220,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SmallRyeConfigMappingMissingPrefixInspection",
"shortDescription": {
"text": "Missing or empty 'prefix' attribute value in the '@ConfigMapping' annotation"
},
"fullDescription": {
"text": "Reports missing or empty 'prefix' attribute value in the '@io.smallrye.config.ConfigMapping' annotation. The IDE requires a correctly specified prefix to look up configuration properties.",
"markdown": "Reports missing or empty `prefix` attribute value in the `@io.smallrye.config.ConfigMapping` annotation.\n\nThe IDE requires a correctly specified prefix to look up configuration properties."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "SmallRyeConfigMappingMissingPrefixInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Quarkus",
"index": 220,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "QsProperties",
"shortDescription": {
"text": "Invalid Quarkus application.properties configuration"
},
"fullDescription": {
"text": "Reports syntax errors, type errors, deprecated and unresolvable keys and values in Quarkus '.properties' configuration files. Also highlights syntax and type errors.",
"markdown": "Reports syntax errors, type errors, deprecated and unresolvable keys and values in Quarkus `.properties` configuration files.\n\n\nAlso highlights syntax and type errors."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "QsProperties",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Quarkus",
"index": 220,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "QsYaml",
"shortDescription": {
"text": "Invalid Quarkus YAML configuration"
},
"fullDescription": {
"text": "Reports deprecated and unresolvable keys and values in Quarkus application YAML configuration files.",
"markdown": "Reports deprecated and unresolvable keys and values in Quarkus application YAML configuration files."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "QsYaml",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Quarkus",
"index": 220,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "org.jetbrains.plugins.less",
"version": "232.8660.185",
"rules": [
{
"id": "LessResolvedByNameOnly",
"shortDescription": {
"text": "Missing import"
},
"fullDescription": {
"text": "Reports a reference to a variable or mixin that is declared in another file, which is not explicitly imported in the current file. Example: '* {\n margin: @var-in-other-file;\n}'",
"markdown": "Reports a reference to a variable or mixin that is declared in another file, which is not explicitly [imported](http://lesscss.org/features/#import-atrules-feature) in the current file.\n\n**Example:**\n\n\n * {\n margin: @var-in-other-file;\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "LessResolvedByNameOnly",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Less",
"index": 221,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LessUnresolvedVariable",
"shortDescription": {
"text": "Unresolved variable"
},
"fullDescription": {
"text": "Reports a reference to a Less variable that is not resolved. Example: '* {\n margin: @unknown-var;\n}'",
"markdown": "Reports a reference to a [Less variable](http://lesscss.org/features/#variables-feature) that is not resolved.\n\n**Example:**\n\n\n * {\n margin: @unknown-var;\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LessUnresolvedVariable",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Less",
"index": 221,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "LessUnresolvedMixin",
"shortDescription": {
"text": "Unresolved mixin"
},
"fullDescription": {
"text": "Reports a reference to a Less mixin that is not resolved. Example: '* {\n .unknown-mixin();\n}'",
"markdown": "Reports a reference to a [Less mixin](http://lesscss.org/features/#mixins-feature) that is not resolved.\n\n**Example:**\n\n\n * {\n .unknown-mixin();\n }\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LessUnresolvedMixin",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Less",
"index": 221,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "tanvd.grazi",
"version": "232.8660.185",
"rules": [
{
"id": "LanguageDetectionInspection",
"shortDescription": {
"text": "Natural language detection"
},
"fullDescription": {
"text": "Detects natural languages and suggests enabling corresponding grammar and spelling checks.",
"markdown": "Detects natural languages and suggests enabling corresponding grammar and spelling checks."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "LanguageDetectionInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Proofreading",
"index": 223,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "GrazieInspection",
"shortDescription": {
"text": "Grammar"
},
"fullDescription": {
"text": "Reports grammar mistakes in your text. You can configure the inspection in Settings | Editor | Natural Languages | Grammar.",
"markdown": "Reports grammar mistakes in your text. You can configure the inspection in [Settings \\| Editor \\| Natural Languages \\| Grammar](settings://reference.settingsdialog.project.grazie)."
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "GrazieInspection",
"ideaSeverity": "GRAMMAR_ERROR",
"qodanaSeverity": "Info"
}
},
"relationships": [
{
"target": {
"id": "Proofreading",
"index": 223,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "org.toml.lang",
"version": "232.8660.185",
"rules": [
{
"id": "TomlUnresolvedReference",
"shortDescription": {
"text": "Unresolved reference"
},
"fullDescription": {
"text": "Reports unresolved references in TOML files.",
"markdown": "Reports unresolved references in TOML files."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "TomlUnresolvedReference",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "TOML",
"index": 227,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.thymeleaf",
"version": "232.8660.185",
"rules": [
{
"id": "ThymeleafDialectDomInspection",
"shortDescription": {
"text": "Thymeleaf Dialect Extensions errors"
},
"fullDescription": {
"text": "Reports incorrect elements in Thymeleaf Dialect Extension '<dialect>' files: References to non-instantiable classes References to classes that do not extend required class References to classes with inappropriate scope Empty tag and attribute values Tag and attribute values that do not match the required pattern (for example, Java Identifiers) Tags that do not include required children tags or attributes Tags that define objects with duplicate names",
"markdown": "Reports incorrect elements in Thymeleaf Dialect Extension `<dialect>` files:\n\n* References to non-instantiable classes\n* References to classes that do not extend required class\n* References to classes with inappropriate scope\n* Empty tag and attribute values\n* Tag and attribute values that do not match the required pattern (for example, Java Identifiers)\n* Tags that do not include required children tags or attributes\n* Tags that define objects with duplicate names"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "ThymeleafDialectDomInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Thymeleaf",
"index": 234,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ThymeleafVariablesResolveInspection",
"shortDescription": {
"text": "Unresolved references in Thymeleaf expression variables"
},
"fullDescription": {
"text": "Reports unresolved references and invalid Thymeleaf expressions. Example: '<html xmlns:th=\"https://www.thymeleaf.org\">\n<body>\n <form th:object=\"${unknownPet}\" <!-- Cannot resolve 'unknownPet' -->\n class=\"form-horizontal\" method=\"post\">\n <input type=\"hidden\" name=\"id\" th:value=\"*{id}\" /> <!-- Cannot resolve 'id' -->\n </form>\n</body>\n</html>'",
"markdown": "Reports unresolved references and invalid Thymeleaf expressions.\n\n**Example:**\n\n\n <html xmlns:th=\"https://www.thymeleaf.org\">\n <body>\n <form th:object=\"${unknownPet}\" <!-- Cannot resolve 'unknownPet' -->\n class=\"form-horizontal\" method=\"post\">\n <input type=\"hidden\" name=\"id\" th:value=\"*{id}\" /> <!-- Cannot resolve 'id' -->\n </form>\n </body>\n </html>\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "note",
"parameters": {
"suppressToolId": "ThymeleafVariablesResolveInspection",
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate"
}
},
"relationships": [
{
"target": {
"id": "Thymeleaf",
"index": 234,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "ThymeleafMessagesResolveInspection",
"shortDescription": {
"text": "Unresolved message resource keys"
},
"fullDescription": {
"text": "Reports unresolved message resource keys. Example: '<html xmlns:th=\"https://www.thymeleaf.org\">\n <body>\n <h1 th:text=\"#{welcome.unknown}\">Hallo, World</h1> <!-- Cannot resolve property key -->\n </body>\n</html>'",
"markdown": "Reports unresolved message resource keys.\n\nExample:\n\n\n <html xmlns:th=\"https://www.thymeleaf.org\">\n <body>\n <h1 th:text=\"#{welcome.unknown}\">Hallo, World</h1> <!-- Cannot resolve property key -->\n </body>\n </html>\n"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "ThymeleafMessagesResolveInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Thymeleaf",
"index": 234,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.spring.integration",
"version": "232.8660.185",
"rules": [
{
"id": "SpringIntegrationModel",
"shortDescription": {
"text": "Incorrect Spring Integration XML-based application context"
},
"fullDescription": {
"text": "Reports issues with the Spring Integration XML-based application context: Unresolved bean references Missing required tags or attributes Incorrect property types Inconsistent 'enum' properties Incorrect types of referenced beans Example: '<beans ... >\n <int:channel id=\"channel\"> <!-- 'dispatcher' and 'queue' can't be used together -->\n <int:dispatcher failover=\"true\"/>\n <int:priority-queue capacity=\"4\"/>\n </int:channel>\n \n <int:channel id=\"another\" >\n <int:queue <!--Exactly one of 'message-store' or 'ref' is required -->\n capacity=\"4\" message-store=\"myMessageStore\" ref=\"myQueue\"/>\n </int:channel>\n \n <int:gateway id=\"asyncGatewayError\"\n async-executor=\"dummyBean\"/> <!--Bean must be of 'java.util.concurrent.Executor' type -->\n\n <int:delayer default-delay=\"3\"\n message-store=\"myMessageStore\"\n scheduler=\"scheduler\"\n wait-for-tasks-to-complete-on-shutdown=\"false\"/>\n <!--Bean must be of 'java.util.concurrent.Executor' type -->\n <int:delayer\n default-delay=\"INVALID_VALUE\" <!--Cannot convert string 'INVALID_VALUE' to target class 'java.lang.Integer' -->\n message-store=\"dummyBean\" <!-- Bean must be of 'org.springframework.integration.store.MessageStore' type-->\n scheduler=\"dummyBean\" <!-- Bean must be one of these types: java.util.concurrent.ScheduledExecutorService,org.springframework.scheduling.TaskScheduler-->\n wait-for-tasks-to-complete-on-shutdown=\"INVALID_VALUE\"/> <!-- Cannot resolve symbol 'INVALID_VALUE' -->\n\n <bean id=\"dummyBean\" class=\"java.lang.String\"/>\n <bean id=\"myMessageStore\" class=\"org.springframework.integration.store.SimpleMessageStore\"/>\n <task:scheduler id=\"scheduler\"/>\n</beans>'",
"markdown": "Reports issues with the [Spring Integration](https://spring.io/projects/spring-integration) XML-based application context:\n\n* Unresolved bean references\n* Missing required tags or attributes\n* Incorrect property types\n* Inconsistent `enum` properties\n* Incorrect types of referenced beans\n\n**Example:**\n\n\n <beans ... >\n <int:channel id=\"channel\"> <!-- 'dispatcher' and 'queue' can't be used together -->\n <int:dispatcher failover=\"true\"/>\n <int:priority-queue capacity=\"4\"/>\n </int:channel>\n \n <int:channel id=\"another\" >\n <int:queue <!--Exactly one of 'message-store' or 'ref' is required -->\n capacity=\"4\" message-store=\"myMessageStore\" ref=\"myQueue\"/>\n </int:channel>\n \n <int:gateway id=\"asyncGatewayError\"\n async-executor=\"dummyBean\"/> <!--Bean must be of 'java.util.concurrent.Executor' type -->\n\n <int:delayer default-delay=\"3\"\n message-store=\"myMessageStore\"\n scheduler=\"scheduler\"\n wait-for-tasks-to-complete-on-shutdown=\"false\"/>\n <!--Bean must be of 'java.util.concurrent.Executor' type -->\n <int:delayer\n default-delay=\"INVALID_VALUE\" <!--Cannot convert string 'INVALID_VALUE' to target class 'java.lang.Integer' -->\n message-store=\"dummyBean\" <!-- Bean must be of 'org.springframework.integration.store.MessageStore' type-->\n scheduler=\"dummyBean\" <!-- Bean must be one of these types: java.util.concurrent.ScheduledExecutorService,org.springframework.scheduling.TaskScheduler-->\n wait-for-tasks-to-complete-on-shutdown=\"INVALID_VALUE\"/> <!-- Cannot resolve symbol 'INVALID_VALUE' -->\n\n <bean id=\"dummyBean\" class=\"java.lang.String\"/>\n <bean id=\"myMessageStore\" class=\"org.springframework.integration.store.SimpleMessageStore\"/>\n <task:scheduler id=\"scheduler\"/>\n </beans>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringIntegrationModel",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Integration",
"index": 239,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "UnresolvedMessageChannel",
"shortDescription": {
"text": "Incorrect 'channel' attribute in an endpoint method annotation"
},
"fullDescription": {
"text": "Reports incorrect channel attributes in endpoint method annotations: @Gateway, @ServiceActivator, @Filter, and so on. Example: '@Component\n public class MyComponent {}\n @Gateway(requestChannel = \"requestChannel\", replyChannel = \"replyChannel\")\n public void gateway() {...}\n\n @Gateway(\n requestChannel =\"simpleBean\", // Bean must be one of these types: org.springframework.integration.MessageChannel,org.springframework.messaging.MessageChannel\n replyChannel = \"unknownChannel\") // Cannot find channel\n public void errors() {...}\n\n @Bean\n public MyBean simpleBean() {...}\n }'",
"markdown": "Reports incorrect channel attributes in endpoint method annotations:\n[@Gateway](https://docs.spring.io/spring-integration/api/org/springframework/integration/annotation/Gateway.html),\n[@ServiceActivator,](https://docs.spring.io/spring-integration/api/org/springframework/integration/annotation/ServiceActivator.html)\n[@Filter](https://docs.spring.io/spring-integration/api/org/springframework/integration/annotation/Filter.html), and so on.\n\n**Example:**\n\n\n @Component\n public class MyComponent {}\n @Gateway(requestChannel = \"requestChannel\", replyChannel = \"replyChannel\")\n public void gateway() {...}\n\n @Gateway(\n requestChannel =\"simpleBean\", // Bean must be one of these types: org.springframework.integration.MessageChannel,org.springframework.messaging.MessageChannel\n replyChannel = \"unknownChannel\") // Cannot find channel\n public void errors() {...}\n\n @Bean\n public MyBean simpleBean() {...}\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "UnresolvedMessageChannel",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Integration",
"index": 239,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringIntegrationMethodEndpointInconsistency",
"shortDescription": {
"text": "Incorrect Spring Integration endpoint method"
},
"fullDescription": {
"text": "Reports incorrect Spring Integration endpoint method declarations. Example: 'class MyEndpoints {\n @InboundChannelAdapter(\"channel\")\n public void cannotBeVoid() {...} // A method annotated with @InboundChannelAdapter must have a return type\n\n @InboundChannelAdapter(\"channel\")\n public String cannotHaveParams(String s) {..} // A method annotated with @InboundChannelAdapter can't have arguments\n\n @Filter(inputChannel = \"channel\", // Endpoint can have only one poller\n outputChannel = \"channel2\",\n poller = {@Poller(fixedDelay = \"100\"), @Poller(fixedRate = \"100\")})\n public void testMultiplePollers() {\n }\n\n @Filter(inputChannel = \"channel\",\n outputChannel = \"channel2\",\n poller = @Poller(value = \"poller\", maxMessagesPerPoll = \"100\"))\n public void testValue() {\n }\n\n @Filter(inputChannel = \"channel\",\n outputChannel = \"channel2\",\n poller = @Poller(trigger = \"trigger\", cron = \"0 */10 * * * *\")) // 'trigger' attribute is mutually exclusive with other attributes\n public void testTrigger() {\n }\n}'",
"markdown": "Reports incorrect [Spring Integration](https://spring.io/projects/spring-integration) endpoint method declarations.\n\n**Example:**\n\n\n class MyEndpoints {\n @InboundChannelAdapter(\"channel\")\n public void cannotBeVoid() {...} // A method annotated with @InboundChannelAdapter must have a return type\n\n @InboundChannelAdapter(\"channel\")\n public String cannotHaveParams(String s) {..} // A method annotated with @InboundChannelAdapter can't have arguments\n\n @Filter(inputChannel = \"channel\", // Endpoint can have only one poller\n outputChannel = \"channel2\",\n poller = {@Poller(fixedDelay = \"100\"), @Poller(fixedRate = \"100\")})\n public void testMultiplePollers() {\n }\n\n @Filter(inputChannel = \"channel\",\n outputChannel = \"channel2\",\n poller = @Poller(value = \"poller\", maxMessagesPerPoll = \"100\"))\n public void testValue() {\n }\n\n @Filter(inputChannel = \"channel\",\n outputChannel = \"channel2\",\n poller = @Poller(trigger = \"trigger\", cron = \"0 */10 * * * *\")) // 'trigger' attribute is mutually exclusive with other attributes\n public void testTrigger() {\n }\n }\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringIntegrationMethodEndpointInconsistency",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Integration",
"index": 239,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringIntegrationDeprecations21",
"shortDescription": {
"text": "Spring Integration 2.1 deprecations"
},
"fullDescription": {
"text": "Reports XML elements deprecated in the current version of the Spring Integration XML-based application context. For more information, see Migration Guide. Example: '<beans ... >\n <int:channel id=\"failChannel\"\n dispatcher=\"failover\"/> <!-- this attribute is deprecated, use dispatcher sub-element instead -->\n <int:poller default=\"true\">\n <int:cron-trigger expression=\"5\"/> <!-- This element is removed in Spring Integration 2.1, use 'cron' attribute instead -->\n <int:interval-trigger interval=\"3\"/> <!-- This element is removed in Spring Integration 2.1, use interval trigger attributes instead -->\n </int:poller>\n <ftp:inbound-channel-adapter session-factory=\"ftpSessionFactory\"\n cache-sessions=\"false\" <!-- This attribute is deprecated, use CachingSessionFactory instead -->\n channel=\"channel\"/>\n</beans>'",
"markdown": "Reports XML elements deprecated in the current version of the [Spring Integration](https://spring.io/projects/spring-integration) XML-based application context.\n\nFor more information, see [Migration Guide](https://github.com/SpringSource/spring-integration/wiki/Spring-Integration-2.0-to-2.1-Migration-Guide).\n\n**Example:**\n\n\n <beans ... >\n <int:channel id=\"failChannel\"\n dispatcher=\"failover\"/> <!-- this attribute is deprecated, use dispatcher sub-element instead -->\n <int:poller default=\"true\">\n <int:cron-trigger expression=\"5\"/> <!-- This element is removed in Spring Integration 2.1, use 'cron' attribute instead -->\n <int:interval-trigger interval=\"3\"/> <!-- This element is removed in Spring Integration 2.1, use interval trigger attributes instead -->\n </int:poller>\n <ftp:inbound-channel-adapter session-factory=\"ftpSessionFactory\"\n cache-sessions=\"false\" <!-- This attribute is deprecated, use CachingSessionFactory instead -->\n channel=\"channel\"/>\n </beans>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringIntegrationDeprecations21",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Integration",
"index": 239,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "Karma",
"version": "232.8660.185",
"rules": [
{
"id": "KarmaConfigFile",
"shortDescription": {
"text": "Invalid Karma configuration file"
},
"fullDescription": {
"text": "Reports a potential error in a file path ('basePath', 'files') for a Karma configuration file, for example, 'karma.conf.js'.",
"markdown": "Reports a potential error in a file path ('basePath', 'files') for a Karma configuration file, for example, `karma.conf.js`."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "KarmaConfigFile",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Unit testing",
"index": 240,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.javaee",
"version": "232.8660.185",
"rules": [
{
"id": "JavaeeApplicationDomInspection",
"shortDescription": {
"text": "Java EE application descriptor correctness"
},
"fullDescription": {
"text": "Reports the following problems inside `application.xml` configuration files: References to non-instantiable classes References to classes that do not extend required class References to classes with inappropriate scope Tag and attribute values that do not match required pattern (for example, Java Identifiers) Tags that do not include required children tags or attributes Tags that define objects with duplicate names Example: '<application>\n <module id=\"ExampleWebModule\">\n <web> // Error: 'web-uri' child tag should be defined\n <context-root>ExampleWebApp</context-root>\n </web>\n </module>\n</application>'",
"markdown": "Reports the following problems inside \\`application.xml\\` configuration files:\n\n* References to non-instantiable classes\n* References to classes that do not extend required class\n* References to classes with inappropriate scope\n* Tag and attribute values that do not match required pattern (for example, Java Identifiers)\n* Tags that do not include required children tags or attributes\n* Tags that define objects with duplicate names\n\n**Example:**\n\n\n <application>\n <module id=\"ExampleWebModule\">\n <web> // Error: 'web-uri' child tag should be defined\n <context-root>ExampleWebApp</context-root>\n </web>\n </module>\n </application>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "JavaeeApplicationDomInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Java EE",
"index": 102,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SecurityRoles",
"shortDescription": {
"text": "Security role name correctness"
},
"fullDescription": {
"text": "Reports invalid security role names. Example: '<web-app>\n <security-role>\n <role-name>custom#role</role-name> // Error: invalid name\n </security-role>\n <security-role>\n <role-name>customRole</role-name> // Good name\n </security-role>\n </web-app>'",
"markdown": "Reports invalid security role names.\n\n**Example:**\n\n\n <web-app>\n <security-role>\n <role-name>custom#role</role-name> // Error: invalid name\n </security-role>\n <security-role>\n <role-name>customRole</role-name> // Good name\n </security-role>\n </web-app>\n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SecurityRoles",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Java EE",
"index": 102,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "tslint",
"version": "232.8660.185",
"rules": [
{
"id": "TsLint",
"shortDescription": {
"text": "TSLint"
},
"fullDescription": {
"text": "Reports a discrepancy detected by the TSLint linter. The highlighting is based on the rule severity specified in the TSLint configuration file for each individual rule. Clear the 'Use rule severity from the configuration file' checkbox to use the severity configured in this inspection for all TSLint rules.",
"markdown": "Reports a discrepancy detected by the [TSLint](https://github.com/palantir/tslint) linter. \n\nThe highlighting is based on the rule severity specified in the [TSLint configuration file](https://palantir.github.io/tslint/usage/configuration/) for each individual rule. \n\nClear the 'Use rule severity from the configuration file' checkbox to use the severity configured in this inspection for all TSLint rules."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "TsLint",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "JavaScript and TypeScript/Code quality tools",
"index": 134,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.spring.security",
"version": "232.8660.185",
"rules": [
{
"id": "SpringSecurityModelInspection",
"shortDescription": {
"text": "Incorrect Spring Security XML-based application context"
},
"fullDescription": {
"text": "Reports issues with the Spring Security XML-based context: Unresolved bean references Missing required tags or attributes Incorrect property types Inconsistent 'enum' properties Incorrect types of referenced beans Also reports the following issues: <https> configuration errors <http> with the pattern '/**' must be the last one Multiple <http> elements without 'pattern' are not allowed <http> configuration errors Empty tag if 'security='none'' <user-service> Must either have attribute 'properties' or list of <user> elements <ldap-server> 'manager-password' is required when 'manager-dn' is used Must either have 'user-context-mapper-ref' or 'user-details-class' <authentication-provider> Only one kind of user-service is allowed <global-method-security> 'pre-post-annotations' must have the value 'enabled' to use <pre-post-annotation-handling>' Cannot use 'mode' with value 'aspectj' for <protect-pointcut> and <intercept-url> 'requires-channel' attribute only allowed for parent <http> <protect> Mixing <protect> with <global-method-security> is not recommended",
"markdown": "Reports issues with the [Spring Security](https://spring.io/projects/spring-security) XML-based context:\n\n* Unresolved bean references\n* Missing required tags or attributes\n* Incorrect property types\n* Inconsistent `enum` properties\n* Incorrect types of referenced beans\n\nAlso reports the following issues:\n\n* \\<https\\> configuration errors\n * \\<http\\> with the pattern '/\\*\\*' must be the last one\n * Multiple \\<http\\> elements without 'pattern' are not allowed\n* \\<http\\> configuration errors\n * Empty tag if `security='none'`\n* \\<user-service\\>\n * Must either have attribute 'properties' or list of \\<user\\> elements\n* \\<ldap-server\\>\n * 'manager-password' is required when 'manager-dn' is used\n * Must either have 'user-context-mapper-ref' or 'user-details-class'\n* \\<authentication-provider\\>\n * Only one kind of user-service is allowed\n* \\<global-method-security\\>\n * 'pre-post-annotations' must have the value 'enabled' to use \\<pre-post-annotation-handling\\>'\n * Cannot use 'mode' with value 'aspectj' for \\<protect-pointcut\\> and \\<intercept-url\\>\n * 'requires-channel' attribute only allowed for parent \\<http\\>\n* \\<protect\\>\n * Mixing \\<protect\\> with \\<global-method-security\\> is not recommended"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringSecurityModelInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Security",
"index": 248,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringSecurityDebugActivatedInspection",
"shortDescription": {
"text": "Debug mode is activated in the Spring Security configuration"
},
"fullDescription": {
"text": "Reports activated <debug> that may expose sensitive information.",
"markdown": "Reports activated **\\<debug\\>** that may expose sensitive information."
},
"defaultConfiguration": {
"enabled": true,
"level": "warning",
"parameters": {
"suppressToolId": "SpringSecurityDebugActivatedInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Security",
"index": 248,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "SpringSecurityAnnotationBeanPointersResolveInspection",
"shortDescription": {
"text": "Incorrect configuration of Spring beans referenced in the Spring Security annotation"
},
"fullDescription": {
"text": "Reports unresolved Spring beans referenced in Spring Security annotations. Examples: '@WithUserDetails(value = \"admin\", userDetailsServiceBeanName = \"unknownUserDetailsService\")\n // \"Cannot resolve 'unknownUserDetailsService' bean\" will be reported if 'unknownUserDetailsService' is not defined in the Spring model' '@WithUserDetails(value = \"admin\", userDetailsServiceBeanName = \"jpaUserDetailsService\")\n //\"Bean must be of 'org.springframework.security.core.userdetails.UserDetailsService' type\"\n // will be reported if \"jpaUserDetailsService\" bean is not of 'UserDetailsService' type'",
"markdown": "Reports unresolved Spring beans referenced in [Spring Security](https://spring.io/projects/spring-security) annotations.\n\n**Examples:**\n\n*\n\n @WithUserDetails(value = \"admin\", userDetailsServiceBeanName = \"unknownUserDetailsService\")\n // \"Cannot resolve 'unknownUserDetailsService' bean\" will be reported if 'unknownUserDetailsService' is not defined in the Spring model\n \n*\n\n @WithUserDetails(value = \"admin\", userDetailsServiceBeanName = \"jpaUserDetailsService\")\n //\"Bean must be of 'org.springframework.security.core.userdetails.UserDetailsService' type\"\n // will be reported if \"jpaUserDetailsService\" bean is not of 'UserDetailsService' type\n \n"
},
"defaultConfiguration": {
"enabled": true,
"level": "error",
"parameters": {
"suppressToolId": "SpringSecurityAnnotationBeanPointersResolveInspection",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Spring/Spring Security",
"index": 248,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "cucumber-java",
"version": "232.8660.185",
"rules": [
{
"id": "CucumberJavaStepDefClassIsPublic",
"shortDescription": {
"text": "Step definition class is not public"
},
"fullDescription": {
"text": "Reports non-public step definition classes. Cucumber-JVM uses step definitions only from public classes.",
"markdown": "Reports non-public step definition classes. Cucumber-JVM uses step definitions only from public classes."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CucumberJavaStepDefClassIsPublic",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Cucumber",
"index": 29,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
},
{
"id": "CucumberJavaStepDefClassInDefaultPackage",
"shortDescription": {
"text": "Step definition class is in default package"
},
"fullDescription": {
"text": "Reports step definition classes that are located in the default package. Cucumber-JVM uses step definition classes only in named packages.",
"markdown": "Reports step definition classes that are located in the default package. Cucumber-JVM uses step definition classes only in named packages."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CucumberJavaStepDefClassInDefaultPackage",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Cucumber",
"index": 29,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "com.intellij.javaee.el",
"version": "232.8660.185",
"rules": [
{
"id": "ELValidationInspection",
"shortDescription": {
"text": "EL validation"
},
"fullDescription": {
"text": "Reports possible EL problems, such as unresolved references and invalid EL locations.",
"markdown": "Reports possible EL problems, such as unresolved references and invalid EL locations."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "ELValidationInspection",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "EL",
"index": 255,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "GlassFish",
"version": "232.8660.185",
"rules": [
{
"id": "Glassfish",
"shortDescription": {
"text": "GlassFish"
},
"fullDescription": {
"text": "Reports incorrect GlassFish-specific XML deployment descriptors: glassfish-web.xml glassfish-application.xml glassfish-ejb-jar.xml Some of the reported issues are: References to non-instantiable classes References to classes that do not extend a required class Empty tag and attribute values Tags that do not include required children tags or attributes Tags that define objects with duplicate names",
"markdown": "Reports incorrect GlassFish-specific XML deployment descriptors:\n\n* [glassfish-web.xml](https://docs.oracle.com/cd/E26576_01/doc.312/e24929/dd-files.htm#GSDPG00078)\n* [glassfish-application.xml](https://docs.oracle.com/cd/E26576_01/doc.312/e24929/dd-files.htm#GSDPG00077)\n* [glassfish-ejb-jar.xml](https://docs.oracle.com/cd/E26576_01/doc.312/e24929/dd-files.htm#GSDPG00079)\n\nSome of the reported issues are:\n\n* References to non-instantiable classes\n* References to classes that do not extend a required class\n* Empty tag and attribute values\n* Tags that do not include required children tags or attributes\n* Tags that define objects with duplicate names"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "Glassfish",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Application servers",
"index": 256,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "idea.plugin.protoeditor",
"version": "232.8660.185",
"rules": [
{
"id": "PbDuplicatedImports",
"shortDescription": {
"text": "Duplicated import statements"
},
"fullDescription": {
"text": "Reports effectively equivalent import statements.",
"markdown": "Reports effectively equivalent import statements."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "PbDuplicatedImports",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Protocol Buffers",
"index": 261,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "JBoss",
"version": "232.8660.185",
"rules": [
{
"id": "JBoss",
"shortDescription": {
"text": "JBoss/WildFly"
},
"fullDescription": {
"text": "Reports incorrect JBoss-specific XML deployment descriptors: 'jboss-web.xml' 'jboss-app.xml' 'jboss.xml' Some of the reported issues are: References to non-instantiable classes References to classes that do not extend a required class Empty tag and attribute values Tags that do not include required children tags or attributes Tags that define objects with duplicate names",
"markdown": "Reports incorrect JBoss-specific XML deployment descriptors:\n\n* `jboss-web.xml`\n* `jboss-app.xml`\n* `jboss.xml`\n\nSome of the reported issues are:\n\n* References to non-instantiable classes\n* References to classes that do not extend a required class\n* Empty tag and attribute values\n* Tags that do not include required children tags or attributes\n* Tags that define objects with duplicate names"
},
"defaultConfiguration": {
"enabled": false,
"level": "error",
"parameters": {
"suppressToolId": "JBoss",
"ideaSeverity": "ERROR",
"qodanaSeverity": "Critical"
}
},
"relationships": [
{
"target": {
"id": "Application servers",
"index": 256,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
},
{
"name": "CheckStyle-IDEA",
"version": "5.81.0",
"rules": [
{
"id": "CheckStyle",
"shortDescription": {
"text": "Checkstyle real-time scan"
},
"fullDescription": {
"text": "This inspection integrates CheckStyle and reports in real-time on problems against the current CheckStyle profile.",
"markdown": "This inspection integrates CheckStyle and reports in real-time on problems against the current CheckStyle profile."
},
"defaultConfiguration": {
"enabled": false,
"level": "warning",
"parameters": {
"suppressToolId": "CheckStyle",
"ideaSeverity": "WARNING",
"qodanaSeverity": "High"
}
},
"relationships": [
{
"target": {
"id": "Checkstyle",
"index": 264,
"toolComponent": {
"name": "IU"
}
},
"kinds": [
"superset"
]
}
]
}
],
"language": "en-US",
"contents": [
"localizedData",
"nonLocalizedData"
],
"isComprehensive": false
}
]
},
"invocations": [
{
"exitCode": 0,
"toolExecutionNotifications": [
{
"message": {
"text": "Reporting from [] 'sanity' inspections was suspended due to high problems count."
},
"level": "error"
}
],
"executionSuccessful": true
}
],
"language": "en-US",
"versionControlProvenance": [
{
"repositoryUri": "ssh://giteajim@git.2martens.de/2martens/wahlrecht.git",
"revisionId": "bb525b8815d1e8472db9c9505699d9a871b3e8e0",
"branch": "main",
"properties": {
"repoUrl": "",
"lastAuthorName": "Jim Martens",
"vcsType": "Git",
"lastAuthorEmail": "jma@hbt.de"
}
}
],
"results": [
{
"ruleId": "HttpUrlsUsage",
"kind": "fail",
"level": "note",
"message": {
"text": "HTTP links are not secure",
"markdown": "HTTP links are not secure"
},
"locations": [
{
"physicalLocation": {
"artifactLocation": {
"uri": "module-server/src/main/kotlin/de/twomartens/wahlrecht/monitoring/actuator/AbstractHealthIndicator.kt",
"uriBaseId": "SRCROOT"
},
"region": {
"startLine": 76,
"startColumn": 34,
"charOffset": 2741,
"charLength": 7,
"snippet": {
"text": "http://"
},
"sourceLanguage": "kotlin"
},
"contextRegion": {
"startLine": 74,
"startColumn": 1,
"charOffset": 2646,
"charLength": 189,
"snippet": {
"text": " companion object {\r\n const val HOST = \"localhost\"\r\n const val HTTP_PREFIX = \"http://\"\r\n const val HOST_PORT_SEPARATOR = \":\"\r\n const val PATH_SEPARATOR = \"/\"\r"
}
}
},
"logicalLocations": [
{
"fullyQualifiedName": "wahlrecht.server.main",
"kind": "module"
}
]
}
],
"partialFingerprints": {
"equalIndicator/v1": "8d42ea2ea7874ef512cd0c127f48e212f41fb21ed33c1af12471afb5509c3753"
},
"properties": {
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate",
"tags": [
"kotlin"
]
}
},
{
"ruleId": "HttpUrlsUsage",
"kind": "fail",
"level": "note",
"message": {
"text": "HTTP links are not secure",
"markdown": "HTTP links are not secure"
},
"locations": [
{
"physicalLocation": {
"artifactLocation": {
"uri": "config/checkstyle/checkstyle.xml",
"uriBaseId": "SRCROOT"
},
"region": {
"startLine": 46,
"startColumn": 80,
"charOffset": 1962,
"charLength": 7,
"snippet": {
"text": "http://"
},
"sourceLanguage": "XML"
},
"contextRegion": {
"startLine": 44,
"startColumn": 1,
"charOffset": 1783,
"charLength": 223,
"snippet": {
"text": " <property name=\"fileExtensions\" value=\"java\"/>\r\n <property name=\"max\" value=\"120\"/>\r\n <property name=\"ignorePattern\" value=\"^package.*|^import.*|a href|href|http://|https://|ftp://\"/>\r\n </module>\r\n\r"
}
}
},
"logicalLocations": [
{
"fullyQualifiedName": "wahlrecht",
"kind": "module"
}
]
}
],
"partialFingerprints": {
"equalIndicator/v1": "de8d45f3a909eabe0dd25e28859c6af227f484c05b43710360da626dfe265bb4"
},
"properties": {
"ideaSeverity": "WEAK WARNING",
"qodanaSeverity": "Moderate",
"tags": [
"XML"
]
}
},
{
"ruleId": "SpringElInspection",
"kind": "fail",
"level": "warning",
"message": {
"text": "Cannot resolve property or method 'CLIENT_SECRET' (dynamic property?)",
"markdown": "Cannot resolve property or method 'CLIENT_SECRET' (dynamic property?)"
},
"locations": [
{
"physicalLocation": {
"artifactLocation": {
"uri": "module-server/src/main/kotlin/de/twomartens/wahlrecht/configuration/WebSecurityConfiguration.kt",
"uriBaseId": "SRCROOT"
},
"region": {
"startLine": 30,
"startColumn": 27,
"charOffset": 1654,
"charLength": 13,
"snippet": {
"text": "CLIENT_SECRET"
},
"sourceLanguage": "SpEL"
},
"contextRegion": {
"startLine": 28,
"startColumn": 1,
"charOffset": 1582,
"charLength": 138,
"snippet": {
"text": " private lateinit var jwkSetUri: String\r\n\r\n @Value(\"#{environment.CLIENT_SECRET}\")\r\n private lateinit var clientSecret: String\r\n\r"
}
}
},
"logicalLocations": [
{
"fullyQualifiedName": "wahlrecht.server.main",
"kind": "module"
}
]
}
],
"partialFingerprints": {
"equalIndicator/v1": "aeb6ea55f96742cb6de110505d70b30bbc4ebf2b230f9b3bfc5837f3c413c34e"
},
"properties": {
"ideaSeverity": "WARNING",
"qodanaSeverity": "High",
"tags": [
"SpEL"
]
}
}
],
"automationDetails": {
"id": "wahlrecht/qodana/2023-08-02",
"guid": "e128e268-80f9-4dc4-bd36-5f0e48fc7592",
"properties": {
"jobUrl": ""
}
},
"newlineSequences": [
"\r\n",
"\n"
],
"properties": {
"configProfile": "starter",
"deviceId": "021121179435866-90f7-47b8-86e9-907decf32605"
}
}
],
"properties": {
"isIdeRun": true
}
}