rules icon indicating copy to clipboard operation
rules copied to clipboard

Falco Rules Doc Comments

Open leogr opened this issue 1 year ago • 11 comments

Motivation

The issues I found with comments are due to practical reasons. In particular:

  • There should be no empty lines between the comments and the referred item
    • This will avoid ambiguities.
    • I guess I mostly fixed that with this PR.
  • There's no standard item's comment structure
    • I would love to define a simple Rule Doc convention (i.e., something similar to Go Doc Comments, but simpler)
  • There's no clear way to distinguish sections from item's comment

Feature

Implement a simple Rules Doc Comments guideline and add it to the rules style guide.

Alternatives

Just rely on an existing convention, if any, or do nothing. However they don't look like compelling alternatives.

Additional context

See https://github.com/falcosecurity/rules/pull/149#issuecomment-1704317483

leogr avatar Sep 04 '23 08:09 leogr