airbnb/caravel

View on GitHub

Showing 2,441 of 6,157 total issues

Function fillNativeFilterForm has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function fillNativeFilterForm(
  type: string,
  name: string,
  dataset?: string,
  filterColumn?: string,
Severity: Minor
Found in superset-frontend/cypress-base/cypress/e2e/dashboard/utils.ts - About 1 hr to fix

    Function buildTree has 41 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const buildTree = (
      node: LayoutItem,
      treeItem: TreeItem,
      layout: Layout,
      charts: Charts,

      Function extractMenuItemsKeyMap has 41 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const extractMenuItemsKeyMap = (
        children: MenuItemChildType,
      ): Record<string, any> => {
        const keysMap: Record<string, any> = {};
        const childrenArray = ensureIsArray(children);

        Function rollingWindowOperator has 41 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        > = (formData, queryObject) => {
          let columns: (string | undefined)[];
          if (isTimeComparison(formData, queryObject)) {
            const metricsMap = getMetricOffsetsMap(formData, queryObject);
            columns = [

          Function __init__ has 13 arguments (exceeds 4 allowed). Consider refactoring.
          Open

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

            Function clicked has 40 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              const clicked = function clicked(d) {
                const hasCenter = d && centered !== d;
                let x;
                let y;
                let k;

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

                render() {
                  const {
                    adhocMetric,
                    onMetricEdit,
                    columns,

                Function addNewQueryEditor has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export function addNewQueryEditor() {
                  return function (dispatch, getState) {
                    const {
                      sqlLab: { queryEditors, tabHistory, unsavedQueryEditor, databases },
                      common,
                Severity: Minor
                Found in superset-frontend/src/SqlLab/actions/sqlLab.js - About 1 hr to fix

                  Function runTablePreviewQuery has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export function runTablePreviewQuery(newTable) {
                    return function (dispatch, getState) {
                      const {
                        sqlLab: { databases },
                      } = getState();
                  Severity: Minor
                  Found in superset-frontend/src/SqlLab/actions/sqlLab.js - About 1 hr to fix

                    Function metadataBar has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      const metadataBar = useMemo(() => {
                        if (!metadata) {
                          return null;
                        }
                        const items = [];

                      Function writing has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        writing() {
                          // SupersetPluginChartHelloWorld
                          const packageLabel = upperFirst(camelCase(this.answers.packageName));
                      
                          const params = {

                        Function traverse has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            treeNodes.map(treeNode => {
                              const { name: nodeName, value, secondaryValue, groupBy } = treeNode;
                              const records = [...(pathRecords || []), nodeName];
                              let name = formatSeriesName(nodeName, {
                                numberFormatter,

                          Function loadLayers has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              (formData: QueryFormData, payload: JsonObject, viewport?: Viewport) => {
                                setViewport(viewport);
                                setSubSlicesLayers({});
                                payload.data.slices.forEach(
                                  (subslice: { slice_id: number } & JsonObject) => {

                            Function handleChange has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                (filters: SelectedFiltersType) => {
                                  const filterKeys = Object.keys(filters);
                                  const groupby = [...groupbyRowsRaw, ...groupbyColumnsRaw];
                                  setDataMask({
                                    extraFormData: {

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

                                render() {
                                  const { adhocFilter, isControlledComponent } = this.props;
                              
                                  const { visible, togglePopover, closePopover } = isControlledComponent
                                    ? {

                                Function renderOptionalIcons has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  const renderOptionalIcons = () => {
                                    if (!hovered) {
                                      return null;
                                    }
                                
                                
                                Severity: Minor
                                Found in superset-frontend/src/explore/components/ControlHeader.tsx - About 1 hr to fix

                                  Function transformProps has 40 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/Time/transformProps.ts - About 1 hr to fix

                                    Function createFetchResourceMethod has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      async (filterValue = '', page: number, pageSize: number) => {
                                        const resourceEndpoint = `/api/v1/${resource}/${method}/${relation}`;
                                        const queryParams = rison.encode_uri({
                                          filter: filterValue,
                                          page,
                                    Severity: Minor
                                    Found in superset-frontend/src/views/CRUD/utils.tsx - About 1 hr to fix

                                      Function PopoverDropdown has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      const PopoverDropdown = (props: PopoverDropdownProps) => {
                                        const {
                                          value,
                                          options,
                                          onChange,
                                      Severity: Minor
                                      Found in superset-frontend/src/components/PopoverDropdown/index.tsx - About 1 hr to fix

                                        Function useDisplayModeToggle has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export const useDisplayModeToggle = () => {
                                          const [drillByDisplayMode, setDrillByDisplayMode] = useState<DrillByType>(
                                            DrillByType.Chart,
                                          );
                                        
                                        
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language