Skip to content
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

Bundler technical writing: avoid use of can not #5859

Open
2 tasks done
tnir opened this issue Aug 23, 2022 · 1 comment
Open
2 tasks done

Bundler technical writing: avoid use of can not #5859

tnir opened this issue Aug 23, 2022 · 1 comment
Labels

Comments

@tnir
Copy link
Contributor

tnir commented Aug 23, 2022

Describe the problem as clearly as you can

Avoid use of can not in UI, comments, manual pages, and docs since that expression can be unclear to readers. We should use cannot (or do not have to in some rare cases).

/label content/cleanup

TODO

Definition of done

git grep -i 'can not ' -- bundler | wc -l should be zero.

@simi
Copy link
Member

simi commented Sep 30, 2023

@tnir all items on your original list are merged, but I do still see non-zero amount of usages.

lib/rubygems/specification_policy.rb
287:      error "invalid value for attribute name: #{name.dump} can not begin with a period, dash, or underscore"

bundler/lib/bundler/vendor/thor/lib/thor/invocation.rb
63:    # You can notice that the method "foo" above invokes two commands: "bar",

bundler/lib/bundler/vendor/uri/lib/uri/file.rb
73:      raise Bundler::URI::InvalidURIError, "can not set userinfo for file Bundler::URI"
78:      raise Bundler::URI::InvalidURIError, "can not set user for file Bundler::URI"
83:      raise Bundler::URI::InvalidURIError, "can not set password for file Bundler::URI"

bundler/lib/bundler/vendor/uri/lib/uri/generic.rb
390:    # Can not have a registry or opaque component defined,
396:          "can not set user with opaque"
414:    # Can not have a registry or opaque component defined,
420:          "can not set password with opaque"
591:    # Can not have a registry or opaque component defined,
599:          "can not set host with registry or opaque"
680:    # Can not have a registry or opaque component defined,
688:          "can not set port with registry or opaque"
736:      raise InvalidURIError, "can not set registry"
741:      raise InvalidURIError, "can not set registry"
746:      raise InvalidURIError, "can not set registry"
754:    # Can not have a opaque component defined,
858:    # Can not have a host, port, user, or path component defined,
869:          "can not set opaque with host, port, userinfo or path"
1238:      # you can modify `rel', but can not `oth'.
1263:      # you can modify `rel', but can not `oth'.

bundler/lib/bundler/cli/add.rb
37:      raise InvalidOption, "You can not specify `--strict` and `--optimistic` at the same time." if options[:strict] && options[:optimistic]

bundler/lib/bundler/cli/init.rb
17:        Bundler.ui.error "Can not create #{gemfile} as the current directory is not writable."

bundler/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb
355:      raise ArgumentError, "Buffer can not be a frozen object" if buf.frozen?

Ignoring vendored libraries, there are only 3 entries in RubyGems and Bundler. Is it still worth to fix? I can open PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants