-
Notifications
You must be signed in to change notification settings - Fork 51
Use consistent coding style across all packages #354
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
Comments
That's a great suggestion. I think you've organized the things that we have to do for clean code, it's very clear. |
@JSUYA Could you take a look at the |
@Swanseo0 Hello, congratulation to join us. 🎉 I think this issue is good to learn about the work process of flutter-tizen. if you don't mind, please take a look at this issue and try to contribute. there are many other packages, but I recommend you to refactoring P.S don't forget to read this guide. |
This patch includes: * Simplify WearableRotaryPlugin Implementation. * Use derived class from flutter::StreamHandler to set stream handlers. * Use derived class from flutter::StreamHandlerError to hold references safely. This change contribute flutter-tizen#354 Signed-off-by: Boram Bae <[email protected]>
This patch includes: * Simplify WearableRotaryPlugin Implementation. * Use derived class from flutter::StreamHandler to set stream handlers. * Use derived class from flutter::StreamHandlerError to hold references safely. This change contribute flutter-tizen#354 Signed-off-by: Boram Bae <[email protected]>
[wearable_rotary] Refactor the c++ code This patch includes: * Simplify WearableRotaryPlugin Implementation. * Use derived class from flutter::StreamHandler to set stream handlers. * Use derived class from flutter::StreamHandlerError to hold references safely. This change contribute #354 Signed-off-by: Boram Bae <[email protected]>
Remaining packages to be worked on:
|
This issue is for tracking the code refactoring status of this repo. The main goal is to improve
of all C++ code.
Here are some general rules for styling the code:
RegisterWithRegistrar
method) is too large (over 150 lines), consider breaking it into multiple classes.flutter/*.h
).GetLastError
pattern (example) or defining your own result type such asTizenResult
.flutter::StreamHandler
if the plugin makes use of event channels. (example)log.h
):LOG_DEBUG
) in the final code.PlatformException
object) is redundant. Instead, provide some additional context about the error so that the developer can easily debug the underlying issue.GetValueFromEncodableMap
to extract arguments from anEncodableMap
.==
over.compare()
when comparing strings.result->Error()
) should be either:result->Error()
whenever possible.ret
to store the return code of a Tizen API call.self
orplugin
to store a pointer to the current class.if (value)
overif (value != nullptr)
.int32_t
,int64_t
) over plain old integer types (int
,long long
). This is not a strict requirement, and there are places where a plainint
fits best. Also, you should avoid use of unsigned integer types.I will start with 1st-party plugins and plus package implementations (there are already some PRs open). If you want to contribute to this project, you may start with 3rd-party plugins and Tizen-only plugins, or plugins authored by you if you have any.
Any comments are welcome. Please let me know if anything in the above is unclear.
The text was updated successfully, but these errors were encountered: