aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linters/nosleep/nosleep.go4
-rw-r--r--linters/nosleep/testdata/sleep_test.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/linters/nosleep/nosleep.go b/linters/nosleep/nosleep.go
index f5f0728..58b55d1 100644
--- a/linters/nosleep/nosleep.go
+++ b/linters/nosleep/nosleep.go
@@ -6,7 +6,7 @@
//
// If god is dead and you need to do this anyways, add a comment that reads:
//
-// // nosleep bypass(yournick): put a reason why here
+// //nosleep:bypass put a reason why here
package nosleep
import (
@@ -25,7 +25,7 @@ var Analyzer = &analysis.Analyzer{
Run: run,
}
-var bypassRegex = regexp.MustCompile(`^// nosleep bypass\((\w+)\): ([\w \.\!\,]+)`)
+var bypassRegex = regexp.MustCompile(`^//nosleep:bypass ([\w \.\!\,]+)`)
// nodeFuncName converts an ast.CallExpr into the human-readable name of
// the function and name.
diff --git a/linters/nosleep/testdata/sleep_test.go b/linters/nosleep/testdata/sleep_test.go
index 0d47045..d334d4e 100644
--- a/linters/nosleep/testdata/sleep_test.go
+++ b/linters/nosleep/testdata/sleep_test.go
@@ -10,5 +10,5 @@ func TestNosleep(t *testing.T) {
}
func TestNosleepIgnore(t *testing.T) {
- time.Sleep(time.Second) // nosleep bypass(Mai): This test requires us to use a sleep statement here. I hate it too.
+ time.Sleep(time.Second) //nosleep:bypass This test requires us to use a sleep statement here. I hate it too.
}