mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-07-28 22:28:25 +00:00
fix: resolve remaining staticcheck linting issues
- Remove newline characters from error messages in step.go - Change capitalized error messages to lowercase in multienv_step_runner.go and github_client.go
This commit is contained in:
@@ -211,12 +211,12 @@ func (s Step) Validate() error {
|
||||
case []interface{}:
|
||||
for _, e := range t {
|
||||
if _, ok := e.(string); !ok {
|
||||
return fmt.Errorf("%q step %q option must contain only strings, found %v\n",
|
||||
return fmt.Errorf("%q step %q option must contain only strings, found %v",
|
||||
stepName, ShellArgsArgKey, e)
|
||||
}
|
||||
}
|
||||
default:
|
||||
return fmt.Errorf("%q step %q option must be a string or a list of strings, found %v\n",
|
||||
return fmt.Errorf("%q step %q option must be a string or a list of strings, found %v",
|
||||
stepName, ShellArgsArgKey, t)
|
||||
}
|
||||
delete(argMap, ShellArgsArgKey)
|
||||
|
||||
@@ -37,7 +37,7 @@ func (r *MultiEnvStepRunner) Run(
|
||||
|
||||
vars, err := parseMultienvLine(res)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("Invalid environment variable definition: %s (%w)", res, err)
|
||||
return "", fmt.Errorf("invalid environment variable definition: %s (%w)", res, err)
|
||||
}
|
||||
|
||||
for i := 0; i < len(vars); i += 2 {
|
||||
|
||||
@@ -966,11 +966,11 @@ func (g *GithubClient) MergePull(logger logging.SimpleLogging, pull models.PullR
|
||||
|
||||
isMethodAllowed, isMethodExist := mergeMethodsAllow[method]
|
||||
if !isMethodExist {
|
||||
return fmt.Errorf("Merge method '%s' is unknown. Specify one of the valid values: '%s'", method, strings.Join(mergeMethodsName, ", "))
|
||||
return fmt.Errorf("merge method '%s' is unknown. Specify one of the valid values: '%s'", method, strings.Join(mergeMethodsName, ", "))
|
||||
}
|
||||
|
||||
if !isMethodAllowed() {
|
||||
return fmt.Errorf("Merge method '%s' is not allowed by the repository Pull Request settings", method)
|
||||
return fmt.Errorf("merge method '%s' is not allowed by the repository Pull Request settings", method)
|
||||
}
|
||||
} else {
|
||||
method = defaultMergeMethod
|
||||
|
||||
Reference in New Issue
Block a user