Describe the bug
In pkg/config/file_permission_unix.go and pkg/config/file_permission_windows.go, the error returned by getFilePermission() is split across two concatenated string literals:
return fmt.Errorf("config file has incorrect permission flags:%s."+
"change the file permission either to 0400 or 0600.", fi.Mode().Perm().S
Two small issues with this:
- Missing spaces in the string: there is no space after the colon (flags:%s), and no space between the period and "change" (.change), causing words to run together in terminal output.
- Trailing punctuation: ending the error message with a period triggers a staticcheck warning (ST1005: error strings should not end with punctuation or newlines).
Expected behavior
The error message should have clean spacing and omit trailing punctuation to follow Go conventions:
config file has incorrect permission flags: %s, change the file permission either to 0400 or 0600
Actual behavior
When an invalid file mode is encountered, the output text runs together:
config file has incorrect permission flags:-rw-r--r--.change the file permission either to 0400 or 0600.
And staticcheck reports:
pkg/config/file_permission_unix.go:30:9: error strings should not end with punctuation or newlines (ST1005)
How to Reproduce?
- Inspect pkg/config/file_permission_unix.go:30 or pkg/config/file_permission_windows.go:30.
- Run staticcheck ./... locally.
- Observe the ST1005 warning.
Microcks version or git rev
main (Latest)
Install method (docker-compose, helm chart, operator, docker-desktop extension,...)
CLI
Additional information
Minor cleanup to fix terminal output formatting and ensure clean staticcheck runs.
Describe the bug
In
pkg/config/file_permission_unix.goandpkg/config/file_permission_windows.go, the error returned bygetFilePermission()is split across two concatenated string literals:Two small issues with this:
Expected behavior
The error message should have clean spacing and omit trailing punctuation to follow Go conventions:
Actual behavior
When an invalid file mode is encountered, the output text runs together:
And staticcheck reports:
How to Reproduce?
Microcks version or git rev
main (Latest)
Install method (
docker-compose,helm chart,operator,docker-desktop extension,...)CLI
Additional information
Minor cleanup to fix terminal output formatting and ensure clean staticcheck runs.