google / google/protobuf.dart

Add // coverage:ignore-file to the header of the generated files to ignore for code coverage

Open
#805 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Dart
Stars
572
Forks
196
Avg merge
1h 59m
Merged PRs (30d)
2

Description

Currently the header of a generated file looks like:

`///
// Generated code. Do not modify.
// source: geometry.proto
//
// @dart = 2.12
// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields
`
It would be great if it can be extended with:
// coverage:ignore-file

so that the generated file is ignored during code coverage analysis.
Thanks

Contributor guide

Open the contributing guide

Research direction

Locate the generator or template responsible for the generated Dart file header shown in the issue. Verify how the existing ignore_for_file header is assembled, then confirm that generated files include the requested coverage:ignore-file directive and that coverage tooling ignores them.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
testing, tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.