mirror of
https://github.com/mgechev/revive.git
synced 2024-11-24 08:32:22 +02:00
26 lines
408 B
Go
26 lines
408 B
Go
package fixtures
|
|
|
|
func one(a int) {
|
|
a, b := 1, 2 // MATCH /parameter 'a' seems to be modified/
|
|
a++ // MATCH /parameter 'a' seems to be modified/
|
|
}
|
|
|
|
func two(b, c float32) {
|
|
if c > 0.0 {
|
|
b = 1 // MATCH /parameter 'b' seems to be modified/
|
|
}
|
|
}
|
|
|
|
type foo struct {
|
|
a string
|
|
}
|
|
|
|
func three(s *foo) {
|
|
s.a = "foooooo"
|
|
}
|
|
|
|
// non regression test for issue 355
|
|
func issue355(_ *foo) {
|
|
_ = "foooooo"
|
|
}
|