bitshares-ui icon indicating copy to clipboard operation
bitshares-ui copied to clipboard

Reformat all code

Open sschiessl-bcp opened this issue 3 years ago • 5 comments

It happens again and again that we have PRs with lots of reformatting and only some business logic change. Let's discuss in here how to format (I personally don't care as long as its clearly defined and consistent), and then do a reformat everything PR. Ideally, we find or pin whatever formatted the existing code, make sure that everyone has that congifured and keep it that way as it was "good" enough imo.

@xiangxn @AmmarYousefM @abitmore preferences?

sschiessl-bcp avatar Dec 19 '21 21:12 sschiessl-bcp

These formatting issues are not because I used the formatter alone. This is entirely due to the automatic completion of the new dependent tools. I have not updated the versions of these tools, so will these format changes be the previous abnormal format? I don't know who added "pretty-quick", and whether everyone uses it normally. Since the "pretty-quick" tool will only work on the files in the new "commit", no matter whether you use a separate PR to deal with the problem, once someone modifies the file, it will cause the "pretty-quick --staged" pair Format standardization. So I think it is unwise to use a PR to solve the formatting problem. Unless you decide to cancel the "pretty-quick" job.

xiangxn avatar Dec 20 '21 08:12 xiangxn

Of course, we can also complete the formatting of the code as soon as possible to fully comply with the "pretty-quick", so that there will be no formatting problems due to modification to the old file. However, my personal suggestion is not to do this for the time being. You can wait until the node and dependencies are updated. Otherwise, my upgrade work will be completely restarted, which is completely unnecessary.

xiangxn avatar Dec 20 '21 08:12 xiangxn

This project has many historical issues. We may need to make some flexible compromises when we start this work, and then complete the work faster and better.

xiangxn avatar Dec 20 '21 08:12 xiangxn

I want to finish #3413 first.

abitmore avatar Dec 20 '21 16:12 abitmore

It happens again and again that we have PRs with lots of reformatting and only some business logic change. Let's discuss in here how to format (I personally don't care as long as its clearly defined and consistent), and then do a reformat everything PR. Ideally, we find or pin whatever formatted the existing code, make sure that everyone has that congifured and keep it that way as it was "good" enough imo.

@xiangxn @AmmarYousefM @abitmore preferences?

Perhaps reformatting might solve a lot of challenges related to keeping the repo dependencies and nodes version up to date in the future; I agree for creating a pull request once for all; let's use some famous formatter and stick to it.

Anyway thanks for your efforts @sschiessl-bcp and @xiangxn

AmmarYousefM avatar Dec 21 '21 20:12 AmmarYousefM