Showing 1,205 of 1,252 total issues
Function GenerateConversation
has 132 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const GenerateConversation: FC<Props> = (props) => {
const { t } = useTranslation();
const {
languages,
onGenerate,
- Create a ticketCreate a ticket
Function SkillsTable
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
Open
const SkillsTable: FC<Props> = (props: Props) => {
const {
data,
intl,
tableType,
- 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 Question
has 131 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Question = (props: QuestionProps): JSX.Element => {
const { of: question, index, dragging, draggedTo, disabled } = props;
const { t } = useTranslation();
const [duplicating, setDuplicating] = useState(false);
- Create a ticketCreate a ticket
Function AccountSettings
has 131 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const AccountSettings = (): JSX.Element => {
const { t } = useTranslation();
const [form, setForm] = useState<FormEmitter<AccountSettingsData>>();
const [reloadForm, setReloadForm] = useState(false);
const [submitting, setSubmitting] = useState(false);
- Create a ticketCreate a ticket
Function InvitationResultDialog
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const InvitationResultDialog: FC<Props> = (props) => {
const { open, handleClose, invitationResult, intl } = props;
const {
duplicateUsers,
existingCourseUsers,
- Create a ticketCreate a ticket
Function renderDownloadDropdown
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
renderDownloadDropdown() {
const {
assessment,
handleDownload,
handleDownloadStatistics,
- Create a ticketCreate a ticket
Function SkillDialog
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const SkillDialog: FC<Props> = (props) => {
const {
open,
onClose,
dialogType,
- Create a ticketCreate a ticket
Function SubmissionsIndex
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const SubmissionsIndex = (): JSX.Element => {
const { t } = useTranslation();
const dispatch = useAppDispatch();
- Create a ticketCreate a ticket
Function reducer
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const reducer = produce((state, action) => {
switch (action.type) {
case actionTypes.FETCH_LEARNING_MAP_SUCCESS:
return {
...state,
- Create a ticketCreate a ticket
Function ThemeProvider
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ThemeProvider = (props: ThemeProviderProps): JSX.Element => {
const theme = createTheme({
palette,
// https://material-ui.com/customization/themes/#typography---html-font-size
// https://material-ui.com/style/typography/#migration-to-typography-v2
- Create a ticketCreate a ticket
Function LoadedAssessmentSettings
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const LoadedAssessmentSettings = (
props: LoadedAssessmentSettingsProps,
): JSX.Element | null => {
const { t } = useTranslation();
const [form, setForm] = useState<FormEmitter<AssessmentSettingsData>>();
- Create a ticketCreate a ticket
Function SubmissionAnswer
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const SubmissionAnswer = <T extends keyof typeof QuestionType>(
props: SubmissionAnswerProps<T>,
): JSX.Element => {
const {
answerId,
- Create a ticketCreate a ticket
Function AssessmentsSettingsForm
has 125 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const AssessmentsSettingsForm = (
props: AssessmentsSettingsFormProps,
): JSX.Element => {
const { t } = useTranslation();
const validationSchema = yup.object({
- Create a ticketCreate a ticket
Function McqMrqForm
has 124 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const McqMrqForm = <T extends 'new' | 'edit'>(
props: McqMrqFormProps<T>,
): JSX.Element => {
const { adapter, with: data } = props;
- Create a ticketCreate a ticket
Function renderFeedbackCard
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderFeedbackCard = (filename, feedbackItem) => {
let cardStyle = styles.card;
if (feedbackItem.state === 'resolved') {
cardStyle = { ...styles.card, ...styles.cardResolved };
} else if (feedbackItem.state === 'dismissed') {
- Create a ticketCreate a ticket
Function WorkbinTable
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const WorkbinTable: FC<Props> = (props) => {
const {
currFolderId,
subfolders,
materials,
- Create a ticketCreate a ticket
Function SubmissionFilter
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const SubmissionFilter: FC<Props> = (props) => {
const {
intl,
filter,
tabCategories,
- Create a ticketCreate a ticket
Function CoursesTable
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const CoursesTable = (props: CoursesTableProps): JSX.Element => {
const { courses, renderRowActionComponent } = props;
const { t } = useTranslation();
if (!courses?.length)
- Create a ticketCreate a ticket
Function InvitationResultDialog
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const InvitationResultDialog: FC<Props> = (props) => {
const { handleClose, invitationResult, intl } = props;
const {
duplicateUsers,
existingInstanceUsers,
- Create a ticketCreate a ticket
ScribingCanvas
has 37 functions (exceeds 20 allowed). Consider refactoring. Open
Open
export default class ScribingCanvas extends Component {
constructor(props) {
super(props);
this.line = undefined;
- Create a ticketCreate a ticket