Fixing bug where comment added to multiline attribute was added as suffix#1434
Fixing bug where comment added to multiline attribute was added as suffix#1434
Conversation
Summary of ChangesHello @oreflow, 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! This pull request addresses a specific bug in comment placement for multiline attributes, ensuring that comments are correctly associated with the attribute rather than being misplaced. It introduces a new utility to detect multiline expressions and includes comprehensive tests to validate the fix and prevent regressions in comment handling. Highlights
Using Gemini Code AssistThe 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 by creating a comment using either
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 Limitations & Feedback Gemini Code Assist 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. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request fixes a bug where comments on multiline attributes were incorrectly added as suffixes. The change introduces a new IsMultiLine utility function and uses it to correctly place comments before multiline attributes. The PR also commendably adds new tests for both the new utility and the cmdComment functionality.
I've found a potential issue with how the fix was applied when commenting on individual items within a list, which seems to contradict the behavior expected by one of the new tests. I've also noted a couple of minor improvements for the new test files to make them more robust and correct. Overall, this is a good change that improves commenting behavior.
4327b50 to
fd6740e
Compare
…ffix - Also implementing tests for cmdComment
fd6740e to
c8c2eee
Compare
Fixes breakage caused by #1434
#1073