abuild-lint

A linting utility for Alpine Linux APKBUILDs

git clone https://git.8pit.net/abuild-lint.git

 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 to
10check their APKBUILDs for mistakes regarding style. It is not intended
11to replace a policy document though.
12
13## Installation
14
15abuild-lint can either be installed using `go get` or using the provided
16`GNUmakefile`. The latter installation method is preferred and boils
17down to the following commands:
18
19	$ make
20	$ make install
21
22## Documentation
23
24End user documentation, which also documents which checks are performed
25by abuild-lint, is available in the form of a man page.
26
27The source code itself is documented using the standard go documentation
28format. The documentation can be viewed using:
29
30	$ go doc -cmd -u
31
32## Tests
33
34abuild-lint comes with a unit testsuite which can either be run using
35`go test` or using the `check` target of the provided `GNUmakefile`.
36
37## FAQ
38
39**Q:** Why not write a code formating tool like `go fmt` instead?
40
41**A:** The purpose of a formating tool is formating source code while the
42purpose of this tool is warning about style mistakes. Some of the
43mistakes abuild-lint currently warns about could be automatically fixed
44by a formating tool and might be handled by a formating tool one day.
45
46**Q:** What's the difference between `abuild sanitycheck` and abuild-lint?
47
48**A:** `abuild sanitycheck` is concerned with the semantical correctness
49of an APKBUILD while abuild-lint is concerned with the syntactical
50correctness.
51
52## License
53
54This program is free software: you can redistribute it and/or modify it
55under the terms of the GNU General Public License as published by the
56Free Software Foundation, either version 3 of the License, or (at your
57option) any later version.
58
59This program is distributed in the hope that it will be useful, but
60WITHOUT ANY WARRANTY; without even the implied warranty of
61MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
62Public License for more details.
63
64You should have received a copy of the GNU General Public License along
65with this program. If not, see <http://www.gnu.org/licenses/>.