Showing 1,205 of 1,252 total issues
Function render
has 524 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { scribing } = this.props;
const toolBarStyle = !scribing.isCanvasLoaded
? styles.disabledToolbar
: styles.toolBar;
- Create a ticketCreate a ticket
Function GenerateProgrammingQuestionPage
has 372 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const GenerateProgrammingQuestionPage = (): JSX.Element => {
const params = useParams();
const id = parseInt(params?.assessmentId ?? '', 10) || undefined;
if (!id)
throw new Error(
- Create a ticketCreate a ticket
Function EnrolRequestsTable
has 371 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const EnrolRequestsTable: FC<Props> = (props) => {
const {
title,
enrolRequests,
pendingEnrolRequests = false,
- Create a ticketCreate a ticket
Function WorkbinTable
has a Cognitive Complexity of 83 (exceeds 5 allowed). Consider refactoring. Open
Open
const WorkbinTable: FC<Props> = (props) => {
const {
currFolderId,
subfolders,
materials,
- 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 LeaderboardTable
has 321 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const LeaderboardTable: FC<Props> = (props: Props) => {
const { data, id: tableType } = props;
const tabletView = useMedia.MinWidth('sm');
const phoneView = useMedia.MinWidth('xs');
const [maxAvatars, setMaxAvatars] = useState(6);
- Create a ticketCreate a ticket
Function InstanceUserRoleRequestsTable
has 300 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const InstanceUserRoleRequestsTable: FC<Props> = (props) => {
const {
title,
roleRequests,
pendingRoleRequests = false,
- Create a ticketCreate a ticket
Function CourseSettingsForm
has 294 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const CourseSettingsForm = (props: CourseSettingsFormProps): JSX.Element => {
const { t } = useTranslation();
const [offsetTimesPrompt, setOffsetTimesPrompt] = useState(false);
const [deletingCourse, setDeletingCourse] = useState(false);
const [stagedLogo, setStagedLogo] = useState<File>();
- Create a ticketCreate a ticket
Function UsersTable
has 284 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const UsersTable: FC<Props> = (props) => {
const { title, renderRowActionComponent, intl, filter, users, userCounts } =
props;
const [isLoading, setIsLoading] = useState(false);
const dispatch = useAppDispatch();
- Create a ticketCreate a ticket
Function StudentPerformanceTable
has 282 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const StudentPerformanceTable: FC<Props> = (props) => {
const {
students,
hasPersonalizedTimeline,
isCourseGamified,
- Create a ticketCreate a ticket
Function SkillsTable
has 267 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const SkillsTable: FC<Props> = (props: Props) => {
const {
data,
intl,
tableType,
- Create a ticketCreate a ticket
Function QuestionForm
has 256 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const QuestionForm = (props) => {
const { disabled, initialValues, onSubmit, intl } = props;
const {
control,
handleSubmit,
- Create a ticketCreate a ticket
Function ResponseIndex
has 254 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ResponseIndex = (props) => {
const { dispatch, survey, responses, isLoading } = props;
const { palette } = useTheme();
const { NOT_STARTED, RESPONDING, SUBMITTED } = responseStatus;
const dataColor = {
- Create a ticketCreate a ticket
Function SubmissionsTableRow
has 254 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const SubmissionsTableRow = (props) => {
const { assessment, assessmentId, courseId, dispatch, submission } = props;
const palette = useTheme().palette;
const [state, setState] = useState({
unsubmitConfirmation: false,
- Create a ticketCreate a ticket
Function AccountSettingsForm
has 254 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const AccountSettingsForm = (props: AccountSettingsFormProps): JSX.Element => {
const { t } = useTranslation();
const [stagedImage, setStagedImage] = useState<File>();
const [requirePasswordConfirmation, setRequirePasswordConfirmation] =
useState(true);
- Create a ticketCreate a ticket
Function LiveFeedbackStatisticsTable
has 253 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const LiveFeedbackStatisticsTable: FC<Props> = (props) => {
const { t } = useTranslation();
const { courseId } = useParams();
const { includePhantom, liveFeedbackStatistics } = props;
- Create a ticketCreate a ticket
Function UsersTable
has 252 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const UsersTable: FC<Props> = (props) => {
const { title, renderRowActionComponent, intl, users, userCounts, filter } =
props;
const [isLoading, setIsLoading] = useState(false);
const dispatch = useAppDispatch();
- Create a ticketCreate a ticket
Function AchievementAwardManager
has 245 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const AchievementAwardManager: FC<Props> = (props) => {
const { achievement, isLoading, handleClose, intl, setIsDirty } = props;
const achievementUsers = achievement.achievementUsers;
const [openConfirmation, setOpenConfirmation] = useState(false);
- Create a ticketCreate a ticket
Function StudentMarksPerQuestionTable
has 242 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const StudentMarksPerQuestionTable: FC<Props> = (props) => {
const { t } = useTranslation();
const { courseId, assessmentId } = useParams();
const { includePhantom } = props;
- Create a ticketCreate a ticket
Function GenerateExportDialog
has 229 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const GenerateExportDialog: FC<Props> = (props) => {
const { open, setOpen, saveActiveFormData, languages } = props;
const { t } = useTranslation();
const dispatch = useAppDispatch();
const generatePageData = useAppSelector(getAssessmentGenerateQuestionsData);
- Create a ticketCreate a ticket
Function CodaveriCommentCard
has 220 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const CodaveriCommentCard: FC<Props> = (props) => {
const { intl, post } = props;
const dispatch = useAppDispatch();
const [editMode, setEditMode] = useState(false);
const [isSaving, setIsSaving] = useState(false);
- Create a ticketCreate a ticket