Showing 125 of 211 total issues
Function render
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
public render() {
const skeleton = new Skeleton();
if (this.props.slots && this.props.alternateSlots) {
// render timetable view
const slotViewsAndDayColumn = GenerateSlotViewsAndDayColumn(
File GridItem.js
has 298 lines of code (exceeds 250 allowed). Consider refactoring. Open
//@ts-nocheck
'use strict';
exports.__esModule = true;
Function GridItem
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
var GridItem = function (_React$Component) {
_inherits(GridItem, _React$Component);
function GridItem() {
var _temp, _this, _ret;
- Read upRead up
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 ParseFgoHtmlToRawSlot_v1
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function ParseFgoHtmlToRawSlot_v1(html: string): RawSlot[] {
const result = new Array<RawSlot>();
const htmlDoc = new DOMParser().parseFromString(html, "text/html");
const tableRows = htmlDoc
Function ResponsiveReactGridLayout
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
var ResponsiveReactGridLayout = function (_React$Component) {
_inherits(ResponsiveReactGridLayout, _React$Component);
function ResponsiveReactGridLayout() {
var _temp, _this, _ret;
Function GenerateNewState
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected GenerateNewState(state: IMasterState): IMasterState {
const slotStore =
state.DataState.RawSlotDataRouter.GetDataFrom("ungeneralized");
const slotTableState = state.SlotTableState;
const slotNumbersOfSelectedSlots = GetSlotNumbers(
Function render
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public render() {
const {
slot,
color,
isShowingAlternativeSlot,
- Read upRead up
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
File subjectListView.tsx
has 285 lines of code (exceeds 250 allowed). Consider refactoring. Open
import Button from "@material-ui/core/Button";
import Drawer from "@material-ui/core/Drawer";
import Paper from "@material-ui/core/Paper";
import TextField from "@material-ui/core/TextField";
import Tooltip from "@material-ui/core/Tooltip";
Function render
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public render() {
if (this.state.redirect) {
return <Redirect push={true} to="/play" />;
}
const inputProps = {
File login.tsx
has 272 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
DialogActions,
DialogContent,
DialogContentText,
DialogTitle,
File selectCourseView.tsx
has 271 lines of code (exceeds 250 allowed). Consider refactoring. Open
import CircularProgress from "@material-ui/core/CircularProgress";
import Dialog from "@material-ui/core/Dialog";
import * as React from "react";
// @ts-ignore
import * as Autosuggest from "react-autosuggest";
Function ReleaseDisabledSubjectsIfPossible
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
export function ReleaseDisabledSubjectsIfPossible(
selectedSubjects: Subject[],
allSubjects: Subject[]
): void {
const disabledSubjects = allSubjects.filter((s) => s.ClashReport !== null);
- Read upRead up
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 GenerateTotalMatrix
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function GenerateTotalMatrix(
timetables: IGroupedTimetable[],
uidsOfClickedMatrix: string[] = []
): STCBox[] {
const result = new Array<STCBox>();
Function constructor
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
public constructor() {
this.renderings.push(() => {
this.cy = Cytoscape({
elements: [],
boxSelectionEnabled: false,
Function render
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public render() {
let style = {
...tableStyle,
};
style = {
Function GenerateSlotAndDayLayouts
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
export function GenerateSlotAndDayLayouts(
rawSlots: ISlotViewModel[],
xOffset: number,
yOffset: number
): [ReactGridLayout.Layout[], ReactGridLayout.Layout[]] {
- Read upRead up
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 moveElement
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function moveElement(layout, l, x, y, isUserAction, preventCollision, compactType, cols) {
if (l.static) return layout;
// Short-circuit if nothing to do.
if (l.y === y && l.x === x) return layout;
- Read upRead up
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 processGridItem
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
ReactGridLayout.prototype.processGridItem = function processGridItem(child) {
if (!child.key) return;
var l = (0, _utils.getLayoutItem)(this.state.layout, String(child.key));
if (!l) return null;
var _props4 = this.props,
Function render
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public render() {
const buttonStyle: React.CSSProperties = {
marginRight: "10px",
};
return (
Function render
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public render() {
const expectedHitCount = this.props.expectedHitCount();
const percentage = (
(expectedHitCount / this.props.actualHitCount) *
100