Chore: Implement revive (#16200)
Since we do not like some of the default golint rules, this commit proposes to use https://github.com/mgechev/revive. And potential revive speed-up should't hurt :). Right now, presented config (./conf/revive.toml) is permissive, we might improve it over time however. Fixes for found revive issues in the code are very limited so it wouldn't be large to review. Also in this commit: * Add annotations for makefile commands and declare phony targets * Rename "gometalinter" script and CI command to "lint" since we are doing there a bit more then using gometalinter package * Add Makefile rules to .editorconfig * Documentation which mentioned "golint" replaced with revive Fixes #16109 Ref #16160
This commit is contained in:
@@ -34,9 +34,9 @@ func runDbCommand(command func(commandLine CommandLine) error) func(context *cli
|
||||
|
||||
cmd.ShowHelp()
|
||||
os.Exit(1)
|
||||
} else {
|
||||
logger.Info("\n\n")
|
||||
}
|
||||
|
||||
logger.Info("\n\n")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,9 +50,9 @@ func runPluginCommand(command func(commandLine CommandLine) error) func(context
|
||||
|
||||
cmd.ShowHelp()
|
||||
os.Exit(1)
|
||||
} else {
|
||||
logger.Info("\nRestart grafana after installing plugins . <service grafana-server restart>\n\n")
|
||||
}
|
||||
|
||||
logger.Info("\nRestart grafana after installing plugins . <service grafana-server restart>\n\n")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,12 +11,13 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Package graphite provides a bridge to push Prometheus metrics to a Graphite
|
||||
// Package graphitebridge provides a bridge to push Prometheus metrics to a Graphite
|
||||
// server.
|
||||
package graphitebridge
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
@@ -26,14 +27,10 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"context"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
dto "github.com/prometheus/client_model/go"
|
||||
"github.com/prometheus/common/expfmt"
|
||||
"github.com/prometheus/common/model"
|
||||
|
||||
dto "github.com/prometheus/client_model/go"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
Reference in New Issue
Block a user