Skip to content

Commit

Permalink
github/semgrep-rules: do not allow trailing spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
igungor committed Jul 8, 2024
1 parent fda7fef commit bf1acb3
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .github/semgrep-rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]+$'
2 changes: 1 addition & 1 deletion command/auto_complete.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
`

Expand Down
4 changes: 2 additions & 2 deletions command/du.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
`
Expand Down
4 changes: 2 additions & 2 deletions command/ls.go
Original file line number Diff line number Diff line change
Expand Up @@ -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/*"
`
Expand Down
4 changes: 2 additions & 2 deletions command/rm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/*"
`
Expand Down

0 comments on commit bf1acb3

Please sign in to comment.