Showing 35 of 96 total issues
Method getTreeCellRendererComponent
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
tree: JTree?,
value: Any?,
selected: Boolean,
expanded: Boolean,
leaf: Boolean,
Avoid deeply nested control flow statements. Open
Open
if (ps.assets.minecraft.textures.gui.container != null) dir("container") {
if (ps.assets.minecraft.textures.gui.container.creativeInventory) dir("creative_inventory") {}
}
Avoid deeply nested control flow statements. Open
Open
if (ps.assets.minecraft.textures.gui.title != null) dir("title") {
if (ps.assets.minecraft.textures.gui.title.background) dir("background") {}
}
Avoid deeply nested control flow statements. Open
Open
if (ps.assets.minecraft.textures.gui.presets) dir("presets") {}
Avoid deeply nested control flow statements. Open
Open
if (ps.assets.minecraft.textures.gui.advancements != null) dir("advancements") {
if (ps.assets.minecraft.textures.gui.advancements.backgrounds) dir("backgrounds") {}
}
Avoid deeply nested control flow statements. Open
Open
models = if (isSelected("assets/minecraft/models")) PackUtil.PackStructure.Minecraft.Models(
block = isSelected("assets/minecraft/models/block"),
item = isSelected("assets/minecraft/models/item")
) else null,
Avoid deeply nested control flow statements. Open
Open
shaders = if (isSelected("assets/minecraft/shaders")) PackUtil.PackStructure.Minecraft.Shaders(
post = isSelected("assets/minecraft/shaders/post"),
program = isSelected("assets/minecraft/shaders/program")
) else null,
Avoid deeply nested control flow statements. Open
Open
textures = if (isSelected("assets/minecraft/textures")) PackUtil.PackStructure.Minecraft.Textures(
block = isSelected("assets/minecraft/textures/block"),
colourmap = isSelected("assets/minecraft/textures/colourmap"),
effect = isSelected("assets/minecraft/textures/effect"),
entity = isSelected("assets/minecraft/textures/entity"),
Avoid deeply nested control flow statements. Open
Open
if (ps.assets.minecraft.textures.models.armor) dir("armor") {}
Method getTableCellRendererComponent
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
table: JTable,
value: Any,
isSelected: Boolean,
hasFocus: Boolean,
row: Int,
Avoid deeply nested control flow statements. Open
Open
if (image.width == image.height) {
return image.width
}
Method getListCellRendererComponent
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
list: JList<*>,
value: Any,
index: Int,
isSelected: Boolean,
cellHasFocus: Boolean
Method search
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
string: String,
caseInsensitive: Boolean = true,
comments: Boolean = false,
start: Int = -1,
backwards: Boolean = false
Method getListCellRendererComponent
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
list: JList<*>?,
value: Any?,
index: Int,
isSelected: Boolean,
cellHasFocus: Boolean
Method addDropTarget
has a Cognitive Complexity of 22 (exceeds 20 allowed). Consider refactoring. Open
Open
private fun addDropTarget() {
this.dropTarget = object : DropTarget() {
@Suppress("UNCHECKED_CAST")
override fun dragEnter(dtde: DropTargetDragEvent) {
val file = Quiver.selectedFile
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"