From 3512f464c53fabfbae9e31079915fd617582856d Mon Sep 17 00:00:00 2001 From: Tim Harder Date: Fri, 18 Dec 2020 14:23:21 -0700 Subject: doc: update config-related docs to include CHECKSETS info --- doc/config.rst | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/config.rst b/doc/config.rst index c0c4e808..012804c9 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -1,12 +1,13 @@ Config file support =================== -Config files are supported by ``pkgcheck scan`` from any of three locations. +Config files are supported by ``pkgcheck scan`` from any of four locations. Listed in order of increasing precedence these include the following: - system config -- /etc/pkgcheck/pkgcheck.conf - user config -- ~/.config/pkgcheck/pkgcheck.conf - repo config -- metadata/pkgcheck.conf inside an ebuild repo +- custom config -- specified via the --config option Any settings from a config file with higher precedence will override matching settings from a config file with a lower precedence, e.g. repo settings @@ -14,10 +15,10 @@ override both user and system settings. Note that command line options override any matching config file setting. In terms of file structure, basic INI formatting is required and allows -creating a default section for system-wide settings or repo-specific sections. -The INI key-value pairs directly relate to the available long-options supported -by ``pkgcheck scan`` and their related values. See the following examples for -how certain config settings affect scanning: +creating a default section (DEFAULT) for system-wide settings or repo-specific +sections. The INI key-value pairs directly relate to the available +long-options supported by ``pkgcheck scan`` and their related values. See the +following examples for how certain config settings affect scanning: - Disable selected checks by default:: @@ -51,3 +52,20 @@ how certain config settings affect scanning: [DEFAULT] repo = my_overlay + +Custom checksets can also be configured via the CHECKSETS section. In essence, +a checkset is an alias for a group of checks or keywords which can either be +enabled or disabled. Configured checkset names can then be used with the +``pkgcheck scan -C/--checkset`` option enabling scanning for configured, custom +sets of results. See the following examples for how to configure them: + +- Assign all python-related checks to the ``python`` checkset:: + + [CHECKSETS] + python = PythonCheck,PythonCompatCheck + +- Checksets also support disabling, e.g. assign all results related to + ManifestCheck except DeprecatedChksum to the ``manifests`` checkset:: + + [CHECKSETS] + manifests = ManifestCheck,-DeprecatedChksum -- cgit v1.2.3-65-gdbad