Showing 239 of 667 total issues
File jquery.ui.daterangepicker.js
has 1472 lines of code (exceeds 250 allowed). Consider refactoring. Open
// This is not the original library! The code has been customized.
/**
* @version: 3.0.3
* @author: Dan Grossman http://www.dangrossman.info/
Function Map
has 733 lines of code (exceeds 25 allowed). Consider refactoring. Open
const Map = () => {
const dispatch = useAppDispatch();
const {
boundEast,
boundNorth,
Function useMapParams
has 632 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const useMapParams = () => {
const defaultThresholds = useAppSelector(selectDefaultThresholds);
const thresholdValues = useAppSelector(selectThresholds);
const isMobile: boolean = useMobileDetection();
const [searchParams, setSearchParams] = useSearchParams();
File Map.tsx
has 830 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, {
useCallback,
useEffect,
useMemo,
useRef,
Function DateRangePicker
has 348 lines of code (exceeds 25 allowed). Consider refactoring. Open
var DateRangePicker = function (element, options, cb) {
//default settings for options
this.parentEl = "body";
this.element = $(element);
this.startDate = moment().startOf("day");
Function Map
has a Cognitive Complexity of 85 (exceeds 5 allowed). Consider refactoring. Open
const Map = () => {
const dispatch = useAppDispatch();
const {
boundEast,
boundNorth,
- 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 mapParamsHandler.ts
has 701 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { debounce } from "lodash";
import { useCallback, useEffect, useMemo } from "react";
import { useSearchParams } from "react-router-dom";
import { MAP_CONFIGS } from "../components/Map/mapConfigs";
File SessionFilters.style.tsx
has 652 lines of code (exceeds 250 allowed). Consider refactoring. Open
import styled, { keyframes } from "styled-components";
import {
acBlue,
acBlueTransparent,
File FixedMarkers.tsx
has 629 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
Cluster,
MarkerClusterer,
SuperClusterAlgorithm,
} from "@googlemaps/markerclusterer";
File append_measurements_content_spec.rb
has 541 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'rails_helper'
describe Csv::AppendMeasurementsContent do
before(:each) { @subject = Csv::AppendMeasurementsContent.new }
Function renderCalendar
has 224 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderCalendar: function (side) {
//
// Build the matrix of dates that will populate the calendar
//
Function mapSettings
has 222 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const mapSettings = () => {
return [
{
featureType: "administrative",
elementType: "labels.text.fill",
Function useThresholdHandlers
has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring. Open
export const useThresholdHandlers = (
setThresholdValues: React.Dispatch<React.SetStateAction<Thresholds>>,
setInputValue: React.Dispatch<React.SetStateAction<string>>,
setActiveInput: React.Dispatch<React.SetStateAction<keyof Thresholds | null>>,
setErrorMessage: React.Dispatch<React.SetStateAction<string>>,
- 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
Method save
has 213 lines of code (exceeds 25 allowed). Consider refactoring. Open
def save(streams)
persisted_streams =
Stream
.select(:id, :min_latitude, :min_longitude, :sensor_name, :session_id)
.joins(:session)
Function useMapParams
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
export const useMapParams = () => {
const defaultThresholds = useAppSelector(selectDefaultThresholds);
const thresholdValues = useAppSelector(selectThresholds);
const isMobile: boolean = useMobileDetection();
const [searchParams, setSearchParams] = useSearchParams();
- 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 ThresholdConfigurator.style.tsx
has 493 lines of code (exceeds 250 allowed). Consider refactoring. Open
import styled from "styled-components";
import * as colors from "../../assets/styles/colors";
import { media } from "../../utils/media";
import { Button } from "../Button/Button.style";
File graphConfig.ts
has 492 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
AlignValue,
ChartOptions,
ChartZoomingOptions,
PlotOptions,
Function useThresholdHandlers
has 191 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const useThresholdHandlers = (
setThresholdValues: React.Dispatch<React.SetStateAction<Thresholds>>,
setInputValue: React.Dispatch<React.SetStateAction<string>>,
setActiveInput: React.Dispatch<React.SetStateAction<keyof Thresholds | null>>,
setErrorMessage: React.Dispatch<React.SetStateAction<string>>,
Function MobileMarkers
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
const MobileMarkers = ({
sessions,
onMarkerClick,
selectedStreamId,
pulsatingSessionId,
- 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 FixedMarkers
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
export function FixedMarkers({
sessions,
onMarkerClick,
selectedStreamId,
pulsatingSessionId,
- 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"