Update PSUseCorrectCasing to enforce correct casing of language keywords
Summary of the new feature
Incorrect case of language keywords should result in a PSUseCorrectCasing rule violation.
A list of keywords can be obtained by reflection:
[ref].Assembly.GetType('System.Management.Automation.Language.Tokenizer').
GetDeclaredField('_keywordText').
ForEach{ $PSItem.GetValue($null) }
elseif
if
else
switch
foreach
from
in
for
while
until
do
try
catch
finally
trap
data
return
continue
break
exit
throw
begin
process
end
dynamicparam
function
filter
param
class
define
var
using
workflow
parallel
sequence
inlinescript
configuration
public
private
static
interface
enum
namespace
module
type
assembly
command
hidden
base
What is the latest version of PSScriptAnalyzer at the point of writing 1.19.0
Similar to the other items #1475 and #1401 that you opened around enhancements for PSUseCorrectCasing, this is possible but not a priority right now. We'd be open to a PR though :)
@SydneyhSmith Any preference whether we should merge those 3 issues into one or keep them separate?
dupe of #767?
Hello,
What new about this feature ? Is that enabled ? If yes how can we do this ? I searched but nothing is working in my side.
Thanks