codegrade 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ed941c70ebef8e4a85be978419dca1675e9e3c1f
4
- data.tar.gz: d08d06ffcb554a7babe0f18bd336a58699ead4dd
3
+ metadata.gz: e3f97d6f359d7a7824488726ec14892a4c778a36
4
+ data.tar.gz: d8e59033abb79029c90973ee25ddaa8f0f54bbcb
5
5
  SHA512:
6
- metadata.gz: e0ad5baf525492fb258d847ee5903082a25f9ed3ad5dc7a26e0d5f784c2d057238b71391adfb1cff44c2651effb392d8a64b51a87a625d668d6397854eeb8346
7
- data.tar.gz: de9fd150d25a7ff7423a6a8ec27c37e17abd705d05a1fc027a50a21d4aa505a923344676522c5a910187a2bc1f11ef30e6e756b9a9fc10cecc7dd01806f62edc
6
+ metadata.gz: 22f7e8f35b332449f38a35f2be9c763dc13b5c89537216acba802058c7388f5e2bb24c7ed3241abf05860e7f91057b61fd78fc1b062b079dc6e826260ac87c33
7
+ data.tar.gz: 08e28c8822b235674ff9c7c3c5a7baa9415b999adf0f1326b08e59a1e7ead60d4b6fd4d6087174ff68b48b992bf784cc3e0271290f9de6ea9ea73036f55c24e7
@@ -5,7 +5,7 @@ module Codegrade
5
5
  end
6
6
 
7
7
  def print
8
- group_by_categories
8
+ group_by_files
9
9
  working_directory = File.expand_path('.')
10
10
 
11
11
  @categories.each do |category, offenses|
@@ -14,7 +14,7 @@ module Codegrade
14
14
 
15
15
  offenses.each do |offense|
16
16
  file = offense.file.gsub(working_directory, '') unless offense.file.nil?
17
- puts "- #{file}:#{offense.line_number}:#{offense.column_number}"
17
+ puts "- #{offense.line_number}:#{offense.column_number} #{offense.category}"
18
18
  end
19
19
 
20
20
  puts
@@ -23,12 +23,12 @@ module Codegrade
23
23
 
24
24
  private
25
25
 
26
- def group_by_categories
26
+ def group_by_files
27
27
  @categories = Hash.new
28
28
 
29
29
  @offenses.each do |offense|
30
- @categories[offense.category] ||= []
31
- @categories[offense.category].push(offense)
30
+ @categories[offense.file] ||= []
31
+ @categories[offense.file].push(offense)
32
32
  end
33
33
  end
34
34
  end
@@ -1,3 +1,3 @@
1
1
  module Codegrade
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codegrade
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michał Młoźniak