diff --git a/src/snapshot_tests.rs b/src/snapshot_tests.rs index bba4e50a..471d6e4c 100644 --- a/src/snapshot_tests.rs +++ b/src/snapshot_tests.rs @@ -172,6 +172,12 @@ fn assert_integration_test(test_name: &str, invocation: &[&str]) { // Remove cargo blocking lines (e.g. from `cargo doc` output) as the amount of blocks // is not reproducible. settings.add_filter(" Blocking waiting for file lock on package cache\n", ""); + // Filter out the current `cargo-semver-checks` version in links to lint references, + // as this will break across version changes. + settings.add_filter( + r"v\d+\.\d+\.\d+(-[\w\.-]+)?/src/lints", + "[VERSION]/src/lints", + ); // The `settings` are applied to the current thread as long as the returned // drop guard `_grd` is alive, so we use a `let` binding to keep it alive diff --git a/test_outputs/snapshot_tests/cargo_semver_checks__snapshot_tests__workspace_baseline_compile_error-output.snap b/test_outputs/snapshot_tests/cargo_semver_checks__snapshot_tests__workspace_baseline_compile_error-output.snap index 1c86560d..aed6ff30 100644 --- a/test_outputs/snapshot_tests/cargo_semver_checks__snapshot_tests__workspace_baseline_compile_error-output.snap +++ b/test_outputs/snapshot_tests/cargo_semver_checks__snapshot_tests__workspace_baseline_compile_error-output.snap @@ -11,7 +11,7 @@ aborting due to failure to build rustdoc for crate error v0.1.0 Description: A publicly-visible function cannot be imported by its prior path. A `pub use` may have been removed, or the function itself may have been renamed or removed entirely. ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove - impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.35.0/src/lints/function_missing.ron + impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/[VERSION]/src/lints/function_missing.ron Failed in: function no_error::my_fn, previously in file [ROOT]/test_crates/manifest_tests/workspace_baseline_compile_error/old/no-error/src/lib.rs:3 diff --git a/test_outputs/snapshot_tests/cargo_semver_checks__snapshot_tests__workspace_publish_false_explicit-output.snap b/test_outputs/snapshot_tests/cargo_semver_checks__snapshot_tests__workspace_publish_false_explicit-output.snap index b361e487..018804e2 100644 --- a/test_outputs/snapshot_tests/cargo_semver_checks__snapshot_tests__workspace_publish_false_explicit-output.snap +++ b/test_outputs/snapshot_tests/cargo_semver_checks__snapshot_tests__workspace_publish_false_explicit-output.snap @@ -10,7 +10,7 @@ success: false Description: A publicly-visible function cannot be imported by its prior path. A `pub use` may have been removed, or the function itself may have been renamed or removed entirely. ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove - impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.35.0/src/lints/function_missing.ron + impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/[VERSION]/src/lints/function_missing.ron Failed in: function a::should_not_run, previously in file [ROOT]/test_crates/manifest_tests/workspace_all_publish_false/old/a/src/lib.rs:4