Showing 125 of 211 total issues
Function ReactGridLayout
has 254 lines of code (exceeds 25 allowed). Consider refactoring. Open
var ReactGridLayout = function (_React$Component) {
_inherits(ReactGridLayout, _React$Component);
// TODO publish internal ReactClass displayName transform
function ReactGridLayout(props, context) {
Function GridItem
has 223 lines of code (exceeds 25 allowed). Consider refactoring. Open
var GridItem = function (_React$Component) {
_inherits(GridItem, _React$Component);
function GridItem() {
var _temp, _this, _ret;
Function FindTimetable
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
export function FindTimetable(
input: IOptimizedSlot[],
disableClashChecking = false,
visualizer?: FindTimetableVisualizer<IOptimizedSlot>
): Timetable[] {
- 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 render
has 172 lines of code (exceeds 25 allowed). Consider refactoring. Open
public render() {
const {
slot,
color,
isShowingAlternativeSlot,
Function ReactGridLayout
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
var ReactGridLayout = function (_React$Component) {
_inherits(ReactGridLayout, _React$Component);
// TODO publish internal ReactClass displayName transform
function ReactGridLayout(props, context) {
- 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 render
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
public render() {
if (this.state.loading) {
return getLoadingElement();
}
if (this.state.redirect) {
Function render
has 125 lines of code (exceeds 25 allowed). Consider refactoring. Open
public render() {
return (
<Drawer
anchor="right"
open={this.props.isOpen}
File ReactGridLayout.js
has 356 lines of code (exceeds 250 allowed). Consider refactoring. Open
//@ts-nocheck
'use strict';
exports.__esModule = true;
Function render
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
public render() {
const subjectViews = this.props.Subjects.map((s, index) => {
if (s.IsVisible) {
return (
<div key={s.Code}>
Function render
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
public render() {
return (
<Dialog open={this.props.isOpen} fullScreen={true}>
{/* transition={Transition}> */}
<DialogContent style={divStyle}>
Function render
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
public render() {
// const DEBUGGING = false; // Please change to false during production
// if (DEBUGGING) {
// this.props.handleSlotLoaded(HENG_2017_APR());
// alert("WARNING! You are in a debugging session.");
Function FindTimetable
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function FindTimetable(
input: IOptimizedSlot[],
disableClashChecking = false,
visualizer?: FindTimetableVisualizer<IOptimizedSlot>
): Timetable[] {
Function GenerateNewState
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected GenerateNewState(state: IMasterState): IMasterState {
const currentTimetable =
state.TimetableListState.FiltrateTimetables[
state.TimetableListState.CurrentIndex
];
Function render
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
public render() {
if (!this.props.slotViewModelStore) {
return Logo();
}
const slotsToBeRendered =
Function GenerateTotalMatrix
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
export function GenerateTotalMatrix(
timetables: IGroupedTimetable[],
uidsOfClickedMatrix: string[] = []
): STCBox[] {
const result = new Array<STCBox>();
- 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 ParseStudentHtmlToRawSlot_v2
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function ParseStudentHtmlToRawSlot_v2(html: string): RawSlot[] {
const result = new Array<RawSlot>();
const htmlDoc = new DOMParser().parseFromString(html, "text/html");
// @ts-ignore
const tableRows = Array.from(
File utils.js
has 306 lines of code (exceeds 250 allowed). Consider refactoring. Open
//@ts-nocheck
'use strict';
exports.__esModule = true;
Function ParseStudentHtmlToRawSlot
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function ParseStudentHtmlToRawSlot(html: string): RawSlot[] {
const result = new Array<RawSlot>();
const htmlDoc = new DOMParser().parseFromString(html, "text/html");
// @ts-ignore
const tableRows = htmlDoc
Function render
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
public render() {
const getButton = (
handler: any,
icon: any,
tooltip: string,
Function ParseFgoHtmlToRawSlot_v2
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function ParseFgoHtmlToRawSlot_v2(html: string): RawSlot[] {
const result = new Array<RawSlot>();
const htmlDoc = new DOMParser().parseFromString(html, "text/html");
const tableRows = htmlDoc