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
|
// vim:set filetype=asciidoc:
[[quality]]
== Quality of packaging
The quality of Debian packaging can be improved by using testing tools.
* **lintian**(1)
* **piuparts**(1)
If you follow "`<<setup>>`", these are automatically executed. You are expected to fix all warnings.
[[wrap-and-sort]]
=== Reformat *debian/** files with *wrap-and-sort*
It is good idea to reformat **debian/*** files consistently using the **wrap-and-sort**(1) command in **devscripts** package.
.Reformat **debian/*** files
----
$ wrap-and-sort -vast
----
// See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895570
// This is the rationale behind -vast option
[[debputy]]
=== Validate *debian/** files with *debputy*
The new https://manpages.debian.org/unstable/dh-debputy/debputy.1.en.html[debputy] tool footnote:[The main purpose of the debputy tool is to offer a new Debian package build paradigm. This new paradigm is beyond the scope of this tutorial.] includes subcommands to validate (and fix) most files in *debian/**.
.Check correctness of files in *debian/**
----
$ debputy lint --spellcheck
----
.Format *debian/control* and *debian/tests/control* files
----
$ debputy reformat --style black
----
Using the "`**debputy reformat**`" command obsoletes using "`**wrap-and-sort -vast**`".
The debputy tool also includes a language server. You can set up to get real-time feedback while editing *debian/** files with any modern editor supporting the https://en.wikipedia.org/wiki/Language_Server_Protocol[Language Server Protocol].
|