Skip to content

Commit

Permalink
Fix printing empty testcase if no errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Eckerstorfer committed Jun 9, 2015
1 parent 16cb19e commit b40bcbb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ scss-lint --require=scss_lint_reporter_junit --format=JUnit foo.scss
Changelog
---------

### Version 0.1.2 (9 June 2015)

- Fix printing empty testcase if no errors

### Version 0.1.1 (9 June 2015)

- Add missing line break between error messages
Expand Down
2 changes: 1 addition & 1 deletion lib/scss_lint_reporter_junit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def report_lints
output = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"

output << "<testsuite name=\"scsslint\" failures=\"#{results.length}\">\n"
if !results.length
if results.length == 0
output << " <testcase name=\"Empty\"/>\n"
end
results.each do |file_name, errors|
Expand Down
2 changes: 1 addition & 1 deletion scss_lint_reporter_junit.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.license = "MIT"
s.name = "scss_lint_reporter_junit"
s.version = "0.1.1"
s.version = "0.1.2"
s.summary = "Extend the scss-lint with a jUnit formatter"
s.description = "This gem add a new formatter to the scss-lint which is compatible with the jUnit standard."
s.homepage = "https://github.com/florianeckerstorfer/scss_lint_reporter_junit"
Expand Down

0 comments on commit b40bcbb

Please sign in to comment.