Skip to content

Make custom rule name consistent  #1545

Open
@jegannathanmaniganadan

Description

@jegannathanmaniganadan

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.
Invoke-ScriptAnalyzer -IncludeRule Measure-Something -ExcludeRule Measure-SomethingElse

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions