Showing 2,441 of 6,157 total issues
Function computeArcStates
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
function computeArcStates(adatum) {
// Find the max sum of values across all time
let maxSum = 0;
let grain = 0;
const sums = [];
Function renderPasswordFields
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
const renderPasswordFields = () => {
if (
passwordFields.length === 0 &&
sshTunnelPasswordFields.length === 0 &&
sshTunnelPrivateKeyFields.length === 0 &&
File selectors.ts
has 353 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 transformProps
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function transformProps(chartProps: ChartProps) {
/**
* This function is called after a successful response has been
* received from the chart data endpoint, and is used to transform
* the incoming data prior to being sent to the Visualization.
Function EditorAutoSync
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
const EditorAutoSync: FC = () => {
const queryEditors = useSelector<SqlLabRootState, QueryEditor[]>(
state => state.sqlLab.queryEditors,
);
const unsavedQueryEditor = useSelector<SqlLabRootState, UnsavedQueryEditor>(
Function onConfirmSave
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
const onConfirmSave = () => {
// Pull out extra fields into the extra object
const schema =
currentDatasource.tableSelector?.schema ||
currentDatasource.databaseSelector?.schema ||
File Shared_DeckGL.jsx
has 351 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.ts
has 351 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 validate_ssh_tunnel_credentials
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
def validate_ssh_tunnel_credentials(
self, data: dict[str, Any], **kwargs: Any
) -> None:
"""If ssh_tunnel has a masked credentials, credentials are required"""
uuid = data["uuid"]
- 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_dataset
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
def import_dataset(
config: dict[str, Any],
overwrite: bool = False,
force_data: bool = False,
ignore_permissions: bool = False,
- 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 EchartsTreemap
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
export default function EchartsTreemap({
echartOptions,
emitCrossFilters,
groupby,
height,
- 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 customTimeRangeDecode
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
export const customTimeRangeDecode = (
timeRange: string,
): CustomRangeDecodeType => {
const splitDateRange = timeRange.split(SEPARATOR);
- 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 350 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 renderEditorBottomBar
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
const renderEditorBottomBar = (hideActions: boolean) => {
const { allow_ctas: allowCTAS, allow_cvas: allowCVAS } = database || {};
const showMenu = allowCTAS || allowCVAS;
const runMenuBtn = (
Function renderRowsReturned
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
const renderRowsReturned = (alertMessage: boolean) => {
const { results, rows, queryLimit, limitingFactor } = query;
let limitMessage = '';
const limitReached = results?.displayLimitReached;
const limit = queryLimit || results.query.limit;
Function renderTabContent
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderTabContent() {
const {
component: tabComponent,
depth,
availableColumnCount,
Function DeckGLPolygon
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
const DeckGLPolygon = (props: DeckGLPolygonProps) => {
const containerRef = useRef<DeckGLContainerHandle>();
const getAdjustedViewport = useCallback(() => {
let viewport = { ...props.viewport };
File index.tsx
has 348 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 ChartHolder.test.tsx
has 347 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 _forEach
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
locations.forEach(function _forEach(location, i) {
const pixel = project(lngLatAccessor(location));
const pixelRounded = [
roundDecimal(pixel[0], 1),
roundDecimal(pixel[1], 1),