Skip to content

Commit 4e013af

Browse files
authored
Merge branch 'main' into criemen/upgrade-rules-rust
2 parents 3721e34 + e47d4cc commit 4e013af

File tree

602 files changed

+19533
-518
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

602 files changed

+19533
-518
lines changed

MODULE.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ local_path_override(
1414
# see https://registry.bazel.build/ for a list of available packages
1515

1616
bazel_dep(name = "platforms", version = "0.0.10")
17-
bazel_dep(name = "rules_go", version = "0.48.0")
17+
bazel_dep(name = "rules_go", version = "0.49.0")
1818
bazel_dep(name = "rules_pkg", version = "0.10.1")
1919
bazel_dep(name = "rules_nodejs", version = "6.2.0-codeql.1")
2020
bazel_dep(name = "rules_python", version = "0.32.2")
@@ -23,7 +23,7 @@ bazel_dep(name = "abseil-cpp", version = "20240116.0", repo_name = "absl")
2323
bazel_dep(name = "nlohmann_json", version = "3.11.3", repo_name = "json")
2424
bazel_dep(name = "fmt", version = "10.0.0")
2525
bazel_dep(name = "rules_kotlin", version = "1.9.4-codeql.1")
26-
bazel_dep(name = "gazelle", version = "0.37.0")
26+
bazel_dep(name = "gazelle", version = "0.38.0")
2727
bazel_dep(name = "rules_dotnet", version = "0.15.1")
2828
bazel_dep(name = "googletest", version = "1.14.0.bcr.1")
2929
bazel_dep(name = "rules_rust", version = "0.49.1")

cpp/ql/test/library-tests/ir/ir/PrintAST.expected

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4179,6 +4179,40 @@ destructors_for_temps.cpp:
41794179
# 103| Type = [IntType] int
41804180
# 103| ValueCategory = prvalue
41814181
# 104| getStmt(1): [ReturnStmt] return ...
4182+
generic.c:
4183+
# 1| [TopLevelFunction] void c11_generic_test(unsigned int, int)
4184+
# 1| <params>:
4185+
# 1| getParameter(0): [Parameter] x
4186+
# 1| Type = [IntType] unsigned int
4187+
# 1| getParameter(1): [Parameter] y
4188+
# 1| Type = [IntType] int
4189+
# 1| getEntryPoint(): [BlockStmt] { ... }
4190+
# 2| getStmt(0): [DeclStmt] declaration
4191+
# 2| getDeclarationEntry(0): [VariableDeclarationEntry] definition of r
4192+
# 2| Type = [IntType] unsigned int
4193+
# 3| getStmt(1): [ExprStmt] ExprStmt
4194+
# 3| getExpr(): [AssignExpr] ... = ...
4195+
# 3| Type = [IntType] unsigned int
4196+
# 3| ValueCategory = prvalue
4197+
# 3| getLValue(): [VariableAccess] r
4198+
# 3| Type = [IntType] unsigned int
4199+
# 3| ValueCategory = lvalue
4200+
# 3| getRValue(): [AddExpr] ... + ...
4201+
# 3| Type = [IntType] unsigned int
4202+
# 3| ValueCategory = prvalue
4203+
# 3| getLeftOperand(): [VariableAccess] x
4204+
# 3| Type = [IntType] unsigned int
4205+
# 3| ValueCategory = prvalue(load)
4206+
# 3| getRightOperand(): [Literal] 1
4207+
# 3| Type = [IntType] int
4208+
# 3| Value = [Literal] 1
4209+
# 3| ValueCategory = prvalue
4210+
# 3| getRightOperand().getFullyConverted(): [CStyleCast] (unsigned int)...
4211+
# 3| Conversion = [IntegralConversion] integral conversion
4212+
# 3| Type = [IntType] unsigned int
4213+
# 3| Value = [CStyleCast] 1
4214+
# 3| ValueCategory = prvalue
4215+
# 4| getStmt(2): [ReturnStmt] return ...
41824216
ir.c:
41834217
# 5| [TopLevelFunction] int getX(MyCoords*)
41844218
# 5| <params>:

cpp/ql/test/library-tests/ir/ir/aliased_ir.expected

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2958,6 +2958,30 @@ destructors_for_temps.cpp:
29582958
# 102| v102_9(void) = AliasedUse : ~m103_26
29592959
# 102| v102_10(void) = ExitFunction :
29602960

2961+
generic.c:
2962+
# 1| void c11_generic_test(unsigned int, int)
2963+
# 1| Block 0
2964+
# 1| v1_1(void) = EnterFunction :
2965+
# 1| m1_2(unknown) = AliasedDefinition :
2966+
# 1| m1_3(unknown) = InitializeNonLocal :
2967+
# 1| m1_4(unknown) = Chi : total:m1_2, partial:m1_3
2968+
# 1| r1_5(glval<unsigned int>) = VariableAddress[x] :
2969+
# 1| m1_6(unsigned int) = InitializeParameter[x] : &:r1_5
2970+
# 1| r1_7(glval<int>) = VariableAddress[y] :
2971+
# 1| m1_8(int) = InitializeParameter[y] : &:r1_7
2972+
# 2| r2_1(glval<unsigned int>) = VariableAddress[r] :
2973+
# 2| m2_2(unsigned int) = Uninitialized[r] : &:r2_1
2974+
# 3| r3_1(glval<unsigned int>) = VariableAddress[x] :
2975+
# 3| r3_2(unsigned int) = Load[x] : &:r3_1, m1_6
2976+
# 3| r3_3(unsigned int) = Constant[1] :
2977+
# 3| r3_4(unsigned int) = Add : r3_2, r3_3
2978+
# 3| r3_5(glval<unsigned int>) = VariableAddress[r] :
2979+
# 3| m3_6(unsigned int) = Store[r] : &:r3_5, r3_4
2980+
# 4| v4_1(void) = NoOp :
2981+
# 1| v1_9(void) = ReturnVoid :
2982+
# 1| v1_10(void) = AliasedUse : m1_3
2983+
# 1| v1_11(void) = ExitFunction :
2984+
29612985
ir.c:
29622986
# 7| void MyCoordsTest(int)
29632987
# 7| Block 0
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
void c11_generic_test(unsigned int x, int y) {
2+
unsigned int r;
3+
r = _Generic(r, unsigned int: x, int: y) + 1;
4+
}
5+
6+
// // semmle-extractor-options: -std=c11

cpp/ql/test/library-tests/ir/ir/raw_ir.expected

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2732,6 +2732,29 @@ destructors_for_temps.cpp:
27322732
# 102| v102_7(void) = AliasedUse : ~m?
27332733
# 102| v102_8(void) = ExitFunction :
27342734

2735+
generic.c:
2736+
# 1| void c11_generic_test(unsigned int, int)
2737+
# 1| Block 0
2738+
# 1| v1_1(void) = EnterFunction :
2739+
# 1| mu1_2(unknown) = AliasedDefinition :
2740+
# 1| mu1_3(unknown) = InitializeNonLocal :
2741+
# 1| r1_4(glval<unsigned int>) = VariableAddress[x] :
2742+
# 1| mu1_5(unsigned int) = InitializeParameter[x] : &:r1_4
2743+
# 1| r1_6(glval<int>) = VariableAddress[y] :
2744+
# 1| mu1_7(int) = InitializeParameter[y] : &:r1_6
2745+
# 2| r2_1(glval<unsigned int>) = VariableAddress[r] :
2746+
# 2| mu2_2(unsigned int) = Uninitialized[r] : &:r2_1
2747+
# 3| r3_1(glval<unsigned int>) = VariableAddress[x] :
2748+
# 3| r3_2(unsigned int) = Load[x] : &:r3_1, ~m?
2749+
# 3| r3_3(unsigned int) = Constant[1] :
2750+
# 3| r3_4(unsigned int) = Add : r3_2, r3_3
2751+
# 3| r3_5(glval<unsigned int>) = VariableAddress[r] :
2752+
# 3| mu3_6(unsigned int) = Store[r] : &:r3_5, r3_4
2753+
# 4| v4_1(void) = NoOp :
2754+
# 1| v1_8(void) = ReturnVoid :
2755+
# 1| v1_9(void) = AliasedUse : ~m?
2756+
# 1| v1_10(void) = ExitFunction :
2757+
27352758
ir.c:
27362759
# 7| void MyCoordsTest(int)
27372760
# 7| Block 0

go/BUILD.bazel

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
load("@bazel_skylib//rules:native_binary.bzl", "native_binary")
1+
load("@gazelle//:def.bzl", "gazelle")
22
load("@rules_pkg//pkg:mappings.bzl", "pkg_files")
33
load("//misc/bazel:pkg.bzl", "codeql_pack", "codeql_pkg_files")
44

5-
native_binary(
5+
gazelle(
66
name = "gazelle",
7-
src = "@gazelle//cmd/gazelle",
8-
out = "gazelle.exe",
97
args = ["go/extractor"],
108
)
119

go/documentation/library-coverage/coverage.csv

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ github.com/beego/beego/server/web/context,,15,1,,,,,,15,1,
5252
github.com/beego/beego/utils,,,13,,,,,,,13,
5353
github.com/couchbase/gocb,,,18,,,,,,,18,
5454
github.com/couchbaselabs/gocb,,,18,,,,,,,18,
55+
github.com/crankycoder/xmlpath,2,,,,,,,2,,,
5556
github.com/cristalhq/jwt,1,,,1,,,,,,,
5657
github.com/dgrijalva/jwt-go,3,,9,2,1,,,,,9,
5758
github.com/elazarl/goproxy,,2,2,,,,,,2,2,
@@ -68,6 +69,7 @@ github.com/go-pg/pg/orm,,,6,,,,,,,6,
6869
github.com/go-xmlpath/xmlpath,2,,,,,,,2,,,
6970
github.com/gobwas/ws,,2,,,,,,,2,,
7071
github.com/gogf/gf-jwt,1,,,1,,,,,,,
72+
github.com/going/toolkit/xmlpath,2,,,,,,,2,,,
7173
github.com/golang-jwt/jwt,3,,11,2,1,,,,,11,
7274
github.com/golang/protobuf/proto,,,4,,,,,,,4,
7375
github.com/gorilla/mux,,1,,,,,,,1,,
@@ -82,6 +84,9 @@ github.com/lestrrat-go/jwx,1,,,1,,,,,,,
8284
github.com/lestrrat-go/jwx/jwk,1,,,1,,,,,,,
8385
github.com/lestrrat-go/libxml2/parser,3,,,,,,,3,,,
8486
github.com/lestrrat/go-jwx/jwk,1,,,1,,,,,,,
87+
github.com/masterzen/xmlpath,2,,,,,,,2,,,
88+
github.com/moovweb/gokogiri/xml,4,,,,,,,4,,,
89+
github.com/moovweb/gokogiri/xpath,1,,,,,,,1,,,
8590
github.com/ory/fosite/token/jwt,2,,,2,,,,,,,
8691
github.com/revel/revel,,23,10,,,,,,23,10,
8792
github.com/robfig/revel,,23,10,,,,,,23,10,
@@ -99,9 +104,13 @@ google.golang.org/protobuf/internal/impl,,,2,,,,,,,2,
99104
google.golang.org/protobuf/proto,,,8,,,,,,,8,
100105
google.golang.org/protobuf/reflect/protoreflect,,,1,,,,,,,1,
101106
gopkg.in/couchbase/gocb,,,18,,,,,,,18,
107+
gopkg.in/go-jose/go-jose,2,,,2,,,,,,,
108+
gopkg.in/go-jose/go-jose/jwt,1,,4,,1,,,,,4,
109+
gopkg.in/go-xmlpath/xmlpath,2,,,,,,,2,,,
102110
gopkg.in/macaron,,12,1,,,,,,12,1,
103111
gopkg.in/square/go-jose,2,,,2,,,,,,,
104112
gopkg.in/square/go-jose/jwt,1,,4,,1,,,,,4,
113+
gopkg.in/xmlpath,2,,,,,,,2,,,
105114
gopkg.in/yaml,,,9,,,,,,,9,
106115
html,,,2,,,,,,,2,
107116
html/template,,,6,,,,,,,6,
@@ -110,6 +119,7 @@ io/fs,,,12,,,,,,,12,
110119
io/ioutil,,,2,,,,,,,2,
111120
k8s.io/api/core,,,10,,,,,,,10,
112121
k8s.io/apimachinery/pkg/runtime,,,47,,,,,,,47,
122+
launchpad.net/xmlpath,2,,,,,,,2,,,
113123
log,,,3,,,,,,,3,
114124
math/big,,,1,,,,,,,1,
115125
mime,,,5,,,,,,,5,

go/documentation/library-coverage/coverage.rst

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,46 @@ Go framework & library support
1212
`Echo <https://echo.labstack.com/>`_,``github.com/labstack/echo*``,12,2,
1313
`Fosite <https://github.com/ory/fosite>`_,``github.com/ory/fosite*``,,,2
1414
`Gin <https://github.com/gin-gonic/gin>`_,``github.com/gin-gonic/gin*``,46,2,
15-
`Go JOSE <https://github.com/go-jose/go-jose>`_,"``github.com/go-jose/go-jose*``, ``github.com/square/go-jose*``, ``gopkg.in/square/go-jose*``",,12,9
15+
`Go JOSE <https://github.com/go-jose/go-jose>`_,"``github.com/go-jose/go-jose*``, ``github.com/square/go-jose*``, ``gopkg.in/square/go-jose*``, ``gopkg.in/go-jose/go-jose*``",,16,12
1616
`Go kit <https://gokit.io/>`_,``github.com/go-kit/kit*``,,,1
17+
`Gokogiri <https://github.com/moovweb/gokogiri>`_,"``github.com/jbowtie/gokogiri*``, ``github.com/jbowtie/moovweb*``",,,5
1718
`Iris <https://www.iris-go.com/>`_,``github.com/kataras/iris*``,,,2
1819
`Kubernetes <https://kubernetes.io/>`_,"``k8s.io/api*``, ``k8s.io/apimachinery*``",,57,
1920
`Macaron <https://gopkg.in/macaron.v1>`_,``gopkg.in/macaron*``,12,1,
2021
`Revel <http://revel.github.io/>`_,"``github.com/revel/revel*``, ``github.com/robfig/revel*``",46,20,
2122
`SendGrid <https://github.com/sendgrid/sendgrid-go>`_,``github.com/sendgrid/sendgrid-go*``,,1,
2223
`Standard library <https://pkg.go.dev/std>`_,"````, ``archive/*``, ``bufio``, ``bytes``, ``cmp``, ``compress/*``, ``container/*``, ``context``, ``crypto``, ``crypto/*``, ``database/*``, ``debug/*``, ``embed``, ``encoding``, ``encoding/*``, ``errors``, ``expvar``, ``flag``, ``fmt``, ``go/*``, ``hash``, ``hash/*``, ``html``, ``html/*``, ``image``, ``image/*``, ``index/*``, ``io``, ``io/*``, ``log``, ``log/*``, ``maps``, ``math``, ``math/*``, ``mime``, ``mime/*``, ``net``, ``net/*``, ``os``, ``os/*``, ``path``, ``path/*``, ``plugin``, ``reflect``, ``reflect/*``, ``regexp``, ``regexp/*``, ``slices``, ``sort``, ``strconv``, ``strings``, ``sync``, ``sync/*``, ``syscall``, ``syscall/*``, ``testing``, ``testing/*``, ``text/*``, ``time``, ``time/*``, ``unicode``, ``unicode/*``, ``unsafe``",16,584,
24+
`XPath <https://github.com/antchfx/xpath>`_,``github.com/antchfx/xpath*``,,,4
25+
`appleboy/gin-jwt <https://github.com/appleboy/gin-jwt>`_,``github.com/appleboy/gin-jwt*``,,,1
2326
`beego <https://beego.me/>`_,"``github.com/astaxie/beego*``, ``github.com/beego/beego*``",63,63,
2427
`chi <https://go-chi.io/>`_,``github.com/go-chi/chi*``,3,,
2528
`cristalhq/jwt <https://github.com/cristalhq/jwt>`_,``github.com/cristalhq/jwt*``,,,1
2629
`fasthttp <https://github.com/valyala/fasthttp>`_,``github.com/valyala/fasthttp*``,50,5,25
30+
`gf-jwt <https://github.com/gogf/gf-jwt>`_,``github.com/gogf/gf-jwt*``,,,1
2731
`go-pg <https://pg.uptrace.dev/>`_,``github.com/go-pg/pg*``,,6,
2832
`go-restful <https://github.com/emicklei/go-restful>`_,``github.com/emicklei/go-restful*``,7,,
2933
`golang.org/x/net <https://pkg.go.dev/golang.org/x/net>`_,``golang.org/x/net*``,2,21,
3034
`goproxy <https://github.com/elazarl/goproxy>`_,``github.com/elazarl/goproxy*``,2,2,
3135
`gorilla/mux <https://github.com/gorilla/mux>`_,``github.com/gorilla/mux*``,1,,
36+
`gorilla/websocket <https://github.com/gorilla/websocket>`_,``github.com/gorilla/websocket*``,3,,
37+
`goxpath <https://github.com/ChrisTrenkamp/goxpath/wiki>`_,``github.com/ChrisTrenkamp/goxpath*``,,,3
38+
`htmlquery <https://github.com/antchfx/htmlquery>`_,``github.com/antchfx/htmlquery*``,,,4
3239
`json-iterator <https://github.com/json-iterator/go>`_,``github.com/json-iterator/go*``,,4,
3340
`jsonpatch <https://github.com/evanphx/json-patch>`_,``github.com/evanphx/json-patch*``,,12,
41+
`jsonquery <https://github.com/antchfx/jsonquery>`_,``github.com/antchfx/jsonquery*``,,,4
3442
`jwt-go <https://golang-jwt.github.io/jwt/>`_,"``github.com/golang-jwt/jwt*``, ``github.com/form3tech-oss/jwt-go*``, ``github.com/dgrijalva/jwt-go*``",,20,8
3543
`jwtauth <https://github.com/go-chi/jwtauth>`_,``github.com/go-chi/jwtauth*``,,,1
3644
`kataras/jwt <https://github.com/kataras/jwt>`_,``github.com/kataras/jwt*``,,,5
3745
`lestrrat-go/jwx <https://github.com/lestrrat-go/jwx>`_,"``github.com/lestrrat-go/jwx*``, ``github.com/lestrrat/go-jwx*``",,,3
46+
`lestrrat-go/libxml2 <https://github.com/lestrrat-go/libxml2>`_,``github.com/lestrrat-go/libxml2*``,,,3
47+
`nhooyr.io/websocket <https://nhooyr.io/websocket>`_,``nhooyr.io/websocket*``,2,,
3848
`protobuf <https://pkg.go.dev/google.golang.org/protobuf>`_,"``github.com/golang/protobuf*``, ``google.golang.org/protobuf*``",,16,
49+
`ws <https://github.com/gobwas/ws>`_,``github.com/gobwas/ws*``,2,,
50+
`xmlpath <https://gopkg.in/xmlpath.v2>`_,"``gopkg.in/xmlpath*``, ``github.com/go-xmlpath/xmlpath*``, ``github.com/crankycoder/xmlpath*``, ``launchpad.net/xmlpath*``, ``github.com/masterzen/xmlpath*``, ``github.com/going/toolkit/xmlpath*``, ``gopkg.in/go-xmlpath/xmlpath*``",,,14
51+
`xmlquery <https://github.com/antchfx/xmlquery>`_,``github.com/antchfx/xmlquery*``,,,8
52+
`xpathparser <https://github.com/santhosh-tekuri/xpathparser>`_,``github.com/santhosh-tekuri/xpathparser*``,,,2
3953
`yaml <https://gopkg.in/yaml.v3>`_,``gopkg.in/yaml*``,,9,
4054
`zap <https://go.uber.org/zap>`_,``go.uber.org/zap*``,,11,
41-
Others,"``github.com/ChrisTrenkamp/goxpath``, ``github.com/antchfx/htmlquery``, ``github.com/antchfx/jsonquery``, ``github.com/antchfx/xmlquery``, ``github.com/antchfx/xpath``, ``github.com/appleboy/gin-jwt``, ``github.com/go-xmlpath/xmlpath``, ``github.com/gobwas/ws``, ``github.com/gogf/gf-jwt``, ``github.com/gorilla/websocket``, ``github.com/jbowtie/gokogiri/xml``, ``github.com/jbowtie/gokogiri/xpath``, ``github.com/lestrrat-go/libxml2/parser``, ``github.com/santhosh-tekuri/xpathparser``, ``nhooyr.io/websocket``",7,,37
42-
Totals,,267,902,94
55+
Others,"``github.com/moovweb/gokogiri/xml``, ``github.com/moovweb/gokogiri/xpath``",,,5
56+
Totals,,267,906,114
4357

go/extractor/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ go_library(
2121
"//go/extractor/toolchain",
2222
"//go/extractor/trap",
2323
"//go/extractor/util",
24-
"@org_golang_x_mod//modfile:go_default_library",
25-
"@org_golang_x_tools//go/packages:go_default_library",
24+
"@org_golang_x_mod//modfile",
25+
"@org_golang_x_tools//go/packages",
2626
],
2727
)
2828

go/extractor/dbscheme/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)