airbnb/caravel

View on GitHub

Showing 2,441 of 6,157 total issues

Function contextmenu has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    contextmenu: async eventParams => {
      if (onContextMenu) {
        eventParams.event.stop();
        const { data, treePathInfo } = eventParams;
        const { treePath } = extractTreePathInfo(treePathInfo);

    Function customTimeRangeEncode has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const customTimeRangeEncode = (customRange: CustomRangeType): string => {
      const {
        sinceDatetime,
        sinceMode,
        sinceGrain,

      Function useApiResourceFullBody has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export function useApiResourceFullBody<RESULT>(
        endpoint: string,
      ): Resource<RESULT> {
        const [resource, setResource] = useState<Resource<RESULT>>(initialState);
        const cancelRef = useRef<() => void>(() => {});
      Severity: Minor
      Found in superset-frontend/src/hooks/apiResources/apiResources.ts - About 1 hr to fix

        Function useCatalogs has 37 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function useCatalogs(options: Params) {
          const { dbId, onSuccess, onError } = options || {};
          const [trigger] = useLazyCatalogsQuery();
          const result = useCatalogsQuery(
            { dbId, forceRefresh: false },
        Severity: Minor
        Found in superset-frontend/src/hooks/apiResources/catalogs.ts - About 1 hr to fix

          Function getFormDataWithDashboardContext has 37 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const getFormDataWithDashboardContext = (
            exploreFormData: QueryFormData,
            dashboardContextFormData: JsonObject,
          ) => {
            const filterBoxData = mergeFilterBoxToFormData(

            Function transformProps has 37 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export default function transformProps(chartProps: ChartProps) {
              const {
                formData,
                height,
                hooks,
            Severity: Minor
            Found in superset-frontend/src/filters/components/Range/transformProps.ts - About 1 hr to fix

              Function pluginContextReducer has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function pluginContextReducer(
                state: PluginContextType,
                action: PluginAction,
              ): PluginContextType {
                switch (action.type) {
              Severity: Minor
              Found in superset-frontend/src/components/DynamicPlugins/index.tsx - About 1 hr to fix

                Function renderFinishState has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  const renderFinishState = () => {
                    if (!editNewDb) {
                      return (
                        <ExtraOptions
                          extraExtension={dbConfigExtraExtension}
                Severity: Minor
                Found in superset-frontend/src/features/databases/DatabaseModal/index.tsx - About 1 hr to fix

                  Function useInitialization has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export const useInitialization = () => {
                    const [isInitialized, setIsInitialized] = useState<boolean>(false);
                    const filters = useFilters();
                    const charts = useSelector<RootState, ChartsState>(state => state.charts);
                  
                  

                    Function story has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      const story = (
                        host: string,
                        mode: string | number,
                        width: number,
                        height: number,

                      Function componentDidMount has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        componentDidMount() {
                          const { datasource } = this.props;
                          if (datasource && datasource.type === 'table') {
                            const dbId = datasource.database?.id;
                            const {

                        Function estimateQueryCost has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export function estimateQueryCost(queryEditor) {
                          return (dispatch, getState) => {
                            const { dbId, catalog, schema, sql, selectedText, templateParams } =
                              getUpToDateQuery(getState(), queryEditor);
                            const requestSql = selectedText || sql;
                        Severity: Minor
                        Found in superset-frontend/src/SqlLab/actions/sqlLab.js - About 1 hr to fix

                          Function fetchQueryEditor has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export function fetchQueryEditor(queryEditor, displayLimit) {
                            return function (dispatch) {
                              SupersetClient.get({
                                endpoint: encodeURI(`/tabstateview/${queryEditor.id}`),
                              })
                          Severity: Minor
                          Found in superset-frontend/src/SqlLab/actions/sqlLab.js - About 1 hr to fix

                            Function onChangeFilterField has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              onChangeFilterField(filterField = {}) {
                                const { layout } = this.props;
                                const nextActiveFilterField = filterField.value;
                                const {
                                  activeFilterField: currentActiveFilterField,

                              Function getCrossFilterDataMask has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  (value: string) => {
                                    const selected: string[] = Object.values(selectedValues);
                                    let values: string[];
                                    if (selected.includes(value)) {
                                      values = selected.filter(v => v !== value);

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

                                  constructor() {
                                    super({
                                      buildQuery,
                                      controlPanel,
                                      loadChart: () => import('../../EchartsTimeseries'),

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

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

                                    Function renderSubheader has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      renderSubheader(maxHeight: number) {
                                        const { bigNumber, subheader, width, bigNumberFallback } = this.props;
                                        let fontSize = 0;
                                    
                                        const NO_DATA_OR_HASNT_LANDED = t(

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

                                      export default function buildQuery(formData: HeatmapFormData) {
                                        const { groupby, normalize_across, sort_x_axis, sort_y_axis, x_axis } =
                                          formData;
                                        const metric = getMetricLabel(formData.metric);
                                        const columns = [

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

                                        export default function buildQuery(formData: QueryFormData) {
                                          const { cols: groupby } = formData;
                                        
                                          const queryContextA = buildQueryContext(formData, baseQueryObject => {
                                            const postProcessing: PostProcessingRule[] = [];
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language