Skip to content

feat: add COBOL language support#1725

Open
mvanhorn wants to merge 3 commits intoo2sh:mainfrom
mvanhorn:feat/cobol-language-support
Open

feat: add COBOL language support#1725
mvanhorn wants to merge 3 commits intoo2sh:mainfrom
mvanhorn:feat/cobol-language-support

Conversation

@mvanhorn
Copy link
Copy Markdown

@mvanhorn mvanhorn commented Apr 3, 2026

Adds COBOL to onefetch's supported languages.

languages.yaml: Added COBOL entry with:

  • Type: programming
  • ASCII art: COBOL letterform + classic IDENTIFICATION DIVISION header
  • Color: blue (#005CA5) matching COBOL's IBM mainframe heritage

tokei already supports COBOL for line counting.

Closes #1443

This contribution was developed with AI assistance (Claude Code).

Add COBOL to the supported languages list with ASCII art featuring
the COBOL letterform and a classic IDENTIFICATION DIVISION header.
Uses blue color matching the IBM mainframe heritage.

Closes o2sh#1443
Copy link
Copy Markdown
Collaborator

@spenserblack spenserblack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the empty lines in the ASCII art can be removed. Otherwise, LGTM.

languages.yaml Outdated
Comment on lines +404 to +415
{0}
{0} CCCC OOOOO BBBBB OOOOO LL
{0} CC CC OO OO BB BB OO OO LL
{0} CC OO OO BBBBB OO OO LL
{0} CC CC OO OO BB BB OO OO LL
{0} CCCC OOOOO BBBBB OOOOO LLLLLL
{0}
{0} ================================================
{0} IDENTIFICATION DIVISION.
{0} PROGRAM-ID. ONEFETCH.
{0} ================================================
{0}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{0}
{0} CCCC OOOOO BBBBB OOOOO LL
{0} CC CC OO OO BB BB OO OO LL
{0} CC OO OO BBBBB OO OO LL
{0} CC CC OO OO BB BB OO OO LL
{0} CCCC OOOOO BBBBB OOOOO LLLLLL
{0}
{0} ================================================
{0} IDENTIFICATION DIVISION.
{0} PROGRAM-ID. ONEFETCH.
{0} ================================================
{0}
{0} CCCC OOOOO BBBBB OOOOO LL
{0} CC CC OO OO BB BB OO OO LL
{0} CC OO OO BBBBB OO OO LL
{0} CC CC OO OO BB BB OO OO LL
{0} CCCC OOOOO BBBBB OOOOO LLLLLL
{0}
{0} ================================================
{0} IDENTIFICATION DIVISION.
{0} PROGRAM-ID. ONEFETCH.
{0} ================================================

Copy link
Copy Markdown
Collaborator

@spenserblack spenserblack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After checking, I realized the CI is failing because the wrong language name was used.

- Rename to match tokei::LanguageType::Cobol variant
- Compress letter spacing to stay within 40-char line width
- Remove empty lines per review feedback
- Shorten separator bars to fit constraint

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mvanhorn
Copy link
Copy Markdown
Author

Fixed in 332742e:

  • Renamed COBOL to Cobol to match tokei::LanguageType::Cobol
  • Compressed ASCII art spacing to stay within the 40-char line width limit
  • Removed empty lines per your suggestion
  • Shortened separator bars to fit the constraint

Build passes locally with cargo check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Language Request: COBOL

2 participants