mirror of
https://github.com/apache/druid.git
synced 2025-02-08 19:14:49 +00:00
fix number of expected functions (#13050)
This commit is contained in:
parent
e29e7a8434
commit
d978afc5b7
@ -23,7 +23,7 @@ const snarkdown = require('snarkdown');
|
|||||||
|
|
||||||
const writefile = 'lib/sql-docs.js';
|
const writefile = 'lib/sql-docs.js';
|
||||||
|
|
||||||
const MINIMUM_EXPECTED_NUMBER_OF_FUNCTIONS = 158;
|
const MINIMUM_EXPECTED_NUMBER_OF_FUNCTIONS = 162;
|
||||||
const MINIMUM_EXPECTED_NUMBER_OF_DATA_TYPES = 14;
|
const MINIMUM_EXPECTED_NUMBER_OF_DATA_TYPES = 14;
|
||||||
|
|
||||||
function hasHtmlTags(str) {
|
function hasHtmlTags(str) {
|
||||||
@ -90,15 +90,15 @@ const readDoc = async () => {
|
|||||||
|
|
||||||
// Make sure there are enough functions found
|
// Make sure there are enough functions found
|
||||||
const numFunction = Object.keys(functionDocs).length;
|
const numFunction = Object.keys(functionDocs).length;
|
||||||
if (numFunction < MINIMUM_EXPECTED_NUMBER_OF_FUNCTIONS) {
|
if (!(MINIMUM_EXPECTED_NUMBER_OF_FUNCTIONS <= numFunction)) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Did not find enough function entries did the structure of '${readfile}' change? (found ${numFunction} but expected at least ${MINIMUM_EXPECTED_NUMBER_OF_FUNCTIONS})`,
|
`Did not find enough function entries did the structure of '${readfile}' change? (found ${numFunction} but expected at least ${MINIMUM_EXPECTED_NUMBER_OF_FUNCTIONS})`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure there are at least 10 data types for sanity
|
// Make sure there are at least 10 data types for sanity
|
||||||
const numDataTypes = dataTypeDocs.length;
|
const numDataTypes = Object.keys(dataTypeDocs).length;
|
||||||
if (numDataTypes < MINIMUM_EXPECTED_NUMBER_OF_DATA_TYPES) {
|
if (!(MINIMUM_EXPECTED_NUMBER_OF_DATA_TYPES <= numDataTypes)) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Did not find enough data type entries did the structure of '${readfile}' change? (found ${numDataTypes} but expected at least ${MINIMUM_EXPECTED_NUMBER_OF_DATA_TYPES})`,
|
`Did not find enough data type entries did the structure of '${readfile}' change? (found ${numDataTypes} but expected at least ${MINIMUM_EXPECTED_NUMBER_OF_DATA_TYPES})`,
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user