core(deps): bump golang-cilint to v2.0.2 (#83)

This commit is contained in:
ChristopherHX
2025-04-25 21:58:30 +02:00
committed by GitHub
parent 4be22e9b76
commit fba76f10dd
38 changed files with 184 additions and 174 deletions

View File

@@ -33,13 +33,13 @@ func testMain(args []string) (exitCode int) {
func TestMainHelp(t *testing.T) {
exitCode := testMain([]string{"cmd", "--help"})
if exitCode != 0 {
t.Errorf("Expected exit code 0, got %d", exitCode)
t.Errorf("expected exit code 0, got %d", exitCode)
}
}
func TestMainNoArgsError(t *testing.T) {
exitCode := testMain([]string{"cmd"})
if exitCode != 1 {
t.Errorf("Expected exit code 1, got %d", exitCode)
t.Errorf("expected exit code 1, got %d", exitCode)
}
}

View File

@@ -280,7 +280,7 @@ func readArgsFile(file string, split bool) []string {
defer func() {
err := f.Close()
if err != nil {
log.Errorf("Failed to close args file: %v", err)
log.Errorf("failed to close args file: %v", err)
}
}()
scanner := bufio.NewScanner(f)
@@ -555,7 +555,7 @@ func newRunCommand(ctx context.Context, input *Input) func(*cobra.Command, []str
}
if plan != nil {
if len(plan.Stages) == 0 {
plannerErr = fmt.Errorf("Could not find any stages to run. View the valid jobs with `act --list`. Use `act --help` to find how to filter by Job ID/Workflow/Event Name")
plannerErr = fmt.Errorf("could not find any stages to run. View the valid jobs with `act --list`. Use `act --help` to find how to filter by Job ID/Workflow/Event Name")
}
}
if plan == nil && plannerErr != nil {

View File

@@ -17,7 +17,7 @@ func newSecrets(secretList []string) secrets {
secretPairParts := strings.SplitN(secretPair, "=", 2)
secretPairParts[0] = strings.ToUpper(secretPairParts[0])
if strings.ToUpper(s[secretPairParts[0]]) == secretPairParts[0] {
log.Errorf("Secret %s is already defined (secrets are case insensitive)", secretPairParts[0])
log.Errorf("secret %s is already defined (secrets are case insensitive)", secretPairParts[0])
}
if len(secretPairParts) == 2 {
s[secretPairParts[0]] = secretPairParts[1]