FarmBot/Farmbot-Web-App

View on GitHub

Showing 646 of 1,897 total issues

Function WIZARD_STEPS has 1446 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const WIZARD_STEPS = (props: WizardStepDataProps): WizardSteps => {
  const { firmwareHardware } = props;
  const xySwap = !!props.getConfigValue?.(BooleanSetting.xy_swap);
  const positiveMovementInstruction = (swap: boolean) =>
    swap
Severity: Major
Found in frontend/wizard/data.ts - About 1 wk to fix

    File constants.ts has 1924 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* eslint-disable @typescript-eslint/quotes */
    import { trim } from "./util";
    
    export namespace ToolTips {
    
    
    Severity: Major
    Found in frontend/constants.ts - About 5 days to fix

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

      import { t } from "../i18next_wrapper";
      import { round } from "lodash";
      import { SetupWizardContent, ToolTips } from "../constants";
      import {
        WizardSection, WizardStepDataProps, WizardSteps, WizardToC, WizardToCSection,
      Severity: Major
      Found in frontend/wizard/data.ts - About 4 days to fix

        Function Bot has 841 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export const Bot = (props: FarmbotModelProps) => {
          const config = props.config;
          const {
            x, y, z, botSizeX, botSizeY, botSizeZ, beamLength, trail, laser, soilHeight,
            bedXOffset, bedYOffset, bedLengthOuter, bedWidthOuter, tracks, zDimension,
        Severity: Major
        Found in frontend/three_d_garden/bot.tsx - About 4 days to fix

          File bot.tsx has 1014 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /* eslint-disable complexity */
          import React, { useEffect, useState } from "react";
          import * as THREE from "three";
          import {
            Cylinder, Extrude, Line, Trail, Tube, useGLTF, useTexture,
          Severity: Major
          Found in frontend/three_d_garden/bot.tsx - About 2 days to fix

            File sequence_editor_middle_active.tsx has 854 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import React from "react";
            import { t } from "../i18next_wrapper";
            import {
              ActiveMiddleProps, SequenceHeaderProps, SequenceBtnGroupProps,
              SequenceSettingProps, SequenceSettingsMenuProps, ActiveMiddleState,
            Severity: Major
            Found in frontend/sequences/sequence_editor_middle_active.tsx - About 2 days to fix

              Function CrossSlide has 395 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                (props: JSX.IntrinsicElements["group"]) => {
                  const { nodes, materials } = model;
                  return <Group {...props}>
                    <MeshComponent
                      geometry={nodes.Cable_Carrier_Spacer_Block.geometry}
              Severity: Major
              Found in frontend/three_d_garden/parts/cross_slide.tsx - About 1 day to fix

                File checks.tsx has 749 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import React from "react";
                import { TakePhotoButton } from "../controls/move/take_photo_button";
                import { mapStateToProps } from "../controls/state_to_props";
                import { store } from "../redux/store";
                import { MoveControls } from "../controls/move/move_controls";
                Severity: Major
                Found in frontend/wizard/checks.tsx - About 1 day to fix

                  File garden_map.tsx has 688 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  import React from "react";
                  import { BooleanSetting } from "../../session_keys";
                  import { closePlantInfo, unselectPlant } from "./actions";
                  import {
                    MapTransformProps, TaggedPlant, Mode, AxisNumberProperty,
                  Severity: Major
                  Found in frontend/farm_designer/map/garden_map.tsx - About 1 day to fix

                    Class AbstractSeeder has 74 methods (exceeds 20 allowed). Consider refactoring.
                    Open

                        class AbstractSeeder
                          include Constants
                          attr_reader :device
                    
                          # DO NOT ALPHABETIZE. ORDER MATTERS! - RC
                    Severity: Major
                    Found in app/mutations/devices/seeders/abstract_seeder.rb - About 1 day to fix

                      Function GantryWheelPlate has 257 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        (props: JSX.IntrinsicElements["group"]) => {
                          const { nodes, materials } = model;
                          return <Group {...props}>
                            <MeshComponent
                              geometry={nodes.Gantry_Wheel_Plate.geometry}
                      Severity: Major
                      Found in frontend/three_d_garden/parts/gantry_wheel_plate.tsx - About 1 day to fix

                        File celery_script_settings_bag.rb has 590 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        module CeleryScriptSettingsBag
                          class BoxLed
                            def self.name
                              "Raspberry Pi Box LED"
                            end
                        Severity: Major
                        Found in app/models/celery_script_settings_bag.rb - About 1 day to fix

                          File tz_list.ts has 588 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          export const list = ["Africa/Abidjan",
                            "Africa/Accra",
                            "Africa/Addis_Ababa",
                            "Africa/Algiers",
                            "Africa/Asmara",
                          Severity: Major
                          Found in frontend/devices/timezones/tz_list.ts - About 1 day to fix

                            Function Model has 252 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export const Model = (props: BoxTopBaseProps) => {
                              const box = useGLTF(ASSETS.models.box, LIB_DIR) as Box;
                              const btn = useGLTF(ASSETS.models.btn, LIB_DIR) as Btn;
                              const led = useGLTF(ASSETS.models.led, LIB_DIR) as Led;
                              const SCALE = 1000;
                            Severity: Major
                            Found in frontend/settings/pin_bindings/model.tsx - About 1 day to fix

                              File cross_slide.tsx has 541 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              /* eslint-disable max-len */
                              import React from "react";
                              import * as THREE from "three";
                              import { InstancedBufferAttribute } from "three";
                              import { GLTF } from "three-stdlib";
                              Severity: Major
                              Found in frontend/three_d_garden/parts/cross_slide.tsx - About 1 day to fix

                                Class None has 60 methods (exceeds 20 allowed). Consider refactoring.
                                Open

                                    class None < AbstractSeeder
                                      def peripherals_lighting; end
                                      def peripherals_peripheral_4; end
                                      def peripherals_peripheral_5; end
                                      def peripherals_vacuum; end
                                Severity: Major
                                Found in app/mutations/devices/seeders/none.rb - About 1 day to fix

                                  Function Motors has 213 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export function Motors(props: MotorsProps) {
                                    const {
                                      dispatch, settingsPanelState, sourceFwConfig, firmwareHardware, arduinoBusy,
                                      showAdvanced,
                                    } = props;
                                  Severity: Major
                                  Found in frontend/settings/hardware_settings/motors.tsx - About 1 day to fix

                                    GardenMap has 59 functions (exceeds 20 allowed). Consider refactoring.
                                    Open

                                    export class GardenMap extends
                                      React.Component<GardenMapProps, Partial<GardenMapState>> {
                                      state: Partial<GardenMapState> = {};
                                      constructor(props: GardenMapProps) {
                                        super(props);
                                    Severity: Major
                                    Found in frontend/farm_designer/map/garden_map.tsx - About 1 day to fix

                                      File edit_fe_form.tsx has 511 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      import React from "react";
                                      import moment from "moment";
                                      import { success, error, warning } from "../toast/toast";
                                      import {
                                        TaggedFarmEvent, SpecialStatus, TaggedSequence, TaggedRegimen,
                                      Severity: Major
                                      Found in frontend/farm_events/edit_fe_form.tsx - About 1 day to fix

                                        Function GardenModel has 204 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export const GardenModel = (props: GardenModelProps) => {
                                          const { config } = props;
                                          const groundZ = config.bedZOffset + config.bedHeight;
                                          const Camera = config.perspective ? PerspectiveCamera : OrthographicCamera;
                                        
                                        
                                        Severity: Major
                                        Found in frontend/three_d_garden/garden.tsx - About 1 day to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language