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

Set pedantic priority #285

Merged
merged 3 commits into from
Jul 29, 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
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ unused_crate_dependencies = "warn"

[workspace.lints.clippy]
panic_in_result_fn = "warn"
pedantic = "warn"
# The explicit priority is required due to https://github.com/rust-lang/cargo/issues/13565.
pedantic = { level = "warn", priority = -1 }
unwrap_used = "warn"

[profile.release]
Expand Down
24 changes: 12 additions & 12 deletions buildpacks/go/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ impl From<IntegrationTestConfig> for BuildConfig {
}

fn test_go_fixture(fixture: &str, expect_loglines: &[&str], refute_loglines: &[&str]) {
TestRunner::default().build(&IntegrationTestConfig::new(fixture).into(), |ctx| {
let build_config: BuildConfig = IntegrationTestConfig::new(fixture).into();
TestRunner::default().build(build_config, |ctx| {
let logs = format!("{}\n{}", ctx.pack_stdout, ctx.pack_stderr);
for expect_line in expect_loglines {
assert_contains!(logs, expect_line);
Expand Down Expand Up @@ -170,16 +171,14 @@ fn test_basic_http_122() {
#[test]
#[ignore = "integration test"]
fn test_go_artifact_caching() {
TestRunner::default().build(
&IntegrationTestConfig::new("basic_http_116").into(),
|ctx| {
assert_contains!(ctx.pack_stdout, "Installing go1.16.",);
let config = ctx.config.clone();
ctx.rebuild(config, |ctx| {
assert_contains!(ctx.pack_stdout, "Reusing go1.16.");
});
},
);
let build_config: BuildConfig = IntegrationTestConfig::new("basic_http_116").into();
TestRunner::default().build(build_config, |ctx| {
assert_contains!(ctx.pack_stdout, "Installing go1.16.",);
let config = ctx.config.clone();
ctx.rebuild(config, |ctx| {
assert_contains!(ctx.pack_stdout, "Reusing go1.16.");
});
});
}

#[test]
Expand All @@ -191,7 +190,8 @@ fn test_go_binary_arch() {
_ => (["(linux-amd64)", "linux-amd64.tar.gz"], "arm64"),
};

TestRunner::default().build(&integration_config.into(), |ctx| {
let build_config: BuildConfig = integration_config.into();
TestRunner::default().build(build_config, |ctx| {
for contain in contains {
assert_contains!(ctx.pack_stdout, contain);
}
Expand Down