dashpresshq/dashpress

View on GitHub

Showing 165 of 459 total issues

Function FormSelectButton has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function FormSelectButton(formInput: IFormSelect) {
  const { input, selectData, disabled, size } = formInput;

  const { _ } = useLingui();
  return (
Severity: Minor
Found in src/frontend/components/app/form/input/select-button.tsx - About 1 hr to fix

    Function EntityCreate has 45 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function EntityCreate() {
      const routeParams = useRouteParams();
      const entity = useEntitySlug();
      const entityCrudConfig = useEntityCrudConfig(entity);
    
    
    Severity: Minor
    Found in src/frontend/views/data/Create/index.tsx - About 1 hr to fix

      Function ActionsIntegrations has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export function ActionsIntegrations() {
        const currentKey = useRouteParam("key");
        const domainMessages = useDomainMessages(LANG_DOMAINS.INTEGRATIONS.ACTIONS);
      
        const integrationsList = useIntegrationsList();
      Severity: Minor
      Found in src/frontend/views/integrations/actions/index.tsx - About 1 hr to fix

        Function ManageCredentialGroup has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
        Open

        export function ManageCredentialGroup({
          group,
          currentTab,
        }: {
          group: IntegrationsConfigurationGroup;
        Severity: Minor
        Found in src/frontend/views/settings/Variables/ManageCredentialGroup.tsx - About 1 hr 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 useApi has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
        Open

        export function useApi<T>(endPoint: string, options: IUseApiOptions<T>) {
          const isRestoring = useIsRestoring();
        
          const builtOptions = buildApiOptions(options);
          const router = useRouter();
        Severity: Minor
        Found in src/frontend/lib/data/useApi/index.ts - About 1 hr 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 EntityPersistentQuerySettings has 43 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function EntityPersistentQuerySettings() {
          const entity = useEntitySlug();
          const domainMessages = useAppConfigurationDomainMessages("persistent_query");
        
          const upsertPeristentQueryMutation = useUpsertConfigurationMutation(
        Severity: Minor
        Found in src/frontend/views/entity/PersistentQuery/index.tsx - About 1 hr to fix

          Function SignIn has 43 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const SignIn: CustomNextPage = () => {
            const render = useGuestCheck();
            const signInMutation = useSignInMutation();
          
            const setupCheck = useSetupCheck([
          Severity: Minor
          Found in src/frontend/views/SignIn/index.tsx - About 1 hr to fix

            Function Toaster has 43 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export function Toaster() {
              const { toasts } = useToast();
              const { _ } = useLingui();
            
              return (
            Severity: Minor
            Found in src/frontend/components/app/toast/toaster.tsx - About 1 hr to fix

              Function EntityUpdate has 42 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export function EntityUpdate() {
                const entityId = useEntityId();
                const entity = useEntitySlug();
              
                useDataUpdateActions({ entity, entityId });
              Severity: Minor
              Found in src/frontend/views/data/Update/index.tsx - About 1 hr to fix

                Function ThemeSettings has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export function ThemeSettings() {
                  const themeColor = useAppConfiguration("theme_color");
                  const domainMessages = useAppConfigurationDomainMessages("theme_color");
                
                  const upsertConfigurationMutation =
                Severity: Minor
                Found in src/frontend/views/settings/Theme/index.tsx - About 1 hr to fix

                  Function VersionInfo has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export function VersionInfo() {
                    const domainMessages = useDomainMessages({
                      plural: msg`System Info`,
                      singular: msg`System Info`,
                    });
                  Severity: Minor
                  Found in src/frontend/views/settings/Versions/index.tsx - About 1 hr to fix

                    Function UserSetup has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export const UserSetup: CustomNextPage = () => {
                      const setupUserMutation = useSetupUserMutation();
                    
                      const isChecking = useSetupCheck([
                        {
                    Severity: Minor
                    Found in src/frontend/views/setup/User/index.tsx - About 1 hr to fix

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

                      export function FormCodeEditor(formInput: IFormCodeEditor) {
                        const {
                          input: { onFocus, name, onBlur, ...inputProps },
                          meta,
                          language,
                      Severity: Minor
                      Found in src/frontend/components/app/form/input/code-editor.tsx - About 1 hr to fix

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

                        export function IconInputField() {
                          return (
                            <Field name="icon" validateFields={[]} validate={required}>
                              {({ input, meta }) =>
                                SystemIconsList.includes(input.value as SystemIconsKeys) ? (
                        Severity: Minor
                        Found in src/frontend/components/app/form/input/icon/index.tsx - About 1 hr to fix

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

                            assertConfiguration() {
                              if (ConfigApiService.isInitialized) {
                                return;
                              }
                              ConfigApiService.isInitialized = true;
                          Severity: Minor
                          Found in src/backend/lib/config/config.service.ts - About 1 hr to fix

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

                              async update(
                                entity: string,
                                id: string,
                                data: Record<string, unknown>,
                                accountProfile: IAccountProfile,
                            Severity: Minor
                            Found in src/backend/data/data.service.ts - About 1 hr to fix

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

                              export function NavigationSkeleton() {
                                const SCHEMA = [
                                  "header",
                                  "item",
                                  "item",
                              Severity: Minor
                              Found in src/frontend/_layouts/app/NavigationSideBar/NavigationSkeleton.tsx - About 1 hr to fix

                                Function reducer has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                                Open

                                const reducer = (state: State, action: Action): State => {
                                  switch (action.type) {
                                    case "ADD_TOAST":
                                      return {
                                        ...state,
                                Severity: Minor
                                Found in src/frontend/components/app/toast/use-toast.ts - About 1 hr 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 Table has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                                Open

                                export function Table<T extends unknown>({
                                  overridePaginatedDataState,
                                  tableData,
                                  syncPaginatedDataStateOut,
                                  columns,
                                Severity: Minor
                                Found in src/frontend/components/app/table/index.tsx - About 1 hr 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 runValidationError has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                                Open

                                  (fields: IAppliedSchemaFormConfig<any>) =>
                                  (values: Record<string, unknown>) => {
                                    const validations = Object.fromEntries(
                                      typescriptSafeObjectDotEntries(fields).map(([field, config]) => {
                                        const validationsToRun = config.validations || [];
                                Severity: Minor
                                Found in src/shared/validations/run.ts - About 1 hr 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

                                Severity
                                Category
                                Status
                                Source
                                Language