Showing 2,441 of 6,157 total issues
Function AnnotationModal
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
const AnnotationModal: FunctionComponent<AnnotationModalProps> = ({
addDangerToast,
addSuccessToast,
annotationLayerId,
annotation = 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 getTimeOffset
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
export const getTimeOffset = ({
timeRangeFilter,
shifts,
startDate,
includeFutureOffsets = true,
- 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 NVD3Controls.tsx
has 489 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
Function drawVis
has 193 lines of code (exceeds 25 allowed). Consider refactoring. Open
function drawVis(i, dat) {
const datum = dat[i];
const w = width;
const h = height / data.length;
const x = d3.scale.linear().range([0, w]);
File 2018-07-22_11-59_bebcf3fed1fe_convert_dashboard_v1_positions.py
has 483 lines of code (exceeds 250 allowed). Consider refactoring. Open
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
Function dashboardStateReducer
has 188 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function dashboardStateReducer(state = {}, action) {
const actionHandlers = {
[HYDRATE_DASHBOARD]() {
return { ...state, ...action.data.dashboardState };
},
File index.tsx
has 479 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
Function transformProps
has 187 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function transformProps(
chartProps: EchartsTreemapChartProps,
): TreemapTransformedProps {
const {
formData,
Function buildQuery
has 186 lines of code (exceeds 25 allowed). Consider refactoring. Open
const buildQuery: BuildQuery<TableChartFormData> = (
formData: TableChartFormData,
options,
) => {
const {
Function ControlPanelsContainer
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
export const ControlPanelsContainer = (props: ControlPanelsContainerProps) => {
const { colors } = useTheme();
const pluginContext = useContext(PluginContext);
const prevState = usePrevious(props.exploreState);
- 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 DatabaseSelector
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
export default function DatabaseSelector({
db,
formMode = false,
emptyState,
getDbList,
- 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 PropertiesModal
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
const PropertiesModal = ({
addSuccessToast,
addDangerToast,
colorScheme: currentColorScheme,
dashboardId,
- 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 AdhocFilterEditPopoverSimpleTabContent.test.tsx
has 475 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
File drilltodetail.test.ts
has 475 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
File index.jsx
has 474 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
actionHandlers
has 52 functions (exceeds 20 allowed). Consider refactoring. Open
const actionHandlers = {
[actions.ADD_QUERY_EDITOR]() {
const mergeUnsavedState = alterInArr(
state,
'queryEditors',
File base.py
has 472 lines of code (exceeds 250 allowed). Consider refactoring. Open
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
File databricks.py
has 471 lines of code (exceeds 250 allowed). Consider refactoring. Open
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
File webpack.config.js
has 468 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable no-console */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
Function CountryMap
has 180 lines of code (exceeds 25 allowed). Consider refactoring. Open
function CountryMap(element, props) {
const {
data,
width,
height,