bazel-contrib / bazel-gazelle

Gazelle is a Bazel build file generator for Bazel projects. It natively supports Go and protobuf, and it may be extended to support new languages and custom rule sets.
Apache License 2.0
1.21k stars 382 forks source link

Always check files in generation tests #1847

Closed Whoaa512 closed 4 months ago

Whoaa512 commented 4 months ago

What type of PR is this?

Bug fix/ Feature

What package or component does this PR mostly affect?

gazelle_generation_test

What does this PR do? Why is it needed? When iterating on new language plugins, it is helpful to have the CheckFiles validation run so that any mismatched BUILD file output can be shown.

Replacing FailNow with Fail allows for this

Other notes for review

Open to making this configurable, but this seems like a better default from the initial implementation https://github.com/bazelbuild/bazel-gazelle/commit/62afca5f276a56c1aa40804055a3a121295f53d8#diff-6ced8e81668a603f2efffea7938a66f16185221acdaab6e16f112377e663fbe5R343