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

For loops that never loop - confusing code #18

Closed
TomMD opened this issue Oct 15, 2020 · 3 comments · Fixed by #21
Closed

For loops that never loop - confusing code #18

TomMD opened this issue Oct 15, 2020 · 3 comments · Fixed by #21
Assignees
Labels
bug Something isn't working

Comments

@TomMD
Copy link

TomMD commented Oct 15, 2020

I'm looking here:

return nil

And while playing with staticcheck (a go Analyzer) I see this and another loop are ... non loops. Is there an idiom here I'm missing that makes this style sensible?

@andresvia
Copy link
Contributor

Thanks.

ECSAPI.DescribeContainerInstances accepts an array of container instance IDs and returns another array of container instances descriptions, this call is passing an array with just one element.

output, err := ECSAPI.DescribeContainerInstances(&ecs.DescribeContainerInstancesInput{

ContainerInstances: []*string{aws.String(containerInstanceID)},

The response from AWS should also contain 1 element.

This can be more explicit.

I've added #19 too.

@andresvia andresvia added bug Something isn't working and removed investigating labels Oct 18, 2020
andresvia added a commit that referenced this issue Oct 18, 2020
@andresvia andresvia mentioned this issue Oct 18, 2020
andresvia added a commit that referenced this issue Oct 19, 2020
@andresvia
Copy link
Contributor

I got muse.dev installed by the org admin and run against a new branch I created:

#21

https://console.muse.dev/result/Autodesk/go-awsecs/01EN1N912T0JXKZMXN0M1D3VG5?tab=results

The reported issues are now cleared.

I'm adding staticcheck to the regular checks in CONTRIBUTING.md as well as to Travis, and I guess muse.dev will now run the checks all the time? Which is good, is there any kind of un-protected badge that I can show in the README.MD?

@TomMD
Copy link
Author

TomMD commented Oct 20, 2020

I'm adding staticcheck to the regular checks in CONTRIBUTING.md as well as to Travis, and I guess muse.dev will now run the checks all the time?

Yes, Muse.dev will run on the checks all the time (on PRs) for every repo on which it's installed. The status bar links to the console which has all the historic bugs, but the main interface is the PR. In the PR you are getting comments on new bugs thought to be introduced (or at least exposed) by the current PR.

Which is good, is there any kind of un-protected badge that I can show in the README.MD?

Thank you for asking. We don't have a badge at this time but have recorded the feature request. Reach out any time if you have thoughts on analyzers, interface, or anything doesn't seem right.

@TomMD TomMD closed this as completed Oct 20, 2020
andresvia added a commit that referenced this issue Oct 22, 2020
* Unmangling. Working on #18 and #19
* More unmangling. More working on #16 and #18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants