Showing 32 of 117 total issues
Method people_iterator
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
def people_iterator(person)
if person.data["shows"]
# If had shows
for record in person.data["shows"]
# Loop through each show with involvement
- Read upRead up
- Create a ticketCreate a ticket
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 generate_show
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
def generate_show(show)
# Set year attributes
show.data["year"] = get_show_year(show)
show.data["year_page"] = get_show_year_page(show)
- Read upRead up
- Create a ticketCreate a ticket
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 generate
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
def generate(site)
# Generate venue pages for venues without manually created pages.
if not site.config["skip_venues"]
@collection = site.collections["venues"]
Jekyll.logger.info "Generating venues..."
- Read upRead up
- Create a ticketCreate a ticket
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
Function init
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
function init() {
var hadKeyboardEvent = false;
var elWithFocusRing;
var inputTypesWhitelist = {
- Create a ticketCreate a ticket
Method fill_people_reverse_index
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def fill_people_reverse_index(item, people_list, index_name, site)
# Create the RI for this case if first time
unless site.data.key?(index_name)
site.data[index_name] = Hash.new
- Read upRead up
- Create a ticketCreate a ticket
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 generate_show
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
def generate_show(show)
# Set year attributes
show.data["year"] = get_show_year(show)
show.data["year_page"] = get_show_year_page(show)
- Create a ticketCreate a ticket
Method show_iterator
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def show_iterator(show)
if show.data["season"]
# Special case, UNCUT/Fringe being the same thing
if show.data["season"] == "UNCUT"
season_corrected = "Fringe"
- Read upRead up
- Create a ticketCreate a ticket
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
File show.rb
has 259 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Jekyll
class ShowDataGenerator < Jekyll::Generator
priority :high
# From years.rb
- Create a ticketCreate a ticket
Method generate_person
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def generate_person(person)
"""Method called on all people"""
# Validate things
if not person.data.has_key?("title")
Jekyll.logger.abort_with("Person record #{person.basename_without_ext} missing key 'title'")
- Read upRead up
- Create a ticketCreate a ticket
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 missing_majority
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def missing_majority(show)
# We don't have crew_incomplete yet, so let's work it out.
show_crew_count = show.data["crew"] ? show.data["crew"].length : 0
amount_missing = 0
missing_fields = ''
- Read upRead up
- Create a ticketCreate a ticket
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 generate_person
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
def generate_person(person)
"""Method called on all people"""
# Validate things
if not person.data.has_key?("title")
Jekyll.logger.abort_with("Person record #{person.basename_without_ext} missing key 'title'")
- Create a ticketCreate a ticket
Method missing_majority
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
def missing_majority(show)
# We don't have crew_incomplete yet, so let's work it out.
show_crew_count = show.data["crew"] ? show.data["crew"].length : 0
amount_missing = 0
missing_fields = ''
- Create a ticketCreate a ticket
Method generate
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
def generate(site)
# Generate venue pages for venues without manually created pages.
if not site.config["skip_venues"]
@collection = site.collections["venues"]
Jekyll.logger.info "Generating venues..."
- Create a ticketCreate a ticket
Method get_show_playwright
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def get_show_playwright(show)
if show.data.key?("playwright") and not show.data["playwright"].nil?
if show.data["playwright"] == "various"
# Is various, special case
["various", nil, "Various Writers"]
- Read upRead up
- Create a ticketCreate a ticket
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 roles
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def roles(set)
roles = Set.new
unless set.nil?
for ri in set
for role in ri['roles']
- Read upRead up
- Create a ticketCreate a ticket
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 people_iterator
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
def people_iterator(person)
if person.data["shows"]
# If had shows
for record in person.data["shows"]
# Loop through each show with involvement
- Create a ticketCreate a ticket
Method role_icons
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def role_icons
role_icons = Hash.new
for item in @roles
if item.key?('role') and item.key?('icon')
role_icons[item['role']] = item['icon']
- Read upRead up
- Create a ticketCreate a ticket
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 generate
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
def generate(site)
Jekyll.logger.info "Generating people by..."
@year_end = site.config['year_end']
@role_map = site.data['role-map'].to_liquid
- Create a ticketCreate a ticket
Method to_liquid
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def to_liquid
if @isd
h = {
"key" => @imageID,
# SM named sizes aren't really used
- Create a ticketCreate a ticket
Method fill_people_reverse_index
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def fill_people_reverse_index(item, people_list, index_name, site)
# Create the RI for this case if first time
unless site.data.key?(index_name)
site.data[index_name] = Hash.new
- Create a ticketCreate a ticket