Showing 537 of 537 total issues
File element_description_defaults.rb
has 1966 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Nokogiri
module HTML4
class ElementDescription
# Methods are defined protected by method_defined? because at
# this point the C-library or Java library is already loaded,
File XmlNode.java
has 1408 lines of code (exceeds 250 allowed). Consider refactoring. Open
package nokogiri;
import static java.lang.Math.max;
import static nokogiri.internals.NokogiriHelpers.*;
Method getNodeCompletePath
has a Cognitive Complexity of 138 (exceeds 5 allowed). Consider refactoring. Open
public static String
getNodeCompletePath(Node node)
{
Node cur, tmp, next;
- 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
File extconf.rb
has 854 lines of code (exceeds 250 allowed). Consider refactoring. Open
ENV["RC_ARCHS"] = "" if RUBY_PLATFORM.include?("darwin")
require "mkmf"
require "rbconfig"
require "fileutils"
XmlNode
has 104 methods (exceeds 20 allowed). Consider refactoring. Open
@JRubyClass(name = "Nokogiri::XML::Node")
public class XmlNode extends RubyObject
{
private static final long serialVersionUID = 1L;
Method nextNode
has a Cognitive Complexity of 99 (exceeds 5 allowed). Consider refactoring. Open
protected boolean
nextNode()
{
// Non-recursive one-fetch-at-a-time depth-first traversal with
// attribute/namespace nodes and white-space stripping.
- 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
File DOM2DTM.java
has 783 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
File SaveContextVisitor.java
has 758 lines of code (exceeds 250 allowed). Consider refactoring. Open
package nokogiri.internals;
import static nokogiri.internals.NokogiriHelpers.canonicalizeWhitespace;
import static nokogiri.internals.NokogiriHelpers.encodeJavaString;
import static nokogiri.internals.NokogiriHelpers.isNamespace;
File NokogiriHelpers.java
has 660 lines of code (exceeds 250 allowed). Consider refactoring. Open
package nokogiri.internals;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
Class Node
has 77 methods (exceeds 20 allowed). Consider refactoring. Open
class Node
include Nokogiri::XML::PP::Node
include Nokogiri::XML::Searchable
include Nokogiri::ClassResolver
include Enumerable
Method handleAttributes
has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring. Open
@Override
protected Iterator<Attr>
handleAttributes(Element element, NameSpaceSymbTable ns)
throws CanonicalizationException
{
- 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
File XmlDocument.java
has 572 lines of code (exceeds 250 allowed). Consider refactoring. Open
package nokogiri;
import static nokogiri.internals.NokogiriHelpers.clearXpathContext;
import static nokogiri.internals.NokogiriHelpers.getCachedNodeOrCreate;
import static nokogiri.internals.NokogiriHelpers.getNokogiriClass;
Method removeDotSegments
has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring. Open
private static String
removeDotSegments(String path)
{
// 1. The input buffer is initialized with the now-appended path
- 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 handleAttributes
has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring. Open
@Override
protected final Iterator<Attr>
handleAttributes(Element element, NameSpaceSymbTable ns)
throws CanonicalizationException
{
- 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
File NokogiriService.java
has 534 lines of code (exceeds 250 allowed). Consider refactoring. Open
package nokogiri;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
File XmlReader.java
has 513 lines of code (exceeds 250 allowed). Consider refactoring. Open
package nokogiri;
import static nokogiri.internals.NokogiriHelpers.getNokogiriClass;
import static nokogiri.internals.NokogiriHelpers.stringOrBlank;
File node.rb
has 506 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "stringio"
module Nokogiri
module XML
# Nokogiri::XML::Node is the primary API you'll use to interact with your Document.
Method handleAttributes
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
@Override
protected Iterator<Attr>
handleAttributes(Element element, NameSpaceSymbTable ns)
throws CanonicalizationException
{
- 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
File ReaderNode.java
has 481 lines of code (exceeds 250 allowed). Consider refactoring. Open
package nokogiri.internals;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
File Canonicalizer11.java
has 477 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file