airbnb/caravel

View on GitHub

Showing 2,441 of 6,157 total issues

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

      restProps.canDelete = (
        valueToBeDeleted: Record<string, any>,
        values: Record<string, any>[],
      ) => {
        const isTemporalRange = (filter: Record<string, any>) =>
Severity: Minor
Found in superset-frontend/src/explore/components/ControlPanelsContainer.tsx - About 1 hr to fix

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

            children: Children.map(row.props.children, item => {
              const {
                name,
                width,
                debounceDelay = FAST_DEBOUNCE,

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

          hover(item: DragItem, monitor: DropTargetMonitor) {
            if (!multi) {
              return;
            }
            if (!ref.current) {

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

        const removeAdhocFilterDuplicates = (filters: AdhocFilter[]) => {
          const isDuplicate = (
            adhocFilter: AdhocFilter,
            existingFilters: AdhocFilter[],
          ) =>

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

          export const getEditedObjects = (userId: string | number) => {
            const filters = {
              edited: [
                {
                  col: 'changed_by',
          Severity: Minor
          Found in superset-frontend/src/views/CRUD/utils.tsx - About 1 hr to fix

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

            export function ActionCell(props: ActionCellProps) {
              const { menuOptions, row } = props;
              const [visible, setVisible] = useState(false);
              const [appendedMenuOptions, setAppendedMenuOptions] = useState(
                appendDataToMenu(menuOptions, row),

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

                const onDbImport = async (info: UploadChangeParam) => {
                  setImportingErrorMessage('');
                  setPasswordFields([]);
                  setSSHTunnelPasswordFields([]);
                  setSSHTunnelPrivateKeyFields([]);
              Severity: Minor
              Found in superset-frontend/src/features/databases/DatabaseModal/index.tsx - About 1 hr to fix

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

                export const DatasetSpecific = () => {
                  SupersetClient.reset();
                  SupersetClient.configure({ csrfToken: '1234' }).init();
                  const { metadataBar } = useDatasetMetadataBar({ datasetId: 1 });
                  const { width, height, ref } = useResizeDetector();

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

                  const resetUseSelectorMock = () => {
                    useSelectorMock.mockReturnValueOnce({
                      createdOn: '2021-04-27T18:12:38.952304',
                      email: 'admin',
                      firstName: 'admin',
                  Severity: Minor
                  Found in superset-frontend/src/features/home/RightMenu.test.tsx - About 1 hr to fix

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

                    function fillNativeFilters(
                      filterConfig: FilterConfiguration,
                      mergedDataMask: DataMaskStateWithId,
                      draftDataMask: DataMaskStateWithId,
                      initialDataMask?: DataMaskStateWithId,
                    Severity: Minor
                    Found in superset-frontend/src/dataMask/reducer.ts - About 1 hr to fix

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

                      export default function createLoadableRenderer<
                        Props,
                        Exports extends { [key: string]: any },
                      >(options: Loadable.OptionsWithMap<Props, Exports>): LoadableRenderer<Props> {
                        const LoadableRenderer = Loadable.Map<Props, Exports>(

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

                        export function getTemporalColumns(
                          datasource: ValueOf<Pick<ControlPanelState, 'datasource'>>,
                        ) {
                          const rv: {
                            temporalColumns: ColumnMeta[] | QueryColumn[];

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

                          export const subscribeToGlobalStream = async (
                            stream: string,
                            listener: ListenerFunction,
                          ) => {
                            /*eslint no-constant-condition: ["error", { "checkLoops": false }]*/
                          Severity: Minor
                          Found in superset-websocket/src/index.ts - About 1 hr to fix

                            Function save_or_overwrite_slice has 8 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def save_or_overwrite_slice(
                            Severity: Major
                            Found in superset/views/core.py - About 1 hr to fix

                              Function filter_values_handler has 8 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  def filter_values_handler(  # pylint: disable=too-many-arguments
                              Severity: Major
                              Found in superset/models/helpers.py - About 1 hr to fix

                                Function _prophet_fit_and_predict has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                def _prophet_fit_and_predict(  # pylint: disable=too-many-arguments
                                Severity: Major
                                Found in superset/utils/pandas_postprocessing/prophet.py - About 1 hr to fix

                                  Function execute_sql_statements has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                  def execute_sql_statements(
                                  Severity: Major
                                  Found in superset/sql_lab.py - About 1 hr to fix

                                    Function get_since_until has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                    def get_since_until(  # pylint: disable=too-many-arguments,too-many-locals,too-many-branches,too-many-statements
                                    Severity: Major
                                    Found in superset/utils/date_parser.py - About 1 hr to fix

                                      Function create has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                          def create(  # pylint: disable=too-many-arguments
                                      Severity: Major
                                      Found in superset/common/query_object_factory.py - About 1 hr to fix

                                        Consider simplifying this complex logical expression.
                                        Open

                                                if state == KQLSplitState.OUTSIDE_STRING:
                                                    if character == ";":
                                                        statements.append(script[statement_start:i])
                                                        statement_start = i + 1
                                                    elif character == "'":
                                        Severity: Major
                                        Found in superset/sql/parse.py - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language