generated_boilerplate

Bootstrapper_state_proto_code_updated updates the file with periodic comments (boilerplates) about generated content.

There are two types of generated boilerplates:

  1. Multiple lines header boilerplate: inserted after the 1st line (after shebang) and used only once.

  2. Single line body boilerplate: inserted periodically.

Implementation: replace lines vs insert lines

To reduce the diff of the generated content (make it diff-tools-friendly), both boilerplates replace empty lines instead of inserting new lines.

An empty line is a blank line or blank line with a blank comment.

For example, all 3 lines here are considered empty (can be replaced by the boilerplates):


   #
#

Multiple lines header boilerplate

It should replace the first N empty lines (after line 1 with shebang) where N is its own size of the boilerplate.

Single line body boilerplate

It should replace any next empty line after M-th lines from the previous replacement.