airbnb/caravel

View on GitHub

Showing 2,441 of 6,157 total issues

Function load_world_bank_health_n_pop has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

def load_world_bank_health_n_pop(  # pylint: disable=too-many-locals
    only_metadata: bool = False,
    force: bool = False,
    sample: bool = False,
) -> None:
Severity: Minor
Found in superset/examples/world_bank.py - About 1 hr to fix

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

      componentDidMount() {
        if (
          isFeatureEnabled(FeatureFlag.DashboardVirtualization) &&
          !isCurrentUserBot()
        ) {
    Severity: Minor
    Found in superset-frontend/src/dashboard/components/gridComponents/Row.jsx - About 1 hr to fix

      Function getChartPadding has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export function getChartPadding(
        show: boolean,
        orientation: LegendOrientation,
        margin?: string | number | null,
        padding?: { top?: number; bottom?: number; left?: number; right?: number },
      Severity: Minor
      Found in superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts - About 1 hr to fix

        Function getDefaultTooltip has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function getDefaultTooltip(refs: Refs) {
          return {
            appendToBody: true,
            borderColor: 'transparent',
            // CSS hack applied on this class to resolve https://github.com/apache/superset/issues/30058
        Severity: Minor
        Found in superset-frontend/plugins/plugin-chart-echarts/src/utils/tooltip.ts - About 1 hr to fix

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

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

            Function wsConnect has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const wsConnect = (): void => {
              let url = config.GLOBAL_ASYNC_QUERIES_WEBSOCKET_URL;
              if (lastReceivedEventId) url += `?last_id=${lastReceivedEventId}`;
              ws = new WebSocket(url);
            
            
            Severity: Minor
            Found in superset-frontend/src/middleware/asyncEvent.ts - About 1 hr to fix

              Function fetchPage has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                    () => (search: string, page: number) => {
                      setPage(page);
                      if (allValuesLoaded) {
                        setIsLoading(false);
                        return;
              Severity: Minor
              Found in superset-frontend/src/components/Select/AsyncSelect.tsx - About 1 hr to fix

                Function Tooltip has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export const Tooltip = (props: TooltipProps) => {
                  const theme = useTheme();
                  return (
                    <>
                      {/* Safari hack to hide browser default tooltips */}
                Severity: Minor
                Found in superset-frontend/src/components/Tooltip/index.tsx - About 1 hr to fix

                  Function renderModal has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  const renderModal = async (
                    modalProps: Partial<DrillByModalProps> = {},
                    overrideState: Record<string, any> = {},
                  ) => {
                    const DrillByModalWrapper = () => {

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

                    function mapStateToProps(state: RootState) {
                      const {
                        datasources,
                        sliceEntities,
                        dataMask,
                    Severity: Minor
                    Found in superset-frontend/src/dashboard/containers/Dashboard.ts - About 1 hr to fix

                      Function errorAlert has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        const errorAlert = () => {
                          let alertErrors: string[] = [];
                          if (!isEmpty(dbErrors)) {
                            alertErrors =
                              typeof dbErrors === 'object'
                      Severity: Minor
                      Found in superset-frontend/src/features/databases/DatabaseModal/index.tsx - About 1 hr to fix

                        Function getDataMaskApplied has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            async function getDataMaskApplied() {
                              const permalinkKey = getUrlParam(URL_PARAMS.permalinkKey);
                              const nativeFilterKeyValue = getUrlParam(URL_PARAMS.nativeFiltersKey);
                              const isOldRison = getUrlParam(URL_PARAMS.nativeFilters);
                        
                        
                        Severity: Minor
                        Found in superset-frontend/src/dashboard/containers/DashboardPage.tsx - About 1 hr to fix

                          Function mapChannelsToOptions has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export const mapChannelsToOptions = (result: SlackChannel[]) => {
                            const publicChannels: SlackChannel[] = [];
                            const privateChannels: SlackChannel[] = [];
                          
                            result.forEach(channel => {

                            Function testConnection has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              const testConnection = () => {
                                if (!db?.sqlalchemy_uri) {
                                  addDangerToast(t('Please enter a SQLAlchemy URI to test'));
                                  return;
                                }
                            Severity: Minor
                            Found in superset-frontend/src/features/databases/DatabaseModal/index.tsx - About 1 hr to fix

                              Function findTabsWithChartsInScope has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export const findTabsWithChartsInScope = (
                                dashboardLayout: DashboardLayout,
                                chartsInScope: number[],
                              ) => {
                                const dashboardRoot = dashboardLayout[DASHBOARD_ROOT_ID];
                              Severity: Minor
                              Found in superset-frontend/src/dashboard/components/nativeFilters/utils.ts - About 1 hr to fix

                                Function onSave has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  const onSave = () => {
                                    if (isEditMode) {
                                      // Edit
                                      if (currentAnnotation?.id) {
                                        const update_id = currentAnnotation.id;
                                Severity: Minor
                                Found in superset-frontend/src/features/annotations/AnnotationModal.tsx - About 1 hr to fix

                                  Function saveCrossFiltersSetting has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export function saveCrossFiltersSetting(crossFiltersEnabled: boolean) {
                                    return async (dispatch: Dispatch, getState: () => RootState) => {
                                      const { id, metadata } = getState().dashboardInfo;
                                      const updateDashboard = makeApi<
                                        Partial<DashboardInfo>,
                                  Severity: Minor
                                  Found in superset-frontend/src/dashboard/actions/dashboardInfo.ts - About 1 hr to fix

                                    Function fetchExploreData has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    const fetchExploreData = async (exploreUrlParams: URLSearchParams) => {
                                      try {
                                        const rv = await makeApi<{}, ExploreResponsePayload>({
                                          method: 'GET',
                                          endpoint: 'api/v1/explore/',
                                    Severity: Minor
                                    Found in superset-frontend/src/pages/Chart/index.tsx - About 1 hr to fix

                                      Function getDashboardContextFormData has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      const getDashboardContextFormData = () => {
                                        const dashboardPageId = getUrlParam(URL_PARAMS.dashboardPageId);
                                        const dashboardContext = getDashboardPageContext(dashboardPageId);
                                        if (dashboardContext) {
                                          const sliceId = getUrlParam(URL_PARAMS.sliceId) || 0;
                                      Severity: Minor
                                      Found in superset-frontend/src/pages/Chart/index.tsx - About 1 hr to fix

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

                                          const errorMessage = useMemo(() => {
                                            const controlsWithErrors = Object.values(props.controls).filter(
                                              control =>
                                                control.validationErrors && control.validationErrors.length > 0,
                                            );
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language