1.Dd March 13 20182.Dt ABUILD-LINT 13.Os4.Sh NAME5.Nm abuild-lint6.Nd Linting utility for Alpine Linux APKBUILDs7.Sh SYNOPSIS8.Nm abuild-lint9.Ar aport ...10.Sh DESCRIPTION11The12.Nm13utility parses Alpine Linux APKBUILDs and checks them for style14mistakes. The15.Ar aport16which should be checked can be specified as a path to an APKBUILD17or as a path to a directory containing an APKBUILD. If no18.Ar aport19is specified20.Nm21searches for an APKBUILD file in the current directory.22.Pp23Regarding the checks24.Nm25differentiates between local declaration and global declaration. Global26declaration are the ones made outside of function and local ones are the27ones made inside a function. Additionally, the terms metadata variables28and metadata functions are used in the following section. The term29metadata variables refers to variables declared in an APKBUILD which are30picked up and parsed by31.Xr abuild 132directly, an example for this is the33.Va pkgname34variable. The metadata functions refers to functions called from35.Xr abuild 1 ,36an example for this is the37.Fn build38function.39.Sh PERFORMED CHECKS40This section is a list of all checks performed by41.Nm42sorted alphabetically.43.\" Add a subsection for each error from errors.go44.Ss Address comment45Check if comments expected to contain a valid46.Em RFC 532247address (maintainer and contributor comments) actually contain one.48.Ss Address separator49Checks if comments expected to contain a valid address separate the50address from the comment prefix with an51.Xr ascii 752space character.53.Ss Amount of maintainer comments54Checks if more than one maintainer comment is present.55.Ss Contributor comment order56Checks if all contributor comments are declared before the maintainer57comment.58.Ss Comment prefixes59Checks if all comments start with an60.Xr ascii 761space character.62.Ss Forbidden Bashisms63Checks for64.Xr bash 165extensions which are not allowed to be used.66.Ss Function order67Checks if all declared function are declared in the same order they are68called by69.Xr abuild 1 .70.Ss Global command substitutions71Checks that command substitutions are not used outside of functions.72.Ss Globally declared variables73Checks if all globally declared non-metadata variables are prefixed with74a single underscore character.75.Ss Locally declared variables76Checks if all locally declared variables are declared using the special77.Em local78keyword.79.Ss Long parameter expansions80Checks if all long parameter expansions of the form81.Em ${varname}82can't be replaced by a short parameter expansion of the form83.Em $varname .84.Ss Maintainer comment85Checks that a maintainer comment is present.86.Ss Maintainer comment order87Checks that the maintainer comment is declared before the first variable88assignment.89.Ss Missing metadata variable90Checks if all required metadata variables where defined.91.Ss Post function declaration metadata92Checks if checksum metadata is declared after the last function93declaration.94.Ss Pre function declaration metadata95Checks if all metadata variables (except checksums) are declared before96the first function declaration.97.Ss Repeated contributor comment98Checks if all declared contributor comments have a unique99.Em RFC 5233100address.101.Ss Unused variables102Checks if all declared non-metadata variables are actually used103somewhere in the APKBUILD.104.Sh EXIT STATUS105If106.Nm107didn't find any style violations in the given108.Ar aports109it exits with exit status zero. If an error occurred or if a style110violation was found in one of the given111.Ar aports112.Nm113exits with a non-zero exit status.114.Sh SEE ALSO115.Xr abuild 1 ,116.Xr APKBUILD 5