Showing 1,205 of 1,252 total issues
Function AssessmentEdit
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
const AssessmentEdit = (): JSX.Element => {
const assessmentId = getAssessmentId();
if (!assessmentId) {
return <div />;
}
- Create a ticketCreate a ticket
Function FormDateTimePickerField
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
const FormDateTimePickerField = (props) => {
const {
afterChangeField,
field,
fieldState,
- Create a ticketCreate a ticket
Method personal_end_at_hash
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
def personal_end_at_hash(assessment_id_array, course_id)
personal_end_at = Course::PersonalTime.find_by_sql(<<-SQL.squish
WITH course_user_personal_end_at AS (
SELECT cpt.course_user_id, cpt.end_at, clpi.actable_id AS assessment_id
FROM course_personal_times cpt
- Create a ticketCreate a ticket
Function AnnouncementsDisplay
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
const AnnouncementsDisplay: FC<Props> = (props) => {
const {
intl,
announcements,
announcementPermissions,
- Create a ticketCreate a ticket
Function MarkAnswerButton
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
const MarkAnswerButton = (props: Props): JSX.Element | null => {
const { topic, isAnswer, post } = props;
const { t } = useTranslation();
const dispatch = useAppDispatch();
- Create a ticketCreate a ticket
Function ForumTopicPostManagementButtons
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
const ForumTopicPostManagementButtons: FC<Props> = (props) => {
const { post, topicId, handleEdit, handleReply, isEditing, disabled } = props;
const dispatch = useAppDispatch();
const { t } = useTranslation();
const navigate = useNavigate();
- Create a ticketCreate a ticket
Function addGroup
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
const addGroup = (): void => {
const groupData = data as
| GroupLeaderboardPoints[]
| GroupLeaderboardAchievement[];
columns.push(
- Create a ticketCreate a ticket
Function BulkAssignTimelineButton
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
const BulkAssignTimelineButton = (
props: BulkAssignTimelineButtonProps,
): JSX.Element => {
const { t } = useTranslation();
- Create a ticketCreate a ticket
Function SessionBlobLegend
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
const SessionBlobLegend = (props: SessionBlobLegendProps): JSX.Element => {
const { t } = useTranslation();
return (
<Tooltip
- Create a ticketCreate a ticket
Function TabbedViewQuestions
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
const TabbedViewQuestions: FC<Props> = (props) => {
const { handleNext, maxStep, stepIndex, setStepIndex } = props;
const assessment = useAppSelector(getAssessment);
const submission = useAppSelector(getSubmission);
- Create a ticketCreate a ticket
Function InstanceComponentsIndex
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
const InstanceComponentsIndex: FC<Props> = (props) => {
const { intl } = props;
const [isLoading, setIsLoading] = useState(false);
const [isUpdating, setIsUpdating] = useState(false);
const [components, setComponents] = useState<ComponentData[]>([]);
- Create a ticketCreate a ticket
Function IndividualInvitation
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
const IndividualInvitation: FC<Props> = (props) => {
const { fieldsConfig, index, intl } = props;
const renderInvitationBody = (
<Grid alignItems="center" container flexWrap="nowrap">
- Create a ticketCreate a ticket
Function RespondButton
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
const RespondButton = ({
courseId,
surveyId,
responseId,
canRespond,
- 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 upcoming_items_from_course_by_type_for_course_user
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def self.upcoming_items_from_course_by_type_for_course_user(course_user)
course = course_user.course
opening_items = course.lesson_plan_items.published.
with_reference_times_for(course_user).
with_personal_times_for(course_user).
- 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
Function CodaveriCommentCard
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
const CodaveriCommentCard: FC<Props> = (props) => {
const { intl, post } = props;
const dispatch = useAppDispatch();
const [editMode, setEditMode] = useState(false);
const [isSaving, setIsSaving] = useState(false);
- 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
Function SubmissionForm
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
const SubmissionForm: FC<Props> = (props) => {
const { step } = props;
const { t } = useTranslation();
const dispatch = useAppDispatch();
- 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
Function ExplanationPanel
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
const ExplanationPanel: FC<Props> = (props) => {
const { questionId } = props;
const { t } = useTranslation();
- 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
Function renderRow
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderRow(setting) {
const componentTitle =
setting.title ??
(settingComponents[setting.component] ? (
<FormattedMessage {...settingComponents[setting.component]} />
- Create a ticketCreate a ticket
Function InviteUsers
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
const InviteUsers: FC<Props> = (props) => {
const { intl } = props;
const [isLoading, setIsLoading] = useState(true);
const [showInvitationResultDialog, setShowInvitationResultDialog] =
useState(false);
- Create a ticketCreate a ticket
Function AchievementManagementButtons
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
const AchievementManagementButtons: FC<Props> = (props) => {
const { achievement, navigateToIndex } = props;
const { t } = useTranslation();
const dispatch = useAppDispatch();
const navigate = useNavigate();
- Create a ticketCreate a ticket