hadmean/hadmean

View on GitHub

Showing 150 of 427 total issues

Function select has 54 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    select: (data: any) => {
      let returnData: T[] = data as unknown as T[];
      if (dataState.filters) {
        returnData = returnData.filter((datum) => {
          return dataState.filters.every(($filter) => {
Severity: Major
Found in src/frontend/components/FEPaginationTable/useFEPagination.ts - About 2 hrs to fix

    Function DateSettings has 53 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function DateSettings() {
      const domainMessages = useAppConfigurationDomainMessages(
        "default_date_format"
      );
    
    
    Severity: Major
    Found in src/frontend/views/settings/Data/index.tsx - About 2 hrs to fix

      Function Table has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
      Open

      export function Table<T extends unknown>({
        overridePaginatedDataState,
        tableData,
        syncPaginatedDataStateOut,
        columns,
      Severity: Minor
      Found in src/frontend/design-system/components/Table/index.tsx - About 2 hrs 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 useNavigationStack has 52 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const useNavigationStack = () => {
        const router = useRouter();
        const { _ } = useLingui();
      
        const [history, setHistory] = useNavigationHistoryStore((store) => [
      Severity: Major
      Found in src/frontend/lib/routing/useNavigationStack.ts - About 2 hrs to fix

        Function SystemSettings has 51 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function SystemSettings() {
          const systemSettings = useAppConfiguration("system_settings");
          const domainMessages = useAppConfigurationDomainMessages("system_settings");
        
          const documentationActionButton = useDocumentationActionButton(
        Severity: Major
        Found in src/frontend/views/settings/System/index.tsx - About 2 hrs to fix

          Function FormSelect has 51 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const FormSelect = (props: IFormSelect) => {
            const {
              input,
              selectData,
              meta,
          Severity: Major
          Found in src/frontend/design-system/components/Form/FormSelect/index.tsx - About 2 hrs to fix

            Function formatIntrospectData has 50 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              private formatIntrospectData(rawEntity: Entity[]): IDBSchema[] {
                const dbSchema = rawEntity
                  .filter(({ name }) => !name.startsWith("dashpress"))
                  .map((entity) => {
                    return {
            Severity: Minor
            Found in src/backend/schema/schema.service.ts - About 2 hrs to fix

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

              export function FormSwitch(props: IProps) {
                const {
                  value,
                  onChange,
                  name,
              Severity: Minor
              Found in src/frontend/design-system/components/Form/FormSwitch/index.tsx - About 2 hrs to fix

                Function parseForm has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export async function parseForm(
                  req: NextApiRequest
                ): Promise<{ fields: formidable.Fields; files: formidable.Files }> {
                  const fileUploadSettings = await configurationApiService.show(
                    "file_upload_settings"
                Severity: Minor
                Found in src/backend/uploads/parse.ts - About 1 hr to fix

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

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

                    Function viewSpecialDataTypes has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                    Open

                    export const viewSpecialDataTypes = ({
                      fieldName,
                      value,
                      entityToOneReferenceFields = {},
                      entityFieldSelections = {},
                    Severity: Minor
                    Found in src/frontend/views/data/viewSpecialDataTypes.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 AsyncFormSelect has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                    Open

                    export function AsyncFormSelect(props: IProps) {
                      const {
                        input,
                        url,
                        referenceUrl,

                    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 EntityDetails has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export function EntityDetails() {
                      const entityId = useEntityId();
                      const entity = useEntitySlug();
                      const entityCrudConfig = useEntityCrudConfig(entity);
                      const dataDetails = useEntityDataDetails({ entity, entityId });
                    Severity: Minor
                    Found in src/frontend/views/data/Details/index.tsx - About 1 hr to fix

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

                      export function TableViewsSettings() {
                        const entity = useEntitySlug();
                        const domainMessages = useAppConfigurationDomainMessages("table_views");
                      
                        const upsertTableViewsMutation = useUpsertConfigurationMutation(
                      Severity: Minor
                      Found in src/frontend/views/entity/Views/index.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 SoftButton has a Cognitive Complexity of 14 (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 DropDownMenu has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                            Open

                            export function DropDownMenu({
                              menuItems: menuItems$1,
                              disabled,
                              ellipsis,
                              ariaLabel,
                            Severity: Minor
                            Found in src/frontend/design-system/components/DropdownMenu/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 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
                              Severity
                              Category
                              Status
                              Source
                              Language