File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ class UseSupportsShouldProcess : ConfigurableRule
3434 private const int indentationSize = 4 ;
3535 private Ast ast ;
3636 private Token [ ] tokens ;
37+
3738 /// <summary>
3839 /// Analyzes the given ast to find if a function defines Confirm and/or WhatIf parameters manually
3940 /// instead of using SupportShouldProcess attribute.
@@ -166,7 +167,7 @@ private List<CorrectionExtent> GetCorrections(
166167 {
167168 // has no cmdletbinding attribute
168169 // hence, add the attribute and supportsshouldprocess argument
169- correctionExtents . Add ( GetCorrectionToAddParamBlock ( paramBlockAst ) ) ;
170+ correctionExtents . Add ( GetCorrectionToAddAttribute ( paramBlockAst ) ) ;
170171 }
171172 }
172173 else
@@ -280,7 +281,6 @@ private static CorrectionExtent GetCorrectionToRemoveFuncParamDecl(
280281 ast . Extent . File ) ;
281282 }
282283
283- // doesn't seem right. The arguments should be of same type.
284284 private CorrectionExtent Normalize (
285285 Position refPosition ,
286286 CorrectionExtent correctionExtent )
@@ -307,7 +307,7 @@ private static bool TryGetCmdletBindingAttribute(
307307 return attributeAst != null ;
308308 }
309309
310- private static CorrectionExtent GetCorrectionToAddParamBlock ( ParamBlockAst paramBlockAst )
310+ private static CorrectionExtent GetCorrectionToAddAttribute ( ParamBlockAst paramBlockAst )
311311 {
312312 return new CorrectionExtent (
313313 paramBlockAst . Extent . StartLineNumber ,
You can’t perform that action at this time.
0 commit comments