silentbalanceyh/vertx-zero

View on GitHub

Showing 9,050 of 9,050 total issues

Method validate has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    static boolean validate(final String[] args) {
        final JsonObject input = Ut.valueJObject(SlConfig.validate().getJsonObject(YmlCore.shell.validate.INPUT));
        /*
         * 1. required arguments for complex shell building
         */

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

    <T> Set<T> saveEntity(final JsonArray data, final ExTable table) {
        final Set<T> resultSet = new HashSet<>();
        if (Objects.nonNull(table.classPojo()) && Objects.nonNull(table.classDao())) {
            try {
                final JsonObject filters = table.whereAncient(data);

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 13 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)

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

    static Kv<String, String> field(final Object value) {
        if (KWeb.ARGS.V_HOLDER.equals(value)) {
            return null;
        }
        final String field;

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 searchInternal has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private <T> List<T> searchInternal(final DSLContext context, final Ir qr) {
        // Started steps
        final SelectWhereStep started = context.selectFrom(this.analyzer.table());
        // Condition set
        SelectConditionStep conditionStep = null;
Severity: Minor
Found in vertx-gaia/vertx-up/src/main/jib/io/vertx/up/uca/jooq/ActionQr.java - About 1 hr to fix

    Method attributes has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        static JsonArray attributes(final String key) {
            final JsonArray columns = getColumn(key);
            if (Ut.isNotNil(columns)) {
                /*
                 * column transfer to

      Method toJson has 39 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              @Override
              public default io.vertx.core.json.JsonObject toJson() {
                      io.vertx.core.json.JsonObject json = new io.vertx.core.json.JsonObject();
                      json.put("KEY",getKey());
                      json.put("NAME",getName());

        Method checkFieldType has 39 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            @Override
            public CheckResult checkFieldType(final MField field, final ConcurrentMap<String, Object> columnDetail) {
                if (null == columnDetail) {
                    return CheckResult.FAILED;
                }

          Method from has 39 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              @Override
              public void from(IPBuyOrder from) {
                  setKey(from.getKey());
                  setSerial(from.getSerial());
                  setType(from.getType());

            Method from has 39 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                @Override
                public void from(IPBuyOrder from) {
                    setKey(from.getKey());
                    setSerial(from.getSerial());
                    setType(from.getType());

              Method toJson has 39 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      @Override
                      public default io.vertx.core.json.JsonObject toJson() {
                              io.vertx.core.json.JsonObject json = new io.vertx.core.json.JsonObject();
                              json.put("KEY",getKey());
                              json.put("SERIAL",getSerial());

                Method getSerializedSize has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    @Override
                    public int getSerializedSize() {
                        int size = this.memoizedSize;
                        if (size != -1) {
                            return size;

                  Similar blocks of code found in 3 locations. Consider refactoring.
                  Open

                  package io.vertx.mod.rbac.authorization.child;
                  
                  import io.vertx.core.json.JsonObject;
                  import io.vertx.mod.rbac.authorization.Amalgam;
                  import io.vertx.mod.rbac.authorization.Assembler;
                  vertx-pin/zero-rbac/src/main/modulat/io/vertx/mod/rbac/authorization/direct/GdHorizon.java on lines 1..56
                  vertx-pin/zero-rbac/src/main/modulat/io/vertx/mod/rbac/authorization/parent/GpHorizon.java on lines 1..56

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 103.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 3 locations. Consider refactoring.
                  Open

                  package io.vertx.mod.rbac.authorization.direct;
                  
                  import io.vertx.core.json.JsonObject;
                  import io.vertx.mod.rbac.authorization.Amalgam;
                  import io.vertx.mod.rbac.authorization.Assembler;
                  vertx-pin/zero-rbac/src/main/modulat/io/vertx/mod/rbac/authorization/child/GcHorizon.java on lines 1..56
                  vertx-pin/zero-rbac/src/main/modulat/io/vertx/mod/rbac/authorization/parent/GpHorizon.java on lines 1..56

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 103.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 3 locations. Consider refactoring.
                  Open

                  package io.vertx.mod.rbac.authorization.parent;
                  
                  import io.vertx.core.json.JsonObject;
                  import io.vertx.mod.rbac.authorization.Amalgam;
                  import io.vertx.mod.rbac.authorization.Assembler;
                  vertx-pin/zero-rbac/src/main/modulat/io/vertx/mod/rbac/authorization/child/GcHorizon.java on lines 1..56
                  vertx-pin/zero-rbac/src/main/modulat/io/vertx/mod/rbac/authorization/direct/GdHorizon.java on lines 1..56

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 103.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

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

                      @SuppressWarnings("unchecked")
                      static <T> T vT(final String literal, final Class<?> type) {
                          if (TIs.isNil(literal)) {
                              return null;
                          }
                  Severity: Minor
                  Found in vertx-gaia/vertx-ams/src/main/java/io/horizon/util/TV.java - About 1 hr to fix

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

                        static void valueToJson(final ClusterSerializable json, final String field) {
                            if (json instanceof JsonArray) {
                                // Fix: 11
                                final JsonArray array = (JsonArray) json;
                                HIter.itJArray(array).forEach(item -> valueToJson(item, field));
                    Severity: Minor
                    Found in vertx-gaia/vertx-ams/src/main/java/io/horizon/util/TValue.java - About 1 hr to fix

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

                          static InputStream read(final String filename,
                                                  final Class<?> clazz) {
                              final String root = IoPath.root();
                              LOG.io(INFO.IoStream.__FILE_ROOT, root, filename);
                              /*
                      Severity: Minor
                      Found in vertx-gaia/vertx-ams/src/main/java/io/horizon/util/IoStream.java - About 1 hr to fix

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

                            @Override
                            public boolean equals(Object obj) {
                                if (this == obj)
                                    return true;
                                if (obj == null)

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

                              private JsonObject procColumn(final UiColumn column) {
                                  final JsonObject columnJson = new JsonObject();
                                  columnJson.put("title", column.getTitle());
                                  columnJson.put("dataIndex", column.getDataIndex());
                                  /*
                            Severity
                            Category
                            Status
                            Source
                            Language