Lines Matching refs:writer
103 def writer(text): function
106 return writer
113 def dump_html_prologue(title, writer, warn_patterns, project_names): argument
114 writer('<html>\n<head>')
115 writer('<title>' + title + '</title>')
116 writer(html_head_scripts)
117 emit_stats_by_project(writer, warn_patterns, project_names)
118 writer('</head>\n<body>')
119 writer(html_big(title))
120 writer('<p>')
123 def dump_html_epilogue(writer): argument
124 writer('</body>\n</head>\n</html>')
216 total_all_projects, writer): argument
235 writer('<script>')
236 emit_const_string_array('StatsHeader', stats_header, writer)
237 emit_const_object_array('StatsRows', stats_rows, writer)
238 writer(draw_table_javascript)
239 writer('</script>')
242 def emit_stats_by_project(writer, warn_patterns, project_names): argument
252 total_all_projects, writer)
255 def dump_stats(writer, warn_patterns): argument
269 writer('Number of classified warnings: <b>' + str(known) + '</b><br>')
270 writer('Number of skipped warnings: <b>' + str(skipped) + '</b><br>')
271 writer('Number of unclassified warnings: <b>' + str(unknown) + '</b><br>')
276 writer('Total number of warnings: <b>' + str(total) + '</b>' + extra_msg)
289 def emit_buttons(writer): argument
290 writer('<button class="button" onclick="expandCollapse(1);">'
308 def dump_fixed(writer, warn_patterns): argument
312 writer('\n<br><p style="background-color:lightblue"><b>'
319 writer('<blockquote>')
325 writer('<div id="' + anchor + '" style="display:none;"><table>')
331 writer('<tr><td class="c' + str(cur_row_class) + '">' + t + '</td></tr>')
332 writer('</table></div>')
333 writer('</blockquote>')
375 def emit_warning_array(name, writer, warn_patterns): argument
376 writer('var warning_{} = ['.format(name))
379 writer('{},'.format(w[name].value))
381 writer('{},'.format(w[name]))
382 writer('];')
385 def emit_warning_arrays(writer, warn_patterns): argument
386 emit_warning_array('severity', writer, warn_patterns)
387 writer('var warning_description = [')
390 writer('"{}",'.format(escape_string(w['description'])))
392 writer('"",') # no such warning
393 writer('];')
542 def emit_const_string(name, value, writer): argument
543 writer('const ' + name + ' = "' + escape_string(value) + '";')
547 def emit_const_int_array(name, array, writer): argument
548 writer('const ' + name + ' = [')
550 writer(str(n) + ',')
551 writer('];')
555 def emit_const_string_array(name, array, writer): argument
556 writer('const ' + name + ' = [')
558 writer('"' + strip_escape_string(s) + '",')
559 writer('];')
563 def emit_const_html_string_array(name, array, writer): argument
564 writer('const ' + name + ' = [')
569 writer('"' + cgi.escape(strip_escape_string(s)) + '",')
570 writer('];')
574 def emit_const_object_array(name, array, writer): argument
575 writer('const ' + name + ' = [')
577 writer(str(x) + ',')
578 writer('];')
581 def emit_js_data(writer, flags, warning_messages, warning_links, argument
584 emit_const_string('FlagPlatform', flags.platform, writer)
585 emit_const_string('FlagURL', flags.url, writer)
586 emit_const_string('FlagSeparator', flags.separator, writer)
588 writer)
590 [s.header for s in Severity.levels], writer)
592 [s.column_header for s in Severity.levels], writer)
593 emit_const_string_array('ProjectNames', project_names, writer)
596 [w['severity'].value for w in warn_patterns], writer)
600 writer)
601 emit_const_html_string_array('WarningMessages', warning_messages, writer)
602 emit_const_object_array('Warnings', warning_records, writer)
604 emit_const_html_string_array('WarningLinks', warning_links, writer)
632 writer = make_writer(output_stream)
633 dump_html_prologue('Warnings for ' + header_str, writer, warn_patterns,
635 dump_stats(writer, warn_patterns)
636 writer('<br><div id="stats_table"></div><br>')
637 writer('\n<script>')
638 emit_js_data(writer, flags, warning_messages, warning_links, warning_records,
640 writer(scripts_for_warning_groups)
641 writer('</script>')
642 emit_buttons(writer)
644 writer('<br><div id="warning_groups"></div>')
646 writer('<script>groupByProject();</script>')
648 writer('<script>groupBySeverity();</script>')
649 dump_fixed(writer, warn_patterns)
650 dump_html_epilogue(writer)
667 dump_csv(csv.writer(f, lineterminator='\n'), warn_patterns)
670 dump_csv(csv.writer(sys.stdout, lineterminator='\n'), warn_patterns)