Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/signals/path-matchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) ||
Expand Down
1 change: 1 addition & 0 deletions test/unit/path-matchers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading