From 53347bc22620c226ec5d761376e8c7056c093acf Mon Sep 17 00:00:00 2001 From: David Lukes Date: Mon, 26 Feb 2018 17:01:40 +0100 Subject: [PATCH] Add license_template_path configuration snippet --- Configurations.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Configurations.md b/Configurations.md index 324546f5a0d..8540bc36383 100644 --- a/Configurations.md +++ b/Configurations.md @@ -2115,3 +2115,23 @@ Enable unstable featuers on stable channel. - **Default value**: `false` - **Possible values**: `true`, `false` - **Stable**: Yes + +## `license_template_path` + +Check whether beginnings of files match a license template. + +- **Default value**: `""`` +- **Possible values**: path to a license template file +- **Stable**: No + +A license template is a plain text file which is matched literally against the +beginning of each source file, except for `{}`-delimited blocks, which are +matched as regular expressions. The following license template therefore +matches strings like `// Copyright 2017 The Rust Project Developers.`, `// +Copyright 2018 The Rust Project Developers.`, etc.: + +``` +// Copyright {\d+} The Rust Project Developers. +``` + +`\{`, `\}` and `\\` match literal braces / backslashes.