Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootlint.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@gmail.com>2019-03-13 19:04:12 +0300
committerXhmikosR <xhmikosr@gmail.com>2019-03-13 20:02:38 +0300
commit82fa063d000972c68fed95f87d52dfb063178ab0 (patch)
treed0537d39920d8b5637334b4da8111d4a8f8a4201
parent5da7f7e3d57e45bcabba1a361080db11fe710d56 (diff)
Replace old coverage ignore directives with the istanbul ones.
-rw-r--r--src/bootlint.js18
-rw-r--r--src/location.js8
2 files changed, 14 insertions, 12 deletions
diff --git a/src/bootlint.js b/src/bootlint.js
index 5194f76..e1965b5 100644
--- a/src/bootlint.js
+++ b/src/bootlint.js
@@ -74,7 +74,7 @@ var LocationIndex = _location.LocationIndex;
return element.name.toUpperCase();
} :
function (element) {
- /* @covignore */
+ /* istanbul ignore next */
return element.tagName.toUpperCase();
};
@@ -226,7 +226,7 @@ var LocationIndex = _location.LocationIndex;
}
function jqueryPluginVersions(jQuery) {
- /* @covignore */
+ /* istanbul ignore next */
return PLUGINS.map(function (pluginName) {
var plugin = jQuery.fn[pluginName];
if (!plugin) {
@@ -291,7 +291,7 @@ var LocationIndex = _location.LocationIndex;
var allLinters = {};
function addLinter(id, linter) {
if (allLinters[id]) {
- /* @covignore */
+ /* istanbul ignore next */
throw new Error('Linter already registered with ID: ' + id);
}
@@ -301,7 +301,7 @@ var LocationIndex = _location.LocationIndex;
} else if (id[0] === 'W') {
Problem = LintWarning;
} else {
- /* @covignore */
+ /* istanbul ignore next */
throw new Error('Invalid linter ID: ' + id);
}
@@ -371,7 +371,7 @@ var LocationIndex = _location.LocationIndex;
// deliberately do nothing
// empty
}
- /* @covignore */
+ /* istanbul ignore if */
if (theWindow) {
// check browser global jQuery
var globaljQuery = theWindow.$ || theWindow.jQuery;
@@ -512,7 +512,7 @@ var LocationIndex = _location.LocationIndex;
var OUTDATED_BOOTSTRAP = 'Bootstrap version might be outdated. Latest version is at least ' + CURRENT_BOOTSTRAP_VERSION + ' ; saw what appears to be usage of Bootstrap ';
var theWindow = getBrowserWindowObject();
var globaljQuery = theWindow && (theWindow.$ || theWindow.jQuery);
- /* @covignore */
+ /* istanbul ignore if */
if (globaljQuery) {
var versions = jqueryPluginVersions(globaljQuery);
if (versions.length) {
@@ -552,7 +552,7 @@ var LocationIndex = _location.LocationIndex;
var theWindow = getBrowserWindowObject();
var globaljQuery = theWindow && (theWindow.$ || theWindow.jQuery);
- /* @covignore */
+ /* istanbul ignore if */
if (globaljQuery) {
var versions = jqueryPluginVersions(globaljQuery);
if (versions.length) {
@@ -608,7 +608,7 @@ var LocationIndex = _location.LocationIndex;
};
}
- /* @covignore */
+ /* istanbul ignore next */
return function lintDoctype($, reporter) {
/* eslint-disable no-undef, block-scoped-var */
var doc = window.document;
@@ -1184,7 +1184,7 @@ var LocationIndex = _location.LocationIndex;
};
} else {
// jQuery; in-browser
- /* @covignore */
+ /* istanbul ignore next */
(function () {
var $ = cheerio;
/**
diff --git a/src/location.js b/src/location.js
index 64eef6a..1cd2753 100644
--- a/src/location.js
+++ b/src/location.js
@@ -40,7 +40,7 @@ var binarySearch = require('binary-search');
while (charIndex < string.length) {
charIndex = string.indexOf('\n', charIndex);
if (charIndex === -1) {
- /* @covignore */
+ /* istanbul ignore next */
break;
}
charIndex++;// go past the newline
@@ -72,8 +72,10 @@ var binarySearch = require('binary-search');
return 0;
});
- if (index < 0) { // binarySearch returns a negative number (but not necessarily -1) when match not found
- /* @covignore */
+
+ // binarySearch returns a negative number (but not necessarily -1) when match not found
+ if (index < 0) {
+ /* istanbul ignore next */
return null;
}
var lineStartEnd = this._lineStartEndTriples[index];