Showing 2,441 of 6,157 total issues
File slice.py
has 319 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 CommonParameters.tsx
has 319 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 filters
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
const filters: Filters = useMemo(() => {
const filters_list = [
{
Header: t('Name'),
key: 'search',
Function constructor
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(props) {
super(props);
const { dashboardFilters, layout } = props;
File tag.py
has 316 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 DrillByMenuItems.tsx
has 316 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 CountryMap
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
function CountryMap(element, props) {
const {
data,
width,
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 get_time_filter
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def get_time_filter(
self,
column: str | None = None,
default: str | None = None,
target_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 getInitialState
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
export default function getInitialState({
common,
active_tab: activeTab,
tab_state_ids: tabStateIds = [],
databases,
- 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 types.ts
has 314 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { JsonObject } from '@superset-ui/core';
import { InputProps } from 'antd/lib/input';
import { ChangeEvent, EventHandler, FormEvent } from 'react';
/**
Function render
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
className,
data,
width,
Function render
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const isButtonDisabled = this.isBtnDisabled();
const VIEW_INSTRUCTIONS_TEXT = t('view instructions');
const datasetHelpText = this.state.canCreateDataset ? (
<span data-test="dataset-write">
File Tab.jsx
has 313 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 PropertiesModal.test.tsx
has 313 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 utils.ts
has 313 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
actionHandlers
has 29 functions (exceeds 20 allowed). Consider refactoring. Open
const actionHandlers = {
[HYDRATE_DASHBOARD]() {
return { ...state, ...action.data.dashboardState };
},
[UPDATE_CSS]() {
File DatasourceModal.tsx
has 312 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 exports
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = async results => {
const enrichedRules = {
'react-prefer-function-component/react-prefer-function-component': {
description: 'We prefer function components to class-based components',
},
Function render
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { isFocused, editorMode } = this.state;
const {
component,
Function options
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
const options = useMemo(() => {
if (dashboardId) {
return [
<Option value="dashboard" label={t('dashboard')} key="dashboard">
<Tooltip title={DASHBOARD_ALERT}>{t('Dashboard scheme')}</Tooltip>