Commit 67050789 authored by Leo's avatar Leo

make default-builddir-value and superfluous-cd-builddir minor

parent b7a8c33e
......@@ -153,7 +153,7 @@ The *builddir* declaration can be removed.
Starting with v2.29.0 of *abuild* the value is set automatically.
Severity: Important, Certainty: Certain
Severity: Minor, Certainty: Certain
## unnecessary-return-1 [AL2]
......@@ -261,7 +261,7 @@ functions automatically have their working directory set to the value of
*builddir*. It is also possible that there are 2 *cd "$builddir"* statements
one after the other.
Severity: Important, Certainty: Possible
Severity: Minor, Certainty: Possible
## pkgname-has-uppercase [AL14]
......
......@@ -63,7 +63,7 @@ default_builddir_value() {
[ "$SKIP_DEFAULT_BUILDDIR_VALUE" ] && return 0
[ "$SKIP_AL1" ] && return 0
if [ "$builddir" = "/$pkgname-$pkgver" ]; then
scan '^builddir=' "builddir can be removed as it is the default value" 'AL1' 'IC'
scan '^builddir=' "builddir can be removed as it is the default value" 'AL1' 'MC'
fi
}
......@@ -180,7 +180,7 @@ superfluous_cd_builddir() {
[ -z "$statement" ] && continue
if echo "$statement" | grep -E -q 'cd ["]?\$[{]?builddir["}]?+($| )' ; then
if [ "$prevcd" -eq 1 ] || [ "$cdscount" -eq 1 ] || [ "$firstcd" -eq 1 ]; then
printf "IP:[AL13]:%s:%s:cd \"\$builddir\" can be removed in phase '%s'\\n" \
printf "MP:[AL13]:%s:%s:cd \"\$builddir\" can be removed in phase '%s'\\n" \
"$apkbuild" \
"$linenum" \
"$phase"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment