airbnb/caravel

View on GitHub

Showing 2,441 of 6,157 total issues

Function renderStepTwoAlert has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const renderStepTwoAlert = () => {
    const { hostname } = window.location;
    let ipAlert = connectionAlert?.REGIONAL_IPS?.default || '';
    const regionalIPs = connectionAlert?.REGIONAL_IPS || {};
    Object.entries(regionalIPs).forEach(([ipRegion, ipRange]) => {
Severity: Minor
Found in superset-frontend/src/features/databases/DatabaseModal/index.tsx - About 1 hr to fix

    Function openModalFromChartContext has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    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

      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

        export function getContrastingColor(color: string, thresholds = 186) {
          let r = 0;
          let g = 0;
          let b = 0;
          if (color.length > 7) {
        Severity: Minor
        Found in superset-frontend/packages/superset-ui-core/src/color/utils.ts - About 1 hr to fix

          Function constructor has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            constructor(config: ChartPluginConfig<FormData, Props>) {
              super();
              const {
                metadata,
                buildQuery,

            Function renderOptionalIcons has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              const renderOptionalIcons = () => {
                if (hovered) {
                  return (
                    <span>
                      {description && (

              Function transformProps has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              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

                export function removeTables(tables) {
                  return function (dispatch) {
                    const tablesToRemove = tables?.filter(Boolean) ?? [];
                    const sync = isFeatureEnabled(FeatureFlag.SqllabBackendPersistence)
                      ? Promise.all(
                Severity: Minor
                Found in superset-frontend/src/SqlLab/actions/sqlLab.js - About 1 hr to fix

                  Function isValid has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  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

                      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

                      function pushData() {
                        for (let i = 0; i < numClients; i++) {
                          const channelId = String(i);
                          const streamId = `${config.redisStreamPrefix}${channelId}`;
                          const data = {
                      Severity: Minor
                      Found in superset-websocket/utils/loadtest.js - About 1 hr to fix

                        Function addSliceToDashboard has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export function addSliceToDashboard(id) {
                          return (dispatch, getState) => {
                            const { sliceEntities } = getState();
                            const selectedSlice = sliceEntities.slices[id];
                            if (!selectedSlice) {
                        Severity: Minor
                        Found in superset-frontend/src/dashboard/actions/dashboardState.js - About 1 hr to fix

                          Function savePublished has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export function savePublished(id, isPublished) {
                            return function savePublishedThunk(dispatch) {
                              return SupersetClient.put({
                                endpoint: `/api/v1/dashboard/${id}`,
                                headers: { 'Content-Type': 'application/json' },
                          Severity: Minor
                          Found in superset-frontend/src/dashboard/actions/dashboardState.js - About 1 hr to fix

                            Function save_or_overwrite_slice has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            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,
                            Severity: Minor
                            Found in superset/views/core.py - About 1 hr to fix

                              Function __init__ has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  def __init__(
                                      self,
                                      datasource: BaseDatasource,
                                      form_data: dict[str, Any],
                                      force: bool = False,
                              Severity: Minor
                              Found in superset/viz.py - About 1 hr to fix

                                Function mapStateToProps has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                              mapStateToProps(explore, _, chart) {
                                                const timeComparisonStatus =
                                                  !!explore?.controls?.time_compare?.value;
                                
                                                const { colnames: _colnames, coltypes: _coltypes } =
                                Severity: Minor
                                Found in superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx - About 1 hr to fix

                                  Function contextMenuEventHandler has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  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

                                    const processComparisonTotals = (
                                      comparisonSuffix: string,
                                      totals?: DataRecord[],
                                    ): DataRecord | undefined => {
                                      if (!totals) {
                                    Severity: Minor
                                    Found in superset-frontend/plugins/plugin-chart-table/src/transformProps.ts - About 1 hr to fix

                                      Function CustomListItem has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                      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

                                        export function getAggFunc(
                                          type = 'sum',
                                          accessor: ((object: any) => number | undefined) | null = null,
                                        ) {
                                          if (type === 'count') {
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language