Showing 14 of 28 total issues
Method queries
has 270 lines of code (exceeds 25 allowed). Consider refactoring. Open
def queries
[{
name: 'Details on the first 10 songs',
value: <<-QUERY.strip_heredoc
{
File parser.rb
has 499 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'racc/parser.rb'
require 'active_support/json'
require 'active_support/core_ext/object/blank'
require 'active_support/core_ext/object/try'
File helper.rb
has 326 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'active_record'
require 'gql'
module App
module Helper
Function GraphQLHighlightRules
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
var GraphQLHighlightRules = function() {
this.$rules = {
"start": [
{
token: "comment.block",
File desktop.js
has 276 lines of code (exceeds 250 allowed). Consider refactoring. Open
define('ace/mode/graphql', function(require, exports, module) {
var oop = require("ace/lib/oop");
var TextMode = require("ace/mode/text").Mode;
var Tokenizer = require("ace/tokenizer").Tokenizer;
var GraphQLHighlightRules = require("ace/mode/graphql_highlight_rules").GraphQLHighlightRules;
Method change
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
def change
create_table :people do |t|
t.string :slug, :null => false
t.string :first_name, :null => false
t.string :last_name, :null => false
Method _next_token
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
def _next_token
text = @ss.peek(1)
@lineno += 1 if text == "\n"
token = case @state
when nil
Method _next_token
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _next_token
text = @ss.peek(1)
@lineno += 1 if text == "\n"
token = case @state
when 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 execute
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def execute(parent, ast_node, target, variables, context)
Method execute
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def execute(person_id_or_slug, band_id_or_slug, started_year, ended_year = nil, role_ids_or_slugs = [])
Method execute
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def execute(caller_class, ast_node, target, variables, context)
Method execute
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def execute(caller_class, ast_node, target, variables, context)
Method tokenize
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def tokenize(input)
tokenizer = Tokenizer.new
tokenizer.scan_setup input
[].tap do |result|
- 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 shutdown
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def shutdown(type, id)
const_name = send("const_name_for_#{type}", id)
accessor = type.to_s.pluralize
[self, *descendants].each do |c|
- 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"