vorteil/direktiv

View on GitHub

Showing 1,235 of 1,235 total issues

Function scheduleRetry has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

func scheduleRetry(ctx context.Context, instance Instance, children []*ChildInfo, idx int, d time.Duration) error {
Severity: Minor
Found in pkg/flow/states/action-helpers.go - About 35 mins to fix

    Method DirektivApplyer.apply has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    func (o *DirektivApplyer) apply(ctx context.Context, callbacks Callbacks, proc *datastore.MirrorProcess, parser *Parser, notes map[string]string) error {
    Severity: Minor
    Found in pkg/mirror/apply.go - About 35 mins to fix

      Method DryrunApplyer.apply has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      func (o *DryrunApplyer) apply(_ context.Context, _ Callbacks, _ *datastore.MirrorProcess, _ *Parser, _ map[string]string) error {
      Severity: Minor
      Found in pkg/mirror/apply.go - About 35 mins to fix

        Method engine.subflowInvoke has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        func (engine *engine) subflowInvoke(ctx context.Context, pi *enginerefactor.ParentInfo, instance *enginerefactor.Instance, name string, input []byte) (*instanceMemory, error) {
        Severity: Minor
        Found in pkg/flow/engine.go - About 35 mins to fix

          Function getVariableDataViaID has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          func getVariableDataViaID(ctx context.Context, flowToken string, flowAddr string, namespace string, id string) (variable, error) {
          Severity: Minor
          Found in cmd/sidecar/api_v2_clients.go - About 35 mins to fix

            Function getVariableMetaFromFlow has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            func getVariableMetaFromFlow(ctx context.Context, flowToken string, flowAddr string, ir *functionRequest, scope, key string) (variable, int, error) {
            Severity: Minor
            Found in cmd/sidecar/api_v2_clients.go - About 35 mins to fix

              Function postVarData has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              func postVarData(ctx context.Context, flowToken string, flowAddr string, namespace string, body createVarRequest) (int, error) {
              Severity: Minor
              Found in cmd/sidecar/api_v2_clients.go - About 35 mins to fix

                Method flow.configureWorkflowStarts has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                func (flow *flow) configureWorkflowStarts(ctx context.Context, tx *database.SQLStore, nsID uuid.UUID, nsName string, file *filestore.File) error {
                Severity: Minor
                Found in pkg/flow/routing.go - About 35 mins to fix

                  Method engine.scheduleTimeout has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  func (engine *engine) scheduleTimeout(_ context.Context, im *instanceMemory, oldController string, t time.Time, soft bool) {
                  Severity: Minor
                  Found in pkg/flow/timeouts.go - About 35 mins to fix

                    Function getKnativeServiceURL has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    func getKnativeServiceURL(knativeNamespace string, namespace string, typ string, file string, name string) string {
                    Severity: Minor
                    Found in pkg/service/service.go - About 35 mins to fix

                      Function generateElements has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                        getLayoutedElements: (
                          incomingEles: (Node | Edge)[],
                          orientation: Orientation
                        ) => (Node | Edge)[],
                        value: Workflow | null,
                      Severity: Minor
                      Found in ui/src/design/WorkflowDiagram/utils.ts - About 35 mins to fix

                        Function sseHandlefunc has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        func sseHandlefunc(ctx context.Context, r *http.Request, c *eventsController, cursorTime time.Time, params []string) ([]CoursoredEvent, error) {
                        Severity: Minor
                        Found in pkg/api/events.go - About 35 mins to fix

                          Method RootQuery.CreateFile has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          func (q *RootQuery) CreateFile(ctx context.Context, path string, typ filestore.FileType, mimeType string, data []byte) (*filestore.File, error) {
                          Severity: Minor
                          Found in pkg/filestore/filestoresql/root_query.go - About 35 mins to fix

                            Method sqlEventHistoryStore.GetStartingIDUntilTime has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            func (hs *sqlEventHistoryStore) GetStartingIDUntilTime(ctx context.Context, namespace string, lastID int, t time.Time, keyAndValues ...string) ([]*datastore.Event, error) {
                            Severity: Minor
                            Found in pkg/datastore/datastoresql/eventstore_history.go - About 35 mins to fix

                              Method sqlEventHistoryStore.getEventsWithWhereClause has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              func (hs *sqlEventHistoryStore) getEventsWithWhereClause(ctx context.Context, namespace string, t time.Time, whereClause string, keyAndValues ...string) ([]*datastore.Event, error) {
                              Severity: Minor
                              Found in pkg/datastore/datastoresql/eventstore_history.go - About 35 mins to fix

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

                                func (srv *LocalServer) run() {
                                    slog.Info("Starting localhost HTTP server.", "addr", srv.server.Addr)
                                
                                    err := srv.server.ListenAndServe()
                                    if err != nil && !errors.Is(err, http.ErrServerClosed) {
                                Severity: Minor
                                Found in cmd/sidecar/local-server.go and 1 other location - About 35 mins to fix
                                cmd/sidecar/network-server.go on lines 106..116

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

                                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

                                func (srv *NetworkServer) run() {
                                    slog.Info("Starting network-facing HTTP server.", "addr", srv.server.Addr)
                                
                                    err := srv.server.ListenAndServe()
                                    if err != nil && !errors.Is(err, http.ErrServerClosed) {
                                Severity: Minor
                                Found in cmd/sidecar/network-server.go and 1 other location - About 35 mins to fix
                                cmd/sidecar/local-server.go on lines 411..421

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

                                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

                                    if req.Path != "" && updatedFile.Typ.IsDirektivSpecFile() {
                                        err = e.bus.DebouncedPublish(&pubsub.FileSystemChangeEvent{
                                            Action:      "rename",
                                            FileType:    string(updatedFile.Typ),
                                            Namespace:   ns.Name,
                                Severity: Minor
                                Found in pkg/api/filesystem.go and 1 other location - About 35 mins to fix
                                pkg/api/filesystem.go on lines 171..183

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

                                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

                                    if newFile.Typ.IsDirektivSpecFile() {
                                        err = e.bus.DebouncedPublish(&pubsub.FileSystemChangeEvent{
                                            Action:      "create",
                                            FileType:    string(newFile.Typ),
                                            Namespace:   ns.Name,
                                Severity: Minor
                                Found in pkg/api/filesystem.go and 1 other location - About 35 mins to fix
                                pkg/api/filesystem.go on lines 384..397

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

                                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

                                    if file.Typ.IsDirektivSpecFile() {
                                        err = e.bus.DebouncedPublish(&pubsub.FileSystemChangeEvent{
                                            Action:       "delete",
                                            FileType:     string(file.Typ),
                                            Namespace:    ns.Name,
                                Severity: Minor
                                Found in pkg/api/filesystem.go and 1 other location - About 35 mins to fix
                                pkg/api/filesystem.go on lines 369..381

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

                                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