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

Is there any way to exclude a specific file or specific parts of a file? #157

Open
CyborgMaster opened this issue Nov 20, 2024 · 0 comments

Comments

@CyborgMaster
Copy link

We have a file that is improperly reformed by golines. Specifically it changes this struct tag:

string typeGen `codegen:"name=String,type=string,zero=\"\",noError=true"`

into this one:

string typeGen `codegen:"name=String,type=string,zero="",noError=true"`

Which is flagged by govet with "struct field tag codegen:"name=String,type=string,zero="",noError=true" not compatible with reflect.StructTag.Get: key:"value" pairs not separated by spaces (govet)"

I would like to be able to instruct golines to ignore this file, like we have with the --ignored-dirs option, or to ignore this part of the file with some bounding comments.

Of course it would be great to fix the invalid struct tag reformatting, but I'm confident that there will be other parts of our codebase we would like to surgically ignore, at a finer grained level than directories, so having an option to do that would be useful.

@CyborgMaster CyborgMaster changed the title Is there any way to exclude a specific file or specific parts of a file. Is there any way to exclude a specific file or specific parts of a file? Nov 20, 2024
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

No branches or pull requests

1 participant