Showing 5 of 5 total issues
Function populate
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func populate(conn deviceGetter, window time.Duration, windowLimit int, shuffler shuffle.Interface, stop chan struct{}, wg *sync.WaitGroup, measures *Measures) {
Method Confidence.codexOnline
has 6 return statements (exceeds 4 allowed). Open
Open
func (confidence *Confidence) codexOnline(device string) bool {
request, err := http.NewRequest("GET", confidence.codexAddress+"/api/v1/device/"+device+"/status", nil)
if err != nil {
logging.Error(confidence.logger).Log(logging.ErrorKey(), err, logging.MessageKey(), "failed to create request")
return false
Function setup
has 6 return statements (exceeds 4 allowed). Open
Open
func setup(arguments []string) (*server.WebPA, *cassandra.Connection, *Confidence, *StatusConfig, xmetrics.Registry, log.Logger, *int) {
var (
s *int
f, v = pflag.NewFlagSet(applicationName, pflag.ContinueOnError), viper.New()
l, mr, codex, err = server.Initialize(applicationName, arguments, f, v, cassandra.Metrics, Metrics, shuffle.Metrics)
Method Confidence.xmidtOnline
has 5 return statements (exceeds 4 allowed). Open
Open
func (confidence *Confidence) xmidtOnline(device string) bool {
request, err := http.NewRequest("GET", confidence.xmidtAddress+"/api/v2/device/"+device+"/stat", nil)
if err != nil {
logging.Error(confidence.logger).Log(logging.ErrorKey(), err, logging.MessageKey(), "failed to create request")
return false
Method Confidence.doRequest
has 5 return statements (exceeds 4 allowed). Open
Open
func (confidence *Confidence) doRequest(request *http.Request) (int, []byte, error) {
retryOptions := xhttp.RetryOptions{
Logger: confidence.logger,
Retries: 3,