scss_lint_reporter_lintxml 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/scss_lint_reporter_lintxml.rb +26 -0
- metadata +48 -0
@@ -0,0 +1,26 @@
|
|
1
|
+
module SCSSLint
|
2
|
+
class Reporter::LintxmlReporter < Reporter
|
3
|
+
def report_lints
|
4
|
+
output = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
|
5
|
+
|
6
|
+
output << "<lint>\n"
|
7
|
+
lints.group_by(&:filename).each do |file_name, errors|
|
8
|
+
output << " <file name=#{file_name.encode(xml: :attr)}>\n"
|
9
|
+
|
10
|
+
errors.each do |error|
|
11
|
+
output << " <issue source=\"#{error.linter.name if error.linter}\" " \
|
12
|
+
"line=\"#{error.location.line}\" " \
|
13
|
+
"char=\"#{error.location.column}\" " \
|
14
|
+
#"length=\"#{error.location.length}\" " \
|
15
|
+
"severity=\"#{error.severity}\" " \
|
16
|
+
"reason=#{error.description.encode(xml: :attr)} />\n"
|
17
|
+
end
|
18
|
+
|
19
|
+
output << " </issue>\n"
|
20
|
+
end
|
21
|
+
output << "</lint>\n"
|
22
|
+
|
23
|
+
output
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: scss_lint_reporter_lintxml
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Michal Šimon
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2015-07-06 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
14
|
+
description: This gem add a new formatter to the scss-lint which is compatible with
|
15
|
+
the Lint XML standard.
|
16
|
+
email:
|
17
|
+
- michal.simon@centrum.cz
|
18
|
+
executables: []
|
19
|
+
extensions: []
|
20
|
+
extra_rdoc_files: []
|
21
|
+
files:
|
22
|
+
- lib/scss_lint_reporter_lintxml.rb
|
23
|
+
homepage: https://github.com/michalhisim/scss_lint_reporter_lint_xml
|
24
|
+
licenses:
|
25
|
+
- MIT
|
26
|
+
post_install_message:
|
27
|
+
rdoc_options: []
|
28
|
+
require_paths:
|
29
|
+
- - lib
|
30
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
31
|
+
none: false
|
32
|
+
requirements:
|
33
|
+
- - ! '>='
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '0'
|
36
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
37
|
+
none: false
|
38
|
+
requirements:
|
39
|
+
- - ! '>='
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: 1.3.6
|
42
|
+
requirements: []
|
43
|
+
rubyforge_project:
|
44
|
+
rubygems_version: 1.8.23
|
45
|
+
signing_key:
|
46
|
+
specification_version: 3
|
47
|
+
summary: Extend the scss-lint with a Lint XML formatter
|
48
|
+
test_files: []
|