Allow to enable imports of code owner config files with arbitrary file extensions

Code owner config files can only import other code owner config files,
but not arbitrary files. For the find-owners backend files with the
following names are considered as code owner config files: OWNERS,
<prefix>_OWNERS, OWNERS_<extension>

Having a name pattern for code owner config files defined allows the
code-owners plugin to recognise code owner config files on upload and
validate them. The validation ensures that code owner config files never
import non-parseable code owner config files. This is important, since
an import of a non-parseable code owner config file would block the
submission of all changes for which this import is relevant, which can
be a serious outage.

To support maintaining different sets of code owner configuration in one
repository/branch it is possible to configure a file extension for code
owner config files. In this case the find-owners backend considers the
following files as code owner config files: OWNERS.<file-extension>,
<prefix>_OWNERS.<file-extension>, OWNERS_<extension>.<file-extension>
(where ‘file-extension’ matches the configured file-extension, but not
arbitrary file extensions). For this use-case it is important that there
is no validation on code owner config files which belong to a different
set of code configurations (e.g. if OWNERS.google files are used, OWNERS
or OWNERS.other files should not be validated). This is important since
the validation of code owner config files which belong to a different
set of code configurations is not unlikely to fail (e.g. they may use a
different syntax or reference users that don’t exist on the host).

Now the Chrome team has the requirement to support code owner config
files with arbitrary file extensions. E.g. for the find-owners backend
OWNERS.<file-extension> should be supported in addition to OWNERS,
<prefix>_OWNERS, OWNERS_<extension>. For their use-case
OWNERS.<file-extension> files with any file extension should be
validated to prevent that they become non-parseable and can break the
submission of changes when they are being imported. This requirement
conflicts with the use case of using file extensions for code owner
config files to support different sets of code owner configurations in
one repository/branch (as explained above this use-case requires that
code owner config files with non-matching file extensions are not
validated).

To support their use-case anyway we add a new configuration option that
controls whether code owner config files with file extensions are
enabled. If code owner config files with file extensions are enabled,
code owner config files with arbitrary file extensions are validated and
can be imported by other code owner config files.

If this option is used, one should not configure a file extension for
code owner files and vice versa (as both options are not compatible as
explained above which likely causes issues).

Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: If663d70067665eb6f8f1a2e261e5a380eae7de12
diff --git a/resources/Documentation/validation.md b/resources/Documentation/validation.md
index 61cf60d..e8ed8d5 100644
--- a/resources/Documentation/validation.md
+++ b/resources/Documentation/validation.md
@@ -66,7 +66,9 @@
   configured](setup-guide.html#configureCodeOwnersBackend) which now uses a
   different syntax or different names for code owner config files, the [file
   extension for code owner config file is set/changed](config.html#codeOwnersFileExtension),
-  or the [allowed email domains are changed](config.html#pluginCodeOwnersAllowedEmailDomain))
+  [arbitrary file extensions for code owner config files](config.html#codeOwnersEnableCodeOwnerConfigFilesWithFileExtensions)
+  get enabled/disabled or the [allowed email domains are
+  changed](config.html#pluginCodeOwnersAllowedEmailDomain))
 * emails of users may change so that emails in code owner configs can no longer
   be resolved
 * imported code owner config files may get deleted or renamed so that import