Skip to content

Commit 3ca8d0b

Browse files
author
Kapil Borle
committed
Update offset comparison in PSUseCredentialType source
1 parent c7e200e commit 3ca8d0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Rules/UsePSCredentialType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ private bool WrongCredentialUsage(ParameterAst parameter)
115115
var credentialAttribute = parameter.Attributes.FirstOrDefault(paramAttribute => paramAttribute.TypeName.GetReflectionType() == typeof(CredentialAttribute));
116116

117117
// check that both exists and pscredentialtype comes before credential attribute
118-
if (psCredentialType != null && credentialAttribute != null && psCredentialType.Extent.EndOffset < credentialAttribute.Extent.StartOffset)
118+
if (psCredentialType != null && credentialAttribute != null && psCredentialType.Extent.EndOffset <= credentialAttribute.Extent.StartOffset)
119119
{
120120
return false;
121121
}

0 commit comments

Comments
 (0)