DecimalTurn / VBA-GitHub-Checks

Performing checks on newly updated VBA repos.
MIT License
2 stars 0 forks source link

[kerryoostdyk/VBA-Challenge_Week2] is detected as VBScript #296

Closed github-actions[bot] closed 6 days ago

github-actions[bot] commented 1 week ago

Hi @kerryoostdyk,

It seems like there is a small issue with your repo named VBA-Challenge_Week2. Currently, it is marked as a VBScript repo since more than 50% of its code is identified as VBScript.

The reason is that you are currently using the extension .vbs for your VBA code, but this extension is associated with VBScript.

To solve this issue and make sure that files in this repo are correctly identified as VBA, there are a mainly 3 options:

Option A: Change the file extensions to .vba

By using the .vba extension, you make sure that all you VBA code will be correctly detected by GitHub as VBA.

Option B: Add the following in the .gitattributes file:


*.vb linguist-language=vba

The advantage of this method is that you only have to make the change in one place. The disadvantage is that this won't solve the problem for GitHub searches because the linguist-language attribute is not supported for searches. This means that if the VBA language filter is used in a search query, files that are currently labeled as VB.NET still won't show up.

Option C: Change the file extensions to .bas + add the language information at the top of each file

The .bas extension is the default extension for VBA modules code, but it is also shared by other languages in the BASIC family of languages. To avoid any ambiguity, it is better to include the following information at the top of your .bas files:

Attribute VB_Name = "ComponentName"
'@Lang VBA

The Atttribute is automatically generated by the VBE when you export a VBA module and the @Lang annotation is there to make sure your code isn't indentified as Visual Basic 6.0 (VB6) by mistake since VB6 module files also have Attribute VB_Name at the top.


This message was autogenerated. If you believe that it was an error, please reply to let us know and improve the bot.

github-actions[bot] commented 6 days ago

Looks like you made some changes and the repository is now reported as VBA, great! This issue is now resolved, so I'm closing it. If you have any questions, feel free to ask.