Skip to content

Feature: Exclude generated code from BestPractice #44

@SvenGasterstaedt

Description

@SvenGasterstaedt

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions