Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Engine/Commands/InvokeScriptAnalyzerCommand.cs
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please tidy up diff

Original file line number Diff line number Diff line change
Expand Up @@ -340,11 +340,11 @@ protected override void BeginProcessing()
settingsObj?.CustomRulePath?.ToArray(),
this.SessionState,
combRecurseCustomRulePath);
combRulePaths = rulePaths == null
? settingsCustomRulePath
: settingsCustomRulePath == null
? rulePaths
: rulePaths.Concat(settingsCustomRulePath).ToArray();
combRulePaths = rulePaths == null
? settingsCustomRulePath
: settingsCustomRulePath == null
? rulePaths
: rulePaths.Concat(settingsCustomRulePath).ToArray();
}
catch (Exception exception)
{
Expand Down
1 change: 1 addition & 0 deletions Engine/Settings/PSGallery.psd1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file is to replicate setting used by PSGallery to scan code when users upload new module and send email if there are violations. I don't even know whether this file is still in sync as of today but this file should only be updated by PSGallery members who know the rules used by PSGallery (and consider adding new ones).
Can you comment on whether this file is up to date and if not open separate PR to sync please @alerickson ?

Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
'PSAvoidGlobalVars',
'PSUseDeclaredVarsMoreThanAssignments',
'PSAvoidUsingInvokeExpression',
'PSAvoidUsingNewObject',
'PSAvoidUsingPlainTextForPassword',
'PSAvoidUsingComputerNameHardcoded',
'PSUsePSCredentialType',
Expand Down
3 changes: 2 additions & 1 deletion Engine/Settings/ScriptFunctions.psd1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure what the purpose of this settings file is but until then I'd not recommend touching it please

Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
'PSAvoidUsingPositionalParameters',
'PSAvoidGlobalVars',
'PSUseDeclaredVarsMoreThanAssignments',
'PSAvoidUsingInvokeExpression')
'PSAvoidUsingInvokeExpression',
'PSAvoidUsingNewObject')
}
Loading
Loading