-
Notifications
You must be signed in to change notification settings - Fork 69
@W-20397770 Enriching scan apex class for antipatterns tool with runtime based criticality insights #361
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
base: main
Are you sure you want to change the base?
Conversation
- Implemented AST-based detector for SOQL queries lacking WHERE or LIMIT clauses - Added SOQLAstUtils for robust query extraction and analysis - Created comprehensive fix instructions with severity levels and code examples - Registered new detector in scan-apex-antipatterns-tool
…tern - Add unit tests for SOQLAstUtils (soql-ast-utils.test.ts) - Add unit tests for SOQLNoWhereLimitDetector (soql-no-where-limit-detector.test.ts) - Add unit tests for SOQLNoWhereLimitRecommender (soql-no-where-limit-recommender.test.ts) - Cover edge cases: multi-line queries, nested subqueries, SOQL in loops, comments, complex WHERE clauses
- ast-analyzer.ts was not used anywhere in the codebase - All AST operations are handled directly by @apexdevtools/apex-parser - Reduces unnecessary code complexity
skipped flapping test for windows
…cli/mcp into sa/runtime_insights_scale_mcp
| return null; | ||
| } | ||
|
|
||
| const connection = await orgService.getConnection(defaultOrg.value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tried this with local vs global default target orgs? I have found that different MCP Clients will start the MCP Server node process in different locations. It is not necessarily the route of your IDE Workspace. So if you have a global Default Target Org AND a local Default Target Org the Tool might connect to the incorrect one.
In our Tools, we use a directory parameter to change the directory of the process before executing the "get the org" logic. Here is a simple example https://github.com/salesforcecli/mcp/blob/main/packages/mcp-provider-dx-core/src/tools/run_soql_query.ts#L84
We probably want to allow the user to pass in the usernameOrAlias input as well to be consistent to the rest of the MCP tooling.
@W-20397770@
What does this PR do?
What issues does this PR fix or reference?