function createErrorMessage(expectedAmount,actualSpaces,actualTabs){var expectedStatement=expectedAmount+" "+indentType+(expectedAmount===1?"":"s");// e.g. "2 tabs"
var foundSpacesWord="space"+(actualSpaces===1?"":"s");// e.g. "space"
var foundTabsWord="tab"+(actualTabs===1?"":"s");// e.g. "tabs"
var foundStatement=void 0;if(actualSpaces>0&&actualTabs>0){foundStatement=actualSpaces+" "+foundSpacesWord+" and "+actualTabs+" "+foundTabsWord;// e.g. "1 space and 2 tabs"
}else if(actualSpaces>0){// Abbreviate the message if the expected indentation is also spaces.
// e.g. 'Expected 4 spaces but found 2' rather than 'Expected 4 spaces but found 2 spaces'
foundStatement=indentType==="space"?actualSpaces:actualSpaces+" "+foundSpacesWord;}else if(actualTabs>0){foundStatement=indentType==="tab"?actualTabs:actualTabs+" "+foundTabsWord;}else{foundStatement="0";}return"Expected indentation of "+expectedStatement+" but found "+foundStatement+".";}
Creates an error message for a line, given the expected/actual indentation.
@param {int} expectedAmount The expected amount of indentation characters for this line
@param {int} actualSpaces The actual number of indentation spaces that were found on this line
@param {int} actualTabs The actual number of indentation tabs that were found on this line
@returns {string} An error message for this line