HomeWinBuzzer NewsGitHub Copilot Adds Code Referencing in Visual Studio

GitHub Copilot Adds Code Referencing in Visual Studio

Microsoft enhances Visual Studio with GitHub Copilot’code referencing, connecting suggestions to public repositories.

-

Microsoft has introduced a code referencing tool for GitHub Copilot, integrated into Visual Studio 2022, to address licensing challenges faced by developers.

The new feature, now available in preview, flags public repository matches for AI-suggested code, offering developers a clearer understanding of code origins and associated licenses. The tool marks a step forward in ensuring compliance and fostering ethical software development.

Making AI-Suggested Code Transparent

One of the major concerns surrounding AI-powered development tools has been the opacity of code suggestions. Developers often grapple with questions about the origin and licensing of AI-suggested snippets, a challenge that Microsoft’s new code referencing tool aims to resolve.

The feature, embedded in Visual Studio 2022 version 17.12 Preview 3, examines AI-suggested code and flags instances where matches exist with public repositories on GitHub. Developers are presented with detailed information, including the repository name, the matching snippet, and its licensing terms, directly in the editor.
 
Code Referencing for GitHub Copilot Chat officialThis new functionality helps developers understand where their AI-suggested code is coming from,” explained Rhea Patel, Microsoft’s product manager. “It’s about providing transparency and control so developers can make informed decisions“.

By highlighting licensing details, the tool allows users to make better-informed choices about incorporating suggested code into their projects. It also offers the option to block or allow such suggestions, configurable at both the individual and organizational levels.

Administrators managing GitHub Enterprise Cloud accounts can enforce these settings for teams, ensuring alignment with corporate compliance policies.

RelatedWindows Terminal Now Integrates GitHub Copilot: Here’s What You Can Do

Streamlining AI-Supported Development

Beyond licensing transparency, the new code referencing tool integrates seamlessly into Visual Studio’s broader developer ecosystem. The feature aims to reduce risks associated with unverified code adoption by providing essential context, ensuring developers avoid potential compliance violations.

For example, developers might encounter snippets that are functionally helpful but originate from repositories with restrictive licenses. In such cases, this tool allows them to navigate these complexities confidently, supporting ethical and efficient software development practices.

The code referencing tool complements existing GitHub Copilot features by enhancing trust in AI-assisted workflows. It strengthens GitHub’s position as a development platform that prioritizes both innovation and accountability.

Other Updates: AI-Driven Code Reviews

Just days ago GitHub introduced another key update to Copilot: AI-driven code reviews. While the code referencing tool focuses on transparency, this feature enhances efficiency by automating feedback on pull requests.

Available in public preview, GitHub Copilot’s code review tool analyzes changes and provides actionable comments in under 30 seconds. It supports targeted reviews for specific code snippets and comprehensive assessments of full pull requests, catering to diverse workflows. For developers, this means faster feedback and more efficient iterations, promises GitHub.

The new feature also extends to pre-push reviews in Visual Studio Code, helping developers address potential issues before committing changes. Combined with tools like static analyzers—software that detects bugs or vulnerabilities in code without execution—GitHub Copilot’s new features streamline development cycles.

RelatedAI Coding Models – Alibaba Expands Qwen2.5-Coder Series Amid Global AI Push

Bringing Customization to Enterprise Teams

For enterprise users, GitHub has introduced coding guidelines alongside the AI review tool. These customizable, natural language rules allow organizations to align Copilot’s feedback with specific standards, such as flagging the use of magic numbers—arbitrary constant values that reduce code readability—or enforcing consistent naming conventions.

These guidelines, configured at the repository level, enhance collaboration within large teams. They ensure consistency across projects while maintaining transparency by attributing AI-generated comments to their source.

Addressing Challenges of AI-Assisted Development

Both the code referencing tool and AI-driven code reviews represent advancements in AI-powered development, but Microsoft and GitHub acknowledge their limitations.

For instance, AI tools may produce “hallucinated” feedback, where the AI misinterprets code and offers inaccurate suggestions. Similarly, biases in training data could lead to recommendations that favor certain coding styles over others.

To mitigate these issues, GitHub Copilot’s AI reviews always leave “Comment” reviews rather than approvals or change requests. This ensures human oversight remains central to the process. Developers are encouraged to validate suggestions through manual reviews and automated testing.

RelatedSupermaven Joins Cursor to Compete With GitHub Copilot in AI Code Editing

How to Access the New Features

Both tools are readily available for testing. Developers can enable the code referencing feature in Visual Studio by upgrading to the latest preview version. The AI-driven code review tool, meanwhile, is accessible through GitHub’s public preview program for Copilot Individual, Business, and Enterprise subscribers.

Detailed setup guides and changelogs are available to help users integrate these features seamlessly into their workflows. As Patel noted, “These tools are designed to make AI assistance more transparent and effective, while keeping developers in control.”

SourceMicrosoft
Markus Kasanmascheff
Markus Kasanmascheff
Markus has been covering the tech industry for more than 15 years. He is holding a Master´s degree in International Economics and is the founder and managing editor of Winbuzzer.com.

Recent News

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
We would love to hear your opinion! Please comment below.x
()
x