Method query_branches
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def query_branches
# TODO: properly handle paginated results from github
branches = github_query(@client) { @client.branches(@repository, :per_page => 100) }
branches.each do |b|
- 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 query_pull_requests
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def query_pull_requests
# This line is where we want to add :accept => 'application/vnd.github.shadow-cat-preview+json' for draft PRs
pull_requests = github_query(@client) { @client.pull_requests(@repository, :state => 'open', :per_page => 50) }
@pull_request_details = []
- 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 query_pull_requests
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
def query_pull_requests
# This line is where we want to add :accept => 'application/vnd.github.shadow-cat-preview+json' for draft PRs
pull_requests = github_query(@client) { @client.pull_requests(@repository, :state => 'open', :per_page => 50) }
@pull_request_details = []
Method query_branches
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Wontfix
def query_branches
# TODO: properly handle paginated results from github
branches = github_query(@client) { @client.branches(@repository, :per_page => 100) }
branches.each do |b|
Method get_regression_base
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_regression_base(t_potential_build)
config = t_potential_build.configuration
defined_baseline = config.send("regression_baseline_#{t_potential_build.branch_name}")
default_baseline = config.regression_baseline_default
- 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"