airbnb/caravel

View on GitHub

Showing 2,441 of 6,157 total issues

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

export function convertFilters(fts: InternalFilter[]): FilterValue[] {
  return fts
    .filter(
      f =>
        !(
Severity: Minor
Found in superset-frontend/src/components/ListView/utils.ts - About 1 hr to fix

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

      const onFinish = () => {
        const fields = form.getFieldsValue();
        delete fields.database;
        fields.schema = currentSchema;
        const mergedValues = { ...defaultUploadInfo, ...fields };
    Severity: Minor
    Found in superset-frontend/src/features/databases/UploadDataModel/index.tsx - About 1 hr to fix

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

        async (dispatch: Dispatch, getState: () => any) => {
          if (isFilterChangesEmpty(filterChanges)) {
            return;
          }
      
      
      Severity: Minor
      Found in superset-frontend/src/dashboard/actions/nativeFilters.ts - About 1 hr to fix

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

          const loadDatasetOptions = async (
            search: string,
            page: number,
            pageSize: number,
          ) => {

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

          export default function setupApp() {
            $(document).ready(function () {
              $(':checkbox[data-checkbox-api-prefix]').change(function (
                this: HTMLElement,
              ) {
          Severity: Minor
          Found in superset-frontend/src/setup/setupApp.ts - About 1 hr to fix

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

                dashboardData => {
                  const {
                    id,
                    dashboard_title,
                    slug,

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

              const CrossFilterChartTitle = (props: {
                title: string;
                orientation: FilterBarOrientation;
                onHighlightFilterSource: () => void;
              }) => {

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

                function defaultConfig(): ConfigType {
                  return {
                    port: 8080,
                    logLevel: 'info',
                    logToFile: false,
                Severity: Minor
                Found in superset-websocket/src/config.ts - About 1 hr to fix

                  Function handleContextMenu has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    const handleContextMenu = source => {
                      const pointerEvent = d3.event;
                      pointerEvent.preventDefault();
                      const key = source.id || source.country;
                      const val =

                    Function sortAs has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const sortAs = function (order) {
                      const mapping = {};
                    
                      // sort lowercased keys similarly
                      const lMapping = {};

                      Function drawText has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        drawText(ctx, pixel, options = {}) {
                          const IS_DARK_THRESHOLD = 110;
                          const {
                            fontHeight = 0,
                            label = '',

                        Function innerGetOptions has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export const innerGetOptions = props => {
                          const { choices, optionRenderer, valueKey } = props;
                          let options = [];
                          if (props.options) {
                            options = props.options.map(o => ({
                        Severity: Minor
                        Found in superset-frontend/src/explore/components/controls/SelectControl.jsx - About 1 hr to fix

                          Function v1ChartDataRequest has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          const v1ChartDataRequest = async (
                            formData,
                            resultFormat,
                            resultType,
                            force,
                          Severity: Minor
                          Found in superset-frontend/src/components/Chart/chartAction.js - About 1 hr to fix

                            Function execute_sql_statements has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            def execute_sql_statements(
                                # pylint: disable=too-many-arguments, too-many-locals, too-many-statements, too-many-branches
                                query_id: int,
                                rendered_query: str,
                                return_results: bool,
                            Severity: Minor
                            Found in superset/sql_lab.py - About 1 hr to fix

                              Function __init__ has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  def __init__(  # pylint: disable=too-many-locals, too-many-arguments
                                      self,
                                      *,
                                      annotation_layers: list[dict[str, Any]] | None = None,
                                      applied_time_extras: dict[str, str] | None = None,
                              Severity: Minor
                              Found in superset/common/query_object.py - About 1 hr to fix

                                Function allEventHandlers has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export const allEventHandlers = (
                                  transformedProps: BaseTransformedProps<any> & CrossFilterTransformedProps,
                                ) => {
                                  const {
                                    groupby,

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

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

                                    Function StyleControl has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    const StyleControl = (props: CustomControlConfig<StyleCustomControlProps>) => {
                                      const theme = useTheme();
                                    
                                      const defaultValue = props?.value
                                        ? undefined

                                      Function getPadding has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export function getPadding(
                                        showLegend: boolean,
                                        legendOrientation: LegendOrientation,
                                        addYAxisTitleOffset: boolean,
                                        zoomable: boolean,

                                        Function InteractiveCronPicker has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export const InteractiveCronPicker = (props: CronProps) => {
                                          // @ts-ignore
                                          const inputRef = useRef<Input>(null);
                                          const [value, setValue] = useState(props.value);
                                          const customSetValue = useCallback(
                                        Severity: Minor
                                        Found in superset-frontend/src/components/CronPicker/CronPicker.stories.tsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language