Showing 2,441 of 6,157 total issues
Function renderStepTwoAlert
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderStepTwoAlert = () => {
const { hostname } = window.location;
let ipAlert = connectionAlert?.REGIONAL_IPS?.default || '';
const regionalIPs = connectionAlert?.REGIONAL_IPS || {};
Object.entries(regionalIPs).forEach(([ipRegion, ipRange]) => {
Function openModalFromChartContext
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function openModalFromChartContext(targetMenuItem: string) {
interceptSamples();
if (targetMenuItem.startsWith('Drill to detail by')) {
cy.get('.ant-dropdown')
Function processFilters
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function processFilters(
formData: Partial<QueryFormData>,
): Partial<QueryFormData> {
// Split adhoc_filters into four fields according to
// (1) clause (WHERE or HAVING)
Function getContrastingColor
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getContrastingColor(color: string, thresholds = 186) {
let r = 0;
let g = 0;
let b = 0;
if (color.length > 7) {
Function constructor
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(config: ChartPluginConfig<FormData, Props>) {
super();
const {
metadata,
buildQuery,
Function renderOptionalIcons
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderOptionalIcons = () => {
if (hovered) {
return (
<span>
{description && (
Function transformProps
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function transformProps(chartProps) {
const { width, height, formData, queriesData } = chartProps;
const {
colorScheme,
linkLength,
Function removeTables
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function removeTables(tables) {
return function (dispatch) {
const tablesToRemove = tables?.filter(Boolean) ?? [];
const sync = isFeatureEnabled(FeatureFlag.SqllabBackendPersistence)
? Promise.all(
Function isValid
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
isValid() {
const nullCheckOperators = [Operators.IsNotNull, Operators.IsNull].map(
op => OPERATOR_ENUM_TO_OPERATOR_TYPE[op].operation,
);
const truthCheckOperators = [Operators.IsTrue, Operators.IsFalse].map(
Function onChange
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
onChange() {
const { type } = this.state;
const value = { type };
const errors = [];
const errMsg = t('Invalid lat/long configuration.');
Function pushData
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function pushData() {
for (let i = 0; i < numClients; i++) {
const channelId = String(i);
const streamId = `${config.redisStreamPrefix}${channelId}`;
const data = {
Function addSliceToDashboard
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function addSliceToDashboard(id) {
return (dispatch, getState) => {
const { sliceEntities } = getState();
const selectedSlice = sliceEntities.slices[id];
if (!selectedSlice) {
Function savePublished
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function savePublished(id, isPublished) {
return function savePublishedThunk(dispatch) {
return SupersetClient.put({
endpoint: `/api/v1/dashboard/${id}`,
headers: { 'Content-Type': 'application/json' },
Function save_or_overwrite_slice
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def save_or_overwrite_slice(
# pylint: disable=too-many-arguments,too-many-locals
slc: Slice | None,
slice_add_perm: bool,
slice_overwrite_perm: bool,
Function __init__
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def __init__(
self,
datasource: BaseDatasource,
form_data: dict[str, Any],
force: bool = False,
Function mapStateToProps
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
mapStateToProps(explore, _, chart) {
const timeComparisonStatus =
!!explore?.controls?.time_compare?.value;
const { colnames: _colnames, coltypes: _coltypes } =
Function contextMenuEventHandler
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(e: Event) => {
if (onContextMenu) {
e.event.stop();
const pointerEvent = e.event.event;
const drillFilters: BinaryQueryObjectFilterClause[] = [];
Function processComparisonTotals
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const processComparisonTotals = (
comparisonSuffix: string,
totals?: DataRecord[],
): DataRecord | undefined => {
if (!totals) {
Function CustomListItem
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function CustomListItem(props: CustomListItemProps) {
const { selectable, children, ...rest } = props;
const theme = useTheme();
const css = {
'&.ant-list-item': {
Function getAggFunc
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getAggFunc(
type = 'sum',
accessor: ((object: any) => number | undefined) | null = null,
) {
if (type === 'count') {