Skip to content

Commit 4e8afdd

Browse files
janiszclaude
andcommitted
refactor: rename init() to Register*() in central pcidss32 compliance checks
Renamed all package-level init() functions to explicit Register*() functions in 24 central pcidss32 compliance check files. Created init.go to call all register functions explicitly. Deleted all.go with blank imports. This prevents automatic execution for all components in the busybox binary. Central compliance checks now only run when explicitly initialized via centralChecks.Init() in central/app/app.go. Files changed: - 24 check files: init() → Register*() (e.g., check112: Register112()) - init.go: created to call all 24 Register*() functions - all.go: deleted (blank imports no longer needed) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent f487fd3 commit 4e8afdd

26 files changed

Lines changed: 81 additions & 52 deletions

File tree

‎central/compliance/checks/pcidss32/all.go‎

Lines changed: 0 additions & 28 deletions
This file was deleted.

‎central/compliance/checks/pcidss32/check112/check.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
const checkID = "PCI_DSS_3_2:1_1_2"
99

10-
func init() {
10+
func Register112() {
1111
framework.MustRegisterNewCheck(
1212
framework.CheckMetadata{
1313
ID: checkID,

‎central/compliance/checks/pcidss32/check1121/check.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
const checkID = "PCI_DSS_3_2:11_2_1"
1010

11-
func init() {
11+
func Register1121() {
1212
framework.MustRegisterNewCheck(
1313
framework.CheckMetadata{
1414
ID: checkID,

‎central/compliance/checks/pcidss32/check114/check.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
const checkID = "PCI_DSS_3_2:1_1_4"
1010

11-
func init() {
11+
func Register114() {
1212
framework.MustRegisterNewCheck(
1313
framework.CheckMetadata{
1414
ID: checkID,

‎central/compliance/checks/pcidss32/check12/check.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
const checkID = "PCI_DSS_3_2:1_2"
1010

11-
func init() {
11+
func Register12() {
1212
framework.MustRegisterNewCheck(
1313
framework.CheckMetadata{
1414
ID: checkID,

‎central/compliance/checks/pcidss32/check121/check.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
const checkID = "PCI_DSS_3_2:1_2_1"
1010

11-
func init() {
11+
func Register121() {
1212
framework.MustRegisterNewCheck(
1313
framework.CheckMetadata{
1414
ID: checkID,

‎central/compliance/checks/pcidss32/check132/check.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
const checkID = "PCI_DSS_3_2:1_3_2"
1010

11-
func init() {
11+
func Register132() {
1212
framework.MustRegisterNewCheck(
1313
framework.CheckMetadata{
1414
ID: checkID,

‎central/compliance/checks/pcidss32/check134/check.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
const checkID = "PCI_DSS_3_2:1_3_4"
1010

11-
func init() {
11+
func Register134() {
1212
framework.MustRegisterNewCheck(
1313
framework.CheckMetadata{
1414
ID: checkID,

‎central/compliance/checks/pcidss32/check135/check.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
const checkID = "PCI_DSS_3_2:1_3_5"
1212

13-
func init() {
13+
func Register135() {
1414
framework.MustRegisterNewCheck(
1515
framework.CheckMetadata{
1616
ID: checkID,

‎central/compliance/checks/pcidss32/check21/check.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
const checkID = "PCI_DSS_3_2:2_1"
99

10-
func init() {
10+
func Register21() {
1111
framework.MustRegisterNewCheck(
1212
framework.CheckMetadata{
1313
ID: checkID,

0 commit comments

Comments
 (0)