apkbuild-fixer(1)
π apkbuild-fixer β the lint-fixer bestie
okay so bestie, welcome to apkbuild-fixer(1) from the General Commands Manual β literally the glow-up artist for your APKBUILDs π
β¨ NAME β¨
apkbuild-fixer β fixes the violations that apkbuild-lint snitches about π΅οΈββοΈ
πΈ SYNOPSIS πΈ
apkbuild-fixer [-sh] [-p path] <apkbuild...>
π OPTIONS π
-hβ shows the help mesage (their spelling, not mine π) and then dips, bye-sβ strict mode, queen behavior π β it only fixes policy violations that are certainly not false positives. lowkey cautious, highkey slay-p <path>β the path to the binary used to find violations. defaults toapkbuild-lint, iykyk
π¦ DESCRIPTION π¦
So apkbuild-fixer fixes linting violations found by apkbuild-lint(1) by modifying the APKBUILD in-place β no backup era, we edit the real file, periodt. And the way it works? After each individual fix to a particular violation is done, it calls apkbuild-lint again. re-checking, re-verifying, main character energy π
β οΈ note that not all violations have automatic fixes, and even though care is taken to avoid breaking the APKBUILD, it might happen in some edge cases. so like... review your diff, bestie π
π₯ FIXES π₯
These are the violations that can be fixed automatically β but manual review is recommended, fr fr:
- AL1 (
default-builddir-value)- Remove the
builddirvariable
- Remove the
- AL2 (
unnecessary-return-1)- Removes the
|| return 1from the line - Removes the line if only the
|| return 1is present- Checks the previous line for
\and removes it.
- Checks the previous line for
- Removes the
- AL5 (
empty-variable)- Remove the empty variable
- AL8 (
trailing-whitespace)- Removes trailing whitespace on the given line
- AL10 (
space-before-function-parenthesis)- Fixed by rewriting the function name to match the norm.
- AL11 (
space-after-function-parenthesis)- Fixed by rewriting the function name to match the norm.
- AL13 (
superfluous-cd-builddir)- Remove the
cd "$builddir"and any following empty lines
- Remove the
- AL29 (
pkgname-used-in-source)- Replace
$pkgnamewith the value of the variable
- Replace
- AL32 (
braced-variable)- Remove the braces around the variable
- AL49 (
invalid-option)- Remove the invalid option from the line, ignoring comments
- AL57 (
invalid-arch)- Remove the invalid option from the line, ignoring comments
β¨ and one bonus glow-up: apkbuild-fixer will also rename _builddir to builddir, because that underscore era is very common from before the builddir variable was even a thing. we love a nostalgic queen π«Ά
π AUTHORS π
Maintained by Leo <thinkabit.ukim@gmail.com> β ty for your service π
β SEE ALSO β
alint(5) apkbuild-lint(1) β go read those too, no cap π
and that's the whole page, bestie π β brought to you by the General Commands Manual, dated 2026-10-14, for apkbuild-fixer(1). now go fix those APKBUILDs, you absolute icon π
π¦ where this page comes from
- alpine 3.24: atools-doc 20.2.2-r27 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms