Skip to content

Commit

Permalink
Clean up console logging and version number to prepare for publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
RobH123 committed Dec 23, 2020
1 parent dff6689 commit 48b7fe4
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "uw-content-validation",
"description": "Functions for Checking Door43.org Scriptural Content/Resources.",
"version": "0.9.3_alpha19",
"version": "0.9.3",
"private": false,
"homepage": "https://unfoldingword.github.io/uw-content-validation/",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/core/annotation-table-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ export async function checkAnnotationRows(languageCode, annotationType, bookID,
}

if (!checkingOptions?.suppressNoticeDisablingFlag) {
console.log(`checkAnnotationRows: calling removeDisabledNotices(${carResult.noticeList.length}) having ${JSON.stringify(checkingOptions)}`);
// console.log(`checkAnnotationRows: calling removeDisabledNotices(${carResult.noticeList.length}) having ${JSON.stringify(checkingOptions)}`);
carResult.noticeList = removeDisabledNotices(carResult.noticeList);
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/disabled-notices.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,6 @@ export function removeDisabledNotices(givenNoticeList) {
if (!isDisabledNotice(thisNotice))
remainingNoticeList.push(thisNotice);
}
console.log(`removeDisabledNotices: returning ${remainingNoticeList.length} from ${givenNoticeList.length} notices`);
// console.log(`removeDisabledNotices: returning ${remainingNoticeList.length} from ${givenNoticeList.length} notices`);
return remainingNoticeList;
}
3 changes: 2 additions & 1 deletion src/core/file-text-check.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ const textB = `{ Peace on Earth,,
// Just change these next two lines to change the text being used (to demonstrate differing results)
const chosenTextName = "textB";
const chosenText = textB;
const checkingOptions = {};

const rawResults = checkTextfileContents('en', 'text', 'Sample', chosenText, 'in '+chosenTextName+' that was supplied', {});
const rawResults = checkTextfileContents('en', 'text', 'Sample', chosenText, 'in '+chosenTextName+' that was supplied', checkingOptions);

// Because we know here that we're only checking one file, we don’t need the filename field in the notices
function deleteFilenameField(notice) { delete notice.filename; return notice; }
Expand Down
2 changes: 1 addition & 1 deletion src/core/manifest-text-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ export async function checkManifestText(username, repoName, repoBranch, manifest
}

if (!checkingOptions?.suppressNoticeDisablingFlag) {
console.log(`checkManifestText: calling removeDisabledNotices(${cmtResult.noticeList.length}) having ${JSON.stringify(checkingOptions)}`);
// console.log(`checkManifestText: calling removeDisabledNotices(${cmtResult.noticeList.length}) having ${JSON.stringify(checkingOptions)}`);
cmtResult.noticeList = removeDisabledNotices(cmtResult.noticeList);
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/markdown-text-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export async function checkMarkdownText(languageCode, textOrFileName, markdownTe
}

if (!checkingOptions?.suppressNoticeDisablingFlag) {
console.log(`checkMarkdownText: calling removeDisabledNotices(${result.noticeList.length}) having ${JSON.stringify(checkingOptions)}`);
// console.log(`checkMarkdownText: calling removeDisabledNotices(${result.noticeList.length}) having ${JSON.stringify(checkingOptions)}`);
result.noticeList = removeDisabledNotices(result.noticeList);
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/plain-text-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export function checkPlainText(textType, textName, plainText, givenLocation, che
}

if (!checkingOptions?.suppressNoticeDisablingFlag) {
console.log(`checkPlainText: calling removeDisabledNotices(${cptResult.noticeList.length}) having ${JSON.stringify(checkingOptions)}`);
// console.log(`checkPlainText: calling removeDisabledNotices(${cptResult.noticeList.length}) having ${JSON.stringify(checkingOptions)}`);
cptResult.noticeList = removeDisabledNotices(cptResult.noticeList);
}

Expand Down
3 changes: 2 additions & 1 deletion src/core/plain-text-check.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ Another paragraph.
// (to demonstrate differing results)
const chosenText = textSB;
const chosenTextName = 'textSB';
const checkingOptions = {};

const rawResults = checkPlainText('raw', chosenTextName, chosenText, 'that was supplied', {});
const rawResults = checkPlainText('raw', chosenTextName, chosenText, 'that was supplied', checkingOptions);
if (!rawResults.successList || !rawResults.successList.length)
rawResults.successList = ["Done plain text checks"];

Expand Down
2 changes: 1 addition & 1 deletion src/core/tn-table-text-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ export async function checkTN_TSVText(languageCode, bookID, filename, tableText,
}

if (!checkingOptions?.suppressNoticeDisablingFlag) {
console.log(`checkTN_TSVText: calling removeDisabledNotices(${ttResult.noticeList.length}) having ${JSON.stringify(checkingOptions)}`);
// console.log(`checkTN_TSVText: calling removeDisabledNotices(${ttResult.noticeList.length}) having ${JSON.stringify(checkingOptions)}`);
ttResult.noticeList = removeDisabledNotices(ttResult.noticeList);
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/usfm-text-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@ export function checkUSFMText(languageCode, repoCode, bookID, filename, givenTex
// addNoticePartial({priority:103, `USFMGrammar: ${warningString.trim()}`, location});

if (!checkingOptions?.suppressNoticeDisablingFlag) {
console.log(`checkUSFMText: calling removeDisabledNotices(${result.noticeList.length}) having ${JSON.stringify(checkingOptions)}`);
// console.log(`checkUSFMText: calling removeDisabledNotices(${result.noticeList.length}) having ${JSON.stringify(checkingOptions)}`);
result.noticeList = removeDisabledNotices(result.noticeList);
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/yaml-text-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export function checkYAMLText(languageCode, textName, YAMLText, givenLocation, c
ourBasicFileChecks(textName, YAMLText, givenLocation, checkingOptions);

if (!checkingOptions?.suppressNoticeDisablingFlag) {
console.log(`checkYAMLText: calling removeDisabledNotices(${cytResult.noticeList.length}) having ${JSON.stringify(checkingOptions)}`);
// console.log(`checkYAMLText: calling removeDisabledNotices(${cytResult.noticeList.length}) having ${JSON.stringify(checkingOptions)}`);
cytResult.noticeList = removeDisabledNotices(cytResult.noticeList);
}

Expand Down
3 changes: 2 additions & 1 deletion src/core/yaml-text-check.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,9 @@ projects:
// (to demonstrate differing results)
const chosenText = textG2;
const chosenTextName = 'textG2';
const checkingOptions = {};

const rawResults = checkYAMLText('en', chosenTextName, chosenText, 'in YAML data that was supplied');
const rawResults = checkYAMLText('en', chosenTextName, chosenText, 'in YAML data that was supplied', checkingOptions);

<>
<b>YAML contents</b>: <RenderLines text={chosenText} />
Expand Down

0 comments on commit 48b7fe4

Please sign in to comment.