kubenetworks/kubevpn

View on GitHub
pkg/syncthing/syncthing.go

Summary

Maintainability
B
6 hrs
Test Coverage

Function StartServer has 94 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func StartServer(ctx context.Context, detach bool, remoteDir string) error {
    if err := MakeSureGui(); err != nil {
        return err
    }

Severity: Major
Found in pkg/syncthing/syncthing.go - About 2 hrs to fix

    Function StartClient has 91 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func StartClient(ctx context.Context, localDir string, localAddr, remoteAddr string) error {
        if err := MakeSureGui(); err != nil {
            return err
        }
        err := cmdutil.SetConfigDataLocationsFromFlags(pkgconfig.GetSyncthingPath(), "", "")
    Severity: Major
    Found in pkg/syncthing/syncthing.go - About 2 hrs to fix

      Function StartClient has 6 return statements (exceeds 4 allowed).
      Open

      func StartClient(ctx context.Context, localDir string, localAddr, remoteAddr string) error {
          if err := MakeSureGui(); err != nil {
              return err
          }
          err := cmdutil.SetConfigDataLocationsFromFlags(pkgconfig.GetSyncthingPath(), "", "")
      Severity: Major
      Found in pkg/syncthing/syncthing.go - About 40 mins to fix

        Function StartServer has 6 return statements (exceeds 4 allowed).
        Open

        func StartServer(ctx context.Context, detach bool, remoteDir string) error {
            if err := MakeSureGui(); err != nil {
                return err
            }
        
        
        Severity: Major
        Found in pkg/syncthing/syncthing.go - About 40 mins to fix

          There are no issues that match your filters.

          Category
          Status