Skip to content

Commit e5b6920

Browse files
style: format code with ClangFormat, dotnet-format, Prettier, RuboCop, Rustfmt, Scalafmt, StandardJS, StandardRB and swift-format
This commit fixes the style issues introduced in 70e5cfd according to the output from ClangFormat, dotnet-format, Prettier, RuboCop, Rustfmt, Scalafmt, StandardJS, StandardRB and swift-format. Details: None
1 parent 70e5cfd commit e5b6920

19 files changed

Lines changed: 3052 additions & 1513 deletions

coverage/base.css

Lines changed: 262 additions & 124 deletions
Large diffs are not rendered by default.

coverage/block-navigation.js

Lines changed: 67 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,85 @@
11
/* eslint-disable */
22
var jumpToCode = (function init() {
3-
// Classes of code we would like to highlight in the file view
4-
var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
3+
// Classes of code we would like to highlight in the file view
4+
var missingCoverageClasses = [".cbranch-no", ".cstat-no", ".fstat-no"];
55

6-
// Elements to highlight in the file listing view
7-
var fileListingElements = ['td.pct.low'];
6+
// Elements to highlight in the file listing view
7+
var fileListingElements = ["td.pct.low"];
88

9-
// We don't want to select elements that are direct descendants of another match
10-
var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
9+
// We don't want to select elements that are direct descendants of another match
10+
var notSelector = ":not(" + missingCoverageClasses.join("):not(") + ") > "; // becomes `:not(a):not(b) > `
1111

12-
// Selector that finds elements on the page to which we can jump
13-
var selector =
14-
fileListingElements.join(', ') +
15-
', ' +
16-
notSelector +
17-
missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
12+
// Selector that finds elements on the page to which we can jump
13+
var selector =
14+
fileListingElements.join(", ") +
15+
", " +
16+
notSelector +
17+
missingCoverageClasses.join(", " + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
1818

19-
// The NodeList of matching elements
20-
var missingCoverageElements = document.querySelectorAll(selector);
19+
// The NodeList of matching elements
20+
var missingCoverageElements = document.querySelectorAll(selector);
2121

22-
var currentIndex;
22+
var currentIndex;
2323

24-
function toggleClass(index) {
25-
missingCoverageElements
26-
.item(currentIndex)
27-
.classList.remove('highlighted');
28-
missingCoverageElements.item(index).classList.add('highlighted');
29-
}
30-
31-
function makeCurrent(index) {
32-
toggleClass(index);
33-
currentIndex = index;
34-
missingCoverageElements.item(index).scrollIntoView({
35-
behavior: 'smooth',
36-
block: 'center',
37-
inline: 'center'
38-
});
39-
}
24+
function toggleClass(index) {
25+
missingCoverageElements.item(currentIndex).classList.remove("highlighted");
26+
missingCoverageElements.item(index).classList.add("highlighted");
27+
}
4028

41-
function goToPrevious() {
42-
var nextIndex = 0;
43-
if (typeof currentIndex !== 'number' || currentIndex === 0) {
44-
nextIndex = missingCoverageElements.length - 1;
45-
} else if (missingCoverageElements.length > 1) {
46-
nextIndex = currentIndex - 1;
47-
}
29+
function makeCurrent(index) {
30+
toggleClass(index);
31+
currentIndex = index;
32+
missingCoverageElements.item(index).scrollIntoView({
33+
behavior: "smooth",
34+
block: "center",
35+
inline: "center",
36+
});
37+
}
4838

49-
makeCurrent(nextIndex);
39+
function goToPrevious() {
40+
var nextIndex = 0;
41+
if (typeof currentIndex !== "number" || currentIndex === 0) {
42+
nextIndex = missingCoverageElements.length - 1;
43+
} else if (missingCoverageElements.length > 1) {
44+
nextIndex = currentIndex - 1;
5045
}
5146

52-
function goToNext() {
53-
var nextIndex = 0;
47+
makeCurrent(nextIndex);
48+
}
5449

55-
if (
56-
typeof currentIndex === 'number' &&
57-
currentIndex < missingCoverageElements.length - 1
58-
) {
59-
nextIndex = currentIndex + 1;
60-
}
50+
function goToNext() {
51+
var nextIndex = 0;
6152

62-
makeCurrent(nextIndex);
53+
if (
54+
typeof currentIndex === "number" &&
55+
currentIndex < missingCoverageElements.length - 1
56+
) {
57+
nextIndex = currentIndex + 1;
6358
}
6459

65-
return function jump(event) {
66-
if (
67-
document.getElementById('fileSearch') === document.activeElement &&
68-
document.activeElement != null
69-
) {
70-
// if we're currently focused on the search input, we don't want to navigate
71-
return;
72-
}
60+
makeCurrent(nextIndex);
61+
}
7362

74-
switch (event.which) {
75-
case 78: // n
76-
case 74: // j
77-
goToNext();
78-
break;
79-
case 66: // b
80-
case 75: // k
81-
case 80: // p
82-
goToPrevious();
83-
break;
84-
}
85-
};
63+
return function jump(event) {
64+
if (
65+
document.getElementById("fileSearch") === document.activeElement &&
66+
document.activeElement != null
67+
) {
68+
// if we're currently focused on the search input, we don't want to navigate
69+
return;
70+
}
71+
72+
switch (event.which) {
73+
case 78: // n
74+
case 74: // j
75+
goToNext();
76+
break;
77+
case 66: // b
78+
case 75: // k
79+
case 80: // p
80+
goToPrevious();
81+
break;
82+
}
83+
};
8684
})();
87-
window.addEventListener('keydown', jumpToCode);
85+
window.addEventListener("keydown", jumpToCode);

0 commit comments

Comments
 (0)