mirror of
https://github.com/YunoHost/package_linter.git
synced 2024-09-03 20:06:12 +02:00
Fix regex for source
Current regex will match any of the ten line after the official helper files starting with the string "source". Thus, in my specific case for which I declare a variable named source_filename="{...}", the linter will display a warning for it: ` ! Please avoid sourcing additional helpers after the official helpers (in this case file _filename=$(basename$upstream__url)) `. As it should be only interested in matching the command `source` (`source path/to/file`), a space should be appended to the current regex.
This commit is contained in:
parent
8c00413d2f
commit
7110959e51
1 changed files with 1 additions and 1 deletions
|
@ -2797,7 +2797,7 @@ class Script(TestSuite):
|
||||||
@test()
|
@test()
|
||||||
def helpers_sourcing_after_official(self):
|
def helpers_sourcing_after_official(self):
|
||||||
helpers_after_official = subprocess.check_output(
|
helpers_after_official = subprocess.check_output(
|
||||||
"head -n 30 '%s' | grep -A 10 '^ *source */usr/share/yunohost/helpers' | grep '^ *source' | tail -n +2"
|
"head -n 30 '%s' | grep -A 10 '^ *source */usr/share/yunohost/helpers' | grep '^ *source ' | tail -n +2"
|
||||||
% self.path,
|
% self.path,
|
||||||
shell=True,
|
shell=True,
|
||||||
).decode("utf-8")
|
).decode("utf-8")
|
||||||
|
|
Loading…
Reference in a new issue