DecimalTurn / VBA-GitHub-Checks

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

[KathMac58/VBA_Challenge_Mod2] detected as Visual Basic .NET #134

Closed github-actions[bot] closed 2 weeks ago

github-actions[bot] commented 3 weeks ago

Hi @KathMac58,

It seems like there is a small issue with your repo named VBA_Challenge_Mod2. Currently, it is marked as a Visual Basic .NET repo since more than 50% of its code is identified as VB.NET.

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

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.

KathMac58 commented 3 weeks ago

Ok - I tried exporting as .bas and uploading again. Does that work?

Thanks, Kathryn

On Mon, Sep 16, 2024 at 4:05 PM github-actions[bot] < @.***> wrote:

Hi @KathMac58 https://github.com/KathMac58,

It seems like there is a small issue with your repo named VBA_Challenge_Mod2 https://github.com/KathMac58/VBA_Challenge_Mod2. Currently, it is marked as a Visual Basic .NET repo since more than 50% of its code is identified as VB.NET.

https://raw.githubusercontent.com/DecimalTurn/VBA-on-GitHub-Automations/main/assets/vb-file-extension.svg

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

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

https://raw.githubusercontent.com/DecimalTurn/VBA-on-GitHub-Automations/main/assets/vba-file-extension.svg

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 = @.*** 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.

— Reply to this email directly, view it on GitHub https://github.com/DecimalTurn/VBA-on-GitHub-Automations/issues/134, or unsubscribe https://github.com/notifications/unsubscribe-auth/BELYQ4EHZZAM6CDX7KF22ILZW5B2RAVCNFSM6AAAAABOKDKGWWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGUZDSNBZHA3TCNY . You are receiving this because you were mentioned.Message ID: @.***>

--

-Kathryn McAtee

github-actions[bot] commented 3 weeks ago

Looks like you made some changes and the repository is now reported as VBA, great! However, there are still files with the .vb extension. Is this intentional? [SubCheck AA]

KathMac58 commented 3 weeks ago

Yes, I kept the original file in case the change didn’t work, but I can remove it if you’d like!Kathryn McAtee | #267.566.0318On Sep 17, 2024, at 11:06 AM, github-actions[bot] @.***> wrote: Looks like you made some changes and the repository is now reported as VBA, great! However, there are still files with the .vb extension. Is this intentional? [SubCheck AA]

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

DecimalTurn commented 2 weeks ago

I see. It's up to you, but I think you could remove the original file without any issue. The beauty of Git is also that you can find deleted files in the history, so there isn't any risks anyway.