-
Notifications
You must be signed in to change notification settings - Fork 108
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
Add staticcheck to actions #96
Conversation
This will move regex out of the loop
0cee179
to
a4b17cc
Compare
a4b17cc
to
42200c1
Compare
Hi @Ullaakut :) |
interfaceRegex := regexp.MustCompile(`\*INTERFACES\*`) | ||
routesRegex := regexp.MustCompile(`\*ROUTES\*`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually regexp.MustCompile
statements are kept outside of the function body, in var
declarations at the top of the files they are used in. WDYT?
See discussion about it in the noglobals linter if you're curious
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will change this. @ChnMig mentioned it but I was not sure if we really need this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @elivlo ! Thanks for your contribution :))) Appreciated as always! I think we could add further linters as well in the future, I'm up for discussing it with you if you're interested
This pull request will apply some changes to actions. It will add staticcheck to check the code for some optimization.
Suggestion from: #95