Showing 1,205 of 1,252 total issues
Function CourseEnrolOptions
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
const CourseEnrolOptions: FC<Props> = (props) => {
const { intl, registrationInfo } = props;
const dispatch = useAppDispatch();
- Create a ticketCreate a ticket
Function FormSelectField
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
const FormSelectField = (props) => {
const {
field,
fieldState,
disabled,
- Create a ticketCreate a ticket
Function MilestoneForm
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
const MilestoneForm = (props) => {
const { onSubmit, initialValues, disabled } = props;
const {
control,
handleSubmit,
- Create a ticketCreate a ticket
Function ColorPickerField
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
const ColorPickerField = (props) => {
const {
intl,
colorPickerColor,
onClickColorPicker,
- Create a ticketCreate a ticket
Function AvatarSelector
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
const AvatarSelector = (props: AvatarSelectorProps): JSX.Element => {
const { t } = useTranslation();
const [selectedImage, setSelectedImage] = useState<File>();
const [cropping, setCropping] = useState(false);
- Create a ticketCreate a ticket
Function mapDispatchToProps
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
function mapDispatchToProps(dispatch, ownProps) {
const {
match: {
params: { submissionId },
},
- Create a ticketCreate a ticket
Function MaterialUpload
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
const MaterialUpload: FC<Props> = (props) => {
const { intl, isOpen, handleClose, currFolderId } = props;
const [confirmationDialogOpen, setConfirmationDialogOpen] = useState(false);
const [isSubmitting, setIsSubmitting] = useState(false);
- Create a ticketCreate a ticket
Function AllAttemptsDisplay
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
const AllAttemptsDisplay: FC<Props> = (props) => {
const { allAnswers, question, questionNumber, submissionEditUrl } = props;
const { t } = useTranslation();
- Create a ticketCreate a ticket
Function DuplicationPrompt
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
const DuplicationPrompt = (props: DuplicationPromptProps): JSX.Element => {
const { for: question } = props;
const { t } = useTranslation();
const [duplicating, setDuplicating] = useState(false);
- Create a ticketCreate a ticket
Function render
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { forumTopicPostPack } = this.props;
const postPackIds = new Set(
this.props.selectedPostPacks.map((pack) => pack.corePost.id),
);
- Create a ticketCreate a ticket
Function reducer
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
const reducer = produce((draft: CoursesState, action: CoursesActionType) => {
switch (action.type) {
case SAVE_COURSE_LIST: {
const courseList = action.courseList;
const entityList = courseList.map((data) => ({
- Create a ticketCreate a ticket
Function HeartbeatDetailCard
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
const HeartbeatDetailCard = (props: HeartbeatDetailCardProps): JSX.Element => {
const { of: heartbeat } = props;
const { t } = useTranslation();
- Create a ticketCreate a ticket
Function LiveFeedbackHistoryPage
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
const LiveFeedbackHistoryPage: FC<Props> = (props) => {
const { t } = useTranslation();
const { questionNumber } = props;
const allLiveFeedbackHistory = useAppSelector(getLiveFeedbackHistory);
const nonEmptyLiveFeedbackHistory = allLiveFeedbackHistory.filter(
- Create a ticketCreate a ticket
Function processColumns
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
const processColumns = (includeRowNumber, columns) => {
if (!columns.length) return columns;
const processed = columns.map((column) => {
if (!column.options?.alignCenter && !column.options?.hideInSmallScreen)
- 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 ManageUsersTable
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
const ManageUsersTable = (props: ManageUsersTableProps): JSX.Element => {
const { users, manageStaff, timelinesMap, renderRowActionComponent } = 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 HeartbeatsTimelineChart
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
const HeartbeatsTimelineChart = (
props: HeartbeatsTimelineChartProps,
): JSX.Element => {
const { in: heartbeats } = props;
- 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 PendingEnrolRequestsButtons
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
const PendingEnrolRequestsButtons: FC<Props> = (props) => {
const { intl, enrolRequest } = props;
const dispatch = useAppDispatch();
const [isApproving, setIsApproving] = useState(false);
const [isDeleting, setIsDeleting] = useState(false);
- Create a ticketCreate a ticket
Function StoriesSettings
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
const StoriesSettings = (): JSX.Element => {
const { t } = useTranslation();
const [form, setForm] = useState<FormEmitter<StoriesSettingsData>>();
const [submitting, setSubmitting] = useState(false);
- Create a ticketCreate a ticket
Function PendingInvitationsButtons
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
const PendingInvitationsButtons: FC<Props> = (props) => {
const { intl, invitation } = props;
const dispatch = useAppDispatch();
const [isResending, setIsResending] = useState(false);
const [isDeleting, setIsDeleting] = useState(false);
- Create a ticketCreate a ticket
Function renderButtons
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
const renderButtons = (todo: TodoData): JSX.Element => {
let accessButtonText = '';
let accessButtonLink = '';
// TODO: Refactor below by changing switch to dictionary
- Create a ticketCreate a ticket