Preparing report...

Report for github.com/sorintlab/stolon

A+    Excellent!    Found 42 issues across 71 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo76%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

    • stolon/cmd/sentinel/cmd/sentinel.go
    • Line 781: warning: cyclomatic complexity 140 of function (*Sentinel).updateCluster() is high (> 15) (gocyclo)
    • Line 174: warning: cyclomatic complexity 30 of function (*Sentinel).updateKeepersStatus() is high (> 15) (gocyclo)
    • Line 1836: warning: cyclomatic complexity 18 of function (*Sentinel).clusterSentinelCheck() is high (> 15) (gocyclo)
    • stolon/tests/integration/config_test.go
    • Line 245: warning: cyclomatic complexity 37 of function TestWalKeepSegments() is high (> 15) (gocyclo)
    • Line 503: warning: cyclomatic complexity 29 of function TestAdditionalReplicationSlots() is high (> 15) (gocyclo)
    • Line 130: warning: cyclomatic complexity 25 of function TestWalLevel() is high (> 15) (gocyclo)
    • Line 639: warning: cyclomatic complexity 23 of function TestAutomaticPgRestart() is high (> 15) (gocyclo)
    • Line 763: warning: cyclomatic complexity 19 of function TestAdvertise() is high (> 15) (gocyclo)
    • Line 33: warning: cyclomatic complexity 19 of function TestServerParameters() is high (> 15) (gocyclo)
    • Line 418: warning: cyclomatic complexity 18 of function TestAlterSystem() is high (> 15) (gocyclo)
    • stolon/tests/integration/ha_test.go
    • Line 954: warning: cyclomatic complexity 33 of function testTimelineFork() is high (> 15) (gocyclo)
    • Line 800: warning: cyclomatic complexity 27 of function testPartition1() is high (> 15) (gocyclo)
    • Line 661: warning: cyclomatic complexity 23 of function testOldMasterRestart() is high (> 15) (gocyclo)
    • Line 1509: warning: cyclomatic complexity 23 of function testKeeperRemovalStolonCtl() is high (> 15) (gocyclo)
    • Line 1633: warning: cyclomatic complexity 22 of function TestStandbyCantSync() is high (> 15) (gocyclo)
    • Line 1961: warning: cyclomatic complexity 21 of function TestSyncStandbyNotInSync() is high (> 15) (gocyclo)
    • Line 475: warning: cyclomatic complexity 19 of function testFailoverFailed() is high (> 15) (gocyclo)
    • Line 1846: warning: cyclomatic complexity 19 of function testForceFail() is high (> 15) (gocyclo)
    • Line 364: warning: cyclomatic complexity 18 of function testFailover() is high (> 15) (gocyclo)
    • Line 1244: warning: cyclomatic complexity 17 of function TestFailedStandby() is high (> 15) (gocyclo)
    • Line 1147: warning: cyclomatic complexity 16 of function testMasterChangedAddress() is high (> 15) (gocyclo)
    • stolon/internal/cluster/cluster.go
    • Line 418: warning: cyclomatic complexity 40 of function (*ClusterSpec).Validate() is high (> 15) (gocyclo)
    • Line 343: warning: cyclomatic complexity 23 of function (*ClusterSpec).WithDefaults() is high (> 15) (gocyclo)
    • stolon/tests/integration/init_test.go
    • Line 173: warning: cyclomatic complexity 28 of function testInitExisting() is high (> 15) (gocyclo)
    • Line 305: warning: cyclomatic complexity 19 of function TestInitUsers() is high (> 15) (gocyclo)
    • Line 521: warning: cyclomatic complexity 17 of function TestPasswordTrailingNewLine() is high (> 15) (gocyclo)
    • stolon/tests/integration/standby_test.go
    • Line 308: warning: cyclomatic complexity 23 of function TestPromoteStandbyClusterArchiveRecovery() is high (> 15) (gocyclo)
    • Line 164: warning: cyclomatic complexity 21 of function TestPromoteStandbyCluster() is high (> 15) (gocyclo)
    • Line 31: warning: cyclomatic complexity 19 of function TestInitStandbyCluster() is high (> 15) (gocyclo)

golint56%

Golint is a linter for Go source code.

    • stolon/internal/cluster/v0/member.go
    • Line 19: warning: exported type KeepersInfo should have comment or be unexported (golint)
    • Line 21: warning: exported type KeeperInfo should have comment or be unexported (golint)
    • Line 30: warning: exported method KeeperInfo.Copy should have comment or be unexported (golint)
    • Line 38: warning: exported type PostgresTimelinesHistory should have comment or be unexported (golint)
    • Line 40: warning: exported method PostgresTimelinesHistory.Copy should have comment or be unexported (golint)
    • Line 49: warning: exported type PostgresTimelineHistory should have comment or be unexported (golint)
    • Line 55: warning: exported method PostgresTimelinesHistory.GetTimelineHistory should have comment or be unexported (golint)
    • Line 64: warning: exported type PostgresState should have comment or be unexported (golint)
    • Line 73: warning: exported method PostgresState.Copy should have comment or be unexported (golint)
    • Line 82: warning: exported type KeepersDiscoveryInfo should have comment or be unexported (golint)
    • Line 84: warning: exported type KeeperDiscoveryInfo should have comment or be unexported (golint)
    • Line 89: warning: exported type SentinelsInfo should have comment or be unexported (golint)
    • Line 95: warning: exported type SentinelInfo should have comment or be unexported (golint)
    • Line 101: warning: exported type ProxiesInfo should have comment or be unexported (golint)
    • Line 107: warning: exported type ProxyInfo should have comment or be unexported (golint)
    • stolon/cmd/proxy/cmd/proxy.go
    • Line 42: warning: exported var CmdProxy should have comment or be unexported (golint)
    • Line 79: warning: exported type ClusterChecker should have comment or be unexported (golint)
    • Line 98: warning: exported function NewClusterChecker should have comment or be unexported (golint)
    • Line 174: warning: exported method ClusterChecker.SetProxyInfo should have comment or be unexported (golint)
    • Line 275: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 296: warning: exported method ClusterChecker.TimeoutChecker should have comment or be unexported (golint)
    • Line 326: warning: exported method ClusterChecker.Start should have comment or be unexported (golint)
    • Line 363: warning: exported function Execute should have comment or be unexported (golint)
    • stolon/internal/postgresql/connstring.go
    • Line 28: warning: exported type ConnParams should have comment or be unexported (golint)
    • Line 30: warning: exported method ConnParams.Set should have comment or be unexported (golint)
    • Line 34: warning: exported method ConnParams.Get should have comment or be unexported (golint)
    • Line 38: warning: exported method ConnParams.Del should have comment or be unexported (golint)
    • Line 42: warning: exported method ConnParams.Isset should have comment or be unexported (golint)
    • Line 47: warning: exported method ConnParams.Equals should have comment or be unexported (golint)
    • Line 51: warning: exported method ConnParams.Copy should have comment or be unexported (golint)
    • Line 212: warning: receiver name p should be consistent with previous receiver name cp for ConnParams (golint)
    • stolon/tests/integration/utils.go
    • Line 42: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 50: warning: exported const MinPort should have comment (or a comment on this block) or be unexported (golint)
    • Line 74: warning: exported type Querier should have comment or be unexported (golint)
    • Line 79: warning: exported type ReplQuerier should have comment or be unexported (golint)
    • Line 83: warning: exported function GetPGParameters should have comment or be unexported (golint)
    • Line 102: warning: exported function GetSystemData should have comment or be unexported (golint)
    • Line 124: warning: exported function GetXLogPos should have comment or be unexported (golint)
    • Line 237: warning: exported type Process should have comment or be unexported (golint)
    • Line 269: warning: exported method Process.Start should have comment or be unexported (golint)
    • Line 277: warning: exported method Process.StartExpect should have comment or be unexported (golint)
    • Line 281: warning: exported method Process.Signal should have comment or be unexported (golint)
    • Line 289: warning: exported method Process.Kill should have comment or be unexported (golint)
    • Line 299: warning: exported method Process.Stop should have comment or be unexported (golint)
    • Line 310: warning: exported method Process.Wait should have comment or be unexported (golint)
    • Line 325: warning: exported type TestKeeper should have comment or be unexported (golint)
    • Line 339: warning: exported function NewTestKeeperWithID should have comment or be unexported (golint)
    • Line 424: warning: exported function NewTestKeeper should have comment or be unexported (golint)
    • Line 431: warning: exported method TestKeeper.PGDataVersion should have comment or be unexported (golint)
    • Line 447: warning: exported method TestKeeper.GetPrimaryConninfo should have comment or be unexported (golint)
    • Line 477: warning: exported method TestKeeper.Exec should have comment or be unexported (golint)
    • Line 486: warning: exported method TestKeeper.Query should have comment or be unexported (golint)
    • Line 495: warning: exported method TestKeeper.ReplQuery should have comment or be unexported (golint)
    • Line 504: warning: exported method TestKeeper.SwitchWals should have comment or be unexported (golint)
    • Line 533: warning: exported method TestKeeper.CheckPoint should have comment or be unexported (golint)
    • Line 538: warning: exported method TestKeeper.WaitDBUp should have comment or be unexported (golint)
    • Line 551: warning: exported method TestKeeper.WaitDBDown should have comment or be unexported (golint)
    • Line 563: warning: exported method TestKeeper.GetPGProcess should have comment or be unexported (golint)
    • Line 583: warning: exported method TestKeeper.SignalPG should have comment or be unexported (golint)
    • Line 610: warning: exported method TestKeeper.WaitDBRole should have comment or be unexported (golint)
    • Line 658: warning: exported method TestKeeper.GetPGParameters should have comment or be unexported (golint)
    • Line 688: warning: exported type TestSentinel should have comment or be unexported (golint)
    • Line 693: warning: exported function NewTestSentinel should have comment or be unexported (golint)
    • Line 723: warning: exported type TestProxy should have comment or be unexported (golint)
    • Line 732: warning: exported function NewTestProxy should have comment or be unexported (golint)
    • Line 804: warning: exported method TestProxy.WaitListening should have comment or be unexported (golint)
    • Line 816: warning: exported method TestProxy.CheckListening should have comment or be unexported (golint)
    • Line 821: warning: exported method TestProxy.WaitNotListening should have comment or be unexported (golint)
    • Line 833: warning: exported method TestProxy.Exec should have comment or be unexported (golint)
    • Line 842: warning: exported method TestProxy.Query should have comment or be unexported (golint)
    • Line 851: warning: exported method TestProxy.ReplQuery should have comment or be unexported (golint)
    • Line 860: warning: exported method TestProxy.GetPGParameters should have comment or be unexported (golint)
    • Line 864: warning: exported method TestProxy.WaitRightMaster should have comment or be unexported (golint)
    • Line 880: warning: exported function StolonCtl should have comment or be unexported (golint)
    • Line 910: warning: exported type TestStore should have comment or be unexported (golint)
    • Line 919: warning: exported function NewTestStore should have comment or be unexported (golint)
    • Line 933: warning: exported function NewTestEtcd should have comment or be unexported (golint)
    • Line 991: warning: exported function NewTestConsul should have comment or be unexported (golint)
    • Line 1075: warning: exported method TestStore.WaitUp should have comment or be unexported (golint)
    • Line 1094: warning: exported method TestStore.WaitDown should have comment or be unexported (golint)
    • Line 1109: warning: exported function WaitClusterDataUpdated should have comment or be unexported (golint)
    • Line 1129: warning: exported function WaitClusterDataWithMaster should have comment or be unexported (golint)
    • Line 1145: warning: exported function WaitClusterDataMaster should have comment or be unexported (golint)
    • Line 1163: warning: exported function WaitClusterDataKeeperInitialized should have comment or be unexported (golint)
    • Line 1230: warning: exported function WaitClusterPhase should have comment or be unexported (golint)
    • Line 1246: warning: exported function WaitNumDBs should have comment or be unexported (golint)
    • Line 1262: warning: exported function WaitStandbyKeeper should have comment or be unexported (golint)
    • Line 1284: warning: exported function WaitClusterDataKeepers should have comment or be unexported (golint)
    • Line 1355: warning: exported function WaitClusterDataEnabledProxiesNum should have comment or be unexported (golint)
    • stolon/internal/cluster/cluster.go
    • Line 30: warning: exported function Uint16P should have comment or be unexported (golint)
    • Line 33: warning: exported function Uint32P should have comment or be unexported (golint)
    • Line 37: warning: exported function BoolP should have comment or be unexported (golint)
    • Line 42: warning: exported const CurrentCDFormatVersion should have comment (or a comment on this block) or be unexported (golint)
    • Line 46: warning: exported const DefaultStoreTimeout should have comment (or a comment on this block) or be unexported (golint)
    • Line 75: warning: exported const NoGeneration should have comment (or a comment on this block) or be unexported (golint)
    • Line 79: warning: exported type PGParameters should have comment or be unexported (golint)
    • Line 81: warning: exported type FollowType should have comment or be unexported (golint)
    • Line 84: warning: comment on exported const FollowTypeInternal should be of the form "FollowTypeInternal ..." (golint)
    • Line 86: warning: comment on exported const FollowTypeExternal should be of the form "FollowTypeExternal ..." (golint)
    • Line 90: warning: exported type FollowConfig should have comment or be unexported (golint)
    • Line 99: warning: exported type PostgresBinaryVersion should have comment or be unexported (golint)
    • Line 104: warning: exported type ClusterPhase should have comment or be unexported (golint)
    • Line 107: warning: exported const ClusterPhaseInitializing should have comment (or a comment on this block) or be unexported (golint)
    • Line 111: warning: exported type ClusterRole should have comment or be unexported (golint)
    • Line 114: warning: exported const ClusterRoleMaster should have comment (or a comment on this block) or be unexported (golint)
    • Line 118: warning: exported type ClusterInitMode should have comment or be unexported (golint)
    • Line 121: warning: comment on exported const ClusterInitModeNew should be of the form "ClusterInitModeNew ..." (golint)
    • Line 123: warning: comment on exported const ClusterInitModePITR should be of the form "ClusterInitModePITR ..." (golint)
    • Line 125: warning: comment on exported const ClusterInitModeExisting should be of the form "ClusterInitModeExisting ..." (golint)
    • Line 129: warning: exported function ClusterInitModeP should have comment or be unexported (golint)
    • Line 133: warning: exported function ClusterRoleP should have comment or be unexported (golint)
    • Line 137: warning: exported type DBInitMode should have comment or be unexported (golint)
    • Line 140: warning: exported const DBInitModeNone should have comment (or a comment on this block) or be unexported (golint)
    • Line 141: warning: comment on exported const DBInitModeExisting should be of the form "DBInitModeExisting ..." (golint)
    • Line 143: warning: comment on exported const DBInitModeNew should be of the form "DBInitModeNew ..." (golint)
    • Line 145: warning: comment on exported const DBInitModePITR should be of the form "DBInitModePITR ..." (golint)
    • Line 147: warning: comment on exported const DBInitModeResync should be of the form "DBInitModeResync ..." (golint)
    • Line 151: warning: exported type NewConfig should have comment or be unexported (golint)
    • Line 157: warning: exported type PITRConfig should have comment or be unexported (golint)
    • Line 166: warning: exported type ExistingConfig should have comment or be unexported (golint)
    • Line 170: warning: comment on exported type StandbyConfig should be of the form "StandbyConfig ..." (with optional leading article) (golint)
    • Line 199: warning: exported type SUReplAccessMode should have comment or be unexported (golint)
    • Line 202: warning: comment on exported const SUReplAccessAll should be of the form "SUReplAccessAll ..." (golint)
    • Line 204: warning: comment on exported const SUReplAccessStrict should be of the form "SUReplAccessStrict ..." (golint)
    • Line 208: warning: exported function SUReplAccessModeP should have comment or be unexported (golint)
    • Line 212: warning: exported type ClusterSpec should have comment or be unexported (golint)
    • Line 296: warning: exported type ClusterStatus should have comment or be unexported (golint)
    • Line 303: warning: exported type Cluster should have comment or be unexported (golint)
    • Line 313: warning: exported method Cluster.DeepCopy should have comment or be unexported (golint)
    • Line 324: warning: exported method ClusterSpec.DeepCopy should have comment or be unexported (golint)
    • Line 343: warning: receiver name os should be consistent with previous receiver name c for ClusterSpec (golint)
    • Line 418: warning: receiver name os should be consistent with previous receiver name c for ClusterSpec (golint)
    • Line 540: warning: exported method Cluster.UpdateSpec should have comment or be unexported (golint)
    • Line 557: warning: exported function NewCluster should have comment or be unexported (golint)
    • Line 570: warning: exported type KeeperSpec should have comment or be unexported (golint)
    • Line 572: warning: exported type KeeperStatus should have comment or be unexported (golint)
    • Line 586: warning: exported type Keeper should have comment or be unexported (golint)
    • Line 597: warning: exported function NewKeeperFromKeeperInfo should have comment or be unexported (golint)
    • Line 611: warning: exported method Keepers.SortedKeys should have comment or be unexported (golint)
    • Line 620: warning: exported type DBSpec should have comment or be unexported (golint)
    • Line 663: warning: exported type DBStatus should have comment or be unexported (golint)
    • Line 693: warning: exported type DB should have comment or be unexported (golint)
    • Line 703: warning: exported type ProxySpec should have comment or be unexported (golint)
    • Line 708: warning: exported type ProxyStatus should have comment or be unexported (golint)
    • Line 711: warning: exported type Proxy should have comment or be unexported (golint)
    • Line 727: warning: exported method Duration.MarshalJSON should have comment or be unexported (golint)
    • Line 731: warning: exported method Duration.UnmarshalJSON should have comment or be unexported (golint)
    • Line 741: warning: exported type Keepers should have comment or be unexported (golint)
    • Line 742: warning: exported type DBs should have comment or be unexported (golint)
    • Line 744: warning: comment on exported type ClusterData should be of the form "ClusterData ..." (with optional leading article) (golint)
    • Line 759: warning: exported function NewClusterData should have comment or be unexported (golint)
    • Line 769: warning: exported method ClusterData.DeepCopy should have comment or be unexported (golint)
    • Line 780: warning: exported method ClusterData.FindDB should have comment or be unexported (golint)
    • Line 780: warning: receiver name cd should be consistent with previous receiver name c for ClusterData (golint)
    • stolon/internal/cluster/v0/config.go
    • Line 25: warning: exported const DefaultProxyCheckInterval should have comment (or a comment on this block) or be unexported (golint)
    • Line 36: warning: exported type NilConfig should have comment or be unexported (golint)
    • Line 47: warning: exported type Config should have comment or be unexported (golint)
    • Line 67: warning: exported function StringP should have comment or be unexported (golint)
    • Line 71: warning: exported function UintP should have comment or be unexported (golint)
    • Line 75: warning: exported function BoolP should have comment or be unexported (golint)
    • Line 79: warning: exported function DurationP should have comment or be unexported (golint)
    • Line 83: warning: exported function MapStringP should have comment or be unexported (golint)
    • Line 93: warning: exported method NilConfig.UnmarshalJSON should have comment or be unexported (golint)
    • Line 105: warning: exported method NilConfig.Copy should have comment or be unexported (golint)
    • Line 137: warning: exported method Config.Copy should have comment or be unexported (golint)
    • Line 158: warning: exported method Duration.MarshalJSON should have comment or be unexported (golint)
    • Line 162: warning: exported method Duration.UnmarshalJSON should have comment or be unexported (golint)
    • Line 172: warning: exported method NilConfig.Validate should have comment or be unexported (golint)
    • Line 188: warning: exported method NilConfig.MergeDefaults should have comment or be unexported (golint)
    • Line 215: warning: exported method NilConfig.ToConfig should have comment or be unexported (golint)
    • Line 230: warning: exported function NewDefaultConfig should have comment or be unexported (golint)
    • stolon/internal/store/k8s.go
    • Line 41: warning: exported type ComponentLabelValue should have comment or be unexported (golint)
    • Line 44: warning: exported const DefaultComponentLabel should have comment (or a comment on this block) or be unexported (golint)
    • Line 51: warning: exported type KubeStore should have comment or be unexported (golint)
    • Line 59: warning: exported function NewKubeStore should have comment or be unexported (golint)
    • Line 114: warning: exported method KubeStore.AtomicPutClusterData should have comment or be unexported (golint)
    • Line 143: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 163: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 186: warning: exported method KubeStore.PutClusterData should have comment or be unexported (golint)
    • Line 206: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 224: warning: exported method KubeStore.GetClusterData should have comment or be unexported (golint)
    • Line 230: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 247: warning: exported method KubeStore.SetKeeperInfo should have comment or be unexported (golint)
    • Line 255: warning: exported method KubeStore.GetKeepersInfo should have comment or be unexported (golint)
    • Line 282: warning: exported method KubeStore.SetSentinelInfo should have comment or be unexported (golint)
    • Line 290: warning: exported method KubeStore.GetSentinelsInfo should have comment or be unexported (golint)
    • Line 317: warning: exported method KubeStore.SetProxyInfo should have comment or be unexported (golint)
    • Line 325: warning: exported method KubeStore.GetProxiesInfo should have comment or be unexported (golint)
    • Line 352: warning: exported type KubeElection should have comment or be unexported (golint)
    • Line 369: warning: exported function NewKubeElection should have comment or be unexported (golint)
    • Line 394: warning: exported method KubeElection.RunForElection should have comment or be unexported (golint)
    • Line 409: warning: exported method KubeElection.Stop should have comment or be unexported (golint)
    • Line 417: warning: exported method KubeElection.Leader should have comment or be unexported (golint)
    • stolon/cmd/stolonctl/cmd/spec.go
    • Line 44: warning: exported type ClusterSpecNoDefaults should have comment or be unexported (golint)
    • Line 77: warning: exported type ClusterSpecDefaults should have comment or be unexported (golint)
    • stolon/cmd/stolonctl/cmd/status.go
    • Line 38: warning: exported type StatusOptions should have comment or be unexported (golint)
    • Line 49: warning: exported type Status should have comment or be unexported (golint)
    • Line 56: warning: exported type SentinelStatus should have comment or be unexported (golint)
    • Line 61: warning: exported type ProxyStatus should have comment or be unexported (golint)
    • Line 66: warning: exported type KeeperStatus should have comment or be unexported (golint)
    • Line 75: warning: exported type ClusterStatus should have comment or be unexported (golint)
    • stolon/internal/postgresql/postgresql.go
    • Line 37: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 57: warning: exported var ErrUnknownState should have comment or be unexported (golint)
    • Line 62: warning: exported type PGManager should have comment or be unexported (golint)
    • Line 66: warning: exported type Manager should have comment or be unexported (golint)
    • Line 86: warning: exported type RecoveryMode should have comment or be unexported (golint)
    • Line 89: warning: exported const RecoveryModeNone should have comment (or a comment on this block) or be unexported (golint)
    • Line 94: warning: exported type RecoveryOptions should have comment or be unexported (golint)
    • Line 99: warning: exported function NewRecoveryOptions should have comment or be unexported (golint)
    • Line 103: warning: exported method RecoveryOptions.DeepCopy should have comment or be unexported (golint)
    • Line 114: warning: exported type SystemData should have comment or be unexported (golint)
    • Line 120: warning: exported type TimelineHistory should have comment or be unexported (golint)
    • Line 126: warning: exported type InitConfig should have comment or be unexported (golint)
    • Line 132: warning: exported function SetLogger should have comment or be unexported (golint)
    • Line 136: warning: exported function NewManager should have comment or be unexported (golint)
    • Line 156: warning: exported method Manager.SetParameters should have comment or be unexported (golint)
    • Line 160: warning: exported method Manager.CurParameters should have comment or be unexported (golint)
    • Line 164: warning: exported method Manager.SetRecoveryOptions should have comment or be unexported (golint)
    • Line 173: warning: exported method Manager.CurRecoveryOptions should have comment or be unexported (golint)
    • Line 177: warning: exported method Manager.SetHba should have comment or be unexported (golint)
    • Line 181: warning: exported method Manager.CurHba should have comment or be unexported (golint)
    • Line 185: warning: exported method Manager.UpdateCurParameters should have comment or be unexported (golint)
    • Line 193: warning: exported method Manager.UpdateCurRecoveryOptions should have comment or be unexported (golint)
    • Line 197: warning: exported method Manager.UpdateCurHba should have comment or be unexported (golint)
    • Line 205: warning: exported method Manager.Init should have comment or be unexported (golint)
    • Line 249: warning: exported method Manager.Restore should have comment or be unexported (golint)
    • Line 289: warning: exported method Manager.Start should have comment or be unexported (golint)
    • Line 401: warning: exported method Manager.IsStarted should have comment or be unexported (golint)
    • Line 420: warning: exported method Manager.Reload should have comment or be unexported (golint)
    • Line 475: warning: exported method Manager.Restart should have comment or be unexported (golint)
    • Line 486: warning: exported method Manager.WaitReady should have comment or be unexported (golint)
    • Line 497: warning: exported method Manager.WaitRecoveryDone should have comment or be unexported (golint)
    • Line 531: warning: exported method Manager.Promote should have comment or be unexported (golint)
    • Line 552: warning: exported method Manager.SetupRoles should have comment or be unexported (golint)
    • Line 593: warning: exported method Manager.GetSyncStandbys should have comment or be unexported (golint)
    • Line 599: warning: exported method Manager.GetReplicationSlots should have comment or be unexported (golint)
    • Line 610: warning: exported method Manager.CreateReplicationSlot should have comment or be unexported (golint)
    • Line 616: warning: exported method Manager.DropReplicationSlot should have comment or be unexported (golint)
    • Line 622: warning: exported method Manager.BinaryVersion should have comment or be unexported (golint)
    • Line 634: warning: exported method Manager.PGDataVersion should have comment or be unexported (golint)
    • Line 650: warning: exported method Manager.IsInitialized should have comment or be unexported (golint)
    • Line 728: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 893: warning: exported method Manager.SyncFromFollowedPGRewind should have comment or be unexported (golint)
    • Line 936: warning: exported method Manager.SyncFromFollowed should have comment or be unexported (golint)
    • Line 1003: warning: exported method Manager.RemoveAll should have comment or be unexported (golint)
    • Line 1022: warning: exported method Manager.GetSystemData should have comment or be unexported (golint)
    • Line 1028: warning: exported method Manager.GetTimelinesHistory should have comment or be unexported (golint)
    • Line 1034: warning: exported method Manager.GetConfigFilePGParameters should have comment or be unexported (golint)
    • Line 1040: warning: exported method Manager.Ping should have comment or be unexported (golint)
    • Line 1046: warning: exported method Manager.OlderWalFile should have comment or be unexported (golint)
    • Line 1099: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • stolon/internal/cluster/member.go
    • Line 26: warning: exported type KeepersInfo should have comment or be unexported (golint)
    • Line 28: warning: exported method KeepersInfo.DeepCopy should have comment or be unexported (golint)
    • Line 42: warning: exported type KeeperInfo should have comment or be unexported (golint)
    • Line 59: warning: exported method KeeperInfo.DeepCopy should have comment or be unexported (golint)
    • Line 73: warning: exported type PostgresTimelinesHistory should have comment or be unexported (golint)
    • Line 75: warning: exported type PostgresTimelineHistory should have comment or be unexported (golint)
    • Line 81: warning: exported method PostgresTimelinesHistory.GetTimelineHistory should have comment or be unexported (golint)
    • Line 90: warning: exported type PostgresState should have comment or be unexported (golint)
    • Line 109: warning: exported method PostgresState.DeepCopy should have comment or be unexported (golint)
    • Line 123: warning: exported type SentinelsInfo should have comment or be unexported (golint)
    • Line 129: warning: exported type SentinelInfo should have comment or be unexported (golint)
    • Line 133: warning: exported type ProxyInfo should have comment or be unexported (golint)
    • Line 148: warning: exported type ProxiesInfo should have comment or be unexported (golint)
    • Line 150: warning: exported method ProxiesInfo.DeepCopy should have comment or be unexported (golint)
    • Line 164: warning: exported method ProxiesInfo.ToSlice should have comment or be unexported (golint)
    • Line 172: warning: exported type ProxiesInfoSlice should have comment or be unexported (golint)
    • stolon/internal/cluster/v0/clusterview.go
    • Line 25: warning: exported const CurrentCDFormatVersion should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported type KeepersState should have comment or be unexported (golint)
    • Line 30: warning: exported method KeepersState.SortedKeys should have comment or be unexported (golint)
    • Line 39: warning: exported method KeepersState.Copy should have comment or be unexported (golint)
    • Line 47: warning: exported method KeepersState.NewFromKeeperInfo should have comment or be unexported (golint)
    • Line 64: warning: exported type KeeperState should have comment or be unexported (golint)
    • Line 76: warning: exported method KeeperState.Copy should have comment or be unexported (golint)
    • Line 84: warning: exported method KeeperState.ChangedFromKeeperInfo should have comment or be unexported (golint)
    • Line 98: warning: exported method KeeperState.UpdateFromKeeperInfo should have comment or be unexported (golint)
    • Line 111: warning: exported method KeeperState.SetError should have comment or be unexported (golint)
    • Line 117: warning: exported method KeeperState.CleanError should have comment or be unexported (golint)
    • Line 121: warning: exported type KeepersRole should have comment or be unexported (golint)
    • Line 123: warning: exported function NewKeepersRole should have comment or be unexported (golint)
    • Line 127: warning: exported method KeepersRole.Copy should have comment or be unexported (golint)
    • Line 135: warning: exported method KeepersRole.Add should have comment or be unexported (golint)
    • Line 143: warning: exported type KeeperRole should have comment or be unexported (golint)
    • Line 148: warning: exported method KeeperRole.Copy should have comment or be unexported (golint)
    • Line 156: warning: exported type ProxyConf should have comment or be unexported (golint)
    • Line 161: warning: exported method ProxyConf.Copy should have comment or be unexported (golint)
    • Line 169: warning: exported type ClusterView should have comment or be unexported (golint)
    • Line 199: warning: exported method ClusterView.Copy should have comment or be unexported (golint)
    • Line 211: warning: comment on exported method ClusterView.GetFollowersIDs should be of the form "GetFollowersIDs ..." (golint)
    • Line 223: warning: comment on exported type ClusterData should be of the form "ClusterData ..." (with optional leading article) (golint)
    • stolon/internal/store/store.go
    • Line 30: warning: exported var ErrKeyModified should have comment or be unexported (golint)
    • Line 34: warning: exported type Store should have comment or be unexported (golint)
    • Line 46: warning: exported type Election should have comment or be unexported (golint)
    • stolon/cmd/keeper/cmd/keeper.go
    • Line 54: warning: exported var CmdKeeper should have comment or be unexported (golint)
    • Line 65: warning: exported type KeeperLocalState should have comment or be unexported (golint)
    • Line 70: warning: exported type DBLocalState should have comment or be unexported (golint)
    • Line 81: warning: exported method DBLocalState.DeepCopy should have comment or be unexported (golint)
    • Line 468: warning: exported type PostgresKeeper should have comment or be unexported (golint)
    • Line 507: warning: exported function NewPostgresKeeper should have comment or be unexported (golint)
    • Line 684: warning: exported method PostgresKeeper.GetInSyncStandbys should have comment or be unexported (golint)
    • Line 700: warning: exported method PostgresKeeper.GetPGState should have comment or be unexported (golint)
    • Line 803: warning: exported method PostgresKeeper.Start should have comment or be unexported (golint)
    • Line 1899: warning: exported function Execute should have comment or be unexported (golint)
    • stolon/cmd/sentinel/cmd/sentinel.go
    • Line 55: warning: exported var CmdSentinel should have comment or be unexported (golint)
    • Line 142: warning: exported method Sentinel.SetKeeperError should have comment or be unexported (golint)
    • Line 148: warning: exported method Sentinel.CleanKeeperError should have comment or be unexported (golint)
    • Line 152: warning: exported method Sentinel.SetDBError should have comment or be unexported (golint)
    • Line 158: warning: exported method Sentinel.CleanDBError should have comment or be unexported (golint)
    • Line 162: warning: exported method Sentinel.SetDBNotIncreasingXLogPos should have comment or be unexported (golint)
    • Line 170: warning: exported method Sentinel.CleanDBNotIncreasingXLogPos should have comment or be unexported (golint)
    • Line 1605: warning: exported type ConvergenceState should have comment or be unexported (golint)
    • Line 1608: warning: exported const Converging should have comment (or a comment on this block) or be unexported (golint)
    • Line 1678: warning: exported type KeeperInfoHistory should have comment or be unexported (golint)
    • Line 1684: warning: exported type KeeperInfoHistories should have comment or be unexported (golint)
    • Line 1686: warning: exported method KeeperInfoHistories.DeepCopy should have comment or be unexported (golint)
    • Line 1700: warning: exported type DBConvergenceInfo should have comment or be unexported (golint)
    • Line 1705: warning: exported type ProxyInfoHistory should have comment or be unexported (golint)
    • Line 1710: warning: exported type ProxyInfoHistories should have comment or be unexported (golint)
    • Line 1712: warning: exported method ProxyInfoHistories.DeepCopy should have comment or be unexported (golint)
    • Line 1726: warning: exported type Sentinel should have comment or be unexported (golint)
    • Line 1761: warning: exported function NewSentinel should have comment or be unexported (golint)
    • Line 1806: warning: exported method Sentinel.Start should have comment or be unexported (golint)
    • Line 1962: warning: exported function Execute should have comment or be unexported (golint)
    • stolon/internal/common/common.go
    • Line 30: warning: exported const StorePrefix should have comment (or a comment on this block) or be unexported (golint)
    • Line 35: warning: exported const PgUnixSocketDirectories should have comment or be unexported (golint)
    • Line 37: warning: exported type Role should have comment or be unexported (golint)
    • Line 40: warning: exported const RoleUndefined should have comment (or a comment on this block) or be unexported (golint)
    • Line 52: warning: exported function UID should have comment or be unexported (golint)
    • Line 57: warning: exported function UUID should have comment or be unexported (golint)
    • Line 65: warning: exported function StolonName should have comment or be unexported (golint)
    • Line 69: warning: exported function NameFromStolonName should have comment or be unexported (golint)
    • Line 73: warning: exported function IsStolonName should have comment or be unexported (golint)
    • Line 77: warning: exported type Parameters should have comment or be unexported (golint)
    • Line 79: warning: exported method Parameters.Equals should have comment or be unexported (golint)
    • stolon/internal/postgresql/utils.go
    • Line 34: warning: comment on exported const WalSegSize should be of the form "WalSegSize ..." (golint)
    • Line 39: warning: exported var ValidReplSlotName should have comment or be unexported (golint)
    • Line 203: warning: exported function PGLsnToInt should have comment or be unexported (golint)
    • Line 220: warning: exported function GetSystemData should have comment or be unexported (golint)
    • Line 306: warning: exported function IsValidReplSlotName should have comment or be unexported (golint)
    • Line 362: warning: don't use underscores in Go names; var use_pg_file_settings should be usePgFileSettings (golint)
    • Line 455: warning: exported function ParseBinaryVersion should have comment or be unexported (golint)
    • Line 468: warning: exported function ParseVersion should have comment or be unexported (golint)
    • Line 488: warning: exported function IsWalFileName should have comment or be unexported (golint)
    • Line 507: warning: exported function XlogPosToWalFileNameNoTimeline should have comment or be unexported (golint)
    • Line 515: warning: exported function WalFileNameNoTimeLine should have comment or be unexported (golint)
    • stolon/internal/util/k8s.go
    • Line 25: warning: exported const KubePodName should have comment (or a comment on this block) or be unexported (golint)
    • Line 35: warning: exported function PodName should have comment or be unexported (golint)
    • stolon/cmd/common.go
    • Line 32: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 35: warning: exported type CommonConfig should have comment or be unexported (golint)
    • Line 57: warning: exported function AddCommonFlags should have comment or be unexported (golint)
    • Line 101: warning: exported function CheckCommonConfig should have comment or be unexported (golint)
    • Line 137: warning: exported function IsColorLoggerEnable should have comment or be unexported (golint)
    • Line 140: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 145: warning: exported function NewKVStore should have comment or be unexported (golint)
    • Line 157: warning: exported function NewStore should have comment or be unexported (golint)
    • Line 187: warning: exported function NewElection should have comment or be unexported (golint)
    • stolon/internal/log/log.go
    • Line 59: warning: exported function SetDebug should have comment or be unexported (golint)
    • Line 63: warning: exported function SetLevel should have comment or be unexported (golint)
    • Line 67: warning: exported function IsDebug should have comment or be unexported (golint)
    • Line 71: warning: exported function S should have comment or be unexported (golint)
    • Line 75: warning: exported function StdLog should have comment or be unexported (golint)
    • Line 79: warning: exported function SColor should have comment or be unexported (golint)
    • Line 83: warning: exported function StdLogColor should have comment or be unexported (golint)
    • stolon/internal/store/kvbacked.go
    • Line 40: warning: exported const CONSUL should have comment (or a comment on this block) or be unexported (golint)
    • Line 53: warning: exported const DefaultEtcdEndpoints should have comment (or a comment on this block) or be unexported (golint)
    • Line 58: warning: comment on exported const MinTTL should be of the form "MinTTL ..." (golint)
    • Line 63: warning: exported var URLSchemeRegexp should have comment or be unexported (golint)
    • Line 65: warning: exported type Config should have comment or be unexported (golint)
    • Line 83: warning: exported type WriteOptions should have comment or be unexported (golint)
    • Line 87: warning: exported type KVStore should have comment or be unexported (golint)
    • Line 107: warning: exported function NewKVStore should have comment or be unexported (golint)
    • Line 203: warning: exported type KVBackedStore should have comment or be unexported (golint)
    • Line 208: warning: exported function NewKVBackedStore should have comment or be unexported (golint)
    • Line 215: warning: exported method KVBackedStore.AtomicPutClusterData should have comment or be unexported (golint)
    • Line 233: warning: exported method KVBackedStore.PutClusterData should have comment or be unexported (golint)
    • Line 242: warning: exported method KVBackedStore.GetClusterData should have comment or be unexported (golint)
    • Line 258: warning: exported method KVBackedStore.SetKeeperInfo should have comment or be unexported (golint)
    • Line 269: warning: exported method KVBackedStore.GetKeepersInfo should have comment or be unexported (golint)
    • Line 289: warning: exported method KVBackedStore.SetSentinelInfo should have comment or be unexported (golint)
    • Line 300: warning: exported method KVBackedStore.GetSentinelsInfo should have comment or be unexported (golint)
    • Line 320: warning: exported method KVBackedStore.SetProxyInfo should have comment or be unexported (golint)
    • Line 331: warning: exported method KVBackedStore.GetProxiesInfo should have comment or be unexported (golint)
    • Line 351: warning: exported function NewKVBackedElection should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.

    • stolon/cmd/stolonctl/cmd/register/cluster_test.go
    • Line 23: warning: no required module provides package github.com/sorintlab/stolon/internal/mock/store; to add it: (ineffassign)
    • Line 23: warning: could not import github.com/sorintlab/stolon/internal/mock/store (invalid package name: "") (ineffassign)
    • Line 31: warning: undeclared name: mock_store (ineffassign)
    • Line 45: warning: undeclared name: mock_store (ineffassign)
    • Line 60: warning: undeclared name: mock_store (ineffassign)
    • Line 23: warning: "github.com/sorintlab/stolon/internal/mock/store" imported but not used (ineffassign)
    • stolon/cmd/stolonctl/cmd/register/discovery_test.go
    • Line 23: warning: no required module provides package github.com/sorintlab/stolon/cmd/stolonctl/cmd/internal/mock/register; to add it: (ineffassign)
    • Line 23: warning: could not import github.com/sorintlab/stolon/cmd/stolonctl/cmd/internal/mock/register (invalid package name: "") (ineffassign)
    • Line 24: warning: register redeclared in this block (ineffassign)
    • Line 23: warning: other declaration of register (ineffassign)
    • Line 45: warning: undeclared name: mock_register (ineffassign)
    • Line 46: warning: undeclared name: mock_register (ineffassign)
    • Line 73: warning: undeclared name: mock_register (ineffassign)
    • Line 74: warning: undeclared name: mock_register (ineffassign)
    • Line 91: warning: undeclared name: mock_register (ineffassign)
    • Line 92: warning: undeclared name: mock_register (ineffassign)
    • Line 116: warning: undeclared name: mock_register (ineffassign)
    • Line 117: warning: undeclared name: mock_register (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!