Re: [go-nuts] Tool showing all assignemnts to the blank identifier

2022-11-29 Thread Wojciech Muła
On Tuesday, November 29, 2022 at 9:07:25 AM UTC+1 Marcel Huijkman wrote:

> golangci-lint has :
> dogsled:
> # checks assignments with too many blank identifiers; default is 2
> max-blank-identifiers: 0
>

Great, thank you.

w. 

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/fbd557ff-226b-49e2-b32c-38db7d3473aen%40googlegroups.com.


Re: [go-nuts] Tool showing all assignemnts to the blank identifier

2022-11-29 Thread Wojciech Muła


On Monday, November 28, 2022 at 1:50:21 PM UTC+1 Jan Mercl wrote:

> On Mon, Nov 28, 2022 at 1:44 PM Wojciech Muła  wrote: 
>
> > Is there any tool that would point out places with 
> > an assignment to the blank identifier? 
> > 
> > I'd like to spot possible refactoring/debug leftovers, 
> > like `_ := func() {}` or unused imports. 
> > 
> > I went through the staticcheck list of checks, but 
> > didn't find anything similar. 
>
> $ grep -n '\b_\b :\?= ' *.go 
>

Thanks, but this will catch also things like `foo, _ := bar`, which are 
perfectly fine.

w.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/0fd84c98-3d0b-4b69-9995-fa89f44b6cdbn%40googlegroups.com.


Re: [go-nuts] Tool showing all assignemnts to the blank identifier

2022-11-29 Thread Marcel Huijkman
golangci-lint has :
dogsled:
# checks assignments with too many blank identifiers; default is 2
max-blank-identifiers: 0

On Monday, November 28, 2022 at 1:50:21 PM UTC+1 Jan Mercl wrote:

> On Mon, Nov 28, 2022 at 1:44 PM Wojciech Muła  wrote:
>
> > Is there any tool that would point out places with
> > an assignment to the blank identifier?
> >
> > I'd like to spot possible refactoring/debug leftovers,
> > like `_ := func() {}` or unused imports.
> >
> > I went through the staticcheck list of checks, but
> > didn't find anything similar.
>
> $ grep -n '\b_\b :\?= ' *.go
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/a52cf7be-7e10-4024-a24a-ad2969fce086n%40googlegroups.com.


Re: [go-nuts] Tool showing all assignemnts to the blank identifier

2022-11-28 Thread Jan Mercl
On Mon, Nov 28, 2022 at 1:44 PM Wojciech Muła  wrote:

> Is there any tool that would point out places with
> an assignment to the blank identifier?
>
> I'd like to spot possible refactoring/debug leftovers,
> like `_ := func() {}` or unused imports.
>
> I went through the staticcheck list of checks, but
> didn't find anything similar.

$ grep -n '\b_\b :\?= ' *.go

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAA40n-UB%3DWBsK4FJWDDyaZd1q8Ew7iTC%2ByUFwbGXMROOL_0_dg%40mail.gmail.com.


[go-nuts] Tool showing all assignemnts to the blank identifier

2022-11-28 Thread Wojciech Muła
Hi!

Is there any tool that would point out places with
an assignment to the blank identifier?

I'd like to spot possible refactoring/debug leftovers,
like `_ := func() {}` or unused imports.

I went through the staticcheck list of checks, but
didn't find anything similar.

cheers
Wojciech

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/f82cdf4a-2032-483f-a125-bddc4f5a2e52n%40googlegroups.com.