mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Adds script analyzer config to project for VS Code
This commit is contained in:
parent
c2ad2b6564
commit
634114d448
1 changed files with 67 additions and 0 deletions
67
PSScriptAnalyzerSettings.psd1
Normal file
67
PSScriptAnalyzerSettings.psd1
Normal file
|
|
@ -0,0 +1,67 @@
|
||||||
|
@{
|
||||||
|
Severity = @(
|
||||||
|
'Error',
|
||||||
|
'Warning',
|
||||||
|
'Information'
|
||||||
|
);
|
||||||
|
IncludeRules = @(
|
||||||
|
'PSAvoidUsingPositionalParameters',
|
||||||
|
'PSAvoidUsingInternalURLs',
|
||||||
|
'PSAvoidUninitializedVariable',
|
||||||
|
'PSUseApprovedVerbs',
|
||||||
|
'PSAvoidUsingCmdletAliases',
|
||||||
|
'PSAvoidUsingPlainTextForPassword',
|
||||||
|
'PSMissingModuleManifestField',
|
||||||
|
'PSUseDeclaredVarsMoreThanAssigments',
|
||||||
|
'PSAvoidTrailingWhitespace',
|
||||||
|
'PSAvoidUsingDeprecatedManifestFields',
|
||||||
|
'PSUseToExportFieldsInManifest',
|
||||||
|
'PSAvoidUsingWriteHost',
|
||||||
|
'PSUseProcessBlockForPipelineCommand',
|
||||||
|
'PSUseConsistentIndentation',
|
||||||
|
'PSUseCompatibleCmdlets',
|
||||||
|
'PSUseConsistentWhitespace',
|
||||||
|
'PSAlignAssignmentStatement',
|
||||||
|
'PSUseCorrectCasing'
|
||||||
|
);
|
||||||
|
ExcludeRules = @(
|
||||||
|
'PSAvoidGlobalVars',
|
||||||
|
'PSUseSingularNouns'
|
||||||
|
)
|
||||||
|
Rules = @{
|
||||||
|
PSUseCompatibleCmdlets = @{
|
||||||
|
Compatibility = @("4.0")
|
||||||
|
};
|
||||||
|
PSPlaceOpenBrace = @{
|
||||||
|
Enable = $true
|
||||||
|
OnSameLine = $true
|
||||||
|
NewLineAfter = $true
|
||||||
|
IgnoreOneLineBlock = $true
|
||||||
|
};
|
||||||
|
PSPlaceCloseBrace = @{
|
||||||
|
Enable = $true
|
||||||
|
NewLineAfter = $true
|
||||||
|
IgnoreOneLineBlock = $true
|
||||||
|
NoEmptyLineBefore = $true
|
||||||
|
};
|
||||||
|
PSUseConsistentIndentation = @{
|
||||||
|
Enable = $true
|
||||||
|
Kind = 'space'
|
||||||
|
IndentationSize = 4
|
||||||
|
PipelineIndentation = 'IncreaseIndentationForFirstPipeline'
|
||||||
|
};
|
||||||
|
PSUseConsistentWhitespace = @{
|
||||||
|
Enable = $true
|
||||||
|
CheckOpenBrace = $true
|
||||||
|
CheckOpenParen = $true
|
||||||
|
CheckOperator = $false
|
||||||
|
CheckSeparator = $true
|
||||||
|
};
|
||||||
|
PSAlignAssignmentStatement = @{
|
||||||
|
Enable = $true
|
||||||
|
};
|
||||||
|
PSUseCorrectCasing = @{
|
||||||
|
Enable = $true
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue