Showing 419 of 572 total issues
Method load_dir_to_tar
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def load_dir_to_tar(dir_path, asmt_dir, tar, filters = [], export_dir = "")
Method date_helper
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def date_helper(name, options, strftime, date_format, alt_format)
Function formatter
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function(row, cell, val, colDef, data) {
Function defaultFormatter
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
defaultFormatter: function(row, cell, value, columnDef, data) {
Function formatter
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
columns[0].formatter = function(row, cell, val, colDef, data) {
Function formatter
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function(row, cell, val, colDef, data) {
Function hijack
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
hijack: function( event, type, dd, x, elem ){
Method handin_directory_and_filename_or_disable_handins
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def handin_directory_and_filename_or_disable_handins
if disable_handins?
true
else
d = handin_directory.blank?
- 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 remainingSubmissionsMsg
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def remainingSubmissionsMsg(submissions, assessment)
numSubmissions = submissions.size
maxSubmit = (assessment.max_submissions || -1)
versionThresh = (assessment.effective_version_threshold || -1)
if maxSubmit == -1 and versionThresh == -1
- 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
Function set_tab_html
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function set_tab_html(is_search, instances, tab_name, archived_instances, empty_message, selected_user_ids) {
is_empty = Object.keys(instances).length === 0;
if (is_empty && !is_search){
$(`#${tab_name}_header`).hide();
html_empty_message = get_html_empty_message(empty_message);
- 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
Function formvalidation
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function formvalidation(form){
function DoubleByte(str) {
for (var i = 0, n = str.length; i < n; i++) {
if (str.charCodeAt(i) > 127) { return true; }
}
- 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
Function reapply
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function reapply(){
/* brokentable() checks if a table has been enumerated or overwritten */
function brokentable(table){
var el = table.getElementsByTagName("th")[0];
return (el && !hasClass(el, 'enum'));}
- 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 validate_link_request
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def validate_link_request
message_type = @jwt[:body]["https://purl.imsglobal.org/spec/lti/claim/message_type"]
if message_type.nil? || message_type != "LtiResourceLinkRequest"
raise LtiError.new("LTI launch is not an LtiResourceLinkRequest", :bad_request)
end
- 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 get_branches
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_branches
return fail_with_reason("User not connected to Github") unless @github_integration
return fail_with_reason("Repository not provided") unless params["repository"]
branches = @github_integration.branches(params["repository"])
- 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 show
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def show
allowed = [:name, :display_name, :description, :start_at, :due_at, :end_at, :updated_at, :max_grace_days,
:max_submissions, :disable_handins, :category_name, :group_size, :writeup_format, :handout_format,
:has_scoreboard, :has_autograder, :max_unpenalized_submissions, :max_total_score, :max_scores]
- 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 handout
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def handout
extend_config_module(@assessment, nil, @cud)
if @assessment.overwrites_method?(:handout)
hash = @assessment.config_module.handout
- 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 uploadDockerImage
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def uploadDockerImage
image_name = params[:image_name]
image_file = params[:image_file]
if image_name.nil? || image_name.empty?
flash[:error] = "Please specify an image name."
- 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_nrps
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def query_nrps
# Initially use the context membership url to start querying NRPS
next_page_url = @lti_context_membership_url
members = []
while !next_page_url.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 sync_roster
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def sync_roster
lcd = LtiCourseDatum.find(params[:lcd_id])
if lcd.nil? || lcd.membership_url.nil? || lcd.course_id.nil?
raise LtiLaunchController::LtiError.new("Unable to update roster", :bad_request)
end
- 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 set_announcement
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def set_announcement
@announcement = @course.announcements.find_by(id: params[:id])
if @announcement.nil? # May be system announcement / from another course
@announcement = Announcement.find_by(id: params[:id])
if @announcement.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"