Skip to content

Commit 1e6f988

Browse files
committed
Add checkdata.SuperProjectType()
This makes the superproject type accessible to the check functions. This allows the check to determine whether the project is a subproject, which may require different handling.
1 parent 259ae3f commit 1e6f988

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

check/checkdata/checkdata.go

+8
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828

2929
// Initialize gathers the check data for the specified project.
3030
func Initialize(project project.Type, schemasPath *paths.Path) {
31+
superprojectType = project.SuperprojectType
3132
projectType = project.ProjectType
3233
projectPath = project.Path
3334
switch project.ProjectType {
@@ -48,6 +49,13 @@ func Initialize(project project.Type, schemasPath *paths.Path) {
4849
}
4950
}
5051

52+
var superprojectType projecttype.Type
53+
54+
// SuperProjectType returns the type of the project being checked.
55+
func SuperProjectType() projecttype.Type {
56+
return superprojectType
57+
}
58+
5159
var projectType projecttype.Type
5260

5361
// ProjectType returns the type of the project being checked.

0 commit comments

Comments
 (0)