WordBreaker.cpp: do not use 'else' after 'return'
Categories
(Developer Infrastructure :: Source Code Analysis, task)
Tracking
(firefox80 fixed)
Tracking | Status | |
---|---|---|
firefox80 | --- | fixed |
People
(Reporter: Sylvestre, Assigned: shindea422, Mentored)
References
(Blocks 1 open bug)
Details
(Keywords: good-first-bug, Whiteboard: [lang=C++])
Attachments
(1 file, 1 obsolete file)
Filling as a good first bug to learn workflows.
if (ASCII_IS_SPACE(c)) {
return kWbClassSpace;
} else if (ASCII_IS_ALPHA(c) || ASCII_IS_DIGIT(c) ||
(c == '_' && !sStopAtUnderscore)) {
do not use 'else' after 'return'
https://searchfox.org/mozilla-central/source/intl/lwbrk/WordBreaker.cpp#56
And the following occurences
As the change is trivial, it is just to learn how to contribute to Firefox.
Found by http://clang.llvm.org/extra/clang-tidy/checks/readability-else-after-return.html
Tutorial to contribute:
https://firefox-source-docs.mozilla.org/tools/docs/contribute/how_to_contribute_firefox.html
Please don't ask for the bug to be assigned. It will be automatically assigned to the first patch.
Comment 3•4 years ago
|
||
Updated•4 years ago
|
Comment 4•4 years ago
|
||
I have created patch for this bug, please check it at https://phabricator.services.mozilla.com/D67739
Reporter | ||
Comment 5•4 years ago
|
||
(In reply to tash from comment #2)
Here is the patch I created. Can you have a look please? Thanks!
Sorry but we don't use github for contribution.
amogh started working on it but there are other similar good first bug. You can send me an email if you don't find one.
(In reply to Sylvestre Ledru [:Sylvestre] from comment #5)
(In reply to tash from comment #2)
Here is the patch I created. Can you have a look please? Thanks!
Sorry but we don't use github for contribution.
amogh started working on it but there are other similar good first bug. You can send me an email if you don't find one.
OK, will be sure to commit to phabricator for my next contribution!
Updated•4 years ago
|
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Comment 8•4 years ago
|
||
Sure :)
Reporter | ||
Comment 10•4 years ago
|
||
sure, please just submit a patch, it will be assigned!
Comment 11•4 years ago
|
||
alright!
Assignee | ||
Comment 12•4 years ago
|
||
This my first contribution.
As said in llvm coding standard else should not be used after interrupts statements.
It is good to solve more bug.
Updated•4 years ago
|
Updated•4 years ago
|
Comment 13•4 years ago
|
||
Pushed by sledru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e0a680bfd926 Remove the } else { after a return to simplify code. r=m_kato
Comment 14•4 years ago
|
||
bugherder |
Updated•2 years ago
|
Description
•