pep8analysis: show annotated CFG in web interface
[nit.git] / contrib / pep8analysis / src / pep8analysis_web.nit
index bb314f1..def8e3c 100644 (file)
@@ -45,10 +45,17 @@ redef class AnalysisManager
                print_notes
                if notes.is_empty then print "Success: Nothing wrong detected"
 
+               var of = new StringOStream
+               cfg.print_dot(of, true)
+               of.close
+               show_graph(of.to_s)
+
                # Ready next
                reset
                clear
        end
+
+       fun show_graph(content: String) do "show_graph('{content.escape_to_c}');".run_js
 end
 
 class StringIStream