Showing 7 of 11 total issues

File FontAwesome.java has 767 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package com.github.athi.athifx.gui.font_awesome;

import javafx.scene.control.Label;

import static com.github.athi.athifx.gui.configuration.ApplicationConfiguration.FONT_SIZE;

    Method showPopup has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private static void showPopup(String title, String message, FontAwesome iconFont, String color) {
            HEIGHT = DEFAULT_HEIGHT;
            changeHeightBasedOnMessage(message);
            
            Label titleLabel = new Label(title);

      Method invokeMethodWithAnnotation has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

          private void invokeMethodWithAnnotation(Object object, Class<? extends Annotation> annotation) {
              for (Method method : object.getClass().getDeclaredMethods()) {
                  if (method.isAnnotationPresent(annotation)) {
                      try {
                          if (!method.isAccessible()) {

      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 namedExceptionMessage has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

          private static String namedExceptionMessage(String message) {
              String beginNamedMessageSubstring = message.substring(message.indexOf(NAMED_STRING));
              String fullNamedMessageSubstring = beginNamedMessageSubstring.substring(NAMED_STRING.length(), beginNamedMessageSubstring.indexOf(")"));
      
              if (fullNamedMessageSubstring.contains(INI_NAME)) {

      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 setAnchors has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          static void setAnchors(Node child, Double left, Double top, Double right, Double bottom) {

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

            @PostConstruct
            private void initMenu() {
                setPrefWidth(200);
                setPadding(Insets.EMPTY);
        
        
        Severity: Minor
        Found in athi-fx-gui/src/main/java/com/github/athi/athifx/gui/menu/Menu.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 initConfigurationFiles has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

            private void initConfigurationFiles(List<File> configurationFiles) {
                for (File configurationFile : configurationFiles) {
                    String name = configurationFile.getName();
                    try {
                        URL url = configurationFile.toURI().toURL();

        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