qax-os / goreporter

A Golang tool that does static analysis, unit testing, code review and generate code quality report.
Apache License 2.0
3.13k stars 273 forks source link

Detect locks passed by value in goreporter #61

Closed fearblackcat closed 6 years ago

fearblackcat commented 6 years ago

It’s not good and the root cause is Percentage method passes lock by value so engine.Summaries is actually called on a copy of the lock. It’s very easy to overlook, especially in bigger programs. It isn’t detected by the compiler since this might be an intention of the programmer. This is where vet steps in… qq20180503-105310 @wgliang So I will pull request if you concur to fix this problem.

wgliang commented 6 years ago

Thank you so much for helping solve this problem.

wgliang commented 6 years ago

Come on!!!