File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 3131end
3232
3333# Output as GitHub Actions annotations (since we can't post PR comments without token)
34+ # Using print instead of puts to avoid Danger's "You used puts" warning
3435if ENV [ 'GITHUB_ACTIONS' ]
3536 violation_report [ :errors ] . each do |v |
3637 if v . file && v . line
37- $stdout . puts "::error file=#{ v . file } ,line=#{ v . line } ::#{ v . message } "
38+ print "::error file=#{ v . file } ,line=#{ v . line } ::#{ v . message } \n "
3839 else
39- $stdout . puts "::error::#{ v . message } "
40+ print "::error::#{ v . message } \n "
4041 end
4142 end
4243
4344 violation_report [ :warnings ] . each do |v |
4445 if v . file && v . line
45- $stdout . puts "::warning file=#{ v . file } ,line=#{ v . line } ::#{ v . message } "
46+ print "::warning file=#{ v . file } ,line=#{ v . line } ::#{ v . message } \n "
4647 else
47- $stdout . puts "::warning::#{ v . message } "
48+ print "::warning::#{ v . message } \n "
4849 end
4950 end
5051
5152 violation_report [ :messages ] . each do |v |
5253 if v . file && v . line
53- $stdout . puts "::notice file=#{ v . file } ,line=#{ v . line } ::#{ v . message } "
54+ print "::notice file=#{ v . file } ,line=#{ v . line } ::#{ v . message } \n "
5455 else
55- $stdout . puts "::notice::#{ v . message } "
56+ print "::notice::#{ v . message } \n "
5657 end
5758 end
59+
60+ # Debug: show counts
61+ total = violation_report [ :errors ] . count + violation_report [ :warnings ] . count + violation_report [ :messages ] . count
62+ print "::notice::Danger completed: #{ violation_report [ :errors ] . count } errors, #{ violation_report [ :warnings ] . count } warnings, #{ violation_report [ :messages ] . count } messages\n "
5863end
Original file line number Diff line number Diff line change @@ -167,3 +167,4 @@ def mounted_instances
167167 end
168168 end
169169end
170+
You can’t perform that action at this time.
0 commit comments