Skip to content

Commit

Permalink
Autoformat CodeQL
Browse files Browse the repository at this point in the history
  • Loading branch information
smowton committed Sep 3, 2024
1 parent 47418c1 commit 91f8a15
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 1 addition & 3 deletions go/ql/lib/semmle/go/Scopes.qll
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,7 @@ class Field extends Variable {
/**
* Gets the tag associated with this field, or the empty string if this field has no tag.
*/
string getTag() {
declaringType.hasOwnFieldWithTag(_, this.getName(), this.getType(), _, result)
}
string getTag() { declaringType.hasOwnFieldWithTag(_, this.getName(), this.getType(), _, result) }
}

/**
Expand Down
6 changes: 4 additions & 2 deletions go/ql/test/library-tests/semmle/go/Types/InterfaceIds.ql
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import go

from NamedType nt, InterfaceType it, Type methodType, string id
where nt.getName() = "MixedExportedAndNot" and it = nt.getUnderlyingType()
and methodType = it.getMethodTypeById(id)
where
nt.getName() = "MixedExportedAndNot" and
it = nt.getUnderlyingType() and
methodType = it.getMethodTypeById(id)
select it.pp(), methodType.pp(), id
6 changes: 4 additions & 2 deletions go/ql/test/library-tests/semmle/go/Types/struct_tags.ql
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import go

from StructType s, Field f, string tag
where f = s.getOwnField(_, _) and tag = f.getTag()
and tag != ""
where
f = s.getOwnField(_, _) and
tag = f.getTag() and
tag != ""
select s.pp(), f, tag

0 comments on commit 91f8a15

Please sign in to comment.