Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 5, 2025

  • Understand the issue requirements (detect calling non-existent functions due to name mismatch)
  • Explore existing analyzer infrastructure
  • Run existing tests to verify baseline
  • Create a new analyzer FunctionNotFoundAnalyzer that detects:
    • Calls to activities via CallActivityAsync with non-existent function names
    • Calls to sub-orchestrations via CallSubOrchestratorAsync with non-existent function names
  • Add corresponding test cases for the new analyzer (17 tests)
  • Update resource strings for the diagnostic messages
  • Update AnalyzerReleases.Unshipped.md to track new rules
  • Run tests to validate the implementation (all 90 tests pass)
  • Run code review and address feedback
    • Added null check for SemanticModel
    • Changed FindOverridingMethod to ClassOverridesMethod returning bool
    • Changed mutable struct to immutable readonly struct with primary constructor
    • Removed unused System.Diagnostics import
  • Address code quality suggestions:
    • Use .Where(...) LINQ filter in foreach loops for diagnostics
    • Use .Any(...) in ClassOverridesMethod instead of explicit foreach loop
    • Combine nested if statements for TaskActivity derived classes check
  • Security: CodeQL checker timed out but no new security-sensitive code patterns introduced
Original prompt

This section details on the original issue you should resolve

<issue_title>Roslyn Analyzer should detect calling non-existent functions (due to name mismatch)</issue_title>
<issue_description>Originally reported by #253 </issue_description>

<agent_instructions>inspect and implement correctly and robustly, add corresponding testcases to validate</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…eadonly struct, remove unused import

Co-authored-by: YunchuWang <[email protected]>
Copilot AI changed the title [WIP] Add Roslyn Analyzer to detect calling non-existent functions Add Roslyn Analyzer to detect calls to non-existent functions (name mismatch) Dec 5, 2025
Copilot AI requested a review from YunchuWang December 5, 2025 01:26
Copilot finished work on behalf of YunchuWang December 5, 2025 01:26
@YunchuWang
Copy link
Member

@copilot check and address the comments

Copy link
Contributor Author

Copilot AI commented Dec 5, 2025

@copilot check and address the comments

Addressed the code quality suggestions in commit 7b66c06:

  • Used .Where(...) LINQ filter in foreach loops instead of inner if statements
  • Used .Any(...) in ClassOverridesMethod instead of explicit foreach loop with early return
  • Combined nested if statements for the TaskActivity derived classes check

Copilot finished work on behalf of YunchuWang December 5, 2025 17:04
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.

Roslyn Analyzer should detect calling non-existent functions (due to name mismatch)

2 participants