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

.golangci.yml dec-order controverses cq-gen generation order #266

Closed
amanenk opened this issue Jul 21, 2022 · 2 comments
Closed

.golangci.yml dec-order controverses cq-gen generation order #266

amanenk opened this issue Jul 21, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@amanenk
Copy link
Contributor

amanenk commented Jul 21, 2022

Describe the bug

cq-gen generates user defined funcitons and types under User Defined Helpers at the end of the file.
dec-order in linter configuration required types to be above functions

Expected Behavior

cq-gen should generate code acording to dec-order bloc or dec-order should be disabled.

Steps to Reproduce

generate file with user type and funtion and run golangci-lint

Possible Solution

No response

Provider and CloudQuery version

Additional Context

No response

@amanenk amanenk added the bug Something isn't working label Jul 21, 2022
@hermanschaaf
Copy link
Member

My workaround to this has been to declare types inside the functions that need them. This won't work for everything, but it might work in many cases.

@erezrokah
Copy link
Member

I think we can close this due to cloudquery/cloudquery#1184.
We can discuss in the future if we want to spend time on ensuring cq-gen and all of our linting rules are aligned.
Please re-open if I got this wrong

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

No branches or pull requests

4 participants