Replace typedef by using
Categories
(Developer Infrastructure :: Source Code Analysis, task, P4)
Tracking
(Not tracked)
People
(Reporter: Sylvestre, Unassigned, Mentored)
References
(Blocks 1 open bug)
Details
(Keywords: good-first-bug, leave-open)
Attachments
(2 files)
+++ This bug was initially created as a clone of Bug #1617528 +++
typedef are less readable than using
for example
typedef void (*NativeIntersectionObserverCallback)(
const Sequence<OwningNonNull<DOMIntersectionObserverEntry>>& aEntries);
becomes
using NativeIntersectionObserverCallback =
void (*)(const Sequence<OwningNonNull<DOMIntersectionObserverEntry>>&);
Running the autofix on js/
./mach static-analysis check --checks="-*, modernize-use-using" --fix js
Reporter | ||
Comment 1•5 years ago
|
||
Done with:
./mach static-analysis check --checks="-*, modernize-use-using" --fix js/
Updated•5 years ago
|
Comment 3•5 years ago
|
||
bugherder |
Comment 4•4 years ago
|
||
The leave-open keyword is there and there is no activity for 6 months.
:Sylvestre, maybe it's time to close this bug?
Reporter | ||
Comment 5•4 years ago
|
||
Andi, do you think we should finish this ? (as good first bugs)
or just close it?
Comment 6•4 years ago
|
||
Let's finish it as a good first bug, it would be wise from us to get rid of as much legacy code as possible.
Updated•4 years ago
|
Comment 7•4 years ago
|
||
Hi! I'm Garima, an Outreachy participant, and would like to work on this bug :)
Comment 8•4 years ago
|
||
Hello Garima, please assign this bug t yourself and you can submit patches.
Comment 9•3 years ago
|
||
The leave-open keyword is there and there is no activity for 6 months.
:andi, maybe it's time to close this bug?
Comment 10•3 years ago
|
||
Hi. I want to finish this bug. As I can see that @Sylvestre completed the replacement for js part. Am I right that is needed to replace typedef to using for other parts of the source code? By the way how to assign it to myself?
Reporter | ||
Comment 12•3 years ago
|
||
yeah, doing it for a whole code base (and js too as it might have regressed). I tried a few days ago and it might requires some manual fixes too.
It will be assigned at your first patch.
Updated•3 years ago
|
Comment 13•3 years ago
|
||
Updated•3 years ago
|
Comment 14•3 years ago
|
||
Hi Sylvestre! I started to change source code and have a question.
Firstly I ran ./mach static-analysis check --checks="-*, modernize-use-using" --fix js/ and only one file was fixed:
js/xpconnect/loader/AutoMemMap.h
But as I can see from rgrep
output other files in js/ also has similar code. Just for example:
https://searchfox.org/mozilla-central/source/js/public/CharacterEncoding.h#31
typedef mozilla::Range<Latin1Char> Base;
So is it needed to fix them manually?
Reporter | ||
Comment 15•3 years ago
|
||
the goal of this bug is to fix everything on the tree (probably directory by directory)
js/ is what we started with
don't bother about manual changes, leave them as it for now
Updated•3 years ago
|
Comment 16•3 years ago
|
||
This good-first-bug hasn't had any activity for 2 months, it is automatically unassigned.
For more information, please visit auto_nag documentation.
Updated•3 years ago
|
Description
•