airbnb/caravel

View on GitHub

Showing 2,441 of 6,157 total issues

Function pivot_df has 11 arguments (exceeds 4 allowed). Consider refactoring.
Open

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

    Function applyAnnotation has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      applyAnnotation() {
        const { value, sourceType } = this.state;
        if (this.isValidForm()) {
          const annotationFields = [
            'name',

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

        constructor(inputProps = {}, subtotals = {}) {
          this.props = { ...PivotData.defaultProps, ...inputProps };
          this.processRecord = this.processRecord.bind(this);
          PropTypes.checkPropTypes(
            PivotData.propTypes,

        Function mapOption has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          mapOption(option) {
            // already a AdhocFilter, skip
            if (option instanceof AdhocFilter) {
              return option;
            }

          Function toDevHTML has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function toDevHTML(originalHtml) {
            let html = originalHtml.replace(
              /(<head>\s*<title>)([\s\S]*)(<\/title>)/i,
              '$1[DEV] $2 $3',
            );
          Severity: Minor
          Found in superset-frontend/webpack.proxy-config.js - About 1 hr to fix

            Function processComparisonDataRecords has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function processComparisonDataRecords(
                originalData: DataRecord[] | undefined,
                originalColumns: DataColumnMeta[],
                comparisonSuffix: string,
              ) {
            Severity: Minor
            Found in superset-frontend/plugins/plugin-chart-table/src/transformProps.ts - About 1 hr to fix

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

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

                Function Histogram has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export default function Histogram(props: HistogramTransformedProps) {
                  const {
                    height,
                    width,
                    echartOptions,

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

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

                    Function applyMapStateToPropsToControl has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export function applyMapStateToPropsToControl<T = ControlType>(
                      controlState: ControlState<T>,
                      controlPanelState: Partial<ControlPanelState> | null,
                    ) {
                      const { mapStateToProps } = controlState;
                    Severity: Minor
                    Found in superset-frontend/src/explore/controlUtils/getControlState.ts - About 1 hr to fix

                      Function determineErrorMap has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const determineErrorMap = (tab: string, contour: ContourType) => {
                        const errorMap: ErrorMapType = {
                          lowerThreshold: [],
                          upperThreshold: [],
                          strokeWidth: [],

                        Function StyledTooltip has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        const StyledTooltip = (props: any) => {
                          const theme = useTheme();
                          return (
                            <ClassNames>
                              {({ css }) => (

                          Function valuesRenderer has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                optionSelector.values.map((column, idx) => {
                                  const datasourceWarningMessage =
                                    isAdhocColumn(column) && column.datasourceWarning
                                      ? t('This column might be incompatible with current dataset')
                                      : undefined;

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

                            export default function transformProps(chartProps: ChartProps) {
                              const {
                                behaviors,
                                formData,
                                height,

                              Function createResource has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  (resource: D, hideToast = false) => {
                                    // Set loading state
                                    updateState({
                                      loading: true,
                                    });
                              Severity: Minor
                              Found in superset-frontend/src/views/CRUD/hooks.ts - About 1 hr to fix

                                Function renderTableSelect has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  function renderTableSelect() {
                                    const disabled = (currentSchema && !formMode && readOnly) || !currentSchema;
                                
                                    const header = sqlLabMode ? (
                                      <FormLabel>{t('See table schema')}</FormLabel>
                                Severity: Minor
                                Found in superset-frontend/src/components/TableSelector/index.tsx - About 1 hr to fix

                                  Function selectChartCrossFilters has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export const selectChartCrossFilters = (
                                    dataMask: DataMaskStateWithId,
                                    chartId: number,
                                    dashboardLayout: Layout,
                                    chartConfiguration: ChartConfiguration = defaultChartConfig,

                                    Function testTimeChart has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    function testTimeChart(vizType: string) {
                                      interceptSamples();
                                    
                                      cy.get(`[data-test-viz-type='${vizType}'] canvas`).then($canvas => {
                                        cy.wrap($canvas).scrollIntoView();

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

                                        render() {
                                          const {
                                            id,
                                            className,
                                            preTransformProps,

                                        Function parseErrorJson has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export function parseErrorJson(responseJson: JsonObject): ClientErrorObject {
                                          let error = { ...responseJson };
                                          // Backwards compatibility for old error renderers with the new error object
                                          if (error.errors && error.errors.length > 0) {
                                            error.error = error.description = error.errors[0].message;
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language