mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Created SC1127 (markdown)
24
SC1127.md
Normal file
24
SC1127.md
Normal file
@@ -0,0 +1,24 @@
|
||||
## Was this intended as a comment? Use `#` in sh.
|
||||
|
||||
### Problematic code:
|
||||
|
||||
```C
|
||||
// This is a comment.
|
||||
/* This too. */
|
||||
```
|
||||
|
||||
### Correct code:
|
||||
|
||||
```sh
|
||||
# This is a comment.
|
||||
# This too.
|
||||
```
|
||||
### Rationale:
|
||||
|
||||
ShellCheck found what appears to be a C-style comment, a line starting with `//` or `/*`.
|
||||
|
||||
In Bourne based shell scripts, the comment character is `#`
|
||||
|
||||
### Exceptions:
|
||||
|
||||
None.
|
Reference in New Issue
Block a user