Created
October 4, 2022 23:29
-
-
Save mjgiarlo/c4eaa744c769178ab9485abc64238f64 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
counts = Hash.new([]) | |
Dir.glob('*/.rubocop.yml').each do |file| | |
YAML.load_file(file).tap do |cops| | |
cops | |
.select { |k, v| v.is_a?(Hash) && v.key?('Enabled') && !v['Enabled'] } | |
.each { |key| counts[key.first] += [file.split('/').first] } | |
end | |
end | |
counts = counts.sort_by { |k, v| [-v.count, k] }.to_h | |
# => | |
# {"RSpec/MultipleMemoizedHelpers"=>["assembly-image", "cocina-models", "dlme-transform", "dor-event-client", "dor-services-app", "dor-services-client", "dor_indexing_app", "infrastructure-integration-test", "pre-assembly", "preservation_robots", "sdr-api", "technical-metadata-service", "was_robot_suite"], | |
# "RSpec/MultipleExpectations"=>["argo", "cocina-models", "dor-event-client", "google-books", "happy-heron", "hydra_etd", "infrastructure-integration-test", "sdr-api", "sul_pub", "technical-metadata-service", "was-registrar-app", "was_robot_suite"], | |
# "RSpec/ExampleLength"=>["dor-services-app", "dor_indexing_app", "gis-robot-suite", "google-books", "happy-heron", "pre-assembly", "preservation_robots", "sdr-api", "technical-metadata-service"], | |
# "Style/WordArray"=>["assembly-image", "dlme-transform", "hydra_etd", "parse_date", "preservation-client", "preservation_catalog"], | |
# "Layout/EmptyLinesAroundClassBody"=>["parse_date", "preservation-client"], | |
# "RSpec/Capybara/SpecificMatcher"=>["argo", "cocina-models"], | |
# "RSpec/ContextWording"=>["pre-assembly", "preservation_catalog"], | |
# "RSpec/FilePath"=>["google-books", "preservation_robots"], | |
# "RSpec/ImplicitSubject"=>["pre-assembly", "preservation_catalog"], | |
# "RSpec/MessageSpies"=>["pre-assembly", "preservation_catalog"], | |
# "RSpec/Rails/HaveHttpStatus"=>["assembly-image", "cocina-models"], | |
# "Rails/EagerEvaluationLogMessage"=>["dor-services-app", "preservation_catalog"], | |
# "Rails/I18nLocaleTexts"=>["argo", "was-registrar-app"], | |
# "Style/FormatStringToken"=>["moab-versioning", "preservation_catalog"], | |
# "Style/NumericPredicate"=>["pre-assembly", "sul_pub"], | |
# "Style/RegexpLiteral"=>["hydra_etd", "pre-assembly"], | |
# "Gemspec/RequiredRubyVersion"=>["parse_date"], | |
# "Layout/EmptyLineAfterGuardClause"=>["preservation_catalog"], | |
# "Layout/EmptyLinesAroundModuleBody"=>["parse_date"], | |
# "Lint/MixedRegexpCaptureTypes"=>["parse_date"], | |
# "Metrics/AbcSize"=>["infrastructure-integration-test"], | |
# "Naming/VariableName"=>["sul_pub"], | |
# "RSpec/AnyInstance"=>["google-books"], | |
# "RSpec/FactoryBot"=>["sul_pub"], | |
# "RSpec/FactoryBot/SyntaxMethods"=>["workflow-server-rails"], | |
# "RSpec/NamedSubject"=>["preservation_catalog"], | |
# "RSpec/NestedGroups"=>["technical-metadata-service"], | |
# "RSpec/Rails/AvoidSetupHook"=>["assembly-image"], | |
# "RSpec/SubjectStub"=>["google-books"], | |
# "Rails/DynamicFindBy"=>["sul_pub"], | |
# "Rails/HasAndBelongsToMany"=>["happy-heron"], | |
# "Style/AccessorGrouping"=>["happy-heron"], | |
# "Style/AsciiComments"=>["dlme-transform"], | |
# "Style/ClassVars"=>["sul_pub"], | |
# "Style/Documentation"=>["ksr-app"], | |
# "Style/ExplicitBlockArgument"=>["preservation_catalog"], | |
# "Style/Next"=>["moab-versioning"], | |
# "Style/NumericLiterals"=>["parse_date"], | |
# "Style/OptionalBooleanParameter"=>["cocina-models"], | |
# "Style/StringLiterals"=>["moab-versioning"], | |
# "Style/YodaCondition"=>["parse_date"]} | |
# Run against these configs | |
# $ ls -laF */.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 10154 Sep 7 12:46 argo/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 4716 Oct 4 13:03 assembly-image/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 5186 Aug 1 09:27 assembly-objectfile/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 8617 Oct 4 13:03 cocina-models/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 4854 Sep 15 11:05 common-accessioning/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 3973 Feb 8 2022 dlme-transform/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 4580 Oct 4 13:03 dor-event-client/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 6114 Oct 4 13:03 dor-rights-auth/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 11878 Aug 31 08:46 dor-services-app/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 4062 May 2 12:45 dor-services-client/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 3046 Aug 1 09:28 dor-workflow-client/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 11606 Aug 1 20:13 dor_indexing_app/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 4407 Oct 4 13:03 druid-tools/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 6999 Sep 12 15:31 gis-robot-suite/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 10050 Aug 10 14:21 google-books/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 12865 Sep 29 10:13 happy-heron/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 11852 Sep 13 16:00 hydra_etd/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 7748 Aug 2 16:27 infrastructure-integration-test/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 502 Feb 22 2022 ksr-app/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 3518 Jun 28 12:55 lyber-core/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 6041 Jun 28 14:56 moab-versioning/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 5603 Aug 1 09:22 modsulator-app-rails/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 4328 Jun 28 14:51 parse_date/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 8023 Oct 4 13:05 pre-assembly/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 4975 Oct 4 13:05 preservation-client/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 9846 Jul 26 11:04 preservation_catalog/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 7631 Oct 4 13:05 preservation_robots/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 2949 May 16 11:48 robot-console/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 7127 Jul 11 13:44 sdr-api/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 4793 Sep 8 10:02 sdr-client/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 4267 Sep 12 08:44 sdr-deploy/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 9298 Aug 1 09:23 sul_pub/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 6495 Sep 12 15:06 suri-rails/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 9305 Sep 12 14:24 technical-metadata-service/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 4673 Oct 3 13:16 was-pywb/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 7275 Jul 20 12:34 was-registrar-app/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 5185 Sep 12 15:03 was_robot_suite/.rubocop.yml | |
# -rw-rw-r-- 1 mjg mjg 6488 Jul 18 11:01 workflow-server-rails/.rubocop.yml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment