Skip to content

Possible bad copy paste #114

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

Closed
Bbulatov opened this issue Feb 27, 2025 · 1 comment · Fixed by #117
Closed

Possible bad copy paste #114

Bbulatov opened this issue Feb 27, 2025 · 1 comment · Fixed by #117

Comments

@Bbulatov
Copy link

Bbulatov commented Feb 27, 2025

Hello!
During the static analysis was found possible mistakes in code:

  1. In mixin.go:393-395 after checking value Title is using value Description. Might be there should be primary.Title=m.Title?

Image

  1. In internal/flatten/replace/replace.go:219-222 after using value erp for errors in internal/flatten/replace/replace.go:221 is using value err. Might be there should be return erp?

Image

@fredbi
Copy link
Member

fredbi commented Mar 11, 2025

@Bbulatov hello. Indeed a good catch. I'll fix that today. There are a few other similar ones o be addressed as well.

fredbi added a commit to fredbi/analysis that referenced this issue Mar 11, 2025
* addressed linting issues, especially those related to non-wrapping
  errors: refactored all calls to fmt.Errorf()
* fixes go-openapi#114: unfortunate copy paste typo in mixin.go

Signed-off-by: Frederic BIDON <[email protected]>
@fredbi fredbi mentioned this issue Mar 11, 2025
fredbi added a commit to fredbi/analysis that referenced this issue Mar 11, 2025
* addressed linting issues, especially those related to non-wrapping
  errors: refactored all calls to fmt.Errorf()
* fixes go-openapi#114: unfortunate copy paste typo in mixin.go

Signed-off-by: Frederic BIDON <[email protected]>
fredbi added a commit to fredbi/analysis that referenced this issue Mar 11, 2025
* addressed linting issues, especially those related to non-wrapping
  errors: refactored all calls to fmt.Errorf()
* fixes go-openapi#114: unfortunate copy paste typo in mixin.go

* test: worked around go issue on windows: golang/go#71544

Signed-off-by: Frederic BIDON <[email protected]>
@fredbi fredbi closed this as completed in dc87465 Mar 11, 2025
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

Successfully merging a pull request may close this issue.

2 participants