Showing 2,441 of 6,157 total issues
File api.py
has 394 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 SliceAdder.tsx
has 394 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 redraw
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
redraw({ width, height, ctx, isDragging, project }) {
const {
aggregation,
compositeOperation,
dotRadius,
File getDropPosition.test.js
has 393 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 drawChart
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
drawChart() {
if (this.canvas) {
const {
data: rawData,
yDomain,
- 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 renderColHeaderRow
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
renderColHeaderRow(attrName, attrIdx, pivotSettings) {
// Render a single row in the column header at the top of 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 to_series
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
def to_series( # pylint: disable=too-many-branches
self, df: pd.DataFrame, classed: str = "", title_suffix: str = ""
) -> list[dict[str, Any]]:
cols = []
for col in df.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 setupErrorMessages
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function setupErrorMessages() {
const errorMessageComponentRegistry = getErrorMessageComponentRegistry();
errorMessageComponentRegistry.registerValue(
ErrorTypeEnum.FRONTEND_TIMEOUT_ERROR,
Function renderControlPanelSection
has 132 lines of code (exceeds 25 allowed). Consider refactoring. Open
const renderControlPanelSection = (
section: ExpandedControlPanelSectionConfig,
) => {
const { controls } = props;
const { label, description, visibility } = section;
Function __init__
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
def __init__( # pylint: disable=too-many-locals
self,
data: DbapiResult,
cursor_description: DbapiDescription,
db_engine_spec: type[BaseEngineSpec],
- 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 VizTypeGallery
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
export default function VizTypeGallery(props: VizTypeGalleryProps) {
const { selectedViz, onChange, onDoubleClick, className, denyList } = props;
const { mountedPluginMetadata } = usePluginContext();
const searchInputRef = useRef<HTMLInputElement>();
const [searchInputValue, setSearchInputValue] = useState('');
- 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 DatasetList
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
const DatasetList: FunctionComponent<DatasetListProps> = ({
addDangerToast,
addSuccessToast,
user,
}) => {
- 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 index.tsx
has 384 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 SqlEditor.test.tsx
has 382 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 CategoricalDeckGLContainer
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
const CategoricalDeckGLContainer = (props: CategoricalDeckGLContainerProps) => {
const containerRef = useRef<DeckGLContainerHandle>(null);
const getAdjustedViewport = useCallback(() => {
let viewport = { ...props.viewport };
Function useListViewResource
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function useListViewResource<D extends object = any>(
resource: string,
resourceLabel: string, // resourceLabel for translations
handleErrorMsg: (errorMsg: string) => void,
infoEnable = true,
Function render
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
refreshLimit = 0,
refreshWarning,
editMode,
File api.py
has 381 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 NotificationMethod.test.tsx
has 381 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 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { datasource, activeTabKey } = this.state;
const { metrics } = datasource;
const sortedMetrics = metrics?.length ? this.sortMetrics(metrics) : [];
const { theme } = this.props;