ArtifactForms/MeshLibCore

View on GitHub

Showing 407 of 407 total issues

Method calculateFaceNormals has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private void calculateFaceNormals() {
        for (Face3D face : mesh.faces) {
            Vector3f faceNormal = mesh.calculateFaceNormal(face);
            faceNormals.put(face, faceNormal);
            for (int i = 0; i < face.indices.length; i++) {
Severity: Minor
Found in src/main/java/mesh/util/VertexNormals.java - About 25 mins to fix

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"

Further reading

Method handleSelection has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  private void handleSelection(int x, int y) {
    SceneObject sceneObject = null;
    String sceneObjectName = selectionRender.getObject(x, y);

    if (sceneObjectName != null) {
Severity: Minor
Found in src/main/java/workspace/Workspace.java - About 25 mins to fix

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"

Further reading

Method appendUtil has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  private Mesh3D appendUtil(Mesh3D... meshes) {
    // FIXME copy vertices and faces
    int n = 0;
    Mesh3D mesh = new Mesh3D();
    List<Vector3f> vertices = mesh.vertices;
Severity: Minor
Found in src/main/java/mesh/Mesh3D.java - About 25 mins to fix

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"

Further reading

Method equals has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  @Override
  public boolean equals(Object obj) {
    if (this == obj) return true;
    if (obj == null) return false;
    if (getClass() != obj.getClass()) return false;
Severity: Minor
Found in src/main/java/math/Vector3f.java - About 25 mins to fix

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"

Further reading

Method bridgeHoles has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private void bridgeHoles() {
        for (Face3D face : originalFaces) {
            int size = face.indices.length;
            for (int i = 0; i < size; i++) {
                Edge3D forwardEdge = createEdgeAt(face, i);
Severity: Minor
Found in src/main/java/mesh/modifier/SolidifyModifier.java - About 25 mins to fix

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"

Further reading

Method createJoints has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private void createJoints() {
        for (int z = 0; z < cubes[0][0].length; z++)
            for (int y = 0; y < cubes.length; y++)
                for (int x = 0; x < cubes[0].length; x++)
                    createJointAt(x, y, z);
Severity: Minor
Found in src/main/java/mesh/creator/unsorted/CubeJointLatticeCubeCreator.java - About 25 mins to fix

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"

Further reading

Method createVertices has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    private void createVertices() {
        float y0 = -(turns * dy) / 2f; // Apply offset to center the helix
        float stepY = dy / (float) majorSegments;
        float majorAngle = 0;
        float minorAngle = 0;
Severity: Minor
Found in src/main/java/mesh/creator/primitives/HelixCreator.java - About 25 mins to fix

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"

Further reading

Severity
Category
Status
Source
Language