Skip to content

Commit a7cc168

Browse files
committed
Add a getter for checkconfigurations.configurations
I use getters for everything else, so this provides consistency.
1 parent 4012a7f commit a7cc168

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

check/check.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func RunChecks(project project.Type) {
7272

7373
checkdata.Initialize(project)
7474

75-
for _, checkConfiguration := range checkconfigurations.Configurations {
75+
for _, checkConfiguration := range checkconfigurations.Configurations() {
7676
if !shouldRun(checkConfiguration, project) {
7777
// TODO: this should only be printed to log and in verbose mode
7878
fmt.Printf("Skipping check: %s\n", checkConfiguration.ID)

check/checkconfigurations/checkconfigurations.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ type Type struct {
3434
CheckFunction checkfunctions.Type // The function that implements the check.
3535
}
3636

37-
// Checks is an array of structs that define the configuration of each check.
38-
var Configurations = []Type{
37+
// configurations is an array of structs that define the configuration of each check.
38+
var configurations = []Type{
3939
{
4040
ProjectType: projecttype.Library,
4141
Category: "library.properties",
@@ -112,3 +112,8 @@ var Configurations = []Type{
112112
CheckFunction: checkfunctions.PdeSketchExtension,
113113
},
114114
}
115+
116+
// Configurations returns the slice of check configurations.
117+
func Configurations() []Type {
118+
return configurations
119+
}

0 commit comments

Comments
 (0)