buildtools icon indicating copy to clipboard operation
buildtools copied to clipboard

Ability to suppress macro documentation warnings

Open c-parsons opened this issue 6 years ago • 3 comments

See https://github.com/bazelbuild/bazel/issues/7977#issuecomment-488118667

We would suggest that users set default values for rules via a wrapper macro. Wrapper macros become more annoying to write, though, if they need to mirror the full documentation of their rule.

We might consider using a meta tag to note that a macro should inherit (or link to) the documentation for the rule it wraps, and this should suppress buildifier warnings.

c-parsons avatar Jun 12 '19 20:06 c-parsons

This should already work: https://github.com/bazelbuild/buildtools/blob/master/WARNINGS.md#how-to-disable-this-warning

laurentlb avatar Jun 12 '19 21:06 laurentlb

So suppression with

# buildozer: disable=function-docstring

should work to suppress the docstring error? Probably a good enough workaround for now. I'm not sure suppressing warnings is a good permanent solution, given that we are recommending macro-wrapping-rule as a common pattern.

c-parsons avatar Jun 12 '19 22:06 c-parsons

Also see #768

aiuto avatar Jan 24 '20 22:01 aiuto