Cubyts Code Analysis for IDE
Overview
Cubyts Code Analysis for IDE is a powerful code review tool that enforces your organization's coding and security standards directly within your IDE. The extension provides real-time code analysis using enterprise rules defined in the Cubyts platform and Abstract Syntax Trees (ASTs) tailored to your programming languages and connected repositories.
Key Benefits
- Real-time analysis: Automatically analyzes code (including AI-generated code) upon commit (push) or triggered from the development platform
- Enterprise integration: Seamlessly connects with your Cubyts account for unified code quality
- Contextual explanations: Detailed explanations help you understand the "why" behind each recommendation
- Production-ready code: Ensures consistent quality standards across projects
- Personal development: Acts as your code correction assistant to improve coding skills
Supported Languages
C#, VB.NET, JavaScript, TypeScript, HTML, CSS, Ruby, Golang, and Python
Getting Started
- Download Cubyts Code Analysis for IDE from the VS Code Extension Marketplace
- Connect to your Cubyts account for enterprise rule integration
- Start coding with automatic analysis and recommendations
Features
The extension provides two main code analysis workflows:
1. Post-commit Recommendations (Automatic)
Automatic analysis that runs after code commits, providing recommendations based on your organization's standards.
2. Pre-commit Recommendations (User triggered, on-demand)
Manual triger of code review on changes in a file and/or the active branch, providing recommendations based on your organization's standards.
3. User Triggered Review (User triggered, on-demand)
Manual code review that you can trigger for specific functions, methods, or code blocks.
Pre-commit and Post-commit Recommendations
Viewing Recommendations
After committing code, Cubyts automatically analyzes your changes and displays recommendations in the "Cubyts Recommendations" panel at the bottom of VS Code.
To access the recommendations panel:
- If visible: Check the bottom panel for "Cubyts Recommendations"
- If not visible: Go to View → Open View... and search for "Cubyts Recommendations"
- Alternative: Switch to the "Cubyts Code Analysis" extension tab
To view the recommendations:
- The "Cubyts Recommendations" view, shows the list of all recommendations for the active editor.
- Pre-commit recommendations will be tagged as [LOCAL]
- Post-commit recommendation will be tagged as [REMOTE]

Managing Recommendations
Select any recommendation to highlight the relevant code section. Right-click on a recommendation to access these options:
Apply Recommendation
- Purpose: Implement the suggested code improvement
- Process: Preview the changes before accepting
- Control: Full review of proposed modifications
Dismiss Recommendation
- Purpose: Remove the recommendation permanently
- Behavior: Once dismissed, the recommendation won't appear again
- Use case: When you disagree with the suggestion or have alternative solutions

Previewing Code Changes
When you choose "Apply Recommendation":
- Refactor Preview Opens: Review proposed changes before implementation
- Select Changes: Use checkboxes to choose which modifications to apply
- Diff View: Click items to see detailed before/after comparison
- Decision Point:
- Apply: Implement the changes (remember to save and commit when ready)
- Discard: Cancel the operation and close the preview
Important: After applying changes, you must manually save the file and commit when your code is ready for publication.

Pre-commit Recommendations
Initiating a Review
Method 1: Current file Change Review
- Open any supported source code file
- Position your cursor within a function or method
- Right-click (or double-tap on touch devices) to open the context menu
- Select "Cubyts Code Review --> All changes in File"
Method 2: Active branch Change Review
- Open any supported source code file
- Position your cursor within a function or method
- Right-click (or double-tap on touch devices) to open the context menu
- Select "Cubyts Code Review --> All changes in Branch"
Scope Limitation: Reviews analyze only the changes in the code of the file/branch specified, ensuring focused and specific recommendations to the changes performed.

Review results
A notification will be received once the review is completed; and once the recommendations refreshed, you will see them in the "Cubyts Recommendation" panel alongside the "Post Commit Recommendations".
User Triggered Review
Initiating a Review
Method 1: Function/Method Review
- Open any supported source code file
- Position your cursor within a function or method
- Right-click (or double-tap on touch devices) to open the context menu
- Select "Cubyts Code Review --> Enclosing function/method"
- Choose from the quick pick menu based on available functions/methods
Method 2: Custom Code Block Review
- Select the specific code block you want to review
- Select "Cubyts Code Review --> Enclosing function/method"
- Review starts immediately (no quick pick menu required)
Scope Limitation: Reviews analyze only the exact lines of code specified, ensuring focused and relevant recommendations.

Selecting Review Scope
When you haven't pre-selected code, the quick pick menu appears with options based on your cursor position:
- Automatic Detection: Menu options are generated by analyzing cursor position and identifying enclosing functions/methods
- Selection Process: Choose the relevant function or method to review
- Processing Time: Reviews typically complete within 15 seconds, depending on code complexity

Understanding Review Results
Review results appear in a dedicated panel alongside your source code with these features:
Organization
- Severity-based grouping: Issues categorized by importance level
- Expandable sections: Click recommendations to view detailed information
- Source highlighting: Problematic code lines highlighted in the editor
Interactive Features
- Detailed explanations: Understand the nature of each problem
- Code context: See the specific lines causing issues
- Actionable recommendations: Clear guidance for resolution

Applying or Dismissing Recommendations
When you expand a recommendation section, you'll see:
- Problem description: Clear explanation of the issue
- Affected code lines: Specific lines causing the problem
- Recommended solution: Detailed fix suggestions
- Git-style diff: Visual representation of proposed changes
- Green lines (+): Code to be added
- Red lines (-): Code to be removed
Available Actions
- Apply Fix: Implement the suggested changes
- Dismiss: Remove the recommendation from the list
Note: Both actions remove the recommendation from the current list and display remaining suggestions.

Best Practices
For Post-commit Recommendations
- Review regularly: Check recommendations after each commit (push)
- Understand before applying: Read explanations to learn from suggestions
- Selective application: Apply recommendations that align with your code goals
- Team consistency: Coordinate with team members on dismissed recommendations
For User Triggered Reviews
- Strategic timing: Use before committing critical code sections
- Focus areas: Target complex algorithms or security-sensitive code
- Learning opportunity: Use detailed explanations to improve coding skills
- Iterative improvement: Re-run reviews after applying fixes
Troubleshooting
Common Issues
Post-commit Recommendations
- No recommendations appearing: Verify Cubyts account connection and repository setup
- Outdated recommendations: Ensure latest version of extension is installed
User Triggered Reviews
- Quick pick menu not showing: Ensure cursor is positioned within a function or method
- Review timeout: Large code blocks may require additional processing time
- No results: Verify internet connection and Cubyts platform connectivity
Getting Help
- Check the Cubyts documentation
- Contact support for enterprise account issues
- Report extension bugs through VS Code marketplace
Privacy and Security
- Enterprise integration: All analysis respects your organization's security policies
- Code privacy: Analysis follows your Cubyts platform configuration
- Secure transmission: All communications use secure protocols
Summary
Cubyts Code Analysis for IDE transforms your development workflow by providing:
- Automated quality assurance through post-commit analysis
- On-demand code review for focused improvements
- Educational insights to enhance coding skills
- Enterprise compliance with organizational standards
Start improving your code quality today with intelligent, contextual recommendations tailored to your development needs.