Skip to content

Commit 4380bf2

Browse files
committed
format & cleanup
1 parent 07e0618 commit 4380bf2

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

checkstyle/reporter/XMLReporter.hx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ class XMLReporter implements IReporter {
2727
public function start() {
2828
var sb = new StringBuf();
2929
sb.add("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
30-
if(_style != "") sb.add("<?xml-stylesheet type=\"text/xsl\" href=\"" + _style +"\" ?>\n");
30+
if(_style != "") {
31+
sb.add("<?xml-stylesheet type=\"text/xsl\" href=\"" + _style + "\" ?>\n");
32+
}
3133
sb.add("<checkstyle version=\"5.0\">\n");
3234
//Sys.stdout().writeString(sb.toString());
3335
_report.add(sb.toString());
@@ -66,9 +68,9 @@ class XMLReporter implements IReporter {
6668

6769
static function severityString(s:SeverityLevel):String {
6870
return switch(s){
69-
case INFO: return "info";
70-
case WARNING: return "warning";
71-
case ERROR: return "error";
71+
case INFO: return "info";
72+
case WARNING: return "warning";
73+
case ERROR: return "error";
7274
}
7375
}
7476

@@ -77,12 +79,12 @@ class XMLReporter implements IReporter {
7779
* https://github.com/janl/mustache.js/blob/master/mustache.js#L49
7880
*/
7981
static var entityMap:Map<String,String> = [
80-
"&" => "&amp;",
81-
"<" => "&lt;",
82-
">" => "&gt;",
83-
'"' => "&quot;",
84-
"'" => "&#39;",
85-
"/" => "&#x2F;"
82+
"&" => "&amp;",
83+
"<" => "&lt;",
84+
">" => "&gt;",
85+
'"' => "&quot;",
86+
"'" => "&#39;",
87+
"/" => "&#x2F;"
8688
];
8789

8890
static var entityRE = ~/[&<>"'\/]/g;
@@ -121,4 +123,4 @@ class XMLReporter implements IReporter {
121123
//Sys.stdout().writeString(sb.toString());
122124
_report.add(sb.toString());
123125
}
124-
}
126+
}

run.n

2.08 KB
Binary file not shown.

0 commit comments

Comments
 (0)