scss_lint_reporter_checkstyle 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5fafb6a11bb9fa6efffdc595a753937ca0236a97
4
+ data.tar.gz: 505f47fff88f001185d16cd9058c187cfdbba5d1
5
+ SHA512:
6
+ metadata.gz: dc9b2284d6b779719abd381c429e4fa465772097c31af259731f7e816e9320a7ea317d6e562b52744538a342b12b1b9799fd738d641fb620ed7c5a10611407e2
7
+ data.tar.gz: 6dc20780e9214079040f0591d3eb999acaa5b2d3c42d255974a55a492aa1d73ac6a616c12dde9aaecd9b628054a453bca9beec2d6b33e98a0129141313928d47
@@ -0,0 +1,26 @@
1
+ module SCSSLint
2
+ class Reporter::CheckstyleReporter < Reporter
3
+ def report_lints
4
+ output = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
5
+
6
+ output << "<checkstyle version=\"1.5.6\">\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 << " <error source=\"#{error.linter.name if error.linter}\" " \
12
+ "line=\"#{error.location.line}\" " \
13
+ "column=\"#{error.location.column}\" " \
14
+ "length=\"#{error.location.length}\" " \
15
+ "severity=\"#{error.severity}\" " \
16
+ "message=#{error.description.encode(xml: :attr)} />\n"
17
+ end
18
+
19
+ output << " </file>\n"
20
+ end
21
+ output << "</checkstyle>\n"
22
+
23
+ output
24
+ end
25
+ end
26
+ end
metadata ADDED
@@ -0,0 +1,46 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: scss_lint_reporter_checkstyle
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Andor Dávid
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-02-27 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: This gem add a new formatter to the scss-lint which is compatible with
14
+ the Checkstyle standard.
15
+ email:
16
+ - david-andor@kozpontiagy.hu
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - lib/scss_lint_reporter_checkstyle.rb
22
+ homepage: https://github.com/Sweetchuck/scss_lint_reporter_checkstyle
23
+ licenses:
24
+ - MIT
25
+ metadata: {}
26
+ post_install_message:
27
+ rdoc_options: []
28
+ require_paths:
29
+ - lib
30
+ required_ruby_version: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ required_rubygems_version: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: 1.3.6
40
+ requirements: []
41
+ rubyforge_project:
42
+ rubygems_version: 2.4.5
43
+ signing_key:
44
+ specification_version: 4
45
+ summary: Extend the scss-lint with a Checkstyle formatter
46
+ test_files: []