Showing 14 of 14 total issues
Class PresentationXMLConvert
has 33 methods (exceeds 20 allowed). Consider refactoring. Open
class PresentationXMLConvert < IsoDoc::PresentationXMLConvert
def initialize(options)
@libdir = File.dirname(__FILE__)
super
end
Class Converter
has 26 methods (exceeds 20 allowed). Consider refactoring. Open
class Converter < Standoc::Converter
XML_ROOT_TAG = "ogc-standard".freeze
XML_NAMESPACE = "https://www.metanorma.org/ns/ogc".freeze
register_for "ogc"
Class Converter
has 26 methods (exceeds 20 allowed). Consider refactoring. Open
class Converter < Standoc::Converter
def boilerplate_file(_xmldoc)
File.join(@libdir, "boilerplate.adoc")
end
Class Converter
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
class Converter < Standoc::Converter
def metadata_author(node, xml)
corporate_author(node, xml)
personal_author(node, xml)
end
Class HtmlConvert
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
class HtmlConvert < IsoDoc::HtmlConvert
def initialize(options)
@libdir = File.dirname(__FILE__)
super
end
Method metadata_subdoctype
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def metadata_subdoctype(node, xml)
s = node.attr("docsubtype")
s1 = ::IsoDoc::Ogc::DOCSUBTYPE_ABBR.invert[s] and s = s1
case doctype(node)
when "standard"
- 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 biblio_ref_entry_code
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def biblio_ref_entry_code(ordinal, ids, _id, standard, datefn, _bib)
Method norm_ref_entry_code
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def norm_ref_entry_code(_ordinal, _idents, _ids, _standard, _datefn, _bib)
Method make_tr_attr
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def make_tr_attr(cell, row, totalrows, header, bordered)
Method xref_init
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def xref_init(lang, script, _klass, labels, options)
Method output
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def output(isodoc_node, inname, outname, format, options={})
Method sequential_permission_bodyx
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def sequential_permission_bodyx(id, block, label, klass, model, container: false)
Method obligations_cleanup_inherit
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def obligations_cleanup_inherit(xml)
xml.xpath("//annex").each do |r|
r["obligation"] = "informative" unless r["obligation"]
end
xml.xpath("//clause[not(ancestor::boilerplate)]").each do |r|
- 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 set_obligation
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def set_obligation(attrs, node)
if node.attr("style") == "appendix" && node.level == 1
attrs[:obligation] = if node.attributes.has_key?("obligation")
node.attr("obligation")
else "informative"
- 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"