Showing 1,184 of 2,084 total issues
Method up
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def up
Portal::Student.reset_column_information
Portal::Learner.reset_column_information
Dataservice::BundleLogger.reset_column_information
Dataservice::BundleContent.reset_column_information
- 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 up
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def up
add_column :portal_collaborations, :offering_id, :integer
# Add this index temporarily, so the processing below can work reasonably fast.
# This index will be added permanently in the next migration.
- 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 load_db
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def load_db(district_data_files, school_data_files)
## Delete all the entries first
## Use the TRUNCATE cammand -- works in mysql to effectively empty the database and reset
## the autogenerating primary key index ... not certain about other databases
if @states_and_provinces && @states_and_provinces.empty?
- 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 rename
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def rename(old_name,new_name)
#rename files:
types = "{rb,haml,erb,html,rjs,js}"
# specify the replacesments list, to ensure
- 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"