Showing 32 of 117 total issues
Function make_template
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def make_template(title, period, sort, season, playwright, date_start, date_end, content):
- Create a ticketCreate a ticket
Method generate
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def generate(site)
if not site.config["skip_seasons"]
@collection = site.collections["seasons"]
Jekyll.logger.info "Generating seasons..."
- 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 8 (exceeds 5 allowed). Consider refactoring. Open
def generate(site)
if not site.config["skip_virtual_people"]
@collection = site.collections["people"]
Jekyll.logger.info "Generating virtual people..."
- 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 8 (exceeds 5 allowed). Consider refactoring. Open
def generate(site)
if not site.config["skip_years"]
@collection = site.collections["years"]
Jekyll.logger.info "Generating years..."
- 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 cache_fetch
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def cache_fetch(id)
if File.exist?(cache_filename(id))
cache_file = File.open(cache_filename(id), "r")
cache_data = JSON.load(cache_file)
cache_file.close
- 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 get_show_asset_type
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_show_asset_type(show, key, image_only=true)
show.data["assets"].select do |i|
# Skip non-images if image_only
if image_only and not i.key?("image") then next end
- 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 get_show_display_image
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_show_display_image(show)
# Assets required
return nil unless show.data.key?("assets")
# Find assets that fit the criteria for being a display image
- 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
Avoid too many return
statements within this method. Open
return programmes[0]
- Create a ticketCreate a ticket
Method role_map
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def role_map
role_map = Hash.new
for item in @roles
role_map[item['role']] = item['role']
- 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 parse_person_list
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def parse_person_list(pl, people_by_filename)
"""Add additional data to a person_list"""
for pli in pl
if pli.key?("name")
filename = make_hp_path(pli["name"])
- 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_asset
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def generate_asset(show, asset)
"""Method called for each asset in the asset attribute"""
# Assign the show as an attr of the asset
asset["show"] = 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"