Travis: Check for gofmt issues.#241
Conversation
This will help catch issues like #240 (comment) in CI.
|
Nice, love it! I'm happy to make it more strict. Want to do that, and also make the minor changes in the codebase to make it pass? :D |
Glad to hear that.
Sure, I'll expand the scope of the PR to include that as well. |
|
The reason CI fails is because some of the vendored dependencies are not compatible with I've discussed the options for a resolution with @shazow, which are:
He told me he prefers option 3, and it's consistent with some of the CI checks already skipping /vendor/. I've never had to skip
I don't want to spend time writing that custom loop logic in bash, so the best long term solution I think is to create a small custom Go command that performs the needed logic (skipping vendor directories). (Or find an existing command that does what's needed, if that's faster/easier.) But, I don't have a budget to work on that for this PR, so that leaves me with these 2 options:
@shazow How would you like to proceed? |
|
@shurcooL Wow thanks for all your effort writing up the situation. Let's just move forward with plain |
|
SGTM, I'll do that. |
|
Updated, tests are passing, PTAL. |
|
Excellent, huge thanks @shurcooL! 🍮 |
This will help catch issues like #240 (comment) in CI.
If you want to be even more strict and require all Go code to be simplified, then you can add
-soption to gofmt, like I've done here. Since it's not my repository, I went with the more permissive option by default.