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

Run lints on nonchanged crates #206

Merged
merged 33 commits into from
Dec 21, 2022
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
feb95b1
Split each source code in test_crates/ into pair of crates
tonowak Dec 2, 2022
300307a
Run lints on nonchanged crates
tonowak Dec 3, 2022
a2e7f9c
Review changes
tonowak Dec 3, 2022
e43fe7c
Changed `expect` string style
tonowak Dec 4, 2022
3bdaf43
Changed `expect` string style
tonowak Dec 4, 2022
bd42fd9
Removed some small stuff I missed during splitting
tonowak Dec 4, 2022
5cc0964
Merge branch 'main' into split_test_crates
obi1kenobi Dec 5, 2022
1cbb9dd
Regenerated test outputs
tonowak Dec 5, 2022
89fd8e2
Added in
tonowak Dec 5, 2022
98b28a9
Merge branch 'main' into split_test_crates
obi1kenobi Dec 7, 2022
ce34cab
Changed script to ignore `README.md` in `test_crates/`
tonowak Dec 7, 2022
2986eca
Regenerated output after `trustfall_core` bugfix
tonowak Dec 7, 2022
d7497d9
Split `item_missing` into multiple crate pairs
tonowak Dec 9, 2022
4394090
Created a map of results instead of flattening them, changed test out…
tonowak Dec 9, 2022
e8e990d
Forgot to fmt
tonowak Dec 9, 2022
9795cd7
Renamed all `src/main.rs` to `src/lib.rs` in test crate pairs
tonowak Dec 9, 2022
1dc2049
Seems clippy doesn't work locally for me, I'll need to inspect this
tonowak Dec 9, 2022
8cfa0b8
Changed key values in top-level map in outputs
tonowak Dec 9, 2022
dca1490
Merge branch 'split_test_crates' into run_lints_on_nonchanged_crates
tonowak Dec 9, 2022
b6d0739
Merge branch 'split_test_crates' into run_lints_on_nonchanged_crates
tonowak Dec 9, 2022
4d3afdb
Forgot to clippy
tonowak Dec 9, 2022
d7c875d
Forgot to fmt...
tonowak Dec 9, 2022
d057bf2
Merge branch 'main' into run_lints_on_nonchanged_crates
tonowak Dec 18, 2022
42da9c1
Pretty-printed an assert and made the code more self-explanatory
tonowak Dec 19, 2022
6898e90
Moved a capture to a separate function
tonowak Dec 20, 2022
99f9b8c
Merge branch 'main' into run_lints_on_nonchanged_crates
tonowak Dec 20, 2022
7e0e96a
Fixed compilation error
tonowak Dec 20, 2022
c2222ff
Changed format! usage
tonowak Dec 20, 2022
a22b9b5
Deconstructed a tuple
tonowak Dec 20, 2022
9545e23
Moved capture that asserts an invariant to a separate function
tonowak Dec 20, 2022
b58de95
Commented a function that asserts an invariant and changed its string…
tonowak Dec 20, 2022
cf6b4c6
Clippy fix
tonowak Dec 20, 2022
36b0290
Fixing a clippy warning made a fmt change :(
tonowak Dec 20, 2022
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
Prev Previous commit
Next Next commit
Commented a function that asserts an invariant and changed its string…
… description
  • Loading branch information
tonowak committed Dec 20, 2022
commit b58de954ac788d4a4eab30f13eba324cb670d4ee
7 changes: 6 additions & 1 deletion src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,14 +269,19 @@ mod tests {
indexed_crate,
);
if !output.is_empty() {
// This `if` statement means that a false positive happened.
// The query was ran on two identical crates (with the same rustdoc)
// and it produced a non-empty output, which means that it found issues
// in a crate pair that definitely has no semver breaks.

let output_difference = pretty_format_output_difference(
query_name,
"Expected output (empty output)".to_string(),
BTreeMap::new(),
format!("Actual output ({crate_pair_name}/{crate_version})"),
BTreeMap::from([(crate_pair_path, output)]),
);
panic!("Running a query on a crate that didn't change should always produce an empty output.\n{}\n",
panic!("The query produced a non-empty output when it compared two crates with the same rustdoc.\n{}\n",
output_difference);
}
}
Expand Down