Showing 2,441 of 6,157 total issues
File controlPanel.tsx
has 282 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.tsx
has 282 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 renderTotalsRow
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderTotalsRow(pivotSettings) {
// Render the final totals rows that has the totals for all the columns.
const {
rowAttrs,
Function render
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
height,
chartAlert,
chartStatus,
Function ModalTrigger
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
(props: ModalTriggerProps, ref: ModalTriggerRef | null) => {
const [showModal, setShowModal] = useState(false);
const {
beforeOpen = () => {},
onExit = () => {},
Function render
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { formatString, testValues } = this.state;
return (
<div className="container">
Function MetricsControl
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
const MetricsControl = ({
onChange,
multi,
value: propsValue,
columns,
- 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 reorderItem
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
export default function reorderItem({
entitiesMap,
source,
destination,
position,
- 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 save_or_overwrite_slice
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def save_or_overwrite_slice(
# pylint: disable=too-many-arguments,too-many-locals
slc: Slice | None,
slice_add_perm: bool,
slice_overwrite_perm: bool,
- 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 get_metric_name
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def get_metric_name(metric: Metric, verbose_map: dict[str, Any] | None = None) -> str:
"""
Extract label from metric
:param metric: object to extract label from
- 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 transformProps
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
export default function transformProps(
chartProps: EchartsSunburstChartProps,
): SunburstTransformedProps {
const {
formData,
- 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 transformProps
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
export default function transformProps(
chartProps: EchartsFunnelChartProps,
): FunnelChartTransformedProps {
const {
formData,
- 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 copyTextToClipboard
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
const copyTextToClipboard = (getText: () => Promise<string>) =>
copyTextWithClipboardApi(getText)
// If the Clipboard API is not supported, fallback to the older method.
.catch(() =>
getText().then(
- 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 FilterableTable
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
const FilterableTable = ({
orderedColumnKeys,
data,
height,
filterText = '',
- 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 RowLevelSecurityModal
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
function RowLevelSecurityModal(props: RowLevelSecurityModalProps) {
const { rule, addDangerToast, addSuccessToast, onHide, show } = props;
const [currentRule, setCurrentRule] = useState<RLSObject>({
...DEFAULT_RULE,
- 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 Label
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
export default function Label(props: LabelProps) {
const theme = useTheme();
const { colors, transitionTiming } = theme;
const { type = 'default', onClick, children, ...rest } = props;
const {
- 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 FilterControls
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
const FilterControls: FC<FilterControlsProps> = ({
dataMaskSelected,
onFilterSelectionChange,
}) => {
const filterBarOrientation = useSelector<RootState, FilterBarOrientation>(
- 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 TableOverview.stories.tsx
has 281 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 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function transformProps(
chartProps: BigNumberTotalChartProps,
): BigNumberVizProps {
const {
width,
Function sortRows
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function sortRows(
rows: DataRecord[],
totalStackedValues: number[],
xAxis: string,
xAxisSortSeries: SortSeriesType,