-
Notifications
You must be signed in to change notification settings - Fork 395
Feature request : Add the possibility to load custom rules by a module name or a fully qualified name #607
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
Comments
Will this request be taken into consideration? @{
CustomRulePath=@('C:\Program Files\WindowsPowerShell\Modules\ParameterSetRules\1.0.0\ParameterSetRules.psd1','C:\Program Files\WindowsPowerShell\Modules\OptimizationRules\0.3.0\OptimizationRules.psd1')
IncludeDefaultRules=$true
} Today if I change the version of one of these modules, I have to modify the configuration file. |
Although a |
For those who use external rules encoded powershell. In my opinion, this discussion will sooner or later come up against this limit. |
@LaurentDardenne Interesting. My thinking is: |
Perhaps a problem of language comprehension on my side, the title seemed clear to me: (get-module ParameterSetRules).ModuleType
#Script Or is it to prototyping?
Plaster does that and it's a appreciable behavior. For PSSA I prefer a configuration file.
Personally before seeing further I would like to see the correction of some bugs which, for me, limit the use of script-based rules or ask me 'more' effort to use it. |
The big difference to including script based rules as part of PSSA itself as part of the default rules has a significant performance impact as I showed in my proof of concept. Hence why I'd rather like to convert them to c#. |
@bergmeister sorry for the late response. I think this issue is useful to improve extensibility by just providing the name of the locally installed module containing additional rules that extend PSSA instead of a hard-coded path in the settings file. Independent versioning (i.e. fixing a bug in the rule itself or adding new rules at any time without being dependent on PSSA releases) is the main reason. Yes I does. |
Could you consider these points in version 2.0 of PSSA ? |
Yes, similar points have been brought up to improve the experience the way custom rules integrate into PSSA. cc @rjmholt |
Today if i publish custom rules, i use a module, but PSScriptAnalyzer need a path to load these custom rules.
I can write this:
Here this code is not dependent to a path :
The text was updated successfully, but these errors were encountered: