@@ -46,7 +46,7 @@ class CheckRunner {
46
46
47
47
// If report should be written to logs
48
48
if ( this . enableCheckLog ) {
49
- this . _logReport ( report )
49
+ this . _logReport ( report ) ;
50
50
}
51
51
return report ;
52
52
}
@@ -85,8 +85,8 @@ class CheckRunner {
85
85
report : {
86
86
version,
87
87
state : CheckState . success ,
88
- groups : [ ]
89
- }
88
+ groups : [ ] ,
89
+ } ,
90
90
} ;
91
91
92
92
// Identify report version
@@ -95,13 +95,12 @@ class CheckRunner {
95
95
default :
96
96
// For each check group
97
97
for ( const group of groups ) {
98
-
99
98
// Create group report
100
99
const groupReport = {
101
100
name : group . name ( ) ,
102
101
state : CheckState . success ,
103
102
checks : [ ] ,
104
- }
103
+ } ;
105
104
106
105
// Create check reports
107
106
groupReport . checks = group . checks ( ) . map ( check => {
@@ -129,9 +128,9 @@ class CheckRunner {
129
128
* @param {Object } report The report to log.
130
129
*/
131
130
_logReport ( report ) {
132
-
133
131
// Determine log level depending on whether any check failed
134
- const log = report . report . state == CheckState . success ? ( s ) => logger . info ( s ) : ( s ) => logger . warn ( s ) ;
132
+ const log =
133
+ report . report . state == CheckState . success ? s => logger . info ( s ) : s => logger . warn ( s ) ;
135
134
136
135
// Declare output
137
136
const indent = ' ' ;
@@ -142,7 +141,7 @@ class CheckRunner {
142
141
143
142
// Traverse all groups and checks for compose output
144
143
for ( const group of report . report . groups ) {
145
- output += `\n- ${ group . name } `
144
+ output += `\n- ${ group . name } ` ;
146
145
147
146
for ( const check of group . checks ) {
148
147
checksCount ++ ;
@@ -166,7 +165,9 @@ class CheckRunner {
166
165
`\n# #` +
167
166
`\n###################################` +
168
167
`\n` +
169
- `\n${ failedChecksCount > 0 ? 'Warning: ' : '' } ${ failedChecksCount } weak security setting(s) found${ failedChecksCount > 0 ? '!' : '' } ` +
168
+ `\n${
169
+ failedChecksCount > 0 ? 'Warning: ' : ''
170
+ } ${ failedChecksCount } weak security setting(s) found${ failedChecksCount > 0 ? '!' : '' } ` +
170
171
`\n${ checksCount } check(s) executed` +
171
172
`\n${ skippedCheckCount } check(s) skipped` +
172
173
`\n` +
@@ -183,9 +184,12 @@ class CheckRunner {
183
184
*/
184
185
_getLogIconForState ( state ) {
185
186
switch ( state ) {
186
- case CheckState . success : return '✅' ;
187
- case CheckState . fail : return '❌' ;
188
- default : return 'ℹ️' ;
187
+ case CheckState . success :
188
+ return '✅' ;
189
+ case CheckState . fail :
190
+ return '❌' ;
191
+ default :
192
+ return 'ℹ️' ;
189
193
}
190
194
}
191
195
0 commit comments