Skip to content

Commit

Permalink
Merge pull request #292 from k1LoW/fix-env-error
Browse files Browse the repository at this point in the history
Make clear the error message of if section
  • Loading branch information
k1LoW authored Oct 24, 2023
2 parents 3431179 + 7d4cdbb commit 404638c
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions config/ready.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func (c *Config) CoverageConfigReady() error {
}
ok, err := c.CheckIf(c.Coverage.If)
if err != nil {
return err
return fmt.Errorf("the condition in the `if` section is not met (%s): %w", c.Coverage.If, err)
}
if !ok {
return fmt.Errorf("the condition in the `if` section is not met (%s)", c.Coverage.If)
Expand All @@ -35,7 +35,7 @@ func (c *Config) CodeToTestRatioConfigReady() error {
}
ok, err := c.CheckIf(c.CodeToTestRatio.If)
if err != nil {
return err
return fmt.Errorf("the condition in the `if` section is not met (%s): %w", c.CodeToTestRatio.If, err)
}
if !ok {
return fmt.Errorf("the condition in the `if` section is not met (%s)", c.CodeToTestRatio.If)
Expand All @@ -52,7 +52,7 @@ func (c *Config) TestExecutionTimeConfigReady() error {
}
ok, err := c.CheckIf(c.TestExecutionTime.If)
if err != nil {
return err
return fmt.Errorf("the condition in the `if` section is not met (%s): %w", c.TestExecutionTime.If, err)
}
if !ok {
return fmt.Errorf("the condition in the `if` section is not met (%s)", c.TestExecutionTime.If)
Expand Down Expand Up @@ -101,7 +101,7 @@ func (c *Config) CommentConfigReady() error {
}
ok, err := c.CheckIf(c.Comment.If)
if err != nil {
return err
return fmt.Errorf("the condition in the `if` section is not met (%s): %w", c.Comment.If, err)
}
if !ok {
return fmt.Errorf("the condition in the `if` section is not met (%s)", c.Comment.If)
Expand All @@ -121,7 +121,7 @@ func (c *Config) SummaryConfigReady() error {
}
ok, err := c.CheckIf(c.Summary.If)
if err != nil {
return err
return fmt.Errorf("the condition in the `if` section is not met (%s): %w", c.Summary.If, err)
}
if !ok {
return fmt.Errorf("the condition in the `if` section is not met (%s)", c.Summary.If)
Expand Down Expand Up @@ -153,7 +153,7 @@ func (c *Config) BodyConfigReady() error {
}
ok, err := c.CheckIf(c.Body.If)
if err != nil {
return err
return fmt.Errorf("the condition in the `if` section is not met (%s): %w", c.Body.If, err)
}
if !ok {
return fmt.Errorf("the condition in the `if` section is not met (%s)", c.Body.If)
Expand Down Expand Up @@ -203,7 +203,7 @@ func (c *Config) CentralConfigReady() error {
}
ok, err := c.CheckIf(c.Central.If)
if err != nil {
return err
return fmt.Errorf("the condition in the `if` section is not met (%s): %w", c.Central.If, err)
}
if !ok {
return fmt.Errorf("the condition in the `if` section is not met (%s)", c.Central.If)
Expand All @@ -223,7 +223,7 @@ func (c *Config) CentralPushConfigReady() error {
}
ok, err := c.CheckIf(c.Central.Push.If)
if err != nil {
return err
return fmt.Errorf("the condition in the `if` section is not met (%s): %w", c.Central.Push.If, err)
}
if !ok {
return fmt.Errorf("the condition in the `if` section is not met (%s)", c.Central.Push.If)
Expand All @@ -240,7 +240,7 @@ func (c *Config) CentralReReportReady() error {
}
ok, err := c.CheckIf(c.Central.ReReport.If)
if err != nil {
return err
return fmt.Errorf("the condition in the `if` section is not met (%s): %w", c.Central.ReReport.If, err)
}
if !ok {
return fmt.Errorf("the condition in the `if` section is not met (%s)", c.Central.ReReport.If)
Expand All @@ -257,7 +257,7 @@ func (c *Config) DiffConfigReady() error {
}
ok, err := c.CheckIf(c.Diff.If)
if err != nil {
return err
return fmt.Errorf("the condition in the `if` section is not met (%s): %w", c.Diff.If, err)
}
if !ok {
return fmt.Errorf("the condition in the `if` section is not met (%s)", c.Diff.If)
Expand All @@ -271,7 +271,7 @@ func (c *Config) ReportConfigReady() error {
}
ok, err := c.CheckIf(c.Report.If)
if err != nil {
return err
return fmt.Errorf("the condition in the `if` section is not met (%s): %w", c.Report.If, err)
}
if !ok {
return fmt.Errorf("the condition in the `if` section is not met (%s)", c.Report.If)
Expand Down

0 comments on commit 404638c

Please sign in to comment.