Showing 1,205 of 1,252 total issues
Function ForumsSettingsForm
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
const ForumsSettingsForm = (props: ForumsSettingsFormProps): JSX.Element => {
const { t } = useTranslation();
return (
<Form
- Create a ticketCreate a ticket
Function VideoSubmissionsTable
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
const VideoSubmissionsTable: FC<Props> = (props) => {
const { title, videoSubmissions, intl } = props;
const options: TableOptions = {
download: false,
- Create a ticketCreate a ticket
Function PendingRoleRequestsButtons
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
const PendingRoleRequestsButtons: FC<Props> = (props) => {
const { roleRequest } = props;
const { t } = useTranslation();
const dispatch = useAppDispatch();
const [isApproving, setIsApproving] = useState(false);
- Create a ticketCreate a ticket
Function default
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function (state = {}, action) {
switch (action.type) {
case actions.FETCH_SUBMISSION_SUCCESS:
case actions.FINALISE_SUCCESS:
case actions.UNSUBMIT_SUCCESS:
- Create a ticketCreate a ticket
Function CodaveriSettingsForm
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
const CodaveriSettingsForm = (
props: CodaveriSettingsFormProps,
): JSX.Element => {
const { settings } = props;
const { t } = useTranslation();
- Create a ticketCreate a ticket
Function AchievementForm
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
const AchievementForm: FC<Props> = (props) => {
const {
open,
title,
conditionAttributes,
- Create a ticketCreate a ticket
Function ProgrammingForm
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
const ProgrammingForm = (props: ProgrammingFormProps): JSX.Element => {
const [data, setData] = useState(props.with);
const { t } = useTranslation();
- Create a ticketCreate a ticket
Function shouldComponentUpdate
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
shouldComponentUpdate(nextProps) {
if (this.canvas) {
this.canvas.isDrawingMode = nextProps.scribing.isDrawingMode;
this.canvas.freeDrawingBrush.color =
nextProps.scribing.colors[scribingToolColor.DRAW];
- 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 StudentsStatisticsTable
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
const StudentsStatisticsTable: FC<Props> = (props) => {
const {
metadata: {
isCourseGamified,
showVideo,
- 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 TimePopupForm
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
const TimePopupForm = (props: TimePopupFormProps): JSX.Element => {
const { for: time } = props;
const { t } = useTranslation();
- Create a ticketCreate a ticket
Function TestCaseComponent
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
const TestCaseComponent: FC<TestCaseComponentProps> = (props) => {
const { testCaseResults, testCaseType } = props;
const { t } = useTranslation();
const isProgrammingAnswerEvaluated =
- Create a ticketCreate a ticket
Function QuestionFormOption
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
const QuestionFormOption = (props) => {
const {
fieldsConfig,
field,
index,
- Create a ticketCreate a ticket
Function ExperiencePointsTableRow
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
const ExperiencePointsTableRow: FC<Props> = (props) => {
const { record, isStudentPage, disabled } = props;
const [isDirty, setIsDirty] = useState(false);
const [rowData, setRowData] = useState({
id: record.id,
- Create a ticketCreate a ticket
Function AchievementShow
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
const AchievementShow: FC<Props> = (props) => {
const { intl } = props;
const courseId = getCourseId();
const [isLoading, setIsLoading] = useState(true);
const dispatch = useAppDispatch();
- Create a ticketCreate a ticket
Function FileManager
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
const FileManager = (props: FileManagerProps): JSX.Element => {
const { disabled, intl } = props;
const [materials, setMaterials] = useState(props.materials ?? []);
const [uploadingMaterials, setUploadingMaterials] = useState<Material[]>([]);
- 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 reducer
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
const reducer = produce((draft: UsersState, action: UsersActionType) => {
switch (action.type) {
case SAVE_USER_LIST: {
const userList = action.userList;
const entityList = userList.map((data) => ({
- Create a ticketCreate a ticket
Function InviteUsersFileUpload
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
const InviteUsersFileUpload: FC<Props> = (props) => {
const { open, onClose, openResultDialog } = props;
const { t } = useTranslation();
const dispatch = useAppDispatch();
- Create a ticketCreate a ticket
Function TimelinesOverviewItem
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
const TimelinesOverviewItem = (
props: TimelinesOverviewItemProps,
): JSX.Element => {
const { for: timeline } = props;
- Create a ticketCreate a ticket
Function default
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function (state = {}, action) {
switch (action.type) {
case actions.FETCH_SUBMISSION_SUCCESS: {
if (action.payload.history) {
return {
- Create a ticketCreate a ticket
Function CodaveriEvaluatorToggleButton
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
const CodaveriEvaluatorToggleButton: FC<CodaveriEvaluatorToggleButtonProps> = (
props,
) => {
const { assessmentIds, for: title, type } = props;
const { t } = useTranslation();
- Create a ticketCreate a ticket