diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-03-16 13:36:06 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-03-17 18:50:55 +0900 |
commit | 66bd2c1a1cea53dec4cf2d9e625ac01d3418863e (patch) | |
tree | c616f98bfd4241e232e3a93c895faf7a1f6c0856 /lib | |
parent | 52ea7afa5f33d1a586866e0f12ede3b4a2a083e8 (diff) |
[rubygems/rubygems] util/rubocop -A --only Style/CommentAnnotation
https://github.com/rubygems/rubygems/commit/4e77a1d1d5
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rubygems/commands/help_command.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/config_file.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/dependency_installer.rb | 6 | ||||
-rw-r--r-- | lib/rubygems/ext/ext_conf_builder.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/installer.rb | 6 | ||||
-rw-r--r-- | lib/rubygems/platform.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/remote_fetcher.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/request.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/security/trust_dir.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/specification.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/uninstaller.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/validator.rb | 2 |
12 files changed, 16 insertions, 16 deletions
diff --git a/lib/rubygems/commands/help_command.rb b/lib/rubygems/commands/help_command.rb index a4d9f39d9a..a64c3e128d 100644 --- a/lib/rubygems/commands/help_command.rb +++ b/lib/rubygems/commands/help_command.rb @@ -268,7 +268,7 @@ Gem::Platform::CURRENT. This will correctly mark the gem with your ruby's platform. EOF - # NOTE when updating also update Gem::Command::HELP + # NOTE: when updating also update Gem::Command::HELP SUBCOMMANDS = [ ["commands", :show_commands], diff --git a/lib/rubygems/config_file.rb b/lib/rubygems/config_file.rb index c1dda3404d..2d404361ec 100644 --- a/lib/rubygems/config_file.rb +++ b/lib/rubygems/config_file.rb @@ -201,7 +201,7 @@ class Gem::ConfigFile @hash = @hash.merge environment_config end - # HACK these override command-line args, which is bad + # HACK: these override command-line args, which is bad @backtrace = @hash[:backtrace] if @hash.key? :backtrace @bulk_threshold = @hash[:bulk_threshold] if @hash.key? :bulk_threshold @home = @hash[:gemhome] if @hash.key? :gemhome diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb index 941a5bda4c..701a1ff61f 100644 --- a/lib/rubygems/dependency_installer.rb +++ b/lib/rubygems/dependency_installer.rb @@ -18,12 +18,12 @@ class Gem::DependencyInstaller DEFAULT_OPTIONS = { # :nodoc: :env_shebang => false, :document => %w[ri], - :domain => :both, # HACK dup + :domain => :both, # HACK: dup :force => false, - :format_executable => false, # HACK dup + :format_executable => false, # HACK: dup :ignore_dependencies => false, :prerelease => false, - :security_policy => nil, # HACK NoSecurity requires OpenSSL. AlmostNo? Low? + :security_policy => nil, # HACK: NoSecurity requires OpenSSL. AlmostNo? Low? :wrappers => true, :build_args => nil, :build_docs_in_background => false, diff --git a/lib/rubygems/ext/ext_conf_builder.rb b/lib/rubygems/ext/ext_conf_builder.rb index 9254197009..37efe47141 100644 --- a/lib/rubygems/ext/ext_conf_builder.rb +++ b/lib/rubygems/ext/ext_conf_builder.rb @@ -43,7 +43,7 @@ class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder full_tmp_dest = File.join(extension_dir, tmp_dest_relative) - # TODO remove in RubyGems 4 + # TODO: remove in RubyGems 4 if Gem.install_extension_in_lib && lib_dir FileUtils.mkdir_p lib_dir entries = Dir.entries(full_tmp_dest) - %w[. ..] diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index 96e777aaee..d0cf3ddf61 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb @@ -233,7 +233,7 @@ class Gem::Installer io.gets # blankline - # TODO detect a specially formatted comment instead of trying + # TODO: detect a specially formatted comment instead of trying # to find a string inside Ruby code. next unless io.gets.to_s.include?("This file was generated by RubyGems") @@ -346,7 +346,7 @@ class Gem::Installer spec - # TODO This rescue is in the wrong place. What is raising this exception? + # TODO: This rescue is in the wrong place. What is raising this exception? # move this rescue to around the code that actually might raise it. rescue Zlib::GzipFile::Error raise Gem::InstallError, "gzip error installing #{gem}" @@ -748,7 +748,7 @@ class Gem::Installer # Return the text for an application file. def app_script_text(bin_file_name) - # note that the `load` lines cannot be indented, as old RG versions match + # NOTE: that the `load` lines cannot be indented, as old RG versions match # against the beginning of the line return <<-TEXT #{shebang bin_file_name} diff --git a/lib/rubygems/platform.rb b/lib/rubygems/platform.rb index 3cfe5aa0a0..38ea93942a 100644 --- a/lib/rubygems/platform.rb +++ b/lib/rubygems/platform.rb @@ -36,7 +36,7 @@ class Gem::Platform end def self.match_gem?(platform, gem_name) - # Note: this method might be redefined by Ruby implementations to + # NOTE: this method might be redefined by Ruby implementations to # customize behavior per RUBY_ENGINE, gem_name or other criteria. match_platforms?(platform, Gem.platforms) end diff --git a/lib/rubygems/remote_fetcher.rb b/lib/rubygems/remote_fetcher.rb index 658752798e..6af0fea00f 100644 --- a/lib/rubygems/remote_fetcher.rb +++ b/lib/rubygems/remote_fetcher.rb @@ -169,7 +169,7 @@ class Gem::RemoteFetcher end verbose "Using local gem #{local_gem_path}" - when nil then # TODO test for local overriding cache + when nil then # TODO: test for local overriding cache source_path = if Gem.win_platform? && source_uri.scheme && !source_uri.path.include?(":") "#{source_uri.scheme}:#{source_uri.path}" diff --git a/lib/rubygems/request.rb b/lib/rubygems/request.rb index 1eeaa416fc..5657f48e07 100644 --- a/lib/rubygems/request.rb +++ b/lib/rubygems/request.rb @@ -241,7 +241,7 @@ class Gem::Request verbose "fatal error" raise Gem::RemoteFetcher::FetchError.new("fatal error", @uri) - # HACK work around EOFError bug in Net::HTTP + # HACK: work around EOFError bug in Net::HTTP # NOTE Errno::ECONNABORTED raised a lot on Windows, and make impossible # to install gems. rescue EOFError, Timeout::Error, diff --git a/lib/rubygems/security/trust_dir.rb b/lib/rubygems/security/trust_dir.rb index df59680d84..cb3943ab2b 100644 --- a/lib/rubygems/security/trust_dir.rb +++ b/lib/rubygems/security/trust_dir.rb @@ -49,7 +49,7 @@ class Gem::Security::TrustDir yield certificate, certificate_file rescue OpenSSL::X509::CertificateError - next # HACK warn + next # HACK: warn end end end diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index 7acdb5c52a..21609bdfb6 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -1502,7 +1502,7 @@ class Gem::Specification < Gem::BasicSpecification def sanitize_string(string) return string unless string - # HACK the #to_s is in here because RSpec has an Array of Arrays of + # HACK: the #to_s is in here because RSpec has an Array of Arrays of # Strings for authors. Need a way to disallow bad values on gemspec # generation. (Probably won't happen.) string.to_s diff --git a/lib/rubygems/uninstaller.rb b/lib/rubygems/uninstaller.rb index 79334d2d64..d5465b32fe 100644 --- a/lib/rubygems/uninstaller.rb +++ b/lib/rubygems/uninstaller.rb @@ -45,7 +45,7 @@ class Gem::Uninstaller # Constructs an uninstaller that will uninstall +gem+ def initialize(gem, options = {}) - # TODO document the valid options + # TODO: document the valid options @gem = gem @version = options[:version] || Gem::Requirement.default @gem_home = File.realpath(options[:install_dir] || Gem.dir) diff --git a/lib/rubygems/validator.rb b/lib/rubygems/validator.rb index b42a176ae3..a288eaaae1 100644 --- a/lib/rubygems/validator.rb +++ b/lib/rubygems/validator.rb @@ -108,7 +108,7 @@ class Gem::Validator good.each do |entry, data| begin - next unless data # HACK `gem check -a mkrf` + next unless data # HACK: `gem check -a mkrf` source = File.join gem_directory, entry["path"] |