1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
sbo-maintainer-tools
====================
These are "lint" tools to make life easier for SlackBuilds.org
maintainers and admins. They check your builds and packages for
various problems, so your builds will be higher quality, and there
will be less work for the admins to do when reviewing your build for
approval.
Included tools:
---------------
- sbolint: checks your SlackBuild, README, .info file, and slack-desc.
- sbopkglint: checks your package, after it's built.
- pre-commit-sbolint: a git pre-commit hook you should use, that
automatically calls sbolint and stops you from committing bad code.
- sbofixinfo: attempts to automatically fix common .info file problems.
Note that the SBo admins use these tools as part of the approval
process, when you submit an update. Failure to pass the lint checks
is a valid reason for rejecting your submission, so you should either
make sure your scripts and packages pass the tests, or give a good
explanation why a failure isn't relevant to your build (because the
tests aren't perfect, of course, and there are exceptions to almost
every rule).
Installation:
-------------
The easiest way to install sbo-maintainer-tools is to install them
from SBo (system/sbo-maintainer-tools). The SBo build might be out
of date, so you might want to get the latest version from git and
install it manually:
git clone https://slackware.uk/~urchlay/repos/sbo-maintainer-tools
cd sbo-maintainer-tools
make install # add PREFIX=/usr if you hate using /usr/local
You can also run sbolint and sbopkglint directly from the source
directory (e.g. ./sbopkglint), if you can think of a reason for that
(maybe you're hacking on the tests).
If you want, you can just symlink sbolint and sbopkglint to some
directory in your $PATH (e.g. if you keep your local scripts in
~/bin).
Git Hook:
---------
To use the git hook, copy pre-commit-sbolint to .git/hooks/pre-commit
in your git work tree (wherever you cloned the SBo repository),
and make sure it's executable (chmod +x). If you already have a
pre-commit hook, you can copy/paste the code, or (possibly) just
append pre-commit-sbolint to your existing hook (if it doesn't end
with "exit 0").
If you absolutely must commit code that doesn't pass sbolint, you can
set SBOLINT=no in the environment, e.g.
SBOLINT=no git commit -m'Message here' ...
If you find yourself having to do this often, please contact the SBo
admins and explain the situation; it may mean sbolint needs updating.
Documentation:
--------------
For more information, see the sbolint, sbopkglint, and sbofixinfo man
pages (or run the scripts with --doc; it's the same thing). There's
also a QUICKSTART file that gives the bare minimum info to get
started.
|