Showing 2,441 of 6,157 total issues
File chartActions.test.js
has 346 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 Markdown.jsx
has 346 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 snowflake.py
has 346 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 render
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { isNew, name, annotationType, sourceType, show, showLabel } =
this.state;
const isValid = this.isValidForm();
const metadata = getChartMetadataRegistry().get(this.props.vizType);
File log.py
has 344 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 renderTableRow
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
renderTableRow(rowKey, rowIdx, pivotSettings) {
// Render a single row in the pivot table.
const {
rowAttrs,
- 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 migrate_dashboard
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
def migrate_dashboard(dashboard: Dashboard) -> None:
"""
Convert the dashboard to use native filters.
:param dashboard: The dashboard to convert
- 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 29 (exceeds 5 allowed). Consider refactoring. Open
export default function transformProps(
chartProps: HeatmapChartProps,
): HeatmapTransformedProps {
const refs: Refs = {};
const { width, height, formData, queriesData, datasource } = chartProps;
- 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 TableSelector
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
const TableSelector: FunctionComponent<TableSelectorProps> = ({
database,
emptyState,
formMode = false,
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 exploreJSON
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function exploreJSON(
formData,
force = false,
timeout,
key,
File DndMetricSelect.tsx
has 343 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 work for additional information
* regarding copyright ownership. The ASF licenses file
File Chart.tsx
has 342 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 342 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 render
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { chartAlert, chartStatus, chartId, emitCrossFilters } = this.props;
// Skip chart rendering
if (chartStatus === 'loading' || !!chartAlert || chartStatus === null) {
File index.jsx
has 341 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 importexport.py
has 341 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 createAxisControl
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createAxisControl(axis: 'x' | 'y'): ControlSetRow[] {
const isXAxis = axis === 'x';
const isVertical = (controls: ControlStateMapping) =>
Boolean(controls?.orientation.value === OrientationType.Vertical);
const isHorizontal = (controls: ControlStateMapping) =>
Function prepareDashboardFilters
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function prepareDashboardFilters(
filters: { name: string; column: string; datasetId: number }[],
) {
cy.createSampleDashboards([0]);
cy.request({
File webdriver.py
has 338 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 Modal.tsx
has 338 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