razum2um/lurker

View on GitHub

Showing 236 of 328 total issues

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

    Avoid too many return statements within this function.
    Open

                return delegate.createProperty('init', key, parseAssignmentExpression(), false, false);
    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

        Avoid too many return statements within this function.
        Open

                    return scanXJSIdentifier();
        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 {
                          type: Token.Punctuator,
                          value: ch1,
                          lineNumber: lineNumber,
                          lineStart: lineStart,
          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 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 delegate.createProperty('init', key, parsePropertyMethodFunction({ generator: false }), true, false);
              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 parseClassExpression();
                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 delegate.createLiteral(token);
                  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

                      Avoid too many return statements within this function.
                      Open

                              return parsePostfixExpression();
                      Severity: Major
                      Found in lib/lurker/templates/javascripts/JSXTransformer.js - About 30 mins to fix

                        Method call has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def call
                              @request = @response = nil # fill in while test
                              @block.call.tap do |result|
                                if @request && @response
                                  @service.verify!(
                        Severity: Minor
                        Found in lib/lurker/spy.rb - About 25 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 call has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def call(env)
                              orig_path = env['PATH_INFO']
                              if orig_path.ends_with?('.js') || orig_path.ends_with?('css') || orig_path.ends_with?('css.map')
                                @result = @app.call(env)
                              else
                        Severity: Minor
                        Found in lib/lurker/sandbox.rb - About 25 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 hashify has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                              def hashify(object, options = {})
                                case object
                                when Lurker::Json::Reference
                                  options[:reference] == :original ? object.to_original_hash(options)
                                    : object.to_hash(options)
                        Severity: Minor
                        Found in lib/lurker/json/schema.rb - About 25 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 extract_references has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                              def extract_references(schema, memo = [])
                                case schema
                                when Array
                                  schema.each { |payload| extract_references(payload, memo) }
                                when Hash, Lurker::Json::Schema
                        Severity: Minor
                        Found in lib/lurker/json/writer.rb - About 25 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 type has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                          def type
                            t = @schema["type"]
                            if t.is_a? Array
                              types = t.map do |type|
                                if type.is_a? Hash
                        Severity: Minor
                        Found in lib/lurker/presenters/schema_presenter.rb - About 25 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

                        Severity
                        Category
                        Status
                        Source
                        Language