append_text_comment
Added in 0.12.0
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| text |
| The string to use inside the comment (required if `file` is not defined) | |
| file |
| A path to a file to be used as the comment content (required if `text` is not defined) | |
| location |
| The location where to add the comment |
|
Use this rule to automatically insert a comment at the start or end of a file. This rule can be useful if you want to insert your license in each file.
Note: make sure to avoid using the remove_comments rule after this rule in the process sequence, otherwise you will be removing your brand new comment.
Examples
print('Print from module')
--!native
print('Print from module')
print('Print from module')
print('Print from module')--hello!
| Input | Output |
|---|---|
| |
| |