Skip to content

Conversation

@kelvinst
Copy link

Extend tests to cover jumping to the definition of defguard macros. This ensures guard macros are correctly resolved by code intelligence features.

Demo:

Bandicam_20251123_074441.mp4

Extend tests to cover jumping to the definition of defguard macros.
This ensures guard macros are correctly resolved by code intelligence
features, improving reliability for users navigating guard definitions.
Copilot AI review requested due to automatic review settings November 23, 2025 10:53
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends test coverage for the jump-to-definition feature to include defguard macros. It ensures that code intelligence can correctly resolve guard definitions across different usage patterns: remote qualified calls (via require), remote imported calls (via import), and local module calls.

  • Added defguard is_adult(age) to test fixture MyDefinition module
  • Added three test cases covering guard definition resolution in different contexts
  • Tests verify that clicking on guard usage correctly jumps to the defguard definition

Reviewed changes

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

File Description
apps/forge/test/fixtures/navigations/lib/my_definition.ex Adds defguard is_adult(age) when age >= 18 fixture for testing guard definition resolution
apps/expert/test/engine/code_intelligence/definition_test.exs Adds three test cases for guard definition lookup: remote qualified call (require), remote imported call (import), and local call patterns

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

@kelvinst kelvinst closed this Nov 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant