diff --git a/.github/semgrep-rules.yaml b/.github/semgrep-rules.yaml index cab96379b..9a44512bc 100644 --- a/.github/semgrep-rules.yaml +++ b/.github/semgrep-rules.yaml @@ -6,3 +6,9 @@ rules: patterns: - pattern-regex: //\s*(fmt\.Print|println) + - id: err-trailing-whitespaces + message: "Trailing whitespace" + languages: [go] + severity: ERROR + patterns: + - pattern-regex: '[ \t]+$' diff --git a/command/auto_complete.go b/command/auto_complete.go index fe01f9495..877f2458e 100644 --- a/command/auto_complete.go +++ b/command/auto_complete.go @@ -72,7 +72,7 @@ _s5cmd_cli_bash_autocomplete() { fi } -# call the _s5cmd_cli_bash_autocomplete to complete s5cmd command. +# call the _s5cmd_cli_bash_autocomplete to complete s5cmd command. complete -o nospace -F _s5cmd_cli_bash_autocomplete s5cmd ` diff --git a/command/du.go b/command/du.go index 8812c9582..a52fa07db 100644 --- a/command/du.go +++ b/command/du.go @@ -41,10 +41,10 @@ Examples: 5. Show disk usage of all versions of all objects that starts with a prefix in the bucket > s5cmd {{.HelpName}} --all-versions "s3://bucket/prefix*" - + 6. Show disk usage of all versions of all objects in the bucket > s5cmd {{.HelpName}} --all-versions "s3://bucket/*" - + 7. Show disk usage of a specific version of an object in the bucket > s5cmd {{.HelpName}} --version-id VERSION_ID s3://bucket/object ` diff --git a/command/ls.go b/command/ls.go index 87ff1e06b..e27e54c5c 100644 --- a/command/ls.go +++ b/command/ls.go @@ -51,11 +51,11 @@ Examples: 9. List all versions of all objects that starts with a prefix in the bucket > s5cmd {{.HelpName}} --all-versions "s3://bucket/prefix*" - + 10. List all versions of all objects in the bucket > s5cmd {{.HelpName}} --all-versions "s3://bucket/*" - 11. List all files with their fullpaths + 11. List all files with their fullpaths > s5cmd {{.HelpName}} --show-fullpath "s3://bucket/*" ` diff --git a/command/rm.go b/command/rm.go index 3ba092b23..1d910f4b7 100644 --- a/command/rm.go +++ b/command/rm.go @@ -42,7 +42,7 @@ Examples: 6. Delete all matching objects but only the ones with .txt extension or starts with "main" > s5cmd {{.HelpName}} --include "*.txt" --include "main*" "s3://bucketname/prefix/*" - + 7. Delete the specific version of a remote object's content to stdout > s5cmd {{.HelpName}} --version-id VERSION_ID s3://bucket/prefix/object @@ -51,7 +51,7 @@ Examples: 9. Delete all versions of all objects that starts with a prefix in the bucket > s5cmd {{.HelpName}} --all-versions "s3://bucket/prefix*" - + 10. Delete all versions of all objects in the bucket > s5cmd {{.HelpName}} --all-versions "s3://bucket/*" `