go-tools icon indicating copy to clipboard operation
go-tools copied to clipboard

analysis/facts: fix `fact_deprecated` analyzer

Open shmsr opened this issue 3 years ago • 2 comments

fact_deprecated analyzer is now able to correctly detect all the deprecated const and type. I have also updated SA1019's testdata in order to show the effect on SA1019 after fixing the fact_deprecated.

Fixes https://github.com/dominikh/go-tools/issues/1313

Signed-off-by: subham sarkar [email protected]

shmsr avatar Aug 19 '22 19:08 shmsr

cc: @dominikh

shmsr avatar Aug 19 '22 19:08 shmsr

Thanks. I'll look at this eventually, but am a bit busy at the moment.

dominikh avatar Sep 02 '22 08:09 dominikh

@dominikh ping

shmsr avatar Oct 12 '22 11:10 shmsr

Also, found a couple of more bugs with this code. Should I push them to this PR itself?

shmsr avatar Oct 12 '22 11:10 shmsr

Also, found a couple of more bugs with this code. Should I push them to this PR itself?

Yes please.

dominikh avatar Oct 12 '22 19:10 dominikh

Also, found a couple of more bugs with this code. Should I push them to this PR itself?

Yes please.

@dominikh Give it a look. I've fixed one more issue with the fact_deprecated analyzer.

shmsr avatar Dec 06 '22 10:12 shmsr

Also, found a couple of more bugs with this code. Should I push them to this PR itself?

Yes please.

@dominikh Give it a look. I've fixed one more issue with the fact_deprecated analyzer.

ping @dominikh

shmsr avatar Dec 16 '22 05:12 shmsr

It's on my radar. I'll look into it eventually. Sorry about the delay.

dominikh avatar Dec 16 '22 16:12 dominikh

Thanks. I've cherry-picked 2dee2d955f0cdf4cf4da62a12b5008df3c267a7c. I didn't apply a31684beb6154ac223653a53a5ded77e4d06a5f9 because "inline comments" aren't the correct way to mark identifiers as deprecated. https://github.com/golang/go/wiki/Deprecated explicitly states that it should be a paragraph in the documentation comment.

dominikh avatar Jan 19 '23 11:01 dominikh

Thanks. I've cherry-picked 2dee2d9. I didn't apply a31684b because "inline comments" aren't the correct way to mark identifiers as deprecated. https://github.com/golang/go/wiki/Deprecated explicitly states that it should be a paragraph in the documentation comment.

Thanks @dominikh!

shmsr avatar Jan 19 '23 18:01 shmsr