silentbalanceyh/vertx-zero

View on GitHub

Showing 9,050 of 9,050 total issues

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

    private String translate(final Class<?> daoCls, final String field) {
        final String pojoFile = this.pojoMap.get(daoCls);
        if (Ut.isNil(pojoFile)) {
            return field;
        } else {
Severity: Minor
Found in vertx-gaia/vertx-up/src/main/jib/io/vertx/up/uca/jooq/UxJoin.java - About 55 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 extract has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    private Event extract(final Method method, final String root) {
        // 1.Method path
        final Event event = new Event();
        // 2.Method resolve
        final HttpMethod httpMethod = MethodResolver.resolve(method);

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

    @Override
    public void mount(final Router router, final JsonObject config) {
        final String name = this.getClass().getSimpleName();
        // Extract class that are implemented
        final Class<?> clazz = ZeroStore.injection(YmlCore.router.__KEY); // ZeroAmbient.getPlugin(KName.ROUTER);

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

    private Function<JsonObject, JsonArray> actionS(final HAtom atom, final KJoin join) {
        return condition -> {
            if (Ux.irNil(condition)) {
                return new JsonArray();
            }

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

    private Function<JsonObject, Future<JsonArray>> actionA(final HAtom atom, final KJoin join) {
        return condition -> {
            if (Ux.irNil(condition)) {
                return Ux.futureA();
            }

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

    private void addWhere(final JsonObject raw, final IrItem item) {
        if (HUt.isNil(raw)) {
            /*
             * Empty add new key directly here, because there is no condition,
             * in this kind of situation, the system will add `qrKey = value` to current

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

    static <T, V> List<T> save(final List<T> list, final T entity, final Function<T, V> keyFn) {
        if (Objects.isNull(entity)) {
            return list;
        }
        final V keyAdd = keyFn.apply(entity);
Severity: Minor
Found in vertx-gaia/vertx-ams/src/main/java/io/horizon/util/CSave.java - About 55 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 parse has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    static ConcurrentMap<String, Boolean> parse(final List<String> valueList) {
        final ConcurrentMap<String, Boolean> result = new ConcurrentHashMap<>();
        if (Objects.isNull(valueList) || EmAttribute.Marker.NAMES.length != valueList.size()) {
            /*
             * 约束限定,两种情况返回默认值

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

    @Override
    public void serialize(final KRuleTerm ruleTerm,
                          final JsonGenerator jgen,
                          final SerializerProvider serializerProvider) throws IOException {
        if (Objects.nonNull(ruleTerm)) {

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

    @SuppressWarnings("unchecked")
    static <T> T vT(final JsonObject item, final String field, final Class<T> clazz) {
        if (TIs.isNil(item)) {
            return null;
        } else {
Severity: Minor
Found in vertx-gaia/vertx-ams/src/main/java/io/horizon/util/TV.java - About 55 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 isSameBy has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    private static boolean isSameBy(final Object left, final Object right, final String field) {
        // 同时为 null
        if (Objects.isNull(left) && Objects.isNull(right)) {
            return true;
        }
Severity: Minor
Found in vertx-gaia/vertx-ams/src/main/java/io/horizon/util/CSave.java - About 55 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 to has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public Date to(final Object value, final Class<?> type) {
        if (Objects.isNull(value)) {
            return new Date();
        } else {
Severity: Minor
Found in vertx-gaia/vertx-ams/src/main/jib/io/horizon/uca/convert/DateVto.java - About 55 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 waitUntil has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public long waitUntil() {
        final Instant end = this.formula.runAt();
        if (Objects.isNull(end)) {
            /*
             * Fix issue of delay < 1ms, the default should be 1
Severity: Minor
Found in vertx-gaia/vertx-co/src/main/java/io/vertx/up/atom/sch/KTimer.java - About 55 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 methodSeek has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    private static Method methodSeek(final Object instance, final String name, final Object... args) {
        // Direct invoke, multi overwrite for unbox/box issue still existing.
        if (Ut.isNil(name) || Objects.isNull(instance)) {
            throw new _412ArgumentNullException(Invoker.class, "name | instance");
        }
Severity: Minor
Found in vertx-gaia/vertx-co/src/main/java/io/vertx/up/util/Invoker.java - About 55 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 isIn has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    static boolean isIn(final Integer value, final Integer min, final Integer max) {
        // min / max = null
        if (null == min && null == max) {
            return true;
        } else if (null != min && null != max) {
Severity: Minor
Found in vertx-gaia/vertx-ams/src/main/java/io/horizon/util/TNumeric.java - About 55 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 authenticate has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    private void authenticate(final Frame frame, final StompServerConnection connection,
                              final Handler<AsyncResult<Void>> remainingActions) {
        if (connection.server().options().isSecured()) {
            /*
             * The Modification based on new interface to parsing the `Authorization` header

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

    @Override
    public void minimize(final JsonObject dataReference, final JsonObject matrix, final Acl acl) {
        /* inputArray */
        final JsonArray inputArray = dataReference.getJsonArray("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 fetchModule has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    private Future<JsonObject> fetchModule(final JsonObject condition, final Supplier<Future<JsonObject>> executor) {
        final String appId = condition.getString("appId");
        final String entry = condition.getString("entry");
        if (Ut.isNil(appId, entry)) {
            return Ux.futureJ();

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

    public Future<JsonObject> procAsync(final JsonObject newRecord,
                                        final JsonObject oldRecord,
                                        final JsonObject options) {
        final JsonObject optJson = Ut.valueJObject(options);
        final AspectPlugin plugin = Ox.pluginActivity(optJson);
Severity: Minor
Found in vertx-pin/zero-vie/src/main/jib/io/mature/extension/uca/log/TrackIo.java - About 55 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 procAsync has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public Future<JsonArray> procAsync(final JsonArray newArray,
                                       final JsonArray oldArray,
                                       final JsonObject options,
                                       final Integer counter) {
        final JsonObject optJson = Ut.valueJObject(options);
Severity: Minor
Found in vertx-pin/zero-vie/src/main/jib/io/mature/extension/uca/log/TrackIo.java - About 55 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