Showing 236 of 328 total issues
Function createProperty
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
createProperty: function (kind, key, value, method, shorthand) {
Function renderXJSLiteral
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function renderXJSLiteral(object, isLast, state, start, end) {
Function _findMapping
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,
aColumnName, aComparator) {
Function _writeUInt16
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function _writeUInt16 (buf, value, offset, littleEndian, noAssert) {
Function _writeFloat
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function _writeFloat (buf, value, offset, littleEndian, noAssert) {
Function _writeDouble
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function _writeDouble (buf, value, offset, littleEndian, noAssert) {
Function read
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
exports.read = function(buffer, offset, isLE, mLen, nBytes) {
Function addComment
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function addComment(type, value, start, end, loc) {
Function analyzeAndTraverse
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function analyzeAndTraverse(analyzer, traverser, node, path, state) {
Function renderXJSExpressionContainer
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function renderXJSExpressionContainer(traverse, object, isLast, path, state) {
Function createArrowFunctionExpression
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
createArrowFunctionExpression: function (params, defaults, body, rest, expression) {
Method to_html
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def to_html(parent_key=nil)
html = StringIO.new
html << '<span class="deprecated">Deprecated</span>' if deprecated?
- 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 process
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def process(*)
super.tap do
if Lurker::Spy.enabled?
[:@request, :@response].each do |iv_name|
if !instance_variable_defined?(iv_name) || instance_variable_get(iv_name).nil?
- 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 safe_require
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def self.safe_require(gem, desc=nil)
begin
require gem
rescue LoadError => e
$stderr.puts(e.message)
- 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 create_by_supposition
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def create_by_supposition(payload)
if payload.key?(Json::ITEMS)
Lurker::Json::List.new(payload, schema_options)
elsif payload.key?(Json::PROPERTIES)
Lurker::Json::Object.new(payload, schema_options)
- 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 gem_info
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def gem_info
spec = if Bundler.respond_to? :locked_gems
Bundler.locked_gems.specs.select { |s| s.name == 'lurker' }.first # 1.6
else
Bundler.definition.sources.detect { |s| s.specs.map(&:name).include?('lurker') } # 1.3
- 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 merge!
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def merge!(schema)
case parent_schema
when Lurker::Json::Object
parent_schema[Json::PROPERTIES][parent_property] = @parser.typed.parse(schema)
when Lurker::Json::List
- 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 read
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def read
return YAML.load_file(@path) unless @path.match(/\.erb$/)
context = Lurker::ErbSchemaContext.new
erb = ERB.new(IO.read @path).result(context.get_binding)
- 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
Avoid too many return
statements within this function. Open
return {
type: Token.Punctuator,
value: '>>>',
lineNumber: lineNumber,
lineStart: lineStart,
Avoid too many return
statements within this function. Open
return scanRegExp();