--- /dev/null
+#!/bin/bash
+
+# fixes this error:
+# ERRO Running error: context loading failed: failed to load packages: timed out to load packages: context deadline exceeded
+# golangci-lint run ./...
+# ERRO Timeout exceeded: try increasing it by passing --timeout option
+# make: *** [Makefile.common:173: common-lint] Error 4
+
+# the hidden message is: for most people, taking this long would be an
+# error, but if you are on a really slow computer, we have a flag you
+# can add
+
+GOLANGCI_LINT_OPTS=--timeout=5m
+
+
+make
for _, expression := range httpConfig.FailIfBodyMatchesRegexp {
if expression.Regexp.Match(body) {
level.Error(logger).Log("msg", "Body matched regular expression", "regexp", expression)
+ level.Debug(logger).Log("msg", "Received html body", "body", body)
return false
}
}
for _, expression := range httpConfig.FailIfBodyNotMatchesRegexp {
if !expression.Regexp.Match(body) {
level.Error(logger).Log("msg", "Body did not match regular expression", "regexp", expression)
+ level.Debug(logger).Log("msg", "Received html body", "body", body)
return false
}
}