Showing 2,441 of 6,157 total issues
File RowLevelSecurityModal.tsx
has 423 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 Heatmap
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
Open
function Heatmap(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 postprocess_datasets
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
Open
def postprocess_datasets(session: Session) -> None:
"""
Postprocess datasets after insertion to
- Quote table names for physical datasets (if needed)
- Link referenced tables to virtual datasets
- 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 dashboardLayout.test.js
has 420 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 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
component: columnComponent,
parentComponent,
index,
File countries.ts
has 420 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.jsx
has 419 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 api.py
has 419 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
Function transformProps
has 151 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function transformProps(chartProps) {
const {
width,
height,
annotationData,
Function renderSliceConfiguration
has 150 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
renderSliceConfiguration() {
const {
annotationType,
sourceType,
value,
Consider simplifying this complex logical expression. Open
Open
if not (
self.can_access_schema(datasource)
or self.can_access("datasource_access", datasource.perm or "")
or self.is_owner(datasource)
or (
File utils.py
has 416 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
Function memoizedRows
has 149 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const memoizedRows = useMemo(() => {
const renderSparklineCell = (valueField, column, entries) => {
let sparkData;
if (column.timeRatio) {
// Period ratio sparkline
File DndFilterSelect.tsx
has 415 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 work for additional information
* regarding copyright ownership. The ASF licenses file
File transformProps.ts
has 414 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 onSave
has 147 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const onSave = async () => {
let dbConfigExtraExtensionOnSaveError;
setLoading(true);
Function transformProps
has 146 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function transformProps(
chartProps: HistogramChartProps,
): HistogramTransformedProps {
const refs: Refs = {};
let focusedSeries: number | undefined;
Function transformProps
has 146 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function transformProps(chartProps: EchartsBubbleChartProps) {
const { height, width, hooks, queriesData, formData, inContextMenu, theme } =
chartProps;
const { data = [] } = queriesData[0];
BaseDatasource
has 43 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class BaseDatasource(AuditMixinNullable, ImportExportMixin): # pylint: disable=too-many-public-methods
"""A common interface to objects that are queryable
(tables and datasources)"""
# ---------------------------------------------------------------
File getFilterScopeFromNodesTree.test.js
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