vorteil/direktiv

View on GitHub

Showing 1,235 of 1,235 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                <PopoverTrigger asChild>
                  <Button variant="outline" className="px-2">
                    {moment(filters[field]).format("YYYY-MM-DD")}
                  </Button>
                </PopoverTrigger>
ui/src/pages/namespace/Events/History/components/Filters/index.tsx on lines 186..190

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 58.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        <Input
          className="sm:w-60"
          value={search}
          onChange={(e) => {
            setSearch(e.target.value);
Severity: Major
Found in ui/src/pages/namespace/Gateway/Routes/index.tsx and 1 other location - About 1 hr to fix
ui/src/pages/namespace/Explorer/Tree/SearchBar.tsx on lines 22..29

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 58.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

  actions: {
    setData: (apiKey: JqPlaygroundState["data"]) => void;
    setJx: (apiKey: JqPlaygroundState["jx"]) => void;
  };
Severity: Major
Found in ui/src/util/store/jqPlayground.ts and 2 other locations - About 1 hr to fix
ui/src/util/store/logs.ts on lines 9..12
ui/src/util/store/theme.ts on lines 12..15

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 58.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Method engine.newIsolateRequest has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

func (engine *engine) newIsolateRequest(im *instanceMemory, stateID string, timeout int,
    fn model.FunctionDefinition, inputData []byte,
    uid uuid.UUID, async bool, files []model.FunctionFileDefinition, iterator int,
Severity: Major
Found in pkg/flow/temporary.go - About 1 hr to fix

    Function buildResourceLimits has 53 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func buildResourceLimits(cf *core.Config, sv *core.ServiceFileData) (*corev1.ResourceRequirements, error) {
        var (
            m int
            c string
            d int
    Severity: Minor
    Found in pkg/service/helper.go - About 1 hr to fix

      Function MenuButton has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const MenuButton = forwardRef<ElementRef<typeof Button>>((props, ref) => {
        const { usesAccounts } = useApiKeyHandling();
        return usesAccounts ? (
          <Button
            ref={ref}
      Severity: Minor
      Found in ui/src/components/UserMenu/MenuButton/index.tsx - About 1 hr to fix

        Function DeleteNamespace has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const DeleteNamespace: FC = () => {
          const { t } = useTranslation();
          const [dialogOpen, setDialogOpen] = useState(false);
        
          return (
        Severity: Minor
        Found in ui/src/pages/namespace/Settings/DeleteNamespace/index.tsx - About 1 hr to fix

          Function App has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const App = () => {
            const theme = useTheme();
          
            const { setSystemTheme } = useThemeActions();
          
          
          Severity: Minor
          Found in ui/src/App.tsx - About 1 hr to fix

            Similar blocks of code found in 6 locations. Consider refactoring.
            Open

            const DropdownMenuShortcut = ({
              className,
              ...props
            }: React.HTMLAttributes<HTMLSpanElement>) => (
              <span
            Severity: Major
            Found in ui/src/design/Dropdown/index.tsx and 5 other locations - About 1 hr to fix
            ui/src/design/ContextMenu/index.tsx on lines 182..193
            ui/src/design/Dialog/index.tsx on lines 65..76
            ui/src/design/Dialog/index.tsx on lines 79..90
            ui/src/design/Drawer/index.tsx on lines 72..83
            ui/src/design/Drawer/index.tsx on lines 86..97

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 57.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 6 locations. Consider refactoring.
            Open

            const DialogHeader = ({
              className,
              ...props
            }: React.HTMLAttributes<HTMLDivElement>) => (
              <div
            Severity: Major
            Found in ui/src/design/Dialog/index.tsx and 5 other locations - About 1 hr to fix
            ui/src/design/ContextMenu/index.tsx on lines 182..193
            ui/src/design/Dialog/index.tsx on lines 79..90
            ui/src/design/Drawer/index.tsx on lines 72..83
            ui/src/design/Drawer/index.tsx on lines 86..97
            ui/src/design/Dropdown/index.tsx on lines 186..197

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 57.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 6 locations. Consider refactoring.
            Open

            const ContextMenuShortcut = ({
              className,
              ...props
            }: React.HTMLAttributes<HTMLSpanElement>) => (
              <span
            Severity: Major
            Found in ui/src/design/ContextMenu/index.tsx and 5 other locations - About 1 hr to fix
            ui/src/design/Dialog/index.tsx on lines 65..76
            ui/src/design/Dialog/index.tsx on lines 79..90
            ui/src/design/Drawer/index.tsx on lines 72..83
            ui/src/design/Drawer/index.tsx on lines 86..97
            ui/src/design/Dropdown/index.tsx on lines 186..197

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 57.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 6 locations. Consider refactoring.
            Open

            const DrawerFooter = ({
              className,
              ...props
            }: React.HTMLAttributes<HTMLDivElement>) => (
              <div
            Severity: Major
            Found in ui/src/design/Drawer/index.tsx and 5 other locations - About 1 hr to fix
            ui/src/design/ContextMenu/index.tsx on lines 182..193
            ui/src/design/Dialog/index.tsx on lines 65..76
            ui/src/design/Dialog/index.tsx on lines 79..90
            ui/src/design/Drawer/index.tsx on lines 72..83
            ui/src/design/Dropdown/index.tsx on lines 186..197

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 57.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 6 locations. Consider refactoring.
            Open

            const DrawerHeader = ({
              className,
              ...props
            }: React.HTMLAttributes<HTMLDivElement>) => (
              <div
            Severity: Major
            Found in ui/src/design/Drawer/index.tsx and 5 other locations - About 1 hr to fix
            ui/src/design/ContextMenu/index.tsx on lines 182..193
            ui/src/design/Dialog/index.tsx on lines 65..76
            ui/src/design/Dialog/index.tsx on lines 79..90
            ui/src/design/Drawer/index.tsx on lines 86..97
            ui/src/design/Dropdown/index.tsx on lines 186..197

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 57.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 6 locations. Consider refactoring.
            Open

            const DialogFooter = ({
              className,
              ...props
            }: React.HTMLAttributes<HTMLDivElement>) => (
              <div
            Severity: Major
            Found in ui/src/design/Dialog/index.tsx and 5 other locations - About 1 hr to fix
            ui/src/design/ContextMenu/index.tsx on lines 182..193
            ui/src/design/Dialog/index.tsx on lines 65..76
            ui/src/design/Drawer/index.tsx on lines 72..83
            ui/src/design/Drawer/index.tsx on lines 86..97
            ui/src/design/Dropdown/index.tsx on lines 186..197

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 57.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            export const createRequestServiceFile = ({
              scale = 1,
              size = "small",
            }: CreateServiceFileParams = {}) => `direktiv_api: service/v1
            image: direktiv/request:v4
            Severity: Major
            Found in ui/e2e/services/utils.ts and 1 other location - About 1 hr to fix
            ui/e2e/services/utils.ts on lines 10..21

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 57.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

              const envs = Array.from({ length: 3 }, () => ({
                name: faker.lorem.word(),
                value: faker.git.shortSha(),
              }));
            Severity: Major
            Found in ui/e2e/explorer/service/index.spec.ts and 1 other location - About 1 hr to fix
            ui/e2e/explorer/service/index.spec.ts on lines 328..331

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 57.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                                <Button
                                  variant="link"
                                  size="sm"
                                  type="button"
                                  onClick={deselectAllPermissions}
            ui/src/pages/namespace/Permissions/components/PermisionsSelector/index.tsx on lines 80..89

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 57.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

              const envs = Array.from({ length: 5 }, () => ({
                name: faker.lorem.word(),
                value: faker.git.shortSha(),
              }));
            Severity: Major
            Found in ui/e2e/explorer/service/index.spec.ts and 1 other location - About 1 hr to fix
            ui/e2e/explorer/service/index.spec.ts on lines 32..35

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 57.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                                <Button
                                  variant="link"
                                  type="button"
                                  size="sm"
                                  onClick={selectAllPermissions}
            ui/src/pages/namespace/Permissions/components/PermisionsSelector/index.tsx on lines 90..99

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 57.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                        to={pages.explorer.createHref({
                          namespace: service.namespace,
                          path: service.filePath,
                          subpage:
                            service.type === "namespace-service" ? "service" : "workflow",
            Severity: Major
            Found in ui/src/pages/namespace/Services/Detail/Header.tsx and 1 other location - About 1 hr to fix
            ui/src/pages/namespace/Services/List/Row/index.tsx on lines 62..69

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 57.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Severity
            Category
            Status
            Source
            Language