mirror of
https://github.com/mandiant/capa.git
synced 2025-12-17 18:07:47 -08:00
rule: fmt: add trailing newline to capa files
This commit is contained in:
@@ -561,7 +561,7 @@ class Rule(object):
|
|||||||
|
|
||||||
ostream = six.BytesIO()
|
ostream = six.BytesIO()
|
||||||
yaml.dump(definition, ostream)
|
yaml.dump(definition, ostream)
|
||||||
return ostream.getvalue().decode('utf-8').rstrip("\n")
|
return ostream.getvalue().decode('utf-8').rstrip("\n") + "\n"
|
||||||
|
|
||||||
|
|
||||||
def get_rules_with_scope(rules, scope):
|
def get_rules_with_scope(rules, scope):
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ def main(argv=None):
|
|||||||
with open(args.path, 'wb') as f:
|
with open(args.path, 'wb') as f:
|
||||||
f.write(rule.to_yaml().encode('utf-8'))
|
f.write(rule.to_yaml().encode('utf-8'))
|
||||||
else:
|
else:
|
||||||
print(rule.to_yaml())
|
print(rule.to_yaml().rstrip("\n"))
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user