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

fix: Switch more notes/warnings to lowercase #13410

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cargo/core/compiler/fingerprint/dirty_reason.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ impl DirtyReason {
DirtyReason::LocalLengthsChanged => {
s.dirty_because(unit, "the local lengths changed")?;
s.note(
"This could happen because of added/removed `cargo::rerun-if` instructions in the build script",
"this could happen because of added/removed `cargo::rerun-if` instructions in the build script",
)?;

Ok(())
Expand Down
2 changes: 1 addition & 1 deletion src/cargo/ops/cargo_compile/unit_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ Rustdoc did not scrape the following examples because they require dev-dependenc
}

return shell.warn(format!(
"Target {}{} specified, but no targets matched. This is a no-op",
"target {}{} specified, but no targets matched; this is a no-op",
if miss_count > 1 { "filters" } else { "filter" },
filters,
));
Expand Down
4 changes: 2 additions & 2 deletions src/cargo/ops/cargo_package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -566,15 +566,15 @@ fn check_repo_state(
}
config.shell().verbose(|shell| {
shell.warn(format!(
"No (git) Cargo.toml found at `{}` in workdir `{}`",
"no (git) Cargo.toml found at `{}` in workdir `{}`",
path.display(),
workdir.display()
))
})?;
}
} else {
config.shell().verbose(|shell| {
shell.warn(format!("No (git) VCS found for `{}`", p.root().display()))
shell.warn(format!("no (git) VCS found for `{}`", p.root().display()))
})?;
}

Expand Down
6 changes: 3 additions & 3 deletions src/cargo/ops/registry/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ pub fn publish(ws: &Workspace<'_>, opts: &PublishOpts<'_>) -> CargoResult<()> {
// Don't change the registry for crates.io and don't warn the user.
// crates.io will be defaulted even without this.
opts.config.shell().note(&format!(
"Found `{}` as only allowed registry. Publishing to it automatically.",
"found `{}` as only allowed registry. Publishing to it automatically.",
default_registry
))?;
publish_registry = Some(default_registry.clone());
Expand Down Expand Up @@ -228,7 +228,7 @@ fn wait_for_publish(
format!("{short_pkg_description} to {source_description}"),
)?;
config.shell().note(format!(
"Waiting for `{short_pkg_description}` to be available at {source_description}.\n\
"waiting for `{short_pkg_description}` to be available at {source_description}.\n\
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can use multiple note invocation for multi-lines message maybe?

You may press ctrl-c to skip waiting; the crate should be available shortly."
))?;
let mut progress = Progress::with_style("Waiting", ProgressStyle::Ratio, config);
Expand Down Expand Up @@ -265,7 +265,7 @@ fn wait_for_publish(
"timed out waiting for `{short_pkg_description}` to be available in {source_description}",
))?;
config.shell().note(
"The registry may have a backlog that is delaying making the \
"the registry may have a backlog that is delaying making the \
crate available. The crate should be available soon.",
)?;
break false;
Expand Down
6 changes: 3 additions & 3 deletions src/cargo/util/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ impl Config {
fn check_environment_key_case_mismatch(&self, key: &ConfigKey) {
if let Some(env_key) = self.env.get_normalized(key.as_env_key()) {
let _ = self.shell().warn(format!(
"Environment variables are expected to use uppercase letters and underscores, \
"environment variables are expected to use uppercase letters and underscores, \
the variable `{}` will be ignored and have no effect",
env_key
));
Expand Down Expand Up @@ -1522,7 +1522,7 @@ impl Config {
if !skip_warning {
if possible_with_extension.exists() {
self.shell().warn(format!(
"Both `{}` and `{}` exist. Using `{}`",
"both `{}` and `{}` exist. Using `{}`",
possible.display(),
possible_with_extension.display(),
possible.display()
Expand All @@ -1533,7 +1533,7 @@ impl Config {
possible.display(),
))?;
self.shell().note(
format!("If you need to support cargo 1.38 or earlier, you can symlink `{filename_without_extension}` to `{filename_without_extension}.toml`"),
format!("if you need to support cargo 1.38 or earlier, you can symlink `{filename_without_extension}` to `{filename_without_extension}.toml`"),
)?;
}
}
Expand Down
6 changes: 3 additions & 3 deletions tests/testsuite/alt_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ fn publish_with_registry_dependency() {
[PACKAGED] [..]
[UPLOADING] foo v0.0.1 [..]
[UPLOADED] foo v0.0.1 to registry `alternative`
note: Waiting for `foo v0.0.1` to be available at registry `alternative`.
[NOTE] waiting for `foo v0.0.1` to be available at registry `alternative`.
You may press ctrl-c to skip waiting; the crate should be available shortly.
[PUBLISHED] foo v0.0.1 at registry `alternative`
",
Expand Down Expand Up @@ -489,7 +489,7 @@ fn publish_to_alt_registry() {
[PACKAGED] [..]
[UPLOADING] foo v0.0.1 [..]
[UPLOADED] foo v0.0.1 to registry `alternative`
note: Waiting for `foo v0.0.1` to be available at registry `alternative`.
[NOTE] waiting for `foo v0.0.1` to be available at registry `alternative`.
You may press ctrl-c to skip waiting; the crate should be available shortly.
[PUBLISHED] foo v0.0.1 at registry `alternative`
",
Expand Down Expand Up @@ -571,7 +571,7 @@ fn publish_with_crates_io_dep() {
[PACKAGED] [..]
[UPLOADING] foo v0.0.1 [..]
[UPLOADED] foo v0.0.1 to registry `alternative`
note: Waiting for `foo v0.0.1` to be available at registry `alternative`.
[NOTE] waiting for `foo v0.0.1` to be available at registry `alternative`.
You may press ctrl-c to skip waiting; the crate should be available shortly.
[PUBLISHED] foo v0.0.1 at registry `alternative`
",
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/artifact_dep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2028,7 +2028,7 @@ fn publish_artifact_dep() {
[PACKAGED] [..]
[UPLOADING] foo v0.1.0 [..]
[UPLOADED] foo v0.1.0 [..]
note: Waiting [..]
[NOTE] waiting [..]
You may press ctrl-c [..]
[PUBLISHED] foo v0.1.0 [..]
",
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/cargo_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ fn publish_allowed() {
[PACKAGED] [..]
[UPLOADING] a v0.0.1 [..]
[UPLOADED] a v0.0.1 to registry `crates-io`
note: Waiting for `a v0.0.1` to be available at registry `crates-io`.
[NOTE] waiting for `a v0.0.1` to be available at registry `crates-io`.
You may press ctrl-c to skip waiting; the crate should be available shortly.
[PUBLISHED] a v0.0.1 at registry `crates-io`
",
Expand Down
4 changes: 2 additions & 2 deletions tests/testsuite/cargo_targets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ fn warn_unmatched_target_filters() {
p.cargo("check --tests --bins --examples --benches")
.with_stderr(
"\
[WARNING] Target filters `bins`, `tests`, `examples`, `benches` specified, \
but no targets matched. This is a no-op
[WARNING] target filters `bins`, `tests`, `examples`, `benches` specified, \
but no targets matched; this is a no-op
[FINISHED][..]
",
)
Expand Down
6 changes: 3 additions & 3 deletions tests/testsuite/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,8 @@ f1 = 1
// It should NOT have warned for the symlink.
let output = read_output(config);
let expected = "\
warning: `[ROOT]/.cargo/config` is deprecated in favor of `config.toml`
note: If you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`";
[WARNING] `[ROOT]/.cargo/config` is deprecated in favor of `config.toml`
[NOTE] if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`";
assert_match(expected, &output);
}

Expand Down Expand Up @@ -332,7 +332,7 @@ f1 = 2
// But it also should have warned.
let output = read_output(config);
let expected = "\
warning: Both `[..]/.cargo/config` and `[..]/.cargo/config.toml` exist. Using `[..]/.cargo/config`
[WARNING] both `[..]/.cargo/config` and `[..]/.cargo/config.toml` exist. Using `[..]/.cargo/config`
";
assert_match(expected, &output);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/testsuite/credential_process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ fn publish() {
{"v":1,"registry":{"index-url":"[..]","name":"alternative"},"kind":"get","operation":"publish","name":"foo","vers":"0.1.0","cksum":"[..]"}
[UPLOADING] foo v0.1.0 [..]
[UPLOADED] foo v0.1.0 [..]
note: Waiting [..]
[NOTE] waiting [..]
You may press ctrl-c [..]
[PUBLISHED] foo v0.1.0 [..]
"#,
Expand Down Expand Up @@ -541,7 +541,7 @@ fn token_caching() {
{"v":1,"registry":{"index-url":"[..]","name":"alternative"},"kind":"get","operation":"publish","name":"foo","vers":"0.1.0","cksum":"[..]"}
[UPLOADING] foo v0.1.0 [..]
[UPLOADED] foo v0.1.0 [..]
note: Waiting [..]
[NOTE] waiting [..]
You may press ctrl-c [..]
[PUBLISHED] foo v0.1.0 [..]
"#;
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/cross_publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ fn publish_with_target() {
[PACKAGED] [..]
[UPLOADING] foo v0.0.0 ([CWD])
[UPLOADED] foo v0.0.0 to registry `crates-io`
note: Waiting [..]
[NOTE] waiting [..]
You may press ctrl-c [..]
[PUBLISHED] foo v0.0.0 at registry `crates-io`
",
Expand Down
4 changes: 2 additions & 2 deletions tests/testsuite/features_namespaced.rs
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ fn publish_no_implicit() {
[PACKAGED] [..]
[UPLOADING] foo v0.1.0 [..]
[UPLOADED] foo v0.1.0 [..]
note: Waiting [..]
[NOTE] waiting [..]
You may press ctrl-c [..]
[PUBLISHED] foo v0.1.0 [..]
",
Expand Down Expand Up @@ -1021,7 +1021,7 @@ fn publish() {
[PACKAGED] [..]
[UPLOADING] foo v0.1.0 [..]
[UPLOADED] foo v0.1.0 [..]
note: Waiting [..]
[NOTE] waiting [..]
You may press ctrl-c [..]
[PUBLISHED] foo v0.1.0 [..]
",
Expand Down
10 changes: 5 additions & 5 deletions tests/testsuite/inheritable_workspace_fields.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ fn inherit_own_workspace_fields() {
[PACKAGED] [..]
[UPLOADING] foo v1.2.3 [..]
[UPLOADED] foo v1.2.3 to registry `crates-io`
note: Waiting for `foo v1.2.3` to be available at registry `crates-io`.
[NOTE] waiting for `foo v1.2.3` to be available at registry `crates-io`.
You may press ctrl-c to skip waiting; the crate should be available shortly.
[PUBLISHED] foo v1.2.3 at registry `crates-io`
",
Expand Down Expand Up @@ -323,7 +323,7 @@ fn inherit_own_dependencies() {
[PACKAGED] [..]
[UPLOADING] bar v0.2.0 [..]
[UPLOADED] bar v0.2.0 to registry `crates-io`
note: Waiting for `bar v0.2.0` to be available at registry `crates-io`.
[NOTE] waiting for `bar v0.2.0` to be available at registry `crates-io`.
You may press ctrl-c to skip waiting; the crate should be available shortly.
[PUBLISHED] bar v0.2.0 at registry `crates-io`
",
Expand Down Expand Up @@ -469,7 +469,7 @@ fn inherit_own_detailed_dependencies() {
[PACKAGED] [..]
[UPLOADING] bar v0.2.0 [..]
[UPLOADED] bar v0.2.0 to registry `crates-io`
note: Waiting for `bar v0.2.0` to be available at registry `crates-io`.
[NOTE] waiting for `bar v0.2.0` to be available at registry `crates-io`.
You may press ctrl-c to skip waiting; the crate should be available shortly.
[PUBLISHED] bar v0.2.0 at registry `crates-io`
",
Expand Down Expand Up @@ -709,7 +709,7 @@ fn inherit_workspace_fields() {
[PACKAGED] [..]
[UPLOADING] bar v1.2.3 [..]
[UPLOADED] bar v1.2.3 to registry `crates-io`
note: Waiting for `bar v1.2.3` to be available at registry `crates-io`.
[NOTE] waiting for `bar v1.2.3` to be available at registry `crates-io`.
You may press ctrl-c to skip waiting; the crate should be available shortly.
[PUBLISHED] bar v1.2.3 at registry `crates-io`
",
Expand Down Expand Up @@ -867,7 +867,7 @@ fn inherit_dependencies() {
[PACKAGED] [..]
[UPLOADING] bar v0.2.0 [..]
[UPLOADED] bar v0.2.0 to registry `crates-io`
note: Waiting for `bar v0.2.0` to be available at registry `crates-io`.
[NOTE] waiting for `bar v0.2.0` to be available at registry `crates-io`.
You may press ctrl-c to skip waiting; the crate should be available shortly.
[PUBLISHED] bar v0.2.0 at registry `crates-io`
",
Expand Down
Loading