Fail build when docs contain // AUTOSENSE

It is deprecated and should be replaced with // CONSOLE.
This commit is contained in:
Nik Everett 2016-05-09 17:28:15 -04:00
parent e54c24db02
commit fdae97a2b5
1 changed files with 6 additions and 2 deletions

View File

@ -112,8 +112,12 @@ public class SnippetsTask extends DefaultTask {
lastLanguageLine = lineNumber
return
}
if (line ==~ /\/\/\s*AUTOSENSE\s*/
|| line ==~ /\/\/\s*CONSOLE\s*/) {
if (line ==~ /\/\/\s*AUTOSENSE\s*/) {
throw new InvalidUserDataException("AUTOSENSE has been " +
"replaced by CONSOLE. Use that instead at " +
"$file:$lineNumber")
}
if (line ==~ /\/\/\s*CONSOLE\s*/) {
if (snippet == null) {
throw new InvalidUserDataException("CONSOLE not " +
"paired with a snippet at $file:$lineNumber")