diff --git a/src/signals/path-matchers.ts b/src/signals/path-matchers.ts index e03567221e..3f5a2e69f8 100644 --- a/src/signals/path-matchers.ts +++ b/src/signals/path-matchers.ts @@ -51,9 +51,10 @@ function isGeneratedFileFrom(parts: NormalizedPath): boolean { /(^|\/)(__generated__|generated)\//.test(norm) || /\.(generated|gen)\.[^/]+$/.test(norm) || // protoc output: Go/TS/JS plugins emit `.pb.{go,ts,js}`, the reference C++ plugin emits - // `.pb.cc` / `.pb.h`, the Swift plugin emits `.pb.swift`, and the Dart plugin emits - // `.pb.dart` (the `.pb` infix keeps hand-written `.dart`/`.kt` from matching). - /\.pb\.(go|ts|js|cc|h|swift|dart|kt)$/.test(norm) || + // `.pb.cc` / `.pb.h`, the Swift plugin emits `.pb.swift`, the Dart plugin emits `.pb.dart`, + // the Kotlin plugin emits `.pb.kt`, and the C# plugin emits `.pb.cs`. + // `.pb.dart`/`.pb.kt`/`.pb.cs` (the `.pb` infix keeps hand-written sources from matching). + /\.pb\.(go|ts|js|cc|h|swift|dart|kt|cs)$/.test(norm) || // Python protobuf: message stubs are `*_pb2.py[i]`; the gRPC plugin emits sibling // `*_pb2_grpc.py[i]` service stubs, which are the same machine-generated output. /_pb2(_grpc)?\.pyi?$/.test(norm) || diff --git a/test/unit/path-matchers.test.ts b/test/unit/path-matchers.test.ts index cac5f2dd79..f363acd404 100644 --- a/test/unit/path-matchers.test.ts +++ b/test/unit/path-matchers.test.ts @@ -78,6 +78,7 @@ describe("isGeneratedFile", () => { "proto/messages.pb.swift", "proto/messages.pb.dart", "proto/messages.pb.kt", + "proto/messages.pb.cs", "lib/user.freezed.dart", "lib/api_client.gr.dart", "ui/MainForm.Designer.cs",