Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: pass []any as any in variadic function #5

Closed
alingse opened this issue Jul 11, 2022 · 7 comments
Closed

Bug: pass []any as any in variadic function #5

alingse opened this issue Jul 11, 2022 · 7 comments

Comments

@alingse
Copy link

alingse commented Jul 11, 2022

i am writing a linter to lint that pass []any as any in variadic function

and run github Actions for some top go packages, this package failed

see github actions lint result here https://github.com/alingse/asasalint/runs/7284512845?check_suite_focus=true

Error: /home/runner/work/asasalint/asasalint/dynaQ/dq.go:99:60: pass []any as any to func Query func(dBase *database/sql.DB, query string, timeFormat string, queryParams ...interface{}) ([][]github.com/syke99/dynaQ/pkg/resources/models.QueryValue, error)
Error: /home/runner/work/asasalint/asasalint/dynaQ/dq.go:115:63: pass []any as any to func QueryRow func(dBase *database/sql.DB, query string, timeFormat string, queryParams ...interface{}) ([]github.com/syke99/dynaQ/pkg/resources/models.QueryValue, error)
Error: /home/runner/work/asasalint/asasalint/dynaQ/dq.go:132:[7](https://github.com/alingse/asasalint/runs/7284512845?check_suite_focus=true#step:7:8)6: pass []any as any to func QueryWithContext func(dBase *database/sql.DB, ctx context.Context, query string, timeFormat string, queryParams ...interface{}) ([][]github.com/syke99/dynaQ/pkg/resources/models.QueryValue, error)
@syke99
Copy link
Owner

syke99 commented Jul 11, 2022

Hey, thanks for testing out dynaQ!! I think I know what the issue is and I'll work on it ASAP!! If you would like to fix this issue and to submit a PR, please fork this repo and then create a PR whenever it's complete, and if accepted, I'll merge it in!! (Also, this reminds me I need to set up a code of conduct for contributing, so thanks for that reminder as well!!)

@syke99
Copy link
Owner

syke99 commented Jul 11, 2022

Hey @alingse, I already went ahead and tried to fix this issue. Would you might testing the branch issue5 to test my fix?

@alingse
Copy link
Author

alingse commented Jul 11, 2022

sorry, my github action work on the default branch 😂 it's not configurable.

you can try install the linter on local with go install github.com/alingse/asasalint/cmd/asasalint@latest

i am working on add the linter into golangci-lint, maybe that will be easy to check.

@syke99
Copy link
Owner

syke99 commented Jul 11, 2022

Haha okay, no worries!! Thanks for letting me know. I'll give it a shot (and thanks for the linter tool!! Seems like a really cool idea 😜)

@syke99
Copy link
Owner

syke99 commented Jul 11, 2022

I gave it a shot and didn't get any messages back. I assume this means it passed? @alingse

@alingse
Copy link
Author

alingse commented Jul 11, 2022

yes, no message is means that passed. 🌮

@alingse alingse closed this as completed Jul 11, 2022
@syke99
Copy link
Owner

syke99 commented Jul 11, 2022

Perfect, thanks!! I'll get it merged in. And thanks again for checking out dynaQ!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants