Showing 1,205 of 1,252 total issues
Function PackageUploader
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
const PackageUploader = (props: PackageUploaderProps): JSX.Element => {
const { control } = useFormContext<ProgrammingFormData>();
const { t } = useTranslation();
- Create a ticketCreate a ticket
Function CourseStatistics
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
const CourseStatistics: FC = () => {
return (
<>
<Preload
render={<LoadingIndicator />}
- Create a ticketCreate a ticket
Function AlgorithmMenu
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
const AlgorithmMenu = (props: AlgorithmMenuProps): JSX.Element => {
const { for: user } = props;
const dispatch = useAppDispatch();
- Create a ticketCreate a ticket
Function Comment
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
const Comment: FC<Props> = (props) => {
const { comments } = props;
const { t } = useTranslation();
return (
- Create a ticketCreate a ticket
Function InstanceAnnouncementsIndex
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
const InstanceAnnouncementsIndex: FC<Props> = (props) => {
const { intl } = props;
const [isLoading, setIsLoading] = useState(true);
const [isOpen, setIsOpen] = useState(false);
- Create a ticketCreate a ticket
Function submitAnswer
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function submitAnswer(questionId, answerId, rawAnswer, resetField) {
const currentTime = Date.now();
const answer = formatAnswer(rawAnswer, currentTime);
const payload = { answer };
- Create a ticketCreate a ticket
Function uploadTextResponseFiles
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function uploadTextResponseFiles(answerId, answer, resetField) {
const payload = {
answer: {
id: answerId,
files: answer.files,
- Create a ticketCreate a ticket
Function render
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { dispatch, visibility } = this.props;
const itemTypes = Object.keys(visibility);
if (itemTypes.length < 1) {
- Create a ticketCreate a ticket
Function Levels
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
const Levels = (props) => {
const {
gateInputSizeThreshold,
getGateConnectionPointId,
getGateId,
- Create a ticketCreate a ticket
Function reducer
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
const reducer = produce((draft: FoldersState, action: FoldersActionType) => {
switch (action.type) {
case SAVE_FOLDER: {
draft.currFolderInfo = action.currFolderInfo;
- Create a ticketCreate a ticket
Function BrandingHead
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
const BrandingHead = (props: BrandingHeadProps): JSX.Element => {
const { t } = useTranslation();
const courseSwitcherRef =
useRef<ComponentRef<typeof CourseSwitcherPopupMenu>>(null);
- Create a ticketCreate a ticket
Function ItemsSidebar
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
const ItemsSidebar = (props: ItemsSidebarProps): JSX.Element => {
const { for: items, within: timelines } = props;
return (
<aside className={`h-fit shrink-0 ${props.className ?? ''}`}>
- Create a ticketCreate a ticket
Method find_compre_keyword_in_answer
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def find_compre_keyword_in_answer(answer_text_lemma_array, lifted_word_status, hash)
keyword_status = Array.new(answer_text_lemma_array.length, nil)
answer_text_lemma_array.each_with_index do |answer_text_lemma_word, index|
next unless lifted_word_status[index].nil? ||
- 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 create
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def create # rubocop:disable Metrics/AbcSize
authorize! :access, @assessment
existing_submission = @assessment.submissions.find_by(creator: current_user)
create_success_response(existing_submission) and return if existing_submission
- 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 CommentCard
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
const CommentCard: 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 TimePopup
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
const TimePopup = (props: TimePopupProps): JSX.Element => {
const {
anchorsOn: anchorElement,
for: time,
assignedIn: timeline,
- 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 DurationBar
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
const DurationBar = (props: DurationBarProps): JSX.Element => {
const start = moment(props.starts).startOf('day');
const bonus = props.bonusEnds && moment(props.bonusEnds).startOf('day');
const end = props.ends && moment(props.ends).startOf('day');
- 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 AssessmentForm
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
const AssessmentForm = (props: AssessmentFormProps): JSX.Element => {
const {
conditionAttributes,
disabled,
editing,
- 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 SubmissionsIndex
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
const SubmissionsIndex = (): JSX.Element => {
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 AssessmentsTable
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
const AssessmentsTable = (props: AssessmentsTableProps): JSX.Element => {
const { display, assessments } = props.assessments;
const { t } = useTranslation();
const columns: ColumnTemplate<AssessmentListData>[] = [
- 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"