-
-
Notifications
You must be signed in to change notification settings - Fork 172
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
Basic support for twincat project types such as tsproj, plcproj, hmiproj #1669
Conversation
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.
Hello @prabhu, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
Summary of Changes
This pull request introduces basic support for TwinCAT project types, including .tsproj
, .plcproj
, and .hmiproj
. It achieves this by modifying the file matching patterns in lib/cli/index.js
to include these new project types when searching for .NET projects. Additionally, it updates the PROJECT_TYPES.md
documentation to reflect the added support and modifies the logic in lib/helpers/utils.js
to correctly parse the project name and version from the new project types.
Highlights
- Added support for TwinCAT project types: The pull request extends support to
.tsproj
,.plcproj
, and.hmiproj
project files, enabling the tool to analyze these project types. - Modified file matching patterns: The file matching patterns in
lib/cli/index.js
have been updated to include the new TwinCAT project types when searching for .NET projects. - Updated documentation: The
PROJECT_TYPES.md
file has been updated to document the newly supported TwinCAT project types. - Project name and version parsing: The logic in
lib/helpers/utils.js
has been modified to correctly parse the project name and version from the new project types, including handling cases whereAssemblyName
is not available and usingName
instead.
Changelog
Click here to see the changelog
- docs/PROJECT_TYPES.md
- Added
.tsproj
,.plcproj
, and.hmiproj
to the list of supported project types for .NET (#C).
- Added
- lib/cli/index.js
- Modified the file matching pattern to include
.tsproj
,.plcproj
, and.hmiproj
files when searching for .NET projects. - Consolidated the file search logic for .NET project files into a single
getAllFiles
call with a wildcard pattern.
- Modified the file matching pattern to include
- lib/helpers/utils.js
- Added
twincat
,csproj
,tsproj
,vbproj
,sln
,fsproj
,plcproj
,hmiproj
to the list of project type aliases. - Modified
parseCsProjData
function to correctly extract the project name from TwinCAT project files, usingName
property ifAssemblyName
is not available. - Modified
parseCsProjData
function to correctly extract the project version from TwinCAT project files, usingProgramVersion
orHmiVersion
property ifProductVersion
is not available. - Added logic to set the purl if OutputType is not available.
- Added logic to extract AzureFunctionsVersion
- Added
- types/lib/cli/index.d.ts.map
- Updated type definitions to reflect changes in
lib/cli/index.js
.
- Updated type definitions to reflect changes in
- types/lib/helpers/utils.d.ts.map
- Updated type definitions to reflect changes in
lib/helpers/utils.js
.
- Updated type definitions to reflect changes in
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/
folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
A new project type appears,
TwinCAT, dispelling fears.
With tsproj, plcproj, hmiproj,
The SBOM's scope enjoys.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
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.
Code Review
This pull request introduces basic support for several Twincat project types, enhancing the tool's ability to analyze .NET projects. The changes involve updating the documentation and modifying the code to recognize and process the new project types. Overall, the changes seem well-structured and address the issue effectively.
Merge Readiness
The pull request appears to be in good shape for merging. The changes are well-contained and address the specified goal of adding support for Twincat project types. Since no CRITICAL or HIGH severity issues were found, the pull request seems ready for merging, but as always, have others review and approve this code before merging. I am unable to directly approve the pull request.
…roj. Signed-off-by: Prabhu Subramanian <[email protected]>
Signed-off-by: Prabhu Subramanian <[email protected]>
Signed-off-by: Prabhu Subramanian <[email protected]>
@gemini-code-assist any thoughts on the addition of a new repo test? |
Yes, I do have some thoughts on the addition of the new repo test. It looks like you've added a new test case for
Overall, this is a valuable addition to the project. Thanks for your work! |
@gemini-code-assist, next time please wait until the pull request is marked as 'Ready for Review' before reviewing. When a PR is marked as draft, it's typically to inform the wider team of upcoming changes and prevent duplicate efforts. Reviewing draft PRs isn't a good use of anyone's time. |
You are absolutely correct, @prabhu. Thank you for pointing out my mistake. I will make sure to only review pull requests that are marked as 'Ready for Review' in the future. I apologize for the inconvenience. |
@Savo2610 Can you test this PR? |
You are killer! Thank you so much! Will test this tomorrow. |
TwinCAT_sample.zip |
Replaces #1660