dropwizard/dropwizard

View on GitHub
dropwizard-migrations/src/main/java/io/dropwizard/migrations/DbDumpCommand.java

Summary

Maintainability
B
6 hrs
Test Coverage

Method configure has 87 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Override
    public void configure(Subparser subparser) {
        super.configure(subparser);

        subparser.addArgument("-o", "--output")

    Method run has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        @Override
        @SuppressWarnings("UseOfSystemOutOrSystemErr")
        public void run(Namespace namespace, Liquibase liquibase) throws Exception {
            final Set<Class<? extends DatabaseObject>> compareTypes = new HashSet<>();
    
    

      Method run has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          @Override
          @SuppressWarnings("UseOfSystemOutOrSystemErr")
          public void run(Namespace namespace, Liquibase liquibase) throws Exception {
              final Set<Class<? extends DatabaseObject>> compareTypes = new HashSet<>();
      
      

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

          private void generateChangeLog(final Database database, final CatalogAndSchema catalogAndSchema,
                                         final DiffToChangeLog changeLogWriter, PrintStream outputStream,
                                         final Set<Class<? extends DatabaseObject>> compareTypes)

        There are no issues that match your filters.

        Category
        Status