Showing 2,441 of 6,157 total issues
Function render
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const value = this.props.value || this.props.default;
const type = value.type || controlTypes.fixed;
const columns = this.props.datasource
? this.props.datasource.columns
File index.tsx
has 325 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 325 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 FilterScope.test.tsx
has 324 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 constructor
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor() {
const experimentalPlugins = isFeatureEnabled(
FeatureFlag.ChartPluginsExperimental,
)
? [
Function get_form_data
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def get_form_data(
slice_id: Optional[int] = None,
use_slice_data: bool = False,
initial_form_data: Optional[dict[str, Any]] = None,
) -> tuple[dict[str, Any], Optional[Slice]]:
- 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 filter_values_handler
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def filter_values_handler( # pylint: disable=too-many-arguments
values: FilterValues | None,
operator: str,
target_generic_type: utils.GenericDataType,
target_native_type: str | None = None,
- 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 filter_values_handler
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def filter_values_handler( # pylint: disable=too-many-arguments
values: Optional[FilterValues],
operator: str,
target_generic_type: utils.GenericDataType,
target_native_type: Optional[str] = None,
- 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 extract_table_references
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def extract_table_references(
sql_text: str, sqla_dialect: str, show_warning: bool = True
) -> set[Table]:
"""
Return all the dependencies from a SQL sql_text.
- 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 QueryList
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
function QueryList({ addDangerToast }: QueryListProps) {
const {
state: { loading, resourceCount: queryCount, resourceCollection: queries },
fetchData,
} = useListViewResource<QueryObject>(
- 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 BigNumberViz.tsx
has 322 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 saveOrOverwrite
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
async saveOrOverwrite(gotodash: boolean) {
this.setState({ isLoading: true });
// Create or retrieve dashboard
type DashboardGetResponse = {
Function PluginFilterTimegrain
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function PluginFilterTimegrain(
props: PluginFilterTimeGrainProps,
) {
const {
data,
File api.py
has 321 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 MixedSeries.stories.tsx
has 321 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 gsheets.py
has 320 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 ColorSchemeLabel
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function ColorSchemeLabel(props: ColorSchemeLabelProps) {
const { id, label, colors } = props;
const [showTooltip, setShowTooltip] = useState<boolean>(false);
const labelNameRef = useRef<HTMLElement>(null);
const labelsColorRef = useRef<HTMLElement>(null);
Function importResource
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
(
bundle: File,
databasePasswords: Record<string, string> = {},
sshTunnelPasswords: Record<string, string> = {},
sshTunnelPrivateKey: Record<string, string> = {},
File RightMenu.test.tsx
has 320 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
SupersetAppInitializer
has 30 functions (exceeds 20 allowed). Consider refactoring. Open
class SupersetAppInitializer: # pylint: disable=too-many-public-methods
def __init__(self, app: SupersetApp) -> None:
super().__init__()
self.superset_app = app