From 9734ff98cfdfffb5aa23df885b7db56dd0ce324c Mon Sep 17 00:00:00 2001 From: Kevin Daudt Date: Thu, 10 Oct 2019 18:17:13 +0200 Subject: [PATCH] initd-lint: add documentation --- alint.5.scd | 19 +++++++++++++++++++ conf | 2 +- initd-lint.1.scd | 39 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 initd-lint.1.scd diff --git a/alint.5.scd b/alint.5.scd index e453d9d..c3273e4 100644 --- a/alint.5.scd +++ b/alint.5.scd @@ -342,3 +342,22 @@ Severity: Minor, Certainty: Certain Variable has braces around it while it is not required, remove the braces. Severity: Minor, Certainty: Possible + +# LABELS TAGS (initd-lint) + +## unexpected-shebang-line [AL33] + +OpenRC service files need to use `#!/sbin/openrc-run` to properly work. See +https://github.com/OpenRC/openrc/blob/master/service-script-guide.md#syntax-of-service-scripts +for more details. + +Severity: Important, Certainty: Certain + +## custom-start-stop-function [AL34] + +It's discouraged to write custom start / stop function for service files. In +most cases it suffices to define `command`, `command_args`, and `pidfile`. See +https://github.com/OpenRC/openrc/blob/master/service-script-guide.md#dont-write-your-own-startstop-functions +for more information. + +Severity: Important, Certainty: Certain diff --git a/conf b/conf index a612862..6ea2d77 100644 --- a/conf +++ b/conf @@ -1,3 +1,3 @@ MAN_5_PAGES="alint.5.man" -MAN_1_PAGES="apkbuild-lint.1.man aports-lint.1.man apkbuild-fixer.1.man" +MAN_1_PAGES="apkbuild-lint.1.man aports-lint.1.man apkbuild-fixer.1.man initd-lint.1.man" BINARIES="apkbuild-lint aports-lint apkbuild-fixer" diff --git a/initd-lint.1.scd b/initd-lint.1.scd new file mode 100644 index 0000000..bff8fb0 --- /dev/null +++ b/initd-lint.1.scd @@ -0,0 +1,39 @@ +initd-lint(1) + +# NAME + +initd-lint - A linter for openrc init files shipped with Alpine Linux + +# SYNOPSIS + +*initd-lint* + +# DESCRIPTION + +initd-lint is a linter for openrc init files shipped with Alpine Linux See +*alint(5)* under the initd-lint section for an explanation of each violation +that initd-lint checks for. + +initd-lint will print the policy violations found and exit 1, if no violations +are found then nothing will be printed and it will exit 0. + +# OUTPUT + +initd-lint will print to stdout whenever a policy violation is found in the +following format + + SEVERITYCERTAINITY:[TAG]:PATH::MSG + +- *SEVERITY* refers to how severe a violation is, ranging from *S* to *M*. +- *CERTAINITY* refers to how likely it is not a false positive, ranging from *C* to *P* +- *TAG* refers to the tag of the violation, see *alint(5)* for more details. +- *PATH* refers to the path given for *apkbuild-lint* to check. +- *MSG* is a short message meant for humans to know what is the violation. + +# AUTHORS + +Maintained by Kevin Daudt + +# SEE ALSO + +*alint(5)* -- GitLab