- Replace interface{} with any and fix value receiver mutation in log method
- Use fmt.Fprintln instead of forbidden fmt.Println in Exec output
- Fix appendAssign by splitting append and assignment into two lines
- Replace assert.Nil/NotNil with assert.NoError/Error for error checks
- Upgrade error assertions to require when followed by dependent assertions
- Replace os.Setenv with t.Setenv in all test functions
- Restructure TestFindEnvs to use t.Setenv with unique prefixes
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add golines to the list of golangci-lint formatters
- Format multi-line env variable declarations for CLI flags for consistency
- Split string slice initializations onto multiple lines for improved readability in tests
- Use multi-line function calls for better readability in plugin and test code
- Improve readability of script command appends in logic and tests
Signed-off-by: appleboy <appleboy.tw@gmail.com>
- Update `.golangci.yaml` to version 2 and streamline settings
- Remove specific linters from `.golangci.yaml` configuration
- Add exclusion and formatter settings to `.golangci.yaml`
- Change error message formatting in `plugin.go` to lowercase
- Use `strings.ReplaceAll` instead of `strings.Replace` for better readability and performance in `plugin.go` and `plugin_test.go`
Signed-off-by: appleboy <appleboy.tw@gmail.com>
- Add a `.golangci.yaml` configuration file with various linters enabled and specific settings for `gosec` and `perfsprint`.
- Change `isTimeout` from being initialized to `true` to being declared as a `bool` variable without an initial value in `plugin.go`.
Signed-off-by: appleboy <appleboy.tw@gmail.com>