Showing 2,441 of 6,157 total issues
Function DynamicEditableTitle
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
Open
({
title,
placeholder,
onSave,
canEdit,
- 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 createMultiFormatter
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
Open
export default function createMultiFormatter({
id,
label,
description,
formats = {},
- 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 handleComponentDrop
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function handleComponentDrop(dropResult) {
return (dispatch, getState) => {
const overflowsParent = dropOverflowsParent(
dropResult,
getState().dashboardLayout.present,
Function extractSeries
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function extractSeries(
data: DataRecord[],
opts: {
fillNeighborValue?: number;
xAxis?: string;
Function renderControls
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderControls = () => {
let keyLink;
const KEYS_FOR_TABLE_TEXT = t('Keys for table');
if (tableData?.indexes?.length) {
keyLink = (
Function onFinish
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const onFinish = () => {
const { title, slug, certifiedBy, certificationDetails } =
form.getFieldsValue();
let currentColorScheme = colorScheme;
let currentJsonMetadata = jsonMetadata;
Function renderTimeComparisonDropdown
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderTimeComparisonDropdown = (): JSX.Element => {
const allKey = comparisonColumns[0].key;
const handleOnClick = (data: any) => {
const { key } = data;
// Toggle 'All' key selection
Function ControlWithVerification
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
return function ControlWithVerification(props: FullControlProps) {
const {
hovered,
onChange: basicOnChange,
needAsyncVerification = false,
Function render
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const noQueryEditors = this.props.queryEditors?.length === 0;
const editors = this.props.queryEditors?.map(qe => (
<EditableTabs.TabPane
key={qe.id}
File MetricsControl.jsx
has 293 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 293 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 FilterControls.tsx
has 293 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 TimeTable.jsx
has 292 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 SavedQueryList.test.jsx
has 292 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 Chord
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Chord(element, props) {
const { data, width, height, numberFormat, colorScheme, sliceId } = props;
element.innerHTML = '';
Query
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Query(
SqlTablesMixin,
ExtraJSONMixin,
ExploreMixin,
Model,
Function get_sqla_query
has 24 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get_sqla_query( # pylint: disable=too-many-arguments,too-many-locals,too-many-branches,too-many-statements
BigQueryEngineSpec
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class BigQueryEngineSpec(BaseEngineSpec): # pylint: disable=too-many-public-methods
"""Engine spec for Google's BigQuery
As contributed by @mxmzdlv on issue #945"""
Function __init__
has 24 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__( # pylint: disable=too-many-locals, too-many-arguments
Function componentDidMount
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
componentDidMount() {
// merge post form data with GET search params
// Hack: this data should be coming from getInitialState
// but for some reason this data isn't being passed properly through
// the reducer.