Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds comment support to the Bruno language parser, allowing users to add # and // style comments in .bru files, collection files, and environment files. Comments can appear at the top level, between blocks, and inside dictionary, list, and assert blocks.
Changes:
- Extended grammar rules to recognize comment syntax in all file types
- Added semantic handling to filter out comments during parsing
- Created comprehensive test coverage for comment functionality across different block types
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/bruno-lang/v2/src/bruToJson.js | Updated grammar to support comments in BruFiles, dictionaries, lists, and assert blocks |
| packages/bruno-lang/v2/src/collectionBruToJson.js | Added comment support to collection file grammar |
| packages/bruno-lang/v2/src/envToJson.js | Extended environment file grammar to handle comments |
| packages/bruno-lang/v2/tests/comments.spec.js | Comprehensive test suite covering various comment scenarios in bru files |
| packages/bruno-lang/v2/tests/envComments.spec.js | Test cases for comment support in environment files |
| packages/bruno-lang/v2/tests/examples/examples.spec.js | Added tests for example files with comments |
| packages/bruno-lang/v2/tests/examples/fixtures/bru/example-with-comments.bru | Example fixture demonstrating comment usage |
| packages/bruno-lang/v2/tests/examples/fixtures/bru/test-comments-in-blocks.bru | Test fixture with comments in various block types |
| packages/bruno-lang/v2/tests/examples/fixtures/json/example-with-comments.json | Expected JSON output for example-with-comments.bru |
| packages/bruno-lang/v2/tests/examples/fixtures/json/test-comments-in-blocks.json | Expected JSON output for test-comments-in-blocks.bru |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
WalkthroughThis PR extends the Bruno language parser to recognize and handle comments (starting with Changes
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested Labels
Suggested Reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This PR only adds comment support functionality (#1371)
The changes are additive and don't modify existing behavior.
Example:
Summary by CodeRabbit
Release Notes
New Features
Tests
✏️ Tip: You can customize this high-level summary in your review settings.