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

Consider specific Annotations for UserForms #6206

Open
AlpsDevABE opened this issue Mar 22, 2024 · 0 comments
Open

Consider specific Annotations for UserForms #6206

AlpsDevABE opened this issue Mar 22, 2024 · 0 comments
Labels
enhancement Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope. feature-inspections up-for-grabs Use this label in conjunction with a difficulty level label, e.g. difficulty-02-ducky

Comments

@AlpsDevABE
Copy link

What
When using Code Inspection for userforms the following items come up:

  • Consider renaming Control lblPassword
  • Consider renaming procedure cmdOk_Click

Ignoring these instances at Module level will apply '@IgnoreModule HungarianNotation
Which will suppress any internal variable from marking in the Code.

Why
I understand that Systems HungarianNotaion is bad however in user forms you often have multiple control elements representing as single object such as a Label, TextBox and maybe even a button or two. It becomes a nightmare to manage when there is such a bad mix of Data and Logic together and that is just the nature of userforms.

I would recommend something like '@IgnoreUserForm HungarianNotation which would suppress any references to things like lblPassword txtPassword if Password is a Form Control along with any functions that occur for that control without excluding the inspection for Real Code.

Example

'@IgnoreUserForm HungarianNotation 
' This code should not trigger the inspection:
Private Sub cmdCancel_Click()
  ' But this code should
  Dim strPotatoes as String
  strPotatoes = "Why systems hungarian, ugh!!"
End Sub
@AlpsDevABE AlpsDevABE added enhancement Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope. feature-inspections up-for-grabs Use this label in conjunction with a difficulty level label, e.g. difficulty-02-ducky labels Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope. feature-inspections up-for-grabs Use this label in conjunction with a difficulty level label, e.g. difficulty-02-ducky
Projects
None yet
Development

No branches or pull requests

1 participant