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

First pass at implementing 'trait_missing.ron' #115

Closed
wants to merge 3 commits into from
Closed
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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Generated by Cargo
# will have compiled files and executables
/target/
*/target/

# These are backup files generated by rustfmt
**/*.rs.bk
Expand All @@ -10,3 +11,4 @@

# local-only data
localdata/

47 changes: 47 additions & 0 deletions src/queries/trait_missing.ron
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
SemverQuery(
id: "trait_missing",
human_readable_name: "pub trait removed or renamed",
description: "A trait can no longer be imported by its prior path",
required_update: Major,
reference_link: Some(""),
query: r#"
{
CrateDiff {
baseline {
item {
... on Trait {
visibility_limit @filter(op: "=", value: ["$public"]) @output
name @output @tag

importable_path {
path @output @path
}

span_: span @optional {
filename @output
begin_line @output
}
}
}
}
current @fold @transform(op: "count") @filter(op: "=", value: ["$zero"]) {
item {
... on Trait {
visibility_limit @filter(op: "=", value: ["$public"])
name @filter(op: "=", value: ["%name"])

importable_path {
path @filter(op: "=", value: ["%path"])
}
}
}
}
}
}"#,
arguments: {
"public": "public",
"zero": 0,
},
error_message: "",
per_result_error_template: Some(""),
)