-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(PUP-11771) Rubocop Naming Cops #9183
Merged
joshcooper
merged 16 commits into
puppetlabs:main
from
mhashizume:PUP-11771/main/rubocop-naming
Dec 19, 2023
Merged
(PUP-11771) Rubocop Naming Cops #9183
joshcooper
merged 16 commits into
puppetlabs:main
from
mhashizume:PUP-11771/main/rubocop-naming
Dec 19, 2023
Commits on Dec 7, 2023
-
The private method is_module_package? was only ever referenced by code that was removed in 2014 by 3f05274. Because this method is both private and not referenced anywhere else in the code base, this commit removes the is_module_package? method.
Configuration menu - View commit details
-
Copy full SHA for 38cd675 - Browse repository at this point
Copy the full SHA 38cd675View commit details -
Heredoc delimiters do not bring much value and would involve a lot of work to change existing delimiters. This commit disables the Rubocop Naming/HeredocDelimiterNaming cop.
Configuration menu - View commit details
-
Copy full SHA for 3ca2a70 - Browse repository at this point
Copy the full SHA 3ca2a70View commit details -
The Naming/MethodParameterName Rubocop cop is fairly arbitrary. This commit disables it.
Configuration menu - View commit details
-
Copy full SHA for 85e4069 - Browse repository at this point
Copy the full SHA 85e4069View commit details -
Naming/ClassAndModuleCamelCase
Disable the Naming/ClassAndModuleCamelCase Rubocop cop on existing violations, as class names are public by default and updating them could be a breaking change. Enable this cop for new code to catch any future violations.
Configuration menu - View commit details
-
Copy full SHA for 95dff1a - Browse repository at this point
Copy the full SHA 95dff1aView commit details -
Disable the Naming/ConstantName Rubocop cop on existing violations, as those constants may be public and updating them could be a breaking change. Enable this cop for new code to catch any future violations.
Configuration menu - View commit details
-
Copy full SHA for 81372fb - Browse repository at this point
Copy the full SHA 81372fbView commit details
Commits on Dec 12, 2023
-
Naming/MemoizedInstanceVariableName
Because renaming memoized instance variables can be potentially dangerous, to address the Rubocop Naming/MemoizedInstanceVariableName cop, this commit excludes existing violations while enabling the cop for new code.
Configuration menu - View commit details
-
Copy full SHA for aca2f4b - Browse repository at this point
Copy the full SHA aca2f4bView commit details -
Pops implements the visitor pattern and that relies on the convention of methods being namedoperation_Class. This commit excludes puppet/functions, puppet/pops, and puppet/util/windows from the Rubocop Naming/MethodName cop. Additionally, this commit updates the rpm_compareEVR methods in both Puppet::Util::Package::Version::Rpm and Puppet::Util::RpmCompare to instead be called rpm_compare_evr to adhere to snake case.
Configuration menu - View commit details
-
Copy full SHA for 340038f - Browse repository at this point
Copy the full SHA 340038fView commit details -
Naming/RescuedExceptionsVariableName
This commit disables the Rubocop Naming/RescuedExceptionsVariableName cop, as the cost of updating all of the existing violations outweighs the benefits of those changes.
Configuration menu - View commit details
-
Copy full SHA for 00933fe - Browse repository at this point
Copy the full SHA 00933feView commit details -
This commit enables the Rubocop Naming/VariableName cop while excluding files that had been previously excluded (some Windows code that intentionally follows Microsoft's Hungarian notation). New code will be subject to this cop.
Configuration menu - View commit details
-
Copy full SHA for 0d33e9f - Browse repository at this point
Copy the full SHA 0d33e9fView commit details -
This commit disables the Rubocop Naming/VariableNumber cop. This check affects too much of our existing codebase and the cost of correcting potential violations outweighs the benefits of enabling this cop.
Configuration menu - View commit details
-
Copy full SHA for fbbcc32 - Browse repository at this point
Copy the full SHA fbbcc32View commit details -
Naming/BinaryOperatorParameterName
This commit disables the Rubocop Naming/BinaryOperatorParameterName cop, as its violations are too far-reaching in our codebase to safely and easily fix.
Configuration menu - View commit details
-
Copy full SHA for 2459781 - Browse repository at this point
Copy the full SHA 2459781View commit details -
This commit enables the Rubocop Naming/BlockParameterName cop.
Configuration menu - View commit details
-
Copy full SHA for 24f6448 - Browse repository at this point
Copy the full SHA 24f6448View commit details -
This commit moves the Rubocop Naming/AccessorMethodName cop from the todo file to the .rubocop configuration file. This does not change any behavior but indicates that this behavior is known and intentional.
Configuration menu - View commit details
-
Copy full SHA for 15cb786 - Browse repository at this point
Copy the full SHA 15cb786View commit details -
Remove redundant wrapper method
The is_constant_defined? method was added in 3d43d86 to account for behavior differences between Ruby 1.8 and 1.9. It was simplified in 84a9cb8 as part of removal Ruby 1.8 support and the method exists now as a fairly transparent wrapper of Ruby's built-in Module#const_defined? method. is_constant_defined? has been marked as private since 79889af in 2013. This method removes the is_constant_defined? method and substitutes it with Module#const_defined? instead.
Configuration menu - View commit details
-
Copy full SHA for 3df0457 - Browse repository at this point
Copy the full SHA 3df0457View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1f8cf4b - Browse repository at this point
Copy the full SHA 1f8cf4bView commit details
Commits on Dec 16, 2023
-
This commit addresses the Rubocop Naming/PredicateName cop by either exempting public methods with predicate names or renaming private methods.
Configuration menu - View commit details
-
Copy full SHA for 40d11ec - Browse repository at this point
Copy the full SHA 40d11ecView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.