You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apologies if I am repeating something or if this has been discussed already. This is mostly an re-iteration of #1140 (comment)
As of now, custom rule names are inconsistent across various places.
At first, there are no indication about function name in the ScriptRuleDocumention.md . But PSSA is completely depends on $MyInvocation.InvocationName for rule/violation name
I can not really have a customized rule name, it should be the name of the PS function. That gives me a weird naming of rules like Measure-Something. On the other I can ship the violation with whatever name I like which has no value and can break things.
While suppressing a custom rule, I will have to provide <ModuleName>\<RuleName>. That would end up something like, FooBar\Measure-Something
I really do not like this convention as I do not want the developer to be aware of the module name or the function name.
It gets worst further, While filtering a rule, I can not follow the same convention, it has to be the name whatever the function name.
This is essentially planned for PSSA 2; rules, whether implemented by .NET classes or PS functions, should define an attribute to declare a name, with the namespace being the assembly or module name (the namespace is also customisable/overrideable)
Apologies if I am repeating something or if this has been discussed already. This is mostly an re-iteration of #1140 (comment)
As of now, custom rule names are inconsistent across various places.
$MyInvocation.InvocationName
for rule/violation nameMeasure-Something
. On the other I can ship the violation with whatever name I like which has no value and can break things.<ModuleName>\<RuleName>
. That would end up something like,FooBar\Measure-Something
The text was updated successfully, but these errors were encountered: