Showing 2,441 of 6,157 total issues
Function mapStateToProps
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
function mapStateToProps(state) {
const {
explore,
charts,
common,
Function renderGroupingHeaders
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
const renderGroupingHeaders = (): JSX.Element => {
// TODO: Make use of ColumnGroup to render the aditional headers
const headers: any = [];
let currentColumnIndex = 0;
File controlPanel.tsx
has 270 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 DeckGLContainer
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
forwardRef((props: DeckGLContainerProps, ref) => {
const [tooltip, setTooltip] = useState<TooltipProps['tooltip']>(null);
const [lastUpdate, setLastUpdate] = useState<number | null>(null);
const [viewState, setViewState] = useState(props.viewport);
const prevViewport = usePrevious(props.viewport);
File controlPanel.tsx
has 269 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 renderRowHeaderRow
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderRowHeaderRow(pivotSettings) {
// Render just the attribute names of the rows (the actual attribute values
// will show up in the individual rows).
const {
Function loggerMiddleware
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
const loggerMiddleware = store => next => action => {
if (action.type !== LOG_EVENT) {
return next(action);
}
Function attrValueCells
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
const attrValueCells = rowKey.map((r, i) => {
let handleContextMenu;
let valueCellClassName = 'pvtRowLabel';
if (!omittedHighlightHeaderGroups.includes(rowAttrs[i])) {
if (highlightHeaderCellsOnHover) {
Function getCrossFilterDataMask
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
const getCrossFilterDataMask = (key: string, value: DataRecordValue) => {
let updatedFilters = { ...(filters || {}) };
if (filters && isActiveFilterValue(key, value)) {
updatedFilters = {};
} else {
Function sortedRows
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
const sortedRows = rows.map((row, idx) => {
let sortKey: DataRecordValue = '';
let aggregate: number | undefined;
let entries = 0;
Object.entries(row).forEach(([key, value]) => {
Function contextmenu
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
contextmenu: async eventParams => {
if (onContextMenu) {
eventParams.event.stop();
const { data, seriesName, seriesIndex } = eventParams;
const pointerEvent = eventParams.event.event;
Function fetchSlices
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function fetchSlices(
userId?: number,
filter_value?: string,
sortColumn = 'changed_on',
) {
Function selectNativeIndicatorsForChart
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const selectNativeIndicatorsForChart = (
nativeFilters: Filters,
dataMask: DataMaskStateWithId,
chartId: number,
chart: any,
Function setupFormatters
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function setupFormatters(
d3NumberFormat: Partial<FormatLocaleDefinition>,
d3TimeFormat: Partial<TimeLocaleDefinition>,
) {
getNumberFormatterRegistry()
Function render
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
render() {
const {
showChangeDatasourceModal,
showEditDatasourceModal,
showSaveDatasetModal,
- 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 shouldComponentUpdate
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
shouldComponentUpdate(nextProps, nextState) {
// this logic mostly pertains to chart resizing. we keep a copy of the dimensions in
// state so that we can buffer component size updates and only update on the final call
// which improves performance significantly
if (
- 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 upgrade
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def upgrade():
bind = op.get_bind()
session = db.Session(bind=bind)
for dashboard in paginated_update(session.query(Dashboard)):
#
- 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 convert_filter_scopes
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def convert_filter_scopes(
json_metadata: dict[Any, Any], filter_boxes: list[Slice]
) -> dict[int, dict[str, dict[str, Any]]]:
filter_scopes = {}
immuned_by_id: list[int] = json_metadata.get("filter_immune_slices") or []
- 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 validate_statement
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def validate_statement(
cls,
statement: str,
database: Database,
cursor: Any,
- 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 apply_top_to_sql
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def apply_top_to_sql(cls, sql: str, limit: int) -> str:
"""
Alters the SQL statement to apply a TOP clause
:param limit: Maximum number of rows to be returned by the query
:param sql: SQL query
- 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"