You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## List the top violations of a specific type for packs/your_pack.
53
+
`bin/packs list_top_violations type [ packs/your_pack ]`
54
54
55
-
Want to see who is depending on you? Not sure how your pack's code is being used in an unstated way
55
+
Possible types are: dependency, privacy, architecture.
56
56
57
-
You can use this command to list the top dependency violations.
57
+
Want to see who is depending on you? Not sure how your pack's code is being used in an unstated way? You can use this command to list the top dependency violations.
58
58
59
-
If no pack name is passed in, this will list out violations across all packs.
60
-
61
-
## List the top privacy violations of packs/your_pack
desc'list_top_violations type [ packs/your_pack ]','List the top violations of a specific type for packs/your_pack.'
35
36
long_desc<<~LONG_DESC
36
-
Want to see who is depending on you? Not sure how your pack's code is being used in an unstated way
37
+
Possible types are: #{POSIBLE_TYPES.join(', ')}.
37
38
38
-
You can use this command to list the top dependency violations.
39
+
Want to see who is depending on you? Not sure how your pack's code is being used in an unstated way? You can use this command to list the top dependency violations.
39
40
40
-
If no pack name is passed in, this will list out violations across all packs.
41
-
LONG_DESC
42
-
option:limit,type: :numeric,default: 10,aliases: :l,banner: 'Specify the limit of constants to analyze'
43
-
sig{params(pack_name: String).void}
44
-
deflist_top_dependency_violations(pack_name)
45
-
Packs.list_top_dependency_violations(
46
-
pack_name: pack_name,
47
-
limit: options[:limit]
48
-
)
49
-
exit_successfully
50
-
end
51
-
52
-
desc'list_top_privacy_violations packs/your_pack','List the top privacy violations of packs/your_pack'
53
-
long_desc<<~LONG_DESC
54
-
Want to create interfaces? Not sure how your pack's code is being used?
41
+
Want to create interfaces? Not sure how your pack's code is being used? You can use this command to list the top privacy violations.
55
42
56
-
You can use this command to list the top privacy violations.
43
+
Want to focus on the big picture first? You can use this command to list the top architecture violations.
57
44
58
45
If no pack name is passed in, this will list out violations across all packs.
59
46
LONG_DESC
60
47
option:limit,type: :numeric,default: 10,aliases: :l,banner: 'Specify the limit of constants to analyze'
61
-
sig{params(pack_name: String).void}
62
-
deflist_top_privacy_violations(pack_name)
63
-
Packs.list_top_privacy_violations(
48
+
sigdo
49
+
params(
50
+
type: String,
51
+
pack_name: T.nilable(String)
52
+
).void
53
+
end
54
+
deflist_top_violations(type,pack_name=nil)
55
+
raiseStandardError,"Invalid type #{type}. Possible types are: #{POSIBLE_TYPES.join(', ')}"unlessPOSIBLE_TYPES.include?(type)
0 commit comments