razum2um/lurker

View on GitHub

Showing 236 of 328 total issues

Function read has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

exports.read = function(buffer, offset, isLE, mLen, nBytes) {
Severity: Minor
Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 35 mins to fix

    Function _writeInt16 has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    function _writeInt16 (buf, value, offset, littleEndian, noAssert) {
    Severity: Minor
    Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 35 mins to fix

      Function _writeDouble has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function _writeDouble (buf, value, offset, littleEndian, noAssert) {
      Severity: Minor
      Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 35 mins to fix

        Function createProperty has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                createProperty: function (kind, key, value, method, shorthand) {
        Severity: Minor
        Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 35 mins to fix

          Function renderXJSExpressionContainer has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          function renderXJSExpressionContainer(traverse, object, isLast, path, state) {
          Severity: Minor
          Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 35 mins to fix

            Function renderXJSLiteral has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            function renderXJSLiteral(object, isLast, state, start, end) {
            Severity: Minor
            Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 35 mins to fix

              Function createArrowFunctionExpression has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      createArrowFunctionExpression: function (params, defaults, body, rest, expression) {
              Severity: Minor
              Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 35 mins to fix

                Function recursiveSearch has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare) {
                Severity: Minor
                Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 35 mins to fix

                  Function addComment has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      function addComment(type, value, start, end, loc) {
                  Severity: Minor
                  Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 35 mins to fix

                    Function _writeUInt16 has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    function _writeUInt16 (buf, value, offset, littleEndian, noAssert) {
                    Severity: Minor
                    Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 35 mins to fix

                      Function analyzeAndTraverse has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      function analyzeAndTraverse(analyzer, traverser, node, path, state) {
                      Severity: Minor
                      Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 35 mins to fix

                        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?
                        
                        
                        Severity: Minor
                        Found in lib/lurker/presenters/schema_presenter.rb - About 35 mins to fix

                        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)
                        Severity: Minor
                        Found in lib/lurker.rb - About 35 mins to fix

                        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)
                        Severity: Minor
                        Found in lib/lurker/json/parser/typed_strategy.rb - About 35 mins to fix

                        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
                        Severity: Minor
                        Found in lib/lurker/cli.rb - About 35 mins to fix

                        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
                        Severity: Minor
                        Found in lib/lurker/json/schema/polymorph.rb - About 35 mins to fix

                        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?
                        Severity: Minor
                        Found in lib/lurker/spec_helper/rails.rb - About 35 mins to fix

                        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)
                        Severity: Minor
                        Found in lib/lurker/json/reader.rb - About 35 mins to fix

                        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 scanRegExp();
                        Severity: Major
                        Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                  return scanPunctuator();
                          Severity: Major
                          Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 30 mins to fix
                            Severity
                            Category
                            Status
                            Source
                            Language