apkbuild-fixer(1)

πŸ“¦
version 20.2.2 Β· 2 versions
, in alpine 3.24

πŸ’… 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 to apkbuild-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 builddir variable
  • AL2 (unnecessary-return-1)
    • Removes the || return 1 from the line
    • Removes the line if only the || return 1 is present
      • Checks the previous line for \ and removes it.
  • 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
  • AL29 (pkgname-used-in-source)
    • Replace $pkgname with the value of the variable
  • 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