Skip to content

feat: add RhaiAnalyzerExt trait for enhanced script analysis - #2

Merged
isSerge merged 1 commit into
mainfrom
ext-trait
May 28, 2026
Merged

feat: add RhaiAnalyzerExt trait for enhanced script analysis#2
isSerge merged 1 commit into
mainfrom
ext-trait

Conversation

@isSerge

@isSerge isSerge commented May 28, 2026

Copy link
Copy Markdown
Owner

No description provided.

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedrhai@​1.25.05910093100100

View full report

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a public RhaiAnalyzerExt extension trait so callers can invoke analysis helpers directly on rhai::AST, while updating docs and dependency metadata for the crates.io Rhai release.

Changes:

  • Introduces RhaiAnalyzerExt with analyze, accessed_variables, and string_comparisons_for.
  • Adds unit tests for the new trait methods.
  • Updates Rhai dependency from git to 1.25.0 and refreshes README examples.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
src/lib.rs Adds the extension trait implementation and related tests.
README.md Documents the extension trait usage and updated dependency versions.
Cargo.toml Switches Rhai dependency to crates.io version 1.25.0.
Cargo.lock Updates locked Rhai packages to registry sources.
Comments suppressed due to low confidence (1)

README.md:105

  • The result data structure example is now syntactically incomplete: it shows fields followed by a closing brace but omits the pub struct ScriptAnalysisResult { opening line, which makes the documentation harder to copy or understand. Please restore the struct declaration (and any needed context/imports) or mark this as a field excerpt without the unmatched brace.
```rust,ignore
    /// All unique, fully-qualified variable paths accessed in the script.
    pub accessed_variables: HashSet<String>,

    /// Local variables defined within the script via `let` or loops.
    pub local_variables: HashSet<String>,

    /// Maps a variable path to the set of string literals it is compared against.
    pub string_comparisons: HashMap<String, HashSet<String>>,
}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@isSerge
isSerge merged commit c3f8db7 into main May 28, 2026
5 checks passed
@isSerge
isSerge deleted the ext-trait branch May 28, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants