airbnb/caravel

View on GitHub

Showing 2,441 of 6,157 total issues

Function setTables has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function setTables(tableSchemas) {
  const tables = tableSchemas
    .filter(tableSchema => tableSchema.description !== null)
    .map(tableSchema => {
      const {
Severity: Minor
Found in superset-frontend/src/SqlLab/actions/sqlLab.js - About 1 hr to fix

    Function actions.MERGE_TABLE has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        [actions.MERGE_TABLE]() {
          const at = { ...action.table };
          let existingTable;
          state.tables.forEach(xt => {
            if (
    Severity: Minor
    Found in superset-frontend/src/SqlLab/reducers/sqlLab.js - About 1 hr to fix

      Function periodicRender has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          const periodicRender = () => {
            const { fetchCharts, logEvent, charts, dashboardInfo } = this.props;
            const { metadata } = dashboardInfo;
            const immune = metadata.timed_refresh_immune_slices || [];
            const affectedCharts = Object.values(charts)
      Severity: Minor
      Found in superset-frontend/src/dashboard/components/Header/index.jsx - About 1 hr to fix

        Function render has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          render() {
            const {
              component,
              depth,
              parentComponent,

          Function mapDispatchToProps has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function mapDispatchToProps(dispatch) {
            return bindActionCreators(
              {
                addSuccessToast,
                addDangerToast,
          Severity: Minor
          Found in superset-frontend/src/dashboard/containers/DashboardHeader.jsx - About 1 hr to fix

            Function handleContextMenu has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                  ? (
                      value: D,
                      cellPoint: {
                        key: string;
                        value: DataRecordValue;
            Severity: Minor
            Found in superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx - About 1 hr to fix

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

                constructor() {
                  super({
                    buildQuery,
                    controlPanel,
                    loadChart: () => import('./EchartsRadar'),
              Severity: Minor
              Found in superset-frontend/plugins/plugin-chart-echarts/src/Radar/index.ts - About 1 hr to fix

                Function useSticky has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export default function useSticky<D extends object>(hooks: Hooks<D>) {
                  hooks.useInstance.push(useInstance);
                  hooks.stateReducers.push((newState, action_, prevState) => {
                    const action = action_ as ReducerAction<
                      ReducerActions,

                  Function buildQuery has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export default function buildQuery(formData: BoxPlotQueryFormData) {
                    return buildQueryContext(formData, baseQueryObject => [
                      {
                        ...baseQueryObject,
                        columns: [

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

                      constructor() {
                        super({
                          buildQuery,
                          controlPanel,
                          loadChart: () => import('./EchartsTreemap'),
                    Severity: Minor
                    Found in superset-frontend/plugins/plugin-chart-echarts/src/Treemap/index.ts - About 1 hr to fix

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

                        constructor() {
                          super({
                            buildQuery,
                            controlPanel,
                            loadChart: () => import('./EchartsFunnel'),
                      Severity: Minor
                      Found in superset-frontend/plugins/plugin-chart-echarts/src/Funnel/index.ts - About 1 hr to fix

                        Function queryContexts has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            buildQueryContext(fd, baseQueryObject => {
                              const queryObject = {
                                ...baseQueryObject,
                                columns: [
                                  ...(isXAxisSet(formData)

                          Function queryContextA has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            const queryContextA = buildQueryContext(formData, baseQueryObject => {
                              const postProcessing: PostProcessingRule[] = [];
                              postProcessing.push(timeCompareOperator(formData, baseQueryObject));
                          
                              const nonCustomNorInheritShifts = ensureIsArray(

                            Function renderKicker has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              renderKicker(maxHeight: number) {
                                const { timestamp, showTimestamp, formatTime, width } = this.props;
                                if (
                                  !formatTime ||
                                  !showTimestamp ||

                              Function adhocFilter has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                const adhocFilter = useMemo(() => {
                                  if (isSavedMetric(droppedItem)) {
                                    return new AdhocFilter({
                                      expressionType: ExpressionTypes.Sql,
                                      clause: Clauses.Having,

                                Function toggleFilter has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    (
                                      e: MouseEvent,
                                      value: string,
                                      filters: FilterType,
                                      pivotData: Record<string, any>,

                                  Function fetchAdvancedDataTypeValueCallback has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      (
                                        comp: string | string[],
                                        advancedDataTypesState: AdvancedDataTypesState,
                                        subjectAdvancedDataType?: string,
                                      ) => {

                                    Function refreshComparatorSuggestions has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        const refreshComparatorSuggestions = () => {
                                          const { datasource } = props;
                                          const col = props.adhocFilter.subject;
                                          const having = props.adhocFilter.clause === Clauses.Having;
                                    
                                    

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

                                        constructor(sourceFormData: QueryFormData) {
                                          /*
                                           * Support form_data for smooth switching between different viz
                                           * */
                                          const formData = Object.freeze(sourceFormData);
                                      Severity: Minor
                                      Found in superset-frontend/src/explore/controlUtils/standardizedFormData.ts - About 1 hr to fix

                                        Function loadDatasetOverwriteOptions has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            async (input = '') => {
                                              const { userId } = user;
                                              const queryParams = rison.encode({
                                                filters: [
                                                  {
                                        Severity: Minor
                                        Found in superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language