diff --git a/.rubocop.yml b/.rubocop.yml index e35bc73..e85aaf0 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,46 +1,23 @@ +inherit_from: .rubocop_todo.yml + AllCops: - TargetRubyVersion: 3.1 NewCops: enable - -Metrics/CollectionLiteralLength: - Enabled: false - -Gemspec/DevelopmentDependencies: - Enabled: false - -Style/StringLiterals: - Enabled: false - -Style/FrozenStringLiteralComment: - Enabled: false - -Style/Documentation: - Enabled: false + TargetRubyVersion: 3.1 Layout/LineLength: - Max: 200 Exclude: - lib/humanize/locales/constants/*.rb -Metrics/MethodLength: - Max: 30 - -Metrics/AbcSize: - Max: 30 - -Metrics/CyclomaticComplexity: - Max: 10 - -Metrics/PerceivedComplexity: - Max: 10 - Metrics/BlockLength: Exclude: - spec/**/*.rb +Metrics/CollectionLiteralLength: + Enabled: false + +Style/Documentation: + Enabled: false + Style/WordArray: Exclude: - lib/humanize/locales/constants/*.rb - -Style/SpecialGlobalVars: - Enabled: false diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml new file mode 100644 index 0000000..d55ce85 --- /dev/null +++ b/.rubocop_todo.yml @@ -0,0 +1,53 @@ +# This configuration was generated by +# `rubocop --auto-gen-config --auto-gen-only-exclude` +# on 2024-05-12 03:22:52 UTC using RuboCop version 1.63.5. +# The point is for the user to remove these configuration records +# one by one as the offenses are removed from the code base. +# Note that changes in the inspected code, or installation of new +# versions of RuboCop, may require this file to be generated again. + +# Offense count: 5 +# Configuration parameters: EnforcedStyle, AllowedGems, Include. +# SupportedStyles: Gemfile, gems.rb, gemspec +# Include: **/*.gemspec, **/Gemfile, **/gems.rb +Gemspec/DevelopmentDependencies: + Exclude: + - 'humanize.gemspec' + +# Offense count: 1 +# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max. +Metrics/AbcSize: + Exclude: + - 'lib/humanize/module.rb' + +# Offense count: 1 +# Configuration parameters: AllowedMethods, AllowedPatterns, Max. +Metrics/CyclomaticComplexity: + Exclude: + - 'lib/humanize/module.rb' + +# Offense count: 18 +# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns. +Metrics/MethodLength: + Max: 18 + +# Offense count: 56 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: always, always_true, never +Style/FrozenStringLiteralComment: + Enabled: false + +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: RequireEnglish. +# SupportedStyles: use_perl_names, use_english_names, use_builtin_english_names +Style/SpecialGlobalVars: + EnforcedStyle: use_perl_names + +# Offense count: 3330 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline. +# SupportedStyles: single_quotes, double_quotes +Style/StringLiterals: + Enabled: false