Draft
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…scripts - Fix Meta usage: Meta is now abstract with subtypes (PathMeta, KeyValueMeta, TokenTreeMeta, etc.) - Fix FormatArgsArg: getName() replaced by getArgName() returning FormatArgsArgName - Add upgrade script (old → new) and downgrade script (new → old) - Update Definitions.qll, PathResolution.qll, BadCtorInitialization.ql, FormatTemplateVariableAccessConstructor.qll Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| import codeql.rust.elements.ForTypeRepr | ||
| import codeql.rust.elements.Format | ||
| import codeql.rust.elements.FormatArgsArg | ||
| import codeql.rust.elements.FormatArgsArgName |
| @@ -125,6 +132,7 @@ import codeql.rust.elements.Path | |||
| import codeql.rust.elements.PathAstNode | |||
| import codeql.rust.elements.PathExpr | |||
| import codeql.rust.elements.PathExprBase | |||
| */ | ||
|
|
||
| private import internal.TryBlockModifierImpl | ||
| import codeql.rust.elements.AstNode |
| private import codeql.rust.elements.Locatable | ||
| private import codeql.rust.elements.FormatArgsExpr | ||
| private import codeql.rust.elements.FormatArgsArg | ||
| private import codeql.rust.elements.FormatArgsArgName |
| @@ -4,10 +4,10 @@ | |||
|
|
|||
| query predicate instances(FormatArgsArg x) { toBeTested(x) and not x.isUnknown() } | |||
|
|
|||
| query predicate getExpr(FormatArgsArg x, Expr getExpr) { | |||
| toBeTested(x) and not x.isUnknown() and getExpr = x.getExpr() | |||
| query predicate getArgName(FormatArgsArg x, FormatArgsArgName getArgName) { | |||
| @@ -4,10 +4,10 @@ | |||
|
|
|||
| query predicate instances(FormatArgsArg x) { toBeTested(x) and not x.isUnknown() } | |||
|
|
|||
| query predicate getExpr(FormatArgsArg x, Expr getExpr) { | |||
| toBeTested(x) and not x.isUnknown() and getExpr = x.getExpr() | |||
| query predicate getArgName(FormatArgsArg x, FormatArgsArgName getArgName) { | |||
| toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) | ||
| } | ||
|
|
||
| query predicate getDefault(StructField x, Expr getDefault) { | ||
| toBeTested(x) and not x.isUnknown() and getDefault = x.getDefault() | ||
| query predicate getDefaultVal(StructField x, ConstArg getDefaultVal) { |
| toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) | ||
| } | ||
|
|
||
| query predicate getDiscriminant(Variant x, Expr getDiscriminant) { | ||
| toBeTested(x) and not x.isUnknown() and getDiscriminant = x.getDiscriminant() | ||
| query predicate getConstArg(Variant x, ConstArg getConstArg) { |
Re-run cargo fmt after clippy --fix to ensure consistent formatting. Re-run codegen to update generated file tracking for MetaImpl.qll. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Setting proc_macro_processes to 0 causes an index-out-of-bounds panic in ProcMacroServerPool::new when the proc macro server is enabled. Use the same defaults as rust-analyzer itself (1 each). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove format_args_arg_names from upgrade delete list (table exists in both schemas with different columns) - Accept updated .expected files for schema changes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP. Let's see what the CI thinks of this. (For the avoidance of doubt, Copilot wrote all of the code, and I'm still working my way through the changes themselves.)