Skip to content

Generated files with copyright notices should be skipped, too #52

Description

@AlekSi

go-consistent/main.go

Lines 192 to 193 in c48b49e

isGenerated := len(f.Comments) != 0 &&
generatedFileCommentRE.MatchString(f.Comments[0].Text())

I think that logic does not properly ignore files with copyright notices like:

// Copyright 2026 Google LLC
//
// Licensed under bla-bla-bla.

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.11
// 	protoc        (unknown)
// source: google/type/decimal.proto

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