Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Commit

Permalink
Merge 7639bc3 into 5da7f7e
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Mar 13, 2019
2 parents 5da7f7e + 7639bc3 commit d5482e9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
18 changes: 9 additions & 9 deletions src/bootlint.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ var LocationIndex = _location.LocationIndex;
return element.name.toUpperCase();
} :
function (element) {
/* @covignore */
/* istanbul ignore next */
return element.tagName.toUpperCase();
};

Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
}

Expand All @@ -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);
}

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -1184,7 +1184,7 @@ var LocationIndex = _location.LocationIndex;
};
} else {
// jQuery; in-browser
/* @covignore */
/* istanbul ignore next */
(function () {
var $ = cheerio;
/**
Expand Down
8 changes: 5 additions & 3 deletions src/location.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit d5482e9

Please sign in to comment.