vorteil/direktiv

View on GitHub

Showing 1,235 of 1,235 total issues

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

              <Button variant="outline" asChild>
                <label>
                  {t([`pages.events.history.filter.field.${field}`])}
                </label>
              </Button>
ui/src/pages/namespace/Events/History/components/Filters/index.tsx on lines 99..103
ui/src/pages/namespace/Instances/components/Filters/index.tsx on lines 103..107
ui/src/pages/namespace/Instances/components/Filters/index.tsx on lines 150..154
ui/src/pages/namespace/Instances/components/Filters/index.tsx on lines 198..202

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 52.

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 5 locations. Consider refactoring.
Open

              <Button variant="outline" asChild>
                <label>
                  {t([`pages.events.history.filter.field.${field}`])}
                </label>
              </Button>
ui/src/pages/namespace/Events/History/components/Filters/index.tsx on lines 151..155
ui/src/pages/namespace/Instances/components/Filters/index.tsx on lines 103..107
ui/src/pages/namespace/Instances/components/Filters/index.tsx on lines 150..154
ui/src/pages/namespace/Instances/components/Filters/index.tsx on lines 198..202

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 52.

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 5 locations. Consider refactoring.
Open

              <Button variant="outline" asChild>
                <label>
                  {t([`pages.instances.list.filter.field.${field}`])}
                </label>
              </Button>
Severity: Major
Found in ui/src/pages/namespace/Instances/components/Filters/index.tsx and 4 other locations - About 50 mins to fix
ui/src/pages/namespace/Events/History/components/Filters/index.tsx on lines 99..103
ui/src/pages/namespace/Events/History/components/Filters/index.tsx on lines 151..155
ui/src/pages/namespace/Instances/components/Filters/index.tsx on lines 150..154
ui/src/pages/namespace/Instances/components/Filters/index.tsx on lines 198..202

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 52.

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 5 locations. Consider refactoring.
Open

              <Button variant="outline" asChild>
                <label>
                  {t([`pages.instances.list.filter.field.${field}`])}
                </label>
              </Button>
Severity: Major
Found in ui/src/pages/namespace/Instances/components/Filters/index.tsx and 4 other locations - About 50 mins to fix
ui/src/pages/namespace/Events/History/components/Filters/index.tsx on lines 99..103
ui/src/pages/namespace/Events/History/components/Filters/index.tsx on lines 151..155
ui/src/pages/namespace/Instances/components/Filters/index.tsx on lines 103..107
ui/src/pages/namespace/Instances/components/Filters/index.tsx on lines 150..154

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 52.

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

            <TopRightComponent
              className="justify-self-end lg:hidden"
              theme={theme}
              onThemeChange={() => {
                setTheme((theme) => (theme === "dark" ? "light" : "dark"));
Severity: Minor
Found in ui/src/design/Appshell/index.stories.tsx and 1 other location - About 50 mins to fix
ui/src/design/Appshell/index.stories.tsx on lines 357..363

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 52.

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

        <DialogContent>
          {rebuildService && (
            <Rebuild
              service={rebuildService}
              close={() => {
Severity: Major
Found in ui/src/pages/namespace/Services/List/index.tsx and 2 other locations - About 50 mins to fix
ui/src/pages/namespace/Explorer/Workflow/Overview/Services.tsx on lines 52..61
ui/src/pages/namespace/Explorer/Workflow/Services/ServicesList.tsx on lines 56..65

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 52.

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

        <DialogContent>
          {rebuildService && (
            <Rebuild
              service={rebuildService}
              close={() => {
Severity: Major
Found in ui/src/pages/namespace/Explorer/Workflow/Overview/Services.tsx and 2 other locations - About 50 mins to fix
ui/src/pages/namespace/Explorer/Workflow/Services/ServicesList.tsx on lines 56..65
ui/src/pages/namespace/Services/List/index.tsx on lines 60..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 52.

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

          <DialogContent>
            {rebuildService && (
              <Rebuild
                service={rebuildService}
                close={() => {
ui/src/pages/namespace/Explorer/Workflow/Overview/Services.tsx on lines 52..61
ui/src/pages/namespace/Services/List/index.tsx on lines 60..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 52.

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

              <TopRightComponent
                className="max-lg:hidden"
                theme={theme}
                onThemeChange={() => {
                  setTheme((theme) => (theme === "dark" ? "light" : "dark"));
Severity: Minor
Found in ui/src/design/Appshell/index.stories.tsx and 1 other location - About 50 mins to fix
ui/src/design/Appshell/index.stories.tsx on lines 280..286

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 52.

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 SidebarTop: FC<PropsWithChildren> = ({ children }) => (
  <div className="grid grid-cols-3 items-center border-b border-gray-5 px-6 py-5 dark:border-gray-dark-5 lg:block lg:space-x-0">
    {children}
  </div>
);
Severity: Minor
Found in ui/src/design/Appshell/index.tsx and 1 other location - About 50 mins to fix
ui/src/design/Appshell/index.tsx on lines 37..41

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 52.

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 MainTop: FC<PropsWithChildren> = ({ children }) => (
  <div className="z-30 flex items-center justify-between border-b border-gray-5 bg-white px-4 py-2 dark:border-gray-dark-5 dark:bg-black lg:sticky lg:top-0">
    {children}
  </div>
);
Severity: Minor
Found in ui/src/design/Appshell/index.tsx and 1 other location - About 50 mins to fix
ui/src/design/Appshell/index.tsx on lines 19..23

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 52.

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.NewInstance has 8 return statements (exceeds 4 allowed).
Open

func (engine *engine) NewInstance(ctx context.Context, args *newInstanceArgs) (*instanceMemory, error) {
    ctx = tracing.AddInstanceAttr(ctx, tracing.InstanceAttributes{
        Namespace:    args.Namespace.Name,
        InstanceID:   args.ID.String(),
        Invoker:      args.Invoker,
Severity: Major
Found in pkg/flow/engine.go - About 50 mins to fix

    Function generateGetInstancesFilters has 8 return statements (exceeds 4 allowed).
    Open

    func generateGetInstancesFilters(opts *instancestore.ListOpts) ([]string, []interface{}, error) {
        if opts == nil {
            return []string{}, []interface{}{}, nil
        }
    
    
    Severity: Major
    Found in pkg/instancestore/instancestoresql/sql_builders.go - About 50 mins to fix

      Method getterLogic.Run has 8 return statements (exceeds 4 allowed).
      Open

      func (logic *getterLogic) Run(ctx context.Context, wakedata []byte) (*Transition, error) {
          err := scheduleOnce(logic, wakedata)
          if err != nil {
              return nil, err
          }
      Severity: Major
      Found in pkg/flow/states/getter.go - About 50 mins to fix

        Method LocalServer.logHandler has 8 return statements (exceeds 4 allowed).
        Open

        func (srv *LocalServer) logHandler(w http.ResponseWriter, r *http.Request) {
            actionId := r.URL.Query().Get("aid")
        
            srv.requestsLock.Lock()
            req, ok := srv.requests[actionId]
        Severity: Major
        Found in cmd/sidecar/local-server.go - About 50 mins to fix

          Method flow.cronHandler has 8 return statements (exceeds 4 allowed).
          Open

          func (flow *flow) cronHandler(data []byte) {
              ctx := context.Background()
          
              t := time.Now().Truncate(time.Minute).UTC()
          
          
          Severity: Major
          Found in pkg/flow/routing.go - About 50 mins to fix

            Method eventsAndLogic.Run has 8 return statements (exceeds 4 allowed).
            Open

            func (logic *eventsAndLogic) Run(ctx context.Context, wakedata []byte) (*Transition, error) {
                first, err := scheduleTwice(logic, wakedata)
                if err != nil {
                    return nil, err
                }
            Severity: Major
            Found in pkg/flow/states/eventsAnd.go - About 50 mins to fix

              Method engine.doKnativeHTTPRequest has 8 return statements (exceeds 4 allowed).
              Open

              func (engine *engine) doKnativeHTTPRequest(ctx context.Context,
                  ar *functionRequest, arReq *enginerefactor.ActionRequest,
              ) {
                  ctx, spanEnd, err := tracing.NewSpan(ctx, "executing knative request to action")
                  if err != nil {
              Severity: Major
              Found in pkg/flow/temporary.go - About 50 mins to fix

                Method actionLogic.scheduleAction has 8 return statements (exceeds 4 allowed).
                Open

                func (logic *actionLogic) scheduleAction(ctx context.Context, attempt int) error {
                    input, files, err := generateActionInput(ctx, &generateActionInputArgs{
                        Instance: logic.Instance,
                        Source:   logic.GetInstanceData(),
                        Action:   logic.Action,
                Severity: Major
                Found in pkg/flow/states/action.go - About 50 mins to fix

                  Method SlackWebhookPlugin.Execute has 8 return statements (exceeds 4 allowed).
                  Open

                  func (p *SlackWebhookPlugin) Execute(w http.ResponseWriter, r *http.Request) *http.Request {
                      // check request is already authenticated
                      if gateway.ExtractContextActiveConsumer(r) != nil {
                          return r
                      }
                  Severity: Major
                  Found in pkg/gateway/plugins/auth/slack-event.go - About 50 mins to fix
                    Severity
                    Category
                    Status
                    Source
                    Language