From 91f8a157494dffbfebf02a1b90e24019024e4037 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 3 Sep 2024 12:27:12 +0100 Subject: [PATCH] Autoformat CodeQL --- go/ql/lib/semmle/go/Scopes.qll | 4 +--- go/ql/test/library-tests/semmle/go/Types/InterfaceIds.ql | 6 ++++-- go/ql/test/library-tests/semmle/go/Types/struct_tags.ql | 6 ++++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/go/ql/lib/semmle/go/Scopes.qll b/go/ql/lib/semmle/go/Scopes.qll index 4fb0ef7c48fa4..67946e14dacaa 100644 --- a/go/ql/lib/semmle/go/Scopes.qll +++ b/go/ql/lib/semmle/go/Scopes.qll @@ -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) } } /** diff --git a/go/ql/test/library-tests/semmle/go/Types/InterfaceIds.ql b/go/ql/test/library-tests/semmle/go/Types/InterfaceIds.ql index b36e807aa3c34..5b04b068e6bac 100644 --- a/go/ql/test/library-tests/semmle/go/Types/InterfaceIds.ql +++ b/go/ql/test/library-tests/semmle/go/Types/InterfaceIds.ql @@ -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 diff --git a/go/ql/test/library-tests/semmle/go/Types/struct_tags.ql b/go/ql/test/library-tests/semmle/go/Types/struct_tags.ql index 4eb120e9f03a0..05ce098aed4b4 100644 --- a/go/ql/test/library-tests/semmle/go/Types/struct_tags.ql +++ b/go/ql/test/library-tests/semmle/go/Types/struct_tags.ql @@ -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