Skip to content

Disable the linter in the generated code #73

@alexgarzao

Description

@alexgarzao

In some cases, the linter generates numerous warnings when scanning the generated code.

Below is an example:

if !(obj.boolField == true) { 

In this task, the idea is to add a linter directive to ignore the generated code:

//lint:ignore S1002 intentional explicit comparison
if !(obj.boolField == true) { 

Another possibility is to add a directive that forces the linter to ignore all the files generated by ValidGen.

// Code generated by ValidGen. DO NOT EDIT.

//nolint:unparam
package main
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions