mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 02:14:54 +00:00
Fail build when docs contain // AUTOSENSE
It is deprecated and should be replaced with // CONSOLE.
This commit is contained in:
parent
e54c24db02
commit
fdae97a2b5
@ -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")
|
||||
|
Loading…
x
Reference in New Issue
Block a user