File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
powershell/ql/lib/semmle/code/powershell Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 11private import AstImport
22
33class Attribute extends AttributeBase , TAttribute {
4- string getName ( ) { result = getRawAst ( this ) .( Raw:: Attribute ) .getName ( ) }
4+ string getLowerCaseName ( ) { result = getRawAst ( this ) .( Raw:: Attribute ) .getName ( ) .toLowerCase ( ) }
5+
6+ bindingset [ result ]
7+ string getAName ( ) { result .toLowerCase ( ) = this .getLowerCaseName ( ) }
58
69 NamedAttributeArgument getNamedArgument ( int i ) {
710 exists ( ChildIndex index , Raw:: Ast r | index = attributeNamedArg ( i ) and r = getRawAst ( this ) |
@@ -41,7 +44,7 @@ class Attribute extends AttributeBase, TAttribute {
4144 result = this .toStringSpecific ( )
4245 or
4346 not exists ( this .toStringSpecific ( ) ) and
44- result = this .getName ( )
47+ result = this .getLowerCaseName ( )
4548 }
4649
4750 final override Ast getChild ( ChildIndex i ) {
Original file line number Diff line number Diff line change @@ -180,6 +180,11 @@ class AttributeCfgNode extends AttributeBaseCfgNode {
180180 ExprCfgNode getPositionalArgument ( int i ) {
181181 attr .hasCfgChild ( attr .getPositionalArgument ( i ) , this , result )
182182 }
183+
184+ string getLowerCaseName ( ) { result = attr .getLowerCaseName ( ) }
185+
186+ bindingset [ result ]
187+ string getAName ( ) { result = attr .getAName ( ) }
183188}
184189
185190private class ScriptBlockChildMapping extends NonExprChildMapping , ScriptBlock {
You can’t perform that action at this time.
0 commit comments