Add TERMUX_PKG_REVISION check to lint-packages.py
This commit is contained in:
parent
fbf18c5e67
commit
3e36b0e87b
@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
@ -26,7 +27,12 @@ def validate_package(package_name, lines):
|
|||||||
line_number = 1
|
line_number = 1
|
||||||
for line in lines:
|
for line in lines:
|
||||||
if line.endswith(' \n'):
|
if line.endswith(' \n'):
|
||||||
print('Line ' + str(line_number) + ' has trailing whitespace: ' + package_name)
|
print(package_name + ': Line ' + str(line_number) + ' has trailing whitespace')
|
||||||
|
if line.startswith('TERMUX_PKG_REVISION='):
|
||||||
|
value = line[len('TERMUX_PKG_REVISION='):].strip()
|
||||||
|
if not re.match('[0-9]+', value):
|
||||||
|
print(package_name + ': strange TERMUX_PKG_REVISION value "' + value + '"')
|
||||||
|
|
||||||
line_number += 1
|
line_number += 1
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user