xcpretty-warning-counter 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/warning_counter.rb +6 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a577600fccc8c98e79809dca9e9c5525701194f3
4
- data.tar.gz: 8436c8ca72126693e3ed1319a4201ea00773bd14
3
+ metadata.gz: b727f4e1868c7bcfdcc88ad8b8a5e032eb590f6e
4
+ data.tar.gz: 5c42ba5b369bdbb3e2da8db79519e64371b913e3
5
5
  SHA512:
6
- metadata.gz: e391df9d9a00b100a9d5c8ed164ff6c62b3fbb1297daee3f16f4ff6ffc7ed54124201df9b7fe664ee1a58b3e6cc0391b0dfa3017f7922649d8ae4e7104a38f9d
7
- data.tar.gz: 4f78107d34ffab455e2c1bca70bd247d3374c12b8de2364491284bd6273633db50fef4ea4bf8900a2c78a58a5aa93cb4f968c4eb3ce9aa5a9b61b1e9ab250945
6
+ metadata.gz: e386f280cc00bda5efe1ad19d9fe9f216219f79b40df69f54617fa902b458b9542e45fffa366711adec9f3ea7e3239b5bc774946d6e1e124dc0a9c57fdd48304
7
+ data.tar.gz: 7da38650ed273ec9e659cf8224a5f06137bfb93604f9792c6a77037cbecdf6f0c1483d91b31f028aca5695aae0de003e35aca481dc59f93fbf46e17e35614c62
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # XCPretty Warning Counter
2
2
 
3
- A custom formatter for [xcpretty](https://github.com/supermarin/xcpretty) that counts warnings and outputs them in JSON and YAML format in a files named `warning-counts.json` and `warning-counts.yaml` respectively
3
+ A custom formatter for [xcpretty](https://github.com/supermarin/xcpretty) that counts warnings and outputs them in JSON and YAML format in files named `warning-counts.json` and `warning-counts.yaml` respectively
4
4
 
5
5
  ## Installation
6
6
 
@@ -4,6 +4,7 @@ require 'psych'
4
4
  class WarningCounter < XCPretty::Simple
5
5
  def initialize(use_unicode, colorize)
6
6
  super
7
+ @warnings_hash = Set.new()
7
8
  @warning_count = 0
8
9
  end
9
10
 
@@ -18,7 +19,11 @@ class WarningCounter < XCPretty::Simple
18
19
  end
19
20
 
20
21
  def format_compile_warning(file_name, file_path, reason, line, cursor)
21
- @warning_count += 1
22
+ key = "#{file_path}:#{reason}:#{line}"
23
+ if not @warnings_hash.include?(key)
24
+ @warnings_hash.add(key)
25
+ @warning_count += 1
26
+ end
22
27
  super
23
28
  end
24
29
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcpretty-warning-counter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Lyon-Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-30 00:00:00.000000000 Z
11
+ date: 2016-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xcpretty