Showing 2,441 of 6,157 total issues
Function renderAdvancedFieldset
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderAdvancedFieldset() {
const { datasource } = this.state;
return (
<Fieldset
title={t('Advanced')}
Function applyFilters
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
applyFilters() {
const { appliedFilters } = this;
const { activeFilters, ownDataCharts, slices } = this.props;
// refresh charts if a filter was removed, added, or changed
Function columns
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
.map((key: string, i) => {
const dataType = coltypes[i];
const config = columnConfig[key] || {};
// for the purpose of presentation, only numeric values are treated as metrics
// because users can also add things like `MAX(str_col)` as a metric.
File controlPanel.tsx
has 255 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 getFilterValues
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function getFilterValues(
tab: TableTab,
welcomeTable: WelcomeTable,
user?: User,
otherTabFilters?: Filter[],
File index.tsx
has 255 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 createHandleSave
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
async () => {
const transformFilter = (id: string) => {
const formInputs = values.filters?.[id] || filterConfigMap[id];
if (!formInputs) {
return undefined;
File line.test.ts
has 255 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 nativeFilters.test.ts
has 255 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 254 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 processRecord
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
processRecord(record) {
// this code is called in a tight loop
const colKey = [];
const rowKey = [];
this.props.cols.forEach(col => {
- 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 isValid
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
isValid() {
const nullCheckOperators = [Operators.IsNotNull, Operators.IsNull].map(
op => OPERATOR_ENUM_TO_OPERATOR_TYPE[op].operation,
);
const truthCheckOperators = [Operators.IsTrue, Operators.IsFalse].map(
- 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 ExploreChartPanel
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const ExploreChartPanel = ({
chart,
slice,
vizType,
ownState,
- 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 load_world_bank_health_n_pop
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def load_world_bank_health_n_pop( # pylint: disable=too-many-locals
only_metadata: bool = False,
force: bool = False,
sample: bool = False,
) -> 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 upgrade
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def upgrade():
bind = op.get_bind()
session = db.Session(bind=bind)
tables = [
- 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 downgrade_filter_set
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def downgrade_filter_set(filter_set: dict[str, Any]) -> int:
changed_filters = 0
old_data_mask = filter_set.pop("dataMask", {})
native_filters = {}
data_mask = {"nativeFilters": native_filters}
- 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 upgrade
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def upgrade():
bind = op.get_bind()
session = db.Session(bind=bind)
tables = [
- 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 downgrade
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def downgrade():
bind = op.get_bind()
session = db.Session(bind=bind)
for dashboard in paginated_update(session.query(Dashboard)):
- 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_fk_many_from_list
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def get_fk_many_from_list(
object_list: list[Any],
fkmany: list[Column],
fkmany_class: builtins.type[TableColumn | SqlMetric],
key_attr: str,
- 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_physical_table_metadata
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def get_physical_table_metadata(
database: Database,
table: Table,
normalize_columns: bool,
) -> list[ResultSetColumnType]:
- 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"