jshaptic/minimatch-javaport

View on GitHub

Showing 41 of 78 total issues

Replace this use of System.out or System.err by a logger.
Open

System.out.format("%s: ", Thread.currentThread().getStackTrace()[2].getLineNumber());

Rename "options" which hides the field declared at line 132.
Open

int options = this.options;

Format specifiers should be used instead of string concatenation.
Open

System.out.format(logline.trim() + "\n", vars);

This block of commented-out lines of code should be removed.
Open

// {a},b}

Define and throw a dedicated exception instead of using a generic one.
Open

throw new RuntimeException("wtf?");

Rename "negate" which hides the field declared at line 137.
Open

boolean negate = false;

Refactor this method to reduce its Cognitive Complexity from 16 to the 15 allowed.
Open

public Pattern makeRe() {

Rename "set" which hides the field declared at line 133.
Open

MinimatchPattern[][] set = this.set;

Rename "options" which hides the field declared at line 132.
Open

int options = this.options;

Replace this use of System.out or System.err by a logger.
Open

System.out.format(logline.trim() + "\n", vars);

Refactor this method to reduce its Cognitive Complexity from 24 to the 15 allowed.
Open

public static RangePair range(String a, String b, String str) {

Rename "options" which hides the field declared at line 132.
Open

int options = this.options;

Rename "set" which hides the field declared at line 133.
Open

MinimatchPattern[][] set = new MinimatchPattern[globParts.length][];

Extract this nested ternary operation into an independent statement.
Open

: hasOption(options, DOT) ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";

Extract this nested ternary operation into an independent statement.
Open

String t = pl.type == '*' ? STAR : pl.type == '?' ? QMARK : "\\" + pl.type;

Refactor this method to reduce its Cognitive Complexity from 18 to the 15 allowed.
Open

private boolean match(String path, boolean partial) {

Rename "options" which hides the field declared at line 132.
Open

int options = this.options;

This block of commented-out lines of code should be removed.
Open

// treated as individual members, like {a,{b,c},d}

Define a constant instead of duplicating this literal "pre{{{in}}}post" 4 times.
Open

BalancedMatch.balanced("{{", "}}", "pre{{{in}}}post");

Rename "pattern" which hides the field declared at line 134.
Open

String pattern = this.pattern;
Severity
Category
Status
Source
Language