1# abuild-lint 2 3A linting utility for Alpine Linux APKBUILDs. 4 5## Scope 6 7Alpine Linux currently doesn't have a policy document describing how 8APKBUILDs should be written. This tool tries to enforce some of 9unwritten style practises and thus make it easier for contributors to10check their APKBUILDs for mistakes regarding style. It is not intended11to replace a policy document though.1213## Installation1415abuild-lint can either be installed using `go get` or using the provided16`GNUmakefile`. The latter installation method is preferred and boils17down to the following commands:1819 $ make20 $ make install2122## Documentation2324End user documentation, which also documents which checks are performed25by abuild-lint, is available in the form of a man page.2627The source code itself is documented using the standard go documentation28format. The documentation can be viewed using:2930 $ go doc -cmd -u3132## Tests3334abuild-lint comes with a unit testsuite which can either be run using35`go test` or using the `check` target of the provided `GNUmakefile`.3637## FAQ3839**Q:** Why not write a code formating tool like `go fmt` instead?4041**A:** The purpose of a formating tool is formating source code while the42purpose of this tool is warning about style mistakes. Some of the43mistakes abuild-lint currently warns about could be automatically fixed44by a formating tool and might be handled by a formating tool one day.4546**Q:** What's the difference between `abuild sanitycheck` and abuild-lint?4748**A:** `abuild sanitycheck` is concerned with the semantical correctness49of an APKBUILD while abuild-lint is concerned with the syntactical50correctness.5152## License5354This program is free software: you can redistribute it and/or modify it55under the terms of the GNU General Public License as published by the56Free Software Foundation, either version 3 of the License, or (at your57option) any later version.5859This program is distributed in the hope that it will be useful, but60WITHOUT ANY WARRANTY; without even the implied warranty of61MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General62Public License for more details.6364You should have received a copy of the GNU General Public License along65with this program. If not, see <http://www.gnu.org/licenses/>.