bazel-skylib
bazel-skylib copied to clipboard
Create a failure test rule
When testing for analysis-phase-failures in rules this rule provides otherwise necessary boilerplate that simply allows to test for correct Error messages
I discovered this reoccuring rule while testing some of my rules and thougt it might be useful to others as well.
@brandjon @tetromino Do you have any feedback on this?
Bump :)
@tetromino Thanks for the detailed feedback :)
I updated the change with your findings and also added the stardoc target for the new rule and generated the docs.
However i'm not sure if i have much leverage (or maybe missed something) on generating good documentation there.
e.g. the target_under_test
or the rule docs
attribute can't be set through the analysistest.make
and stardoc generates empty defaults. The module docstring does not seem to be included as well.
Sorry for very delayed review; I'm on leave. But as for the generated docs problem, I realized that we were using a very old Stardoc release via the (deprecated) Federation repo. We'll fix that by https://github.com/bazelbuild/bazel-skylib/pull/327
@tetromino Sry for the even later reaction :/
I fixed the docs and squashed to commits for a cleaner history
Kind of forgot this PR 🙈 I updated everything to the latest version. Could you please update your review @tetromino ? Or is ownership handled differently now @brandjon @comius @hvadehra @c-mita ?
ping @brandjon @comius @c-mita