From 586c834cb950866dec806482b027ed707702cce9 Mon Sep 17 00:00:00 2001 From: Max Claus Nunes Date: Thu, 12 Jul 2018 10:35:44 -0300 Subject: [PATCH] Apply improvements suggested by the linter --- Makefile | 1 + gaper.go | 3 ++- watcher.go | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3c20b78..bfabecb 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,7 @@ lint: --deadline=120s \ --line-length=120 \ --enable-all \ + --disable=gochecknoinits --disable=gochecknoglobals \ --vendor ./... test: diff --git a/gaper.go b/gaper.go index 4bffaf3..e9319d4 100644 --- a/gaper.go +++ b/gaper.go @@ -71,7 +71,8 @@ func Run(cfg *Config, chOSSiginal chan os.Signal) error { return run(cfg, chOSSiginal, builder, runner, watcher) } -func run(cfg *Config, chOSSiginal chan os.Signal, builder Builder, runner Runner, watcher Watcher) error { // nolint: gocyclo +// nolint: gocyclo +func run(cfg *Config, chOSSiginal chan os.Signal, builder Builder, runner Runner, watcher Watcher) error { if err := builder.Build(); err != nil { return fmt.Errorf("build error: %v", err) } diff --git a/watcher.go b/watcher.go index 23bd9f9..07bff43 100644 --- a/watcher.go +++ b/watcher.go @@ -89,7 +89,7 @@ func (w *watcher) Watch() { } // Events get events occurred during the watching -// these events are emited only a file changing is detected +// these events are emitted only a file changing is detected func (w *watcher) Events() chan string { return w.events }