From 16bcbcaf72175b3d0d16eabb95311bcf01fec7f4 Mon Sep 17 00:00:00 2001 From: Harsh Modi Date: Fri, 2 Dec 2022 00:34:01 -0800 Subject: [PATCH] nogo: Add documentation about the _base key --- go/nogo.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/go/nogo.rst b/go/nogo.rst index 212d55ee1e..222d967b0b 100644 --- a/go/nogo.rst +++ b/go/nogo.rst @@ -204,6 +204,9 @@ contain the following key-value pairs: | ``flag.Value`` specified by the analyzer. | +----------------------------+---------------------------------------------------------------------+ +``nogo`` also supports a special key to specify the same config for all analyzers, even if they are +not explicitly specified called ``_base``. See below for an example of its usage. + Example ^^^^^^^ @@ -216,6 +219,12 @@ on a command line driver. .. code:: json { + "_base": { + "description": "Base config that all subsequent analyzers, even unspecified will inherit.", + "exclude_files": { + "third_party/": "exclude all third_party code for all analyzers" + } + }, "importunsafe": { "exclude_files": { "src/foo\\.go": "manually verified that behavior is working-as-intended",