File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -430,10 +430,14 @@ function getFormattedResults(allResults, isPrecommit) {
430430 const formattedResults = results
431431 . map ( ( flaw ) => formatResult ( flaw , isPrecommit ) )
432432 . filter ( ( flaw ) => shouldIncludeResult ( flaw , key ) )
433- const errors = formattedResults . filter ( ( result ) => result . severity === 'error' )
434- const warnings = formattedResults . filter ( ( result ) => result . severity === 'warning' )
435- const sortedResult = [ ...errors , ...warnings ]
436- output [ key ] = [ ...sortedResult ]
433+
434+ // Only add the file to output if there are results after filtering
435+ if ( formattedResults . length > 0 ) {
436+ const errors = formattedResults . filter ( ( result ) => result . severity === 'error' )
437+ const warnings = formattedResults . filter ( ( result ) => result . severity === 'warning' )
438+ const sortedResult = [ ...errors , ...warnings ]
439+ output [ key ] = [ ...sortedResult ]
440+ }
437441 }
438442 } )
439443 return output
Original file line number Diff line number Diff line change 1- // Configuration for which rules should be included in automated weekly reports
21export const reportingConfig = {
3- // Always include all rules with these severities
2+ // Always include all rules with these severities in automated weekly reports
43 includeSeverities : [ 'error' ] ,
54
65 // Specific rules to include regardless of severity
@@ -10,18 +9,19 @@ export const reportingConfig = {
109 'expired-content' ,
1110 ] ,
1211
13- // Specific rules to exclude from reports (overrides severity-based inclusion)
12+ // Specific rules to exclude from CI and reports (overrides severity-based inclusion)
1413 // Add rule names here if you want to suppress them from reports
1514 excludeRules : [
1615 // Example: 'GHD030' // Uncomment to exclude code-fence-line-length warnings
1716 'british-english-quotes' , // Exclude from reports but keep for pre-commit
1817 ] ,
1918
20- // Files to exclude from specific rules in reports
19+ // Files to exclude from specific rules in CI and reports
2120 // Format: { 'rule-name': ['file/path/pattern1', 'file/path/pattern2'] }
2221 excludeFilesFromRules : {
2322 'todocs-placeholder' : [
2423 'content/contributing/collaborating-on-github-docs/using-the-todocs-placeholder-to-leave-notes.md' ,
24+ 'content/contributing/collaborating-on-github-docs/index.md' ,
2525 ] ,
2626 } ,
2727}
You can’t perform that action at this time.
0 commit comments