sleekbyte/tailor

View on GitHub

Showing 84 of 185 total issues

BraceStyleListener has 53 methods (exceeds 20 allowed). Consider refactoring.
Open

public class BraceStyleListener extends SwiftBaseListener {

    private Printer printer;
    private BufferedTokenStream tokenStream;

Severity: Major
Found in src/main/java/com/sleekbyte/tailor/listeners/BraceStyleListener.java - About 7 hrs to fix

    File YamlConfigurationTest.java has 384 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    package com.sleekbyte.tailor.functional.yaml;
    
    import static org.junit.Assert.assertArrayEquals;
    import static org.junit.Assert.assertTrue;
    
    

      File FormatTest.java has 340 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      package com.sleekbyte.tailor.functional;
      
      import static org.junit.Assert.assertArrayEquals;
      
      import com.github.mustachejava.DefaultMustacheFactory;
      Severity: Minor
      Found in src/test/java/com/sleekbyte/tailor/functional/FormatTest.java - About 4 hrs to fix

        File BraceStyleListener.java has 332 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        package com.sleekbyte.tailor.listeners;
        
        import com.sleekbyte.tailor.antlr.SwiftBaseListener;
        import com.sleekbyte.tailor.antlr.SwiftParser;
        import com.sleekbyte.tailor.common.Location;
        Severity: Minor
        Found in src/main/java/com/sleekbyte/tailor/listeners/BraceStyleListener.java - About 4 hrs to fix

          Method addAllExpectedMsgs has 85 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              @Override
              protected void addAllExpectedMsgs() {
                  // Type inheritance commas
                  int start = 9;
                  addExpectedCommaMessage(start, 24, Messages.NO_SPACE_BEFORE);

            Method addAllExpectedMsgs has 78 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                @Override
                protected void addAllExpectedMsgs() {
            
                    // Colons in type annotations
                    int start = 1;

              SourceFileUtilTest has 26 methods (exceeds 20 allowed). Consider refactoring.
              Open

              @RunWith(MockitoJUnitRunner.class)
              public class SourceFileUtilTest {
              
                  @Rule
                  public TestName testName = new TestName();
              Severity: Minor
              Found in src/test/java/com/sleekbyte/tailor/utils/SourceFileUtilTest.java - About 3 hrs to fix

                CLIArgumentParser has 26 methods (exceeds 20 allowed). Consider refactoring.
                Open

                public final class CLIArgumentParser {
                
                    private Options options;
                    private CommandLine cmd;
                
                
                Severity: Minor
                Found in src/main/java/com/sleekbyte/tailor/utils/CLIArgumentParser.java - About 3 hrs to fix

                  Configuration has 24 methods (exceeds 20 allowed). Consider refactoring.
                  Open

                  public final class Configuration {
                  
                      private static final String CONFIG_JSON = "../config.json";
                      private static final Path CODE_CLIMATE_CONFIG = Paths.get(CONFIG_JSON);
                      private static CLIArgumentParser CLIArgumentParser = new CLIArgumentParser();
                  Severity: Minor
                  Found in src/main/java/com/sleekbyte/tailor/utils/Configuration.java - About 2 hrs to fix

                    Method addAllExpectedMsgs has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        @Override
                        protected void addAllExpectedMsgs() {
                            int start = 2;
                            addExpectedMsg(start, 1, Severity.WARNING, Messages.CLASS);
                            addExpectedMsg(start + 5, 5, Severity.WARNING, Messages.INITIALIZER_BODY);

                      File Tailor.java has 274 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      package com.sleekbyte.tailor;
                      
                      import com.sleekbyte.tailor.antlr.SwiftBaseListener;
                      import com.sleekbyte.tailor.antlr.SwiftLexer;
                      import com.sleekbyte.tailor.antlr.SwiftParser;
                      Severity: Minor
                      Found in src/main/java/com/sleekbyte/tailor/Tailor.java - About 2 hrs to fix

                        CommaWhitespaceListener has 23 methods (exceeds 20 allowed). Consider refactoring.
                        Open

                        public final class CommaWhitespaceListener extends SwiftBaseListener {
                        
                            private WhitespaceVerifier verifier;
                        
                            public CommaWhitespaceListener(Printer printer) {

                          File Configuration.java has 268 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          package com.sleekbyte.tailor.utils;
                          
                          import com.google.gson.Gson;
                          import com.google.gson.JsonSyntaxException;
                          import com.sleekbyte.tailor.common.ColorSettings;
                          Severity: Minor
                          Found in src/main/java/com/sleekbyte/tailor/utils/Configuration.java - About 2 hrs to fix

                            Printer has 22 methods (exceeds 20 allowed). Consider refactoring.
                            Open

                            public final class Printer implements Comparable<Printer> {
                            
                                private File inputFile;
                                private Severity maxSeverity;
                                private Formatter formatter;
                            Severity: Minor
                            Found in src/main/java/com/sleekbyte/tailor/output/Printer.java - About 2 hrs to fix

                              Method testIncludeOption has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  @Test
                                  public void testIncludeOption() throws IOException {
                                      // Add expected output
                                      addExpectedMsg(3, 7,
                                          Rules.UPPER_CAMEL_CASE,

                                Method addAllExpectedMsgs has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    @Override
                                    protected void addAllExpectedMsgs() {
                                        addExpectedBraceMsg(13, 54, Severity.WARNING, Messages.SWITCH_STATEMENT);
                                        addExpectedBraceMsg(17, 12, Severity.WARNING, Messages.CLASS);
                                        addExpectedEmptyConstructBodyMsg(24, 19, Severity.WARNING);

                                  Method addAllExpectedMsgs has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      @Override
                                      protected void addAllExpectedMsgs() {
                                          addExpectedMsg(Rules.CONSTANT_NAMING, 2, 5, Severity.WARNING, Messages.GLOBAL + Messages.CONSTANT
                                              + Messages.GLOBAL_CONSTANT_NAMING);
                                          addExpectedMsg(Rules.CONSTANT_K_PREFIX, 2, 22, Severity.WARNING, Messages.CONSTANT + Messages.NAME

                                    Method testCliAndConfigFilePrecedence has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        @Test
                                        public void testCliAndConfigFilePrecedence() throws IOException {
                                    
                                            addExpectedMsg(12, 15,
                                                Rules.TERMINATING_SEMICOLON,

                                      Function demo has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      func demo() {
                                          var x: Int
                                          if (x == 2) {
                                              return (x < 2)
                                          }

                                        Method testPurge has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            @Test
                                            public void testPurge() throws IOException {
                                                addExpectedMsg(12, 15,
                                                    Rules.TERMINATING_SEMICOLON,
                                                    Messages.STATEMENTS + Messages.SEMICOLON,
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language