hadmean/hadmean

View on GitHub

Showing 150 of 428 total issues

Function VersionInfo has 43 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 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 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 BaseManageVariables has 42 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export function BaseManageVariables() {
            const [currentTab, setCurrentTab] = useState<IntegrationsConfigurationGroup>(
              IntegrationsConfigurationGroup.Constants
            );
            const constantsDomainMessages = useDomainMessages(
          Severity: Minor
          Found in src/frontend/views/settings/Variables/Base.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 EntityFormExtensionSettings has 41 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export function EntityFormExtensionSettings() {
                const entity = useEntitySlug();
              
                const domainMessages = useAppConfigurationDomainMessages(
                  "entity_form_extension"
              Severity: Minor
              Found in src/frontend/views/entity/Form/index.tsx - About 1 hr to fix

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

                export function FormSwitch(props: IProps) {
                  const { value, onChange, name, disabled, label, ...rest } = props;
                  const ariaProps = Object.fromEntries(
                    typescriptSafeObjectDotEntries(rest as Record<string, string>).filter(
                      ([key]) => String(key).startsWith("aria-")
                Severity: Minor
                Found in src/frontend/design-system/components/Form/Switch/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 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

                      Function MetaDataSettings has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function MetaDataSettings() {
                        const domainMessages = useAppConfigurationDomainMessages("metadata_columns");
                      
                        const metaDataColumns = useAppConfiguration("metadata_columns");
                      
                      
                      Severity: Minor
                      Found in src/frontend/views/settings/Data/index.tsx - About 1 hr to fix

                        Function useApiMutateOptimisticOptions has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export function useApiMutateOptimisticOptions<T, V, R = void>(
                          options: IApiMutateOptions<T, V, R>
                        ) {
                          const apiMutate = useApiMutate<T>(options.dataQueryPath);
                          const queryClient = useQueryClient();
                        Severity: Minor
                        Found in src/frontend/lib/data/useMutate/useApiMutateOptimisticOptions.ts - About 1 hr to fix

                          Function runValidationError has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            (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

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

                            export function FormSelectButton(formInput: IFormSelect) {
                              const { input, selectData, disabled, sm } = formInput;
                            
                              const { _ } = useLingui();
                              return (
                            Severity: Minor
                            Found in src/frontend/design-system/components/Form/SelectButton/index.tsx - About 1 hr to fix

                              Function getEntitySelectionConfig has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export const getEntitySelectionConfig = (
                                entityType: EntityTypesForSelection,
                                preSelectedType: IColorableSelection[],
                                enumList$1: string[]
                              ): IColorableSelection[] => {
                              Severity: Minor
                              Found in src/shared/logic/entities/getEntitySelectionConfig.ts - About 1 hr to fix

                                Function SoftButton has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                Open

                                export function SoftButton({
                                  label,
                                  block,
                                  size = "sm",
                                  systemIcon,
                                Severity: Minor
                                Found in src/frontend/design-system/components/Button/SoftButton.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 useWaitForResponseMutationOptions has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                Open

                                export function useWaitForResponseMutationOptions<V, R = void>(
                                  options: IWaitForResponseMutationOptions<V, R>
                                ) {
                                  const queryClient = useQueryClient();
                                
                                

                                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 useTableColumns has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                Open

                                export const useTableColumns = (
                                  entity: string
                                ): Partial<DataStateKeys<ITableColumn[]>> => {
                                  const portalTableColumns = usePortalTableColumns(entity);
                                  const getEntityFieldLabels = useEntityFieldLabels(entity);
                                Severity: Minor
                                Found in src/frontend/views/data/Table/useTableColumns.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 runFormAction has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export const runFormAction = async (
                                  entity: string,
                                  dataEventAction: DataEventActions,
                                  getData: () => Promise<Record<string, unknown>>,
                                  authProfile: IAccountProfile
                                Severity: Minor
                                Found in src/backend/form-actions/run-form-action.ts - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language