airbnb/caravel

View on GitHub

Showing 2,441 of 6,157 total issues

File index.tsx has 304 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
Severity: Minor
Found in superset-frontend/src/components/DropdownContainer/index.tsx - About 3 hrs to fix

    Function renderSettingsFieldset has 82 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      renderSettingsFieldset() {
        const { datasource } = this.state;
        return (
          <Fieldset
            title={t('Basic')}
    Severity: Major
    Found in superset-frontend/src/components/Datasource/DatasourceEditor.jsx - About 3 hrs to fix

      Function PluginFilterTimeColumn has 82 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export default function PluginFilterTimeColumn(
        props: PluginFilterTimeColumnProps,
      ) {
        const {
          data,

        Function buildQueryObject has 82 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export default function buildQueryObject<T extends QueryFormData>(
          formData: T,
          queryFields?: QueryFieldAliases,
        ): QueryObject {
          const {

          Function getClientErrorObject has 82 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export function getClientErrorObject(
            response:
              | SupersetClientResponse
              | TimeoutError
              | { response: Response }

            Function createUtils has 82 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function createUtils(useLocalTime = false) {
              let floorSecond: CountableTimeInterval;
              let floorMinute: CountableTimeInterval;
              let floorHour: CountableTimeInterval;
              let floorDay: CountableTimeInterval;

              Function Community has 82 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const Community = () => {
              
                const [showCalendar, setShowCalendar] = useState(false); // State to control calendar visibility
              
                const toggleCalendar = () => {
              Severity: Major
              Found in docs/src/pages/community.tsx - About 3 hrs to fix

                File DashboardGrid.jsx has 303 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /**
                 * Licensed to the Apache Software Foundation (ASF) under one
                 * or more contributor license agreements.  See the NOTICE file
                 * distributed with this work for additional information
                 * regarding copyright ownership.  The ASF licenses this file
                Severity: Minor
                Found in superset-frontend/src/dashboard/components/DashboardGrid.jsx - About 3 hrs to fix

                  File exceptions.py has 303 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  # Licensed to the Apache Software Foundation (ASF) under one
                  # or more contributor license agreements.  See the NOTICE file
                  # distributed with this work for additional information
                  # regarding copyright ownership.  The ASF licenses this file
                  # to you under the Apache License, Version 2.0 (the
                  Severity: Minor
                  Found in superset/exceptions.py - About 3 hrs to fix

                    File index.tsx has 303 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /**
                     * Licensed to the Apache Software Foundation (ASF) under one
                     * or more contributor license agreements.  See the NOTICE file
                     * distributed with this work for additional information
                     * regarding copyright ownership.  The ASF licenses this file

                      File data.ts has 303 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      /*
                       * Licensed to the Apache Software Foundation (ASF) under one
                       * or more contributor license agreements.  See the NOTICE file
                       * distributed with this work for additional information
                       * regarding copyright ownership.  The ASF licenses this file

                        Function ExploreChartHeader has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                        Open

                        export const ExploreChartHeader = ({
                          dashboardId,
                          slice,
                          actions,
                          formData,
                        Severity: Minor
                        Found in superset-frontend/src/explore/components/ExploreChartHeader/index.jsx - About 3 hrs to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function query_obj has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def query_obj(self) -> QueryObjectDict:
                                query_obj = super().query_obj()
                                label_col = self.form_data.get("mapbox_label")
                        
                                if not self.form_data.get("groupby"):
                        Severity: Minor
                        Found in superset/viz.py - About 3 hrs to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function _import has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def _import(configs: dict[str, Any], overwrite: bool = False) -> None:
                                # discover datasets associated with charts
                                dataset_uuids: set[str] = set()
                                for file_name, config in configs.items():
                                    if file_name.startswith("charts/"):
                        Severity: Minor
                        Found in superset/commands/chart/importers/v1/__init__.py - About 3 hrs to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function transformProps has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                        Open

                        export default function transformProps(
                          chartProps: EchartsWaterfallChartProps,
                        ): WaterfallChartTransformedProps {
                          const {
                            width,

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function EchartsSunburst has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                        Open

                        export default function EchartsSunburst(props: SunburstTransformedProps) {
                          const {
                            height,
                            width,
                            echartOptions,

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function TimeOffsetControls has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                        Open

                        export default function TimeOffsetControls({
                          onChange,
                          ...props
                        }: TimeOffsetControlsProps) {
                          const [startDate, setStartDate] = useState<string>('');

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function Button has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                        Open

                        export default function Button(props: ButtonProps) {
                          const {
                            tooltip,
                            placement,
                            disabled = false,
                        Severity: Minor
                        Found in superset-frontend/src/components/Button/index.tsx - About 3 hrs to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function getHotkeyConfig has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          const getHotkeyConfig = useCallback(() => {
                            // Get the user's OS
                            const userOS = detectOS();
                            return [
                              {
                        Severity: Major
                        Found in superset-frontend/src/SqlLab/components/SqlEditor/index.tsx - About 3 hrs to fix

                          File SubMenu.tsx has 301 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          /**
                           * Licensed to the Apache Software Foundation (ASF) under one
                           * or more contributor license agreements.  See the NOTICE file
                           * distributed with this work for additional information
                           * regarding copyright ownership.  The ASF licenses this file
                          Severity: Minor
                          Found in superset-frontend/src/features/home/SubMenu.tsx - About 3 hrs to fix
                            Severity
                            Category
                            Status
                            Source
                            Language