Showing 7,269 of 9,050 total issues
Method start
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private Future<Void> start(final Mission mission) {
/*
* Prepare for mission, it's verf important to bind mission object to Vertx
* instead of bind(Vertx) method.
*/
- Read upRead up
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 module
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
@SuppressWarnings("all")
public AbstractModule module(final ConcurrentMap<Class<I>, Set<Class<T>>> tree,
final Set<Class<T>> flat) {
final Set<Class<?>> classes = this.pointers;
- Read upRead up
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 executeRequest
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
static void executeRequest(final RoutingContext context,
final Map<String, List<Rule>> rulers,
final Depot depot,
final Object[] args,
final Validator verifier) {
- Read upRead up
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 mountPlugin
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
static <T> T mountPlugin(final String key, final BiFunction<Class<?>, JsonObject, T> function,
final Supplier<T> supplier) {
if (PLUGIN_CONFIG.containsKey(key)) {
final JsonObject metadata = PLUGIN_CONFIG.getJsonObject(key);
final Class<?> pluginCls = Ut.clazz(metadata.getString(YmlCore.extension.COMPONENT));
- Read upRead up
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 dataSession
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private static <T> void dataSession(final RoutingContext context,
final T data,
final Method method) {
final Session session = context.session();
if (Objects.isNull(session) || Objects.isNull(data)) {
- Read upRead up
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 moveOn
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
void moveOn(final Mission mission, final boolean noError) {
if (noError) {
/*
* Preparing for job
**/
- Read upRead up
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 isRegion
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected boolean isRegion(final JsonObject matrix) {
if (Objects.isNull(matrix)) {
return false; // 禁用视图流程
}
boolean isEnabled = Ut.isNotNil(Ut.valueJArray(matrix, Ir.KEY_PROJECTION));
- Read upRead up
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 determineAvailabilityOfResourceBundleControl
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private static boolean determineAvailabilityOfResourceBundleControl() {
try {
final ResourceBundle.Control dummyControl = ValidatorBundleLocator.AggregateResourceBundle.CONTROL;
if (dummyControl == null) {
return false;
- Read upRead up
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 connect
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void connect(final Vertx vertx, final HConfig config) {
// 1. Load rules
final List<String> rules = Ut.ioFiles("codex", VPath.SUFFIX.YML);
LOGGER.info(VMessage.Scatter.CODEX, rules.size());
- Read upRead up
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 find
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private static <T, R> T find(final List<T> list, final T current, final Function<T, R> fnValue) {
if (Objects.isNull(list) || list.isEmpty() || Objects.isNull(current)) {
/*
* Could not be found here
* 1) list is null ( Source List )
- Read upRead up
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 a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private <T> List<T> searchInternal(final DSLContext context, final JsonObject criteria, final Sorter sorter) {
// Started steps
final SelectWhereStep started = context.selectFrom(this.analyzer.table());
// Condition injection
SelectConditionStep conditionStep = null;
- Read upRead up
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 ruleJEqual
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
static boolean ruleJEqual(final JsonObject record, final JsonObject latest,
final JsonArray matrix) {
/*
* Matrix may be multi groups
*/
- Read upRead up
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 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void mount(final Router router, final JsonObject config) {
if (ENABLED && Objects.nonNull(this.sockOptions)) {
/*
* 1. Whether the `publish` has been enabled
- Read upRead up
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 toHandler
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
static <T> Handler<AsyncResult<T>> toHandler(
final Message<Envelop> message
) {
return handler -> {
if (handler.succeeded()) {
- Read upRead up
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 ruleMatch
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private static boolean ruleMatch(final KRuleTerm rule, final JsonObject recordL, final JsonObject recordR) {
if (Objects.isNull(rule)) {
/* Compare record directly */
return recordL.equals(recordR);
} else {
- Read upRead up
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 invoke
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
@SuppressWarnings("all")
public void invoke(final Object proxy,
final Method method,
final Message<Envelop> message) {
- Read upRead up
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 failure
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected Envelop failure(final String address,
final AsyncResult<Message<Envelop>> handler) {
final Throwable cause = handler.cause();
final WebException error;
if (Objects.isNull(cause)) {
- Read upRead up
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 fetch
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public Mission fetch(final String code) {
final JobClient client = JobInfix.getClient();
Mission mission = client.fetch(code);
if (Objects.isNull(mission)) {
- Read upRead up
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 ruleJOk
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
static boolean ruleJOk(final JsonObject record, final JsonArray matrix) {
/*
* Matrix may be multi groups
*/
final int size = matrix.size();
- Read upRead up
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 listDirectoriesN
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private static List<String> listDirectoriesN(final String folder, final String root) {
final List<String> folders = new ArrayList<>();
// root + folder
File folderObj = new File(IoPath.resolve(root, folder));
if (!folderObj.exists()) {
- Read upRead up
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"