Skip to content

Commit 09b82d0

Browse files
author
Kapil Borle
committed
Remove commented code
1 parent fc64631 commit 09b82d0

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

Rules/UseShouldProcessCorrectly.cs

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -67,45 +67,6 @@ public IEnumerable<DiagnosticRecord> AnalyzeScript(Ast ast, string fileName)
6767
{
6868
yield return dr;
6969
}
70-
71-
// yield break;
72-
73-
// IEnumerable<Ast> funcDefAsts = ast.FindAll(testAst => testAst is FunctionDefinitionAst, true);
74-
// IEnumerable<Ast> attributeAsts;
75-
// IEnumerable<Ast> memberAsts;
76-
// IScriptExtent extent;
77-
// string funcName;
78-
// string supportsShouldProcess = "SupportsShouldProcess";
79-
// string trueString = "$true";
80-
// bool hasShouldProcessAttribute;
81-
// bool callsShouldProcess;
82-
83-
// foreach (FunctionDefinitionAst funcDefAst in funcDefAsts) {
84-
// extent = funcDefAst.Extent;
85-
// funcName = funcDefAst.Name;
86-
87-
// hasShouldProcessAttribute = false;
88-
// callsShouldProcess = false;
89-
90-
// attributeAsts = funcDefAst.FindAll(testAst => testAst is NamedAttributeArgumentAst, true);
91-
// foreach (NamedAttributeArgumentAst attributeAst in attributeAsts) {
92-
// hasShouldProcessAttribute |= ((attributeAst.ArgumentName.Equals(supportsShouldProcess, StringComparison.OrdinalIgnoreCase) && attributeAst.Argument.Extent.Text.Equals(trueString, StringComparison.OrdinalIgnoreCase))
93-
// // checks for the case if the user just use the attribute without setting it to true
94-
// || (attributeAst.ArgumentName.Equals(supportsShouldProcess, StringComparison.OrdinalIgnoreCase) && attributeAst.ExpressionOmitted));
95-
// }
96-
97-
// memberAsts = funcDefAst.FindAll(testAst => testAst is MemberExpressionAst, true);
98-
// foreach (MemberExpressionAst memberAst in memberAsts) {
99-
// callsShouldProcess |= memberAst.Member.Extent.Text.Equals("ShouldProcess", StringComparison.OrdinalIgnoreCase) || memberAst.Member.Extent.Text.Equals("ShouldContinue", StringComparison.OrdinalIgnoreCase);
100-
// }
101-
102-
// if (hasShouldProcessAttribute && !callsShouldProcess) {
103-
// yield return new DiagnosticRecord(string.Format(CultureInfo.CurrentCulture, Strings.ShouldProcessErrorHasAttribute, funcName), extent, GetName(), DiagnosticSeverity.Warning, fileName);
104-
// }
105-
// else if (!hasShouldProcessAttribute && callsShouldProcess) {
106-
// yield return new DiagnosticRecord(string.Format(CultureInfo.CurrentCulture, Strings.ShouldProcessErrorHasCmdlet, funcName), extent, GetName(), DiagnosticSeverity.Warning, fileName);
107-
// }
108-
// }
10970
}
11071

11172
private void FindViolations()

0 commit comments

Comments
 (0)