Showing 400 of 533 total issues
Method start_element_namespace
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def start_element_namespace(name, attrs = [], prefix = nil, uri = nil, ns = []) # rubocop:disable Metrics/ParameterLists
Method HTML4
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def HTML4(input, url = nil, encoding = nil, options = XML::ParseOptions::DEFAULT_HTML, &block)
Method parse
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def parse(string_or_io, url = nil, encoding = nil, **options, &block)
Method xpath_internal
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def xpath_internal(node, paths, handler, ns, binds)
Method XML
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def XML(thing, url = nil, encoding = nil, options = XML::ParseOptions::DEFAULT_XML, &block)
Method parse
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def parse(thing, url = nil, encoding = nil, options = ParseOptions::DEFAULT_XML, &block)
Method newEmpty
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
newEmpty(Ruby runtime,
Document doc,
IRubyObject name,
IRubyObject external_id,
IRubyObject system_id)
Method parse
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def parse(string, url = nil, encoding = nil, **options, &block)
Method start_element_namespace
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def start_element_namespace(name, attrs = [], prefix = nil, uri = nil, ns = []) # rubocop:disable Metrics/ParameterLists
Method parse
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def parse(input, url = nil, encoding = nil, options = XML::ParseOptions::DEFAULT_HTML, &block)
Method adoptAsChild
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private Node[]
adoptAsChild(final Node parent, Node otherNode)
{
/*
* This is a bit of a hack. C-Nokogiri allows adding a bare text node as the root element.
- 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 isNamespaceDefined
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private static boolean
isNamespaceDefined(String qName, NamedNodeMap nodeMap)
{
if (isNamespace(qName.intern())) { return true; }
for (int i = 0; i < nodeMap.getLength(); i++) {
- 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 do_parse
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected Document
do_parse() throws SAXException, IOException
{
try {
parser.parse(getInputSource());
- 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 getElements
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private static List<Node>
getElements(Node node, final boolean firstOnly)
{
NodeList children = node.getChildNodes();
if (children.getLength() == 0) {
- 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 get
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public XmlNamespace
get(Node node, String prefix)
{
if (prefix == null) { return defaultNamespace; }
for (Map.Entry<CacheKey, CacheEntry> entry : cache.entrySet()) {
- 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 enter
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public boolean
enter(DocumentType docType)
{
if (canonical) {
c14nNodeList.add(docType);
- 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 canonicalizeWhitespace
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static CharSequence
canonicalizeWhitespace(CharSequence str)
{
final int len = str.length();
StringBuilder sb = new StringBuilder(len);
- 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 outputTextToWriter
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected static final void
outputTextToWriter(
final String text, final OutputStream writer
) throws IOException
{
- 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 encodeStringToHtmlEntity
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private CharSequence
encodeStringToHtmlEntity(CharSequence text)
{
if (encoding == null) { return text; }
- 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 resolveSystemId
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private static String
resolveSystemId(String baseName, String systemId)
{
if (baseName == null || baseName.length() < 1) { return null; }
String parentName;
- 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"