Skip to content
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

Issue with language stats bar #1

Closed
DecimalTurn opened this issue Jan 17, 2024 · 5 comments
Closed

Issue with language stats bar #1

DecimalTurn opened this issue Jan 17, 2024 · 5 comments

Comments

@DecimalTurn
Copy link

Currently, the GitHub stats bar for this repo doesn't even include VBA:

image

This is partially because none of the files contain any of the normal metadata that appears at the top of VBA files when they are exported via the VBE. For example, when a module is exported to a .bas file with the VBE, it will include the following metadata at the top of the file:

Attribute VB_Name = "ModuleName"

One way to fix this issue would be to add this metadata manually or via a script, but if you don't want to bother with that and just fix the stats bar, you could add a .gitattributes file with the following lines to your repo:

*.bas linguist-language=vba
*.cls linguist-language=vba
*.frm linguist-language=vba

This will serve to override those files extensions to make sure they are counter as VBA in the stats bar. Let me know if you'd prefer me to make a PR for that.

ReneNyffenegger added a commit that referenced this issue Jan 17, 2024
Let Github know that .bas, .cls and .frm extensions stand
for Visual Basic for Applications in this repository.

Thanks to DecimalTurn for the suggestsion, see
#1
@ReneNyffenegger
Copy link
Owner

Thanks for the recommendation - I didn't know about linguist-language in .gitattributes.

Your suggestion is implemented with cbb7c22

@DecimalTurn
Copy link
Author

DecimalTurn commented Jan 18, 2024

My pleasure! I'll let you decide if you want to do the same for you other VBA repos such as:

Also, I see that some .vb file might contain VBA code, am I mistaken?

@ReneNyffenegger
Copy link
Owner

ReneNyffenegger commented Apr 1, 2024

Thanks again - I postboned doing this for way too long and have finally done it today!
And yes: .vb files contain VBA code. I have switched from using .bas to .vb as preferred suffix for a reason that had to do with syntax highlighting in a specific editor (I believe)

@ReneNyffenegger
Copy link
Owner

Oh... there were some repos I successfully managed to forget about - thanks anyway for your effort, much appreciated.

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

No branches or pull requests

2 participants