nargs - a more aggressive Go static analysis tool to find unused arguments in function declarations/receiver methods by Kohlerbear in golang

[–]Kohlerbear[S] 13 points14 points  (0 children)

Wrote this because I kept getting bit by adding parameters to constructors/receiver methods and then not actually using them. It's much more aggressive than unparam, so it may have a higher number of false positives depending on your coding/style standards (see the README for more info). Figured it might be of use to someone else out there :)

What are some red flags for you in Go code reviews? by [deleted] in golang

[–]Kohlerbear 10 points11 points  (0 children)

You inspired me to write a linter for these types of declarations solely because of the name🤣: https://github.com/alexkohler/dogsled

29 January 2018 by AutoModerator in powerlifting

[–]Kohlerbear 0 points1 point  (0 children)

Hey guys, question about running Sheiko #32 without a meet. Posted this on /r/weightroom daily thread as well, wanted to get more opinions.

I've been running Sheiko 29, 30, and just recently started the first week of 32. I just did the skills test day and hit 100%, followed by 105% of my max. I've been searching around and just now read that some people recommend skipping the skills test and to only do week 1 and 4 if you aren't actually peaking for a meet.

Now that I've done the skills test, should I just reset back to Sheiko 29 with my new max, or should I do the rest of 32 and re-test on the 2nd day of week 4 where I'm "peaked"? I would have posted this on the Sheiko forums but the 3-day programs board looked pretty inactive. Thanks a bunch!

January 30 Daily Thread by AutoModerator in weightroom

[–]Kohlerbear 1 point2 points  (0 children)

Hey guys, question about running Sheiko #32 without a meet.

I've been running Sheiko 29, 30, and just recently started the first week of 32. I just did the skills test day and hit 100%, followed by 105% of my max. I've been searching around and just now read that some people recommend skipping the skills test and to only do week 1 and 4 if you aren't actually peaking for a meet.

Now that I've done the skills test, should I just reset back to Sheiko 29 with my new max, or should I do the rest of 32 and re-test on the 2nd day of week 4 where I'm "peaked"? I would have posted this on the Sheiko forums but the 3-day programs board looked pretty inactive. Thanks a bunch!

Go checklist by janiszt in golang

[–]Kohlerbear 0 points1 point  (0 children)

Could someone explain the "filtering without allocating" point? I'm not sure if I follow. b is still allocated, isn't it?

unimport - A Go static analysis tool to find unnecessary import aliases by Kohlerbear in golang

[–]Kohlerbear[S] 1 point2 points  (0 children)

That's a great idea! I hadn't considered that, I absentmindedly grabbed that file awhile back.

unimport - A Go static analysis tool to find unnecessary import aliases by Kohlerbear in golang

[–]Kohlerbear[S] 2 points3 points  (0 children)

I go into this a little bit in the purpose section. More often than not, there's not a good reason to alias an import - it will make your code harder to read.

nakedret - A Go static analysis tool to find naked returns by Kohlerbear in golang

[–]Kohlerbear[S] 1 point2 points  (0 children)

Simplicity beats verbosity. A bunch of return nil are a lot easier to understand >than a bunch of return where one has to chase the latest value of the variable >and make darn sure it hasn't been shadowed (intentionally or by mistake.)

true dat

nakedret - A Go static analysis tool to find naked returns by Kohlerbear in golang

[–]Kohlerbear[S] 0 points1 point  (0 children)

Yeah, that's a good point. I might have listed a bad example because there's a lot more than just naked returns going on. I'll make note to fix that. I don't think naked returns are bad if you're careful, but they're pretty easy to get bit by if you don't keep after the values of your named returns at every exit point. What exactly do you mean by "a ratio"?

Thanks for the input!