Skip to content

Add new powershell.useCorrectCasingsettings for new rule in PSSA 1.18: PSUseCorrectCasing #1687

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

Merged
merged 6 commits into from
Mar 20, 2019
Merged
Show file tree
Hide file tree
Changes from 5 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
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,11 @@
"default": true,
"description": "Align assignment statements in a hashtable or a DSC Configuration."
},
"powershell.codeFormatting.useCorrectCasing": {
"type": "boolean",
"default": true,
"description": "Correct casing of cmdlets."
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor English "nit" … "Correct" in this case sounds like it might be a verb instead of an adjective. I suggest "Use correct casing for cmdlets." - or something like that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fair point. Done

},
"powershell.integratedConsole.showOnStartup": {
"type": "boolean",
"default": true,
Expand Down
2 changes: 2 additions & 0 deletions src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export interface ICodeFormattingSettings {
whitespaceAfterSeparator: boolean;
ignoreOneLineBlock: boolean;
alignPropertyValuePairs: boolean;
useCorrectCasing: boolean;
}

export interface IScriptAnalysisSettings {
Expand Down Expand Up @@ -131,6 +132,7 @@ export function load(): ISettings {
whitespaceAfterSeparator: true,
ignoreOneLineBlock: true,
alignPropertyValuePairs: true,
useCorrectCasing: true,
};

const defaultIntegratedConsoleSettings: IIntegratedConsoleSettings = {
Expand Down