Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "coverage - ignore file" addition because it results in less flexibility #169

Open
JanMichaelPeter opened this issue Jul 5, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@JanMichaelPeter
Copy link
Collaborator

Describe the bug
We added a line "coverage - ignore file" to generated code in #104
This works fine if widget driver is the only generator that produces code. But for example if I combine widget_driver and json_serializable I run into a problem:
widget_driver writes the ignore coverage comment by default while I need to customize the build_runner from json_serializable with a preamble inside build.yaml see this reference. If I do both, I end up with two "coverage - ignore file" comments in all widget_driver generated files.

To Reproduce
Steps to reproduce the behavior, e.g.:

  1. have json_serializable and widget_driver_generator in class
  2. create a driver that triggers the generation of a file
  3. add this to the build.yaml
targets:
  $default:
    builders:
      source_gen:combining_builder:
        options:
          preamble: |
            // coverage:ignore-file
  1. run dart run build_runner build --delete-conflicting-outputs
  2. Observe two "coverage - ignore file" comments in generated driver files
    Expected behavior
    No "coverage - ignore file" comments in generated driver on default. I want only the option to set it with the pramble
@JanMichaelPeter JanMichaelPeter added the bug Something isn't working label Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant