github.com/songshiyun/revive@v1.1.5-0.20220323112655-f8433a19b3c5/testdata/modifies-param.go (about) 1 package fixtures 2 3 func one(a int) { 4 a, b := 1, 2 // MATCH /parameter 'a' seems to be modified/ 5 a++ // MATCH /parameter 'a' seems to be modified/ 6 } 7 8 func two(b, c float32) { 9 if c > 0.0 { 10 b = 1 // MATCH /parameter 'b' seems to be modified/ 11 } 12 } 13 14 type foo struct { 15 a string 16 } 17 18 func three(s *foo) { 19 s.a = "foooooo" 20 } 21 22 // non regression test for issue 355 23 func issue355(_ *foo) { 24 _ = "foooooo" 25 }