dolphinscheduler icon indicating copy to clipboard operation
dolphinscheduler copied to clipboard

[Improvement] Refactoring Code For Better Comprehension

Open EricGao888 opened this issue 1 year ago • 1 comments

Search before asking

  • [X] I had searched in the issues and found no similar feature requirement.

Description

Currently some parts of code are poorly constructed, leading to difficult comprehension, trouble of testing and maintenance.

With an IntelliJ plugin, metrics reloaded, we could get the complexity of methods in this project.

image

If the cognitive complexity of a method is more than 30, basically we treat it as incomprehensible, untestable and unmaintainable. We would like to have these methods refactored and achieve a significant decrease in complexity, maybe 50% or more.

Any help will be appreciated : )

https://plugins.jetbrains.com/plugin/93-metricsreloaded

https://www.hatica.io/blog/code-complexity/

Are you willing to submit a PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

EricGao888 avatar Feb 20 '24 05:02 EricGao888

Is it only for a specific package, or all of them?

stonelion avatar Feb 22 '24 05:02 stonelion

I can't agree more with your advice ,really need refactoring code.

pinkfloyds avatar Mar 04 '24 08:03 pinkfloyds

Is it only for a specific package, or all of them?

We could do it iteratively, with priority.

EricGao888 avatar Mar 04 '24 08:03 EricGao888

@EricGao888 seems like i do not have write access to this repo. Due to this I am unable to push my feature branch for this issue. Could you help here

akshitk20 avatar Mar 09 '24 16:03 akshitk20

@EricGao888 seems like i do not have write access to this repo. Due to this I am unable to push my feature branch for this issue. Could you help here

Hi @akshitk20 , you don't need direct write access to this repo to contribute. You could submit a PR and maintainers will review it and then help merge it.

FYI: https://github.com/sevntu-checkstyle/sevntu.checkstyle/wiki/Development-workflow-with-Git:-Fork,-Branching,-Commits,-and-Pull-Request

EricGao888 avatar Mar 11 '24 06:03 EricGao888

This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.

github-actions[bot] avatar Apr 11 '24 00:04 github-actions[bot]

This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.

github-actions[bot] avatar Apr 19 '24 00:04 github-actions[bot]