Generated code should not be treated as vialoation in the best practices but shoud still be able to be validated with the Layers.
Ex:
I have a project that uses Protocol Buffers–generated data types. I want to ensure that my service depends correctly on the API layer, while preventing the API types from being used inside the internal or utility parts of the project.
Introducing a dedicated abstraction layer around the generated API types seems like the right approach. This would allow me to clearly separate concerns and enforce proper dependency boundaries.
Since the Protocol Buffers code is generated, I do not need to enforce best practices within that generated code itself, as it is outside of my control.
Therefore i propose to exclude these file endings from the best practices
*.pb.go -> protocol buffer
*.gen.go -> other generated files by convention
Generated code should not be treated as vialoation in the best practices but shoud still be able to be validated with the Layers.
Ex:
I have a project that uses Protocol Buffers–generated data types. I want to ensure that my service depends correctly on the API layer, while preventing the API types from being used inside the internal or utility parts of the project.
Introducing a dedicated abstraction layer around the generated API types seems like the right approach. This would allow me to clearly separate concerns and enforce proper dependency boundaries.
Since the Protocol Buffers code is generated, I do not need to enforce best practices within that generated code itself, as it is outside of my control.
Therefore i propose to exclude these file endings from the best practices
*.pb.go -> protocol buffer
*.gen.go -> other generated files by convention