Showing 31 of 64 total issues
Method link_to_action
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def link_to_action(condition, path, btn_color, tooltip, icon, params = {})
Function PerformanceMarker
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
const PerformanceMarker = ({
score,
personId,
examinationId,
isEditExamination,
- 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 generate_menu_group
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def generate_menu_group(name, plural_name, icon, options = {}, &block)
Function createResult
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function createResult(examinationId, studentProfileId, score, success, error) {
Function groupAttendanceReducer
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export default function groupAttendanceReducer(state = initialState, action) {
switch (action.type) {
case actionTypes.OPEN_ATTENDANCE_SUBMITTER:
return {
...state,
- 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 call
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def self.call(version)
prev_version_attributes = prev_attributes(version)
next_version_attributes = next_attributes(version)
if prev_version_attributes.empty? || next_version_attributes.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
Function AttendanceMarker
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const AttendanceMarker = ({ inSync, presence }) => {
const spinner = <span className="glyphicon glyphicon-refresh" aria-hidden="true" />;
if (presence === true) return <div className="cell bg-success">{inSync ? spinner : '.'}</div>;
if (presence === false) return <div className="cell bg-danger">{inSync ? spinner : 'н'}</div>;
- 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 call
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def self.call(string)
result_object =
string
.split("\n")
.each_with_object(init_new_acc) do |substring, acc|
- 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 6 (exceeds 5 allowed). Consider refactoring. Open
def show?
if record.is_a?(PaperTrail::Version)
object = record.reify || record.item || record.next&.reify
policy = Pundit.policy(user, object)
- 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 update
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def update
authorize @questionnaire, :save_answers?
set_questions
- 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 common_handle
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def common_handle(study_application, method)
authorize study_application
operation_result = method == :create ? study_application.save : study_application.destroy.destroyed?
- 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"