uartois / sonar-golang

Sonarqube plugin for the golang language.
GNU Lesser General Public License v3.0
245 stars 32 forks source link

Shadowed variables support #32

Closed Cosby86 closed 6 years ago

Cosby86 commented 6 years ago

hello all, May I ask you to include the support of shadowed variables errors?

GoMetaLinter found this error:

<error column="0" line="165" message="declaration of "configuration" shadows declaration at line.go:142" severity="warning" source="vetshadow"/>

IMHO, this is a very critical issue in the code.

genez commented 6 years ago

I'm interested in this rule aswell

thibaultfalque commented 6 years ago

Hi,

I will add this rules.

Cosby86 commented 6 years ago

Thank you very much. Are you planning to add it into the next release?

thibaultfalque commented 6 years ago

Please test: https://github.com/uartois/sonar-golang/releases/tag/v1.2.11-rc3

Cosby86 commented 6 years ago

I'll do it very soon. Thank you

Cosby86 commented 6 years ago

Hi thibaultfalque, I tested the RC3 but it seems doesn't work. In the report I have vetshadow entries but in the Sonar are not reported. Attached the gometalinter report.

report.zip

thibaultfalque commented 6 years ago

Can I have the log please ?

Cosby86 commented 6 years ago

attached. thx sonar-output.zip

thibaultfalque commented 6 years ago

please test https://github.com/uartois/sonar-golang/tree/v1.2.11-rc4. The problem was the regex.

Cosby86 commented 6 years ago

It works good. Many thanks