darklua
DocumentationTry itGitHub

append_text_comment


Added in 0.12.0

Parameters


NameTypeDescriptionDefault
text

string

The string to use inside the comment (required if `file` is not defined)
file

string

A path to a file to be used as the comment content (required if `text` is not defined)
location

"start" or "end"

The location where to add the comment

start

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')
 
print('Print from module')
 
InputOutput
print('Print from module')
 
-- hello!
print('Print from module')
print('Print from module')
 

print('Print from module')-- hello!