1
0
mirror of https://github.com/mgechev/revive.git synced 2025-01-10 03:17:11 +02:00
revive/fixtures/disable-annotations2.go
SalvadorC 202adf0786 Fix 102 (#103)
Do not require additional newline for disabling multiple rules
2019-01-24 09:14:43 -08:00

25 lines
695 B
Go

package fixtures
func foo1() {
//revive:disable-next-line:var-naming
var invalid_name = 0
var invalid_name2 = 1 //revive:disable-line:var-naming
}
func foo2() {
// revive:disable-next-line:var-naming
//revive:disable
var invalid_name = 0
var invalid_name2 = 1
}
func foo3() {
//revive:enable
// revive:disable-next-line:var-naming
var invalid_name = 0
// not a valid annotation revive:disable-next-line:var-naming
var invalid_name2 = 1 // MATCH /don't use underscores in Go names; var invalid_name2 should be invalidName2/
/* revive:disable-next-line:var-naming */
var invalid_name3 = 0 // MATCH /don't use underscores in Go names; var invalid_name3 should be invalidName3/
}