-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add RuboCop for code style enforcement
- Loading branch information
1 parent
b2ef844
commit 9386e07
Showing
6 changed files
with
355 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
inherit_from: .rubocop_todo.yml | ||
|
||
require: | ||
- rubocop-performance | ||
- rubocop-rails | ||
- rubocop-minitest | ||
|
||
AllCops: | ||
TargetRubyVersion: 2.7 | ||
|
||
Layout/DotPosition: | ||
EnforcedStyle: 'trailing' | ||
|
||
Layout/EmptyLineAfterGuardClause: | ||
Enabled: false | ||
|
||
Layout/LineLength: | ||
Enabled: false | ||
|
||
Metrics: | ||
Enabled: false | ||
|
||
Style/FormatStringToken: | ||
EnforcedStyle: template | ||
|
||
Style/HashSyntax: | ||
EnforcedStyle: no_mixed_keys | ||
|
||
Style/SymbolArray: | ||
EnforcedStyle: brackets | ||
|
||
Style/Documentation: | ||
Enabled: false |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,301 @@ | ||
# This configuration was generated by | ||
# `rubocop --auto-gen-config` | ||
# on 2024-02-19 11:31:23 UTC using RuboCop version 1.57.2. | ||
# 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: 4 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include. | ||
# Include: **/*.gemfile, **/Gemfile, **/gems.rb | ||
Bundler/OrderedGems: | ||
Exclude: | ||
- 'Gemfile' | ||
|
||
# Offense count: 3 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: EnforcedStyle, IndentationWidth. | ||
# SupportedStyles: with_first_argument, with_fixed_indentation | ||
Layout/ArgumentAlignment: | ||
Exclude: | ||
- 'lib/hammer_cli_foreman_discovery/discovery.rb' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
Layout/ClosingParenthesisIndentation: | ||
Exclude: | ||
- 'test/unit/discovery_resource_mock.rb' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
Layout/EmptyLineAfterMagicComment: | ||
Exclude: | ||
- 'hammer_cli_foreman_discovery.gemspec' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: EmptyLineBetweenMethodDefs, EmptyLineBetweenClassDefs, EmptyLineBetweenModuleDefs, DefLikeMacros, AllowAdjacentOneLineDefs, NumberOfEmptyLines. | ||
Layout/EmptyLineBetweenDefs: | ||
Exclude: | ||
- 'lib/hammer_cli_foreman_discovery/discovery.rb' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
Layout/EmptyLines: | ||
Exclude: | ||
- 'lib/hammer_cli_foreman_discovery/discovery.rb' | ||
|
||
# Offense count: 19 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: EnforcedStyle. | ||
# SupportedStyles: empty_lines, no_empty_lines | ||
Layout/EmptyLinesAroundBlockBody: | ||
Exclude: | ||
- 'lib/hammer_cli_foreman_discovery/command_extensions/provision_with_puppet.rb' | ||
- 'test/unit/discovery_rules_test.rb' | ||
- 'test/unit/discovery_test.rb' | ||
|
||
# Offense count: 5 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: EnforcedStyle. | ||
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only | ||
Layout/EmptyLinesAroundClassBody: | ||
Exclude: | ||
- 'lib/hammer_cli_foreman_discovery/discovery.rb' | ||
- 'lib/hammer_cli_foreman_discovery/discovery_rule.rb' | ||
- 'lib/hammer_cli_foreman_discovery/i18n.rb' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
Layout/EmptyLinesAroundExceptionHandlingKeywords: | ||
Exclude: | ||
- 'lib/hammer_cli_foreman_discovery.rb' | ||
|
||
# Offense count: 8 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: EnforcedStyle. | ||
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines | ||
Layout/EmptyLinesAroundModuleBody: | ||
Exclude: | ||
- 'lib/hammer_cli_foreman_discovery/discovery.rb' | ||
- 'lib/hammer_cli_foreman_discovery/discovery_references.rb' | ||
- 'lib/hammer_cli_foreman_discovery/discovery_rule.rb' | ||
- 'lib/hammer_cli_foreman_discovery/i18n.rb' | ||
- 'test/unit/discovery_resource_mock.rb' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment. | ||
Layout/ExtraSpacing: | ||
Exclude: | ||
- 'lib/hammer_cli_foreman_discovery/discovery.rb' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: EnforcedStyle, IndentationWidth. | ||
# SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses | ||
Layout/FirstArgumentIndentation: | ||
Exclude: | ||
- 'test/unit/discovery_resource_mock.rb' | ||
|
||
# Offense count: 6 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: EnforcedStyle, IndentationWidth. | ||
# SupportedStyles: special_inside_parentheses, consistent, align_braces | ||
Layout/FirstHashElementIndentation: | ||
Exclude: | ||
- 'test/unit/discovery_resource_mock.rb' | ||
|
||
# Offense count: 11 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle. | ||
# SupportedHashRocketStyles: key, separator, table | ||
# SupportedColonStyles: key, separator, table | ||
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit | ||
Layout/HashAlignment: | ||
Exclude: | ||
- 'lib/hammer_cli_foreman_discovery/discovery.rb' | ||
- 'test/unit/discovery_resource_mock.rb' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
Layout/HeredocIndentation: | ||
Exclude: | ||
- 'hammer_cli_foreman_discovery.gemspec' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: Width, AllowedPatterns. | ||
Layout/IndentationWidth: | ||
Exclude: | ||
- 'lib/hammer_cli_foreman_discovery/discovery.rb' | ||
|
||
# Offense count: 2 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: EnforcedStyle. | ||
# SupportedStyles: symmetrical, new_line, same_line | ||
Layout/MultilineMethodCallBraceLayout: | ||
Exclude: | ||
- 'lib/hammer_cli_foreman_discovery.rb' | ||
|
||
# Offense count: 15 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator. | ||
# SupportedStylesForExponentOperator: space, no_space | ||
Layout/SpaceAroundOperators: | ||
Exclude: | ||
- 'lib/hammer_cli_foreman_discovery/discovery.rb' | ||
- 'test/unit/discovery_resource_mock.rb' | ||
|
||
# Offense count: 4 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets. | ||
# SupportedStyles: space, no_space, compact | ||
# SupportedStylesForEmptyBrackets: space, no_space | ||
Layout/SpaceInsideArrayLiteralBrackets: | ||
Exclude: | ||
- 'test/unit/discovery_resource_mock.rb' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters. | ||
# SupportedStyles: space, no_space | ||
# SupportedStylesForEmptyBraces: space, no_space | ||
Layout/SpaceInsideBlockBraces: | ||
Exclude: | ||
- 'lib/hammer_cli_foreman_discovery/discovery.rb' | ||
|
||
# Offense count: 7 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces. | ||
# SupportedStyles: space, no_space, compact | ||
# SupportedStylesForEmptyBraces: space, no_space | ||
Layout/SpaceInsideHashLiteralBraces: | ||
Exclude: | ||
- 'lib/hammer_cli_foreman_discovery/command_extensions/provision_with_puppet.rb' | ||
- 'lib/hammer_cli_foreman_discovery/discovery.rb' | ||
- 'test/unit/discovery_resource_mock.rb' | ||
|
||
# Offense count: 2 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: EnforcedStyle. | ||
# SupportedStyles: final_newline, final_blank_line | ||
Layout/TrailingEmptyLines: | ||
Exclude: | ||
- 'lib/hammer_cli_foreman_discovery/discovery_references.rb' | ||
- 'lib/hammer_cli_foreman_discovery/i18n.rb' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: PreferredName. | ||
Naming/RescuedExceptionsVariableName: | ||
Exclude: | ||
- 'lib/hammer_cli_foreman_discovery/discovery.rb' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
Style/Encoding: | ||
Exclude: | ||
- 'hammer_cli_foreman_discovery.gemspec' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
Style/ExpandPathArguments: | ||
Exclude: | ||
- 'hammer_cli_foreman_discovery.gemspec' | ||
|
||
# Offense count: 13 | ||
# This cop supports unsafe autocorrection (--autocorrect-all). | ||
# Configuration parameters: EnforcedStyle. | ||
# SupportedStyles: always, always_true, never | ||
Style/FrozenStringLiteralComment: | ||
Exclude: | ||
- 'Gemfile' | ||
- 'Rakefile' | ||
- 'hammer_cli_foreman_discovery.gemspec' | ||
- 'lib/hammer_cli_foreman_discovery.rb' | ||
- 'lib/hammer_cli_foreman_discovery/command_extensions/provision_with_puppet.rb' | ||
- 'lib/hammer_cli_foreman_discovery/discovery.rb' | ||
- 'lib/hammer_cli_foreman_discovery/discovery_references.rb' | ||
- 'lib/hammer_cli_foreman_discovery/discovery_rule.rb' | ||
- 'lib/hammer_cli_foreman_discovery/i18n.rb' | ||
- 'lib/hammer_cli_foreman_discovery/version.rb' | ||
- 'test/unit/discovery_resource_mock.rb' | ||
- 'test/unit/discovery_rules_test.rb' | ||
- 'test/unit/discovery_test.rb' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
Style/IfUnlessModifier: | ||
Exclude: | ||
- 'lib/hammer_cli_foreman_discovery/discovery.rb' | ||
|
||
# Offense count: 1 | ||
# This cop supports unsafe autocorrection (--autocorrect-all). | ||
# Configuration parameters: EnforcedStyle. | ||
# SupportedStyles: short, verbose | ||
Style/PreferredHashMethods: | ||
Exclude: | ||
- 'lib/hammer_cli_foreman_discovery/discovery.rb' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: AllowedCompactTypes. | ||
# SupportedStyles: compact, exploded | ||
Style/RaiseArgs: | ||
EnforcedStyle: compact | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
Style/RedundantSelf: | ||
Exclude: | ||
- 'Gemfile' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: EnforcedStyle. | ||
# SupportedStyles: implicit, explicit | ||
Style/RescueStandardError: | ||
Exclude: | ||
- 'lib/hammer_cli_foreman_discovery.rb' | ||
|
||
# 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: 2 | ||
# This cop supports unsafe autocorrection (--autocorrect-all). | ||
# Configuration parameters: Mode. | ||
Style/StringConcatenation: | ||
Exclude: | ||
- 'lib/hammer_cli_foreman_discovery/discovery.rb' | ||
|
||
# Offense count: 356 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline. | ||
# SupportedStyles: single_quotes, double_quotes | ||
Style/StringLiterals: | ||
Exclude: | ||
- 'Gemfile' | ||
- 'Rakefile' | ||
- 'hammer_cli_foreman_discovery.gemspec' | ||
- 'lib/hammer_cli_foreman_discovery.rb' | ||
- 'lib/hammer_cli_foreman_discovery/command_extensions/provision_with_puppet.rb' | ||
- 'lib/hammer_cli_foreman_discovery/discovery.rb' | ||
- 'lib/hammer_cli_foreman_discovery/discovery_references.rb' | ||
- 'lib/hammer_cli_foreman_discovery/discovery_rule.rb' | ||
- 'test/unit/discovery_resource_mock.rb' | ||
- 'test/unit/discovery_rules_test.rb' | ||
- 'test/unit/discovery_test.rb' | ||
|
||
# Offense count: 2 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: MinSize, WordRegex. | ||
# SupportedStyles: percent, brackets | ||
Style/WordArray: | ||
EnforcedStyle: brackets |
This file contains 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
This file contains 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
This file contains 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