-
Notifications
You must be signed in to change notification settings - Fork 791
feat: add support for highlight .cpy and .cpb files as COBOL #2186
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
feat: add support for highlight .cpy and .cpb files as COBOL #2186
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.
Pull request overview
This PR adds support for recognizing .cpy and .cpb file extensions as COBOL files in the Rouge syntax highlighter. These are standard COBOL copybook file extensions commonly used in COBOL development. The changes enable the lexer to properly identify and highlight these file types alongside the existing .cob and .cbl extensions.
Key changes:
- Added
.cpyand.cpbto the list of recognized COBOL file extensions - Added corresponding test coverage for the new file extensions
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| lib/rouge/lexers/cobol.rb | Updated filenames declaration to include *.cpy and *.cpb extensions |
| spec/lexers/cobol_spec.rb | Added test assertions to verify filename guessing works for .cpy and .cpb files |
After thoroughly reviewing the changes, I found no issues with this pull request. The implementation is clean, follows the established patterns in the codebase, and properly adds both the lexer support and corresponding test coverage. The .cpy (copybook) and .cpb (copybook) extensions are legitimate COBOL file extensions used in the COBOL community, particularly for files containing reusable code snippets that are copied into other programs during compilation.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I'm sorry, @gustavosimon. I'm no longer a maintainer on this project. |
|
Thanks, @gustavosimon. LGTM 🚀 |
Great, thanks for approving @tancnle! |
|
@gustavosimon I have pushed a new release https://github.com/rouge-ruby/rouge/releases/tag/v4.7.0. |
Great!! Thanks a lot @tancnle ! Happy new year! |
No description provided.