Showing 2,441 of 6,157 total issues
File ExploreChartHeader.test.tsx
has 407 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 types.ts
has 407 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable camelcase */
/**
* 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
Function render
has 144 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
id,
componentId,
dashboardId,
Function transformProps
has 144 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function transformProps(
chartProps: EchartsTreeChartProps,
): TreeTransformedProps {
const { width, height, formData, queriesData } = chartProps;
const refs: Refs = {};
Function useSimpleTabFilterProps
has 144 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const useSimpleTabFilterProps = (props: Props) => {
const defaultTimeFilter = useDefaultTimeFilter();
const isOperatorRelevant = (operator: Operators, subject: string) => {
const column = props.datasource.columns?.find(
Function useSingleViewResource
has 144 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function useSingleViewResource<D extends object = any>(
resourceName: string,
resourceLabel: string, // resourceLabel for translations
handleErrorMsg: (errorMsg: string) => void,
path_suffix = '',
File index.tsx
has 405 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 403 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 postgres.py
has 402 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 schemas.py
has 402 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 data.ts
has 402 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 Icicle
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
Open
function Icicle(element, props) {
const {
width,
height,
data,
- 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 _import
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
Open
def _import( # pylint: disable=too-many-locals, too-many-branches
configs: dict[str, Any],
overwrite: bool = False,
force_data: 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 FilterBarSettings
has 139 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const FilterBarSettings = () => {
const dispatch = useDispatch();
const theme = useTheme();
const isCrossFiltersEnabled = useSelector<RootState, boolean>(
({ dashboardInfo }) => dashboardInfo.crossFiltersEnabled,
File getControlValuesCompatibleWithDatasource.test.ts
has 397 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 DatasourceControl.test.tsx
has 397 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 SliceHeader.test.tsx
has 397 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 397 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 render
has 138 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
depth,
component: tabsComponent,
parentComponent,
Function AllEntities
has 137 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function AllEntities() {
const [tagId] = useQueryParam('id', NumberParam);
const [tag, setTag] = useState<Tag | null>(null);
const [showTagModal, setShowTagModal] = useState<boolean>(false);
const { addSuccessToast, addDangerToast } = useToasts();