Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce rule on multiline comments #1

Open
jazzsequence opened this issue Mar 10, 2023 · 0 comments
Open

Enforce rule on multiline comments #1

jazzsequence opened this issue Mar 10, 2023 · 0 comments

Comments

@jazzsequence
Copy link
Contributor

I would like there to be a rule that flags multiline // comments as a warning, in favor of /* style comments instead.

Example bad (triggering warning):

// What's with the life preserver? Doc, she's beautiful. She's crazy about me. Look at this, 
// look what she wrote me, Doc. That says it all. Doc, you're my only hope. Oh, uh, hey you, 
// get your damn hands off her. Do you really think I oughta swear? Well, now we gotta sneak 
// this back into my laboratory, we've gotta get you home. Jennifer.

Example better (not great practice but non-violating):

/*
 * What's with the life preserver? Doc, she's beautiful. She's crazy about me. Look at this, look what she wrote me, Doc. That says it all. Doc, you're my only hope. Oh, uh, hey you, get your damn hands off her. Do you really think I oughta swear? Well, now we gotta sneak this back into my laboratory, we've gotta get you home. Jennifer.
 */

Example best:

/*
 * What's with the life preserver? Doc, she's beautiful. She's crazy about me. Look at this, 
 * look what she wrote me, Doc. That says it all. Doc, you're my only hope. Oh, uh, hey you, 
 * get your damn hands off her. Do you really think I oughta swear? Well, now we gotta sneak 
 * this back into my laboratory, we've gotta get you home. Jennifer.
 */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant