Showing 131 of 843 total issues
Function useChartOptions
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const useChartOptions = (
points: PointRecord[],
zeroWindPoints: PointRecord[],
unitSystem: UnitSystem,
additionalSeries: SeriesOptionsType[] = []
- 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 useCountriesWithPlaces
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const useCountriesWithPlaces = (
places: Place[],
searchTerm: string,
bounds: google.maps.LatLngBounds | null | undefined
) => {
- 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 getLaneViolation
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const getLaneViolation = (
points: PointRecord[],
laneEnterPoint: PointRecord,
referencePoint: Coordinate,
exitWindowPoint: PointRecord
- 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 TrackFileInput
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const TrackFileInput = ({
onUploadStart,
onUploadEnd,
onChange,
name
- 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 assign_ranks
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def assign_ranks(standings)
return standings unless standings.any?
standings.first.rank = 1
standings.each_cons(2).with_index do |(prev, curr), index|
- 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 show
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def show
@track = Track.find(params[:track_id])
authorize @track
- 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 RoundCell
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const RoundCell = ({ event, round }: RoundProps) => {
const { t } = useI18n()
const [showRoundActions, setShowRoundActions] = useState(false)
const actionsButtonRef = useRef<HTMLTableCellElement>(null)
const menuRef = useRef<HTMLDivElement>(null)
- 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 redirectPath
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const redirectPath = (onlineRanking: OnlineRanking) => {
const baseUrl = `/online_rankings/${onlineRanking.id}`
if (onlineRanking.intervalType === 'annual') {
const lastYear = onlineRanking.years[onlineRanking.years.length - 1]
- 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 assign_ranks
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def assign_ranks(standings)
return standings unless standings.any?
standings.first[:rank] = 1
standings.each_cons(2).with_index do |(prev, curr), index|
- 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 restoreSeriesVisibility
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const restoreSeriesVisibility = (
chartName: string,
chartSeries: Series[]
): void => {
chartSeries.forEach(series => {
- 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 RoundCell
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const RoundCell = ({ event, round }: RoundProps) => {
const { t } = useI18n()
const [showRoundActions, setShowRoundActions] = useState(false)
const actionsButtonRef = useRef<HTMLTableCellElement>(null)
const menuRef = useRef<HTMLDivElement>(null)
- 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"