Showing 9 of 324 total issues
Function DmnCheckJsExtension
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function DmnCheckJsExtension(eventBus, drd, elementRegistry, moddle, overlays, canvas) {
const messages = document.createElement("div");
messages.classList.add('message-box');
messages.id = "message-box";
Method TOKENIZER
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static Parser<?> TOKENIZER(Collection<ItemDefinition> itemDefinitions) {
final Parser<?> itemDefinitionTokenizer = itemDefinitions.stream()
.map(NamedElement::getName)
.filter(Objects::nonNull)
.map(name -> Patterns.string(name)
Method main
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static void main(String[] args) {
final ValidationServer validationServer = new ValidationServer();
final Logger logger = LoggerFactory.getLogger(ValidationServer.class);
Function validate
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function validate() {
const map = {};
moddle.toXML(drd._definitions, {}, (err, xml) => {
log("Start validation.");
Method zip
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static <A, B, C, D> Stream<D> zip(
final Stream<? extends A> a,
final Stream<? extends B> b,
final Stream<? extends C> c,
final TriFunction<? super A, ? super B, ? super C, ? extends D> zipper) {
Method validate
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@Override
public List<ValidationResult> validate(ItemDefinition itemDefinition, ValidationContext validationContext) {
final Collection<ItemDefinition> itemDefinitionsAndComponents = itemDefinition.getItemComponents().stream()
.filter(itemComponent -> itemComponent.getAllowedValues() != null)
Function DmnCheckJsExtension
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function DmnCheckJsExtension(eventBus, drd, elementRegistry, moddle, overlays, canvas) {
Method zip
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
public static <A, B, C, D> Stream<D> zip(
final Stream<? extends A> a,
final Stream<? extends B> b,
final Stream<? extends C> c,
final TriFunction<? super A, ? super B, ? super C, ? extends D> zipper) {
- 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 zip
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
public static <A, B, C> Stream<C> zip(
final Stream<? extends A> a,
final Stream<? extends B> b,
final BiFunction<? super A, ? super B, ? extends C> zipper) {
Objects.requireNonNull(zipper);
- 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"