parse_packwerk 0.15.0 → 0.16.0

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
  SHA256:
3
- metadata.gz: 307906041051ec00eb3cc2647b0e04be2ac81d03f4ee0ebce51450b42a6eca55
4
- data.tar.gz: 886374546d1cbb7d8562850d541c7fd77c3089f935138ab399c3c5df632ab396
3
+ metadata.gz: fbe9403aa70147a34d5eff8474bfa6d85d7ce224744adf7f0c9fb8fcbe38031c
4
+ data.tar.gz: 1eaa3eeed901bb517330f75ac2d9b12c4244410f7037d0c4095df218bb4d1cb1
5
5
  SHA512:
6
- metadata.gz: 76eff55192a47f33bf95cf267ed7517d143bec88ef403a36fc88b896254ef7278bfc4cc5d7a279aaa39f82d028b6db2d8ac64ee6840080c6da7cc39f5d1ce81d
7
- data.tar.gz: 97ae51ba0bb3694e382f367deecf65ecda486679412c80c970fae1560de8253f30fcbe4eb30502cd2438e75d3cf9224a4ac4637ea91e38a2b0d2afef2d5021fd
6
+ metadata.gz: fbc31cab6491b2f2d620c4529f9517446a0a180fe07c1cdc4eb5195b16bc3ce986f63f359421c5460742b49026daa64535c051679a6860b912f509fd65cc7b5f
7
+ data.tar.gz: ce9ffabcfc52bd3a98eabaf94b7130f1cb8d4f55faa797241a7029efcd143a6e3a2b082fc90017a07ab23bb57190366f425e61a2dd091579db272903d1788e2b
@@ -7,6 +7,8 @@ module ParsePackwerk
7
7
  PACKAGE_TODO_YML_NAME = T.let('package_todo.yml'.freeze, String)
8
8
  ENFORCE_DEPENDENCIES = T.let('enforce_dependencies'.freeze, String)
9
9
  ENFORCE_PRIVACY = T.let('enforce_privacy'.freeze, String)
10
+ DEPENDENCY_VIOLATION_TYPE = T.let('dependency'.freeze, String)
11
+ PRIVACY_VIOLATION_TYPE = T.let('privacy'.freeze, String)
10
12
  PUBLIC_PATH = T.let('public_path'.freeze, String)
11
13
  METADATA = T.let('metadata'.freeze, String)
12
14
  DEPENDENCIES = T.let('dependencies'.freeze, String)
@@ -30,12 +30,8 @@ module ParsePackwerk
30
30
  symbol_usage = package_todo_per_package[class_name]
31
31
  files = symbol_usage['files']
32
32
  violations = symbol_usage['violations']
33
- if violations.include? 'dependency'
34
- all_violations << Violation.new(type: 'dependency', to_package_name: to_package_name, class_name: class_name, files: files)
35
- end
36
-
37
- if violations.include? 'privacy'
38
- all_violations << Violation.new(type: 'privacy', to_package_name: to_package_name, class_name: class_name, files: files)
33
+ violations.uniq.each do |violation_type|
34
+ all_violations << Violation.new(type: violation_type, to_package_name: to_package_name, class_name: class_name, files: files)
39
35
  end
40
36
  end
41
37
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parse_packwerk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gusto Engineers