Showing 2,441 of 6,157 total issues
Function makeApi
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
Open
export default function makeApi<
Payload = SupersetPayload,
Result = JsonObject,
T extends ParseMethod = ParseMethod,
>(
- 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 ChartList
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
Open
function ChartList(props: ChartListProps) {
const {
addDangerToast,
addSuccessToast,
user: { userId },
- 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 AsyncSelect.stories.tsx
has 287 lines of code (exceeds 250 allowed). Consider refactoring. Open
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 ChangeDatasourceModal.tsx
has 287 lines of code (exceeds 250 allowed). Consider refactoring. Open
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 getTimeOffset.ts
has 287 lines of code (exceeds 250 allowed). Consider refactoring. Open
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 Calendar
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Calendar(element, props) {
const {
data,
height,
cellPadding = 3,
File test_db.py
has 286 lines of code (exceeds 250 allowed). Consider refactoring. Open
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 FilterCard.test.tsx
has 286 lines of code (exceeds 250 allowed). Consider refactoring. Open
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 286 lines of code (exceeds 250 allowed). Consider refactoring. Open
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 hotkeys
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const hotkeys = useMemo(() => {
// Get all hotkeys including ace editor hotkeys
// Get the user's OS
const userOS = detectOS();
const base = [
File FilterControl.tsx
has 285 lines of code (exceeds 250 allowed). Consider refactoring. Open
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 ShareMenuItems
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ShareMenuItems = (props: ShareMenuItemProps) => {
const {
copyMenuItemTitle,
emailMenuItemTitle,
emailSubject,
BaseViz
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class BaseViz: # pylint: disable=too-many-public-methods
"""All visualizations derive this base class"""
viz_type: str | None = None
verbose_name = "Base Viz"
File SelectFilterPlugin.tsx
has 284 lines of code (exceeds 250 allowed). Consider refactoring. Open
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 ChartHolder.tsx
has 284 lines of code (exceeds 250 allowed). Consider refactoring. Open
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 Label
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function Label(props: LabelProps) {
const theme = useTheme();
const { colors, transitionTiming } = theme;
const { type = 'default', onClick, children, ...rest } = props;
const {
File Column.jsx
has 283 lines of code (exceeds 250 allowed). Consider refactoring. Open
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 dataset.py
has 283 lines of code (exceeds 250 allowed). Consider refactoring. Open
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 controlPanel.tsx
has 283 lines of code (exceeds 250 allowed). Consider refactoring. Open
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 283 lines of code (exceeds 250 allowed). Consider refactoring. Open
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