Skip to content

Reformat code to Google java styleguide - #66

Closed
jromero wants to merge 3 commits into
tronprotocol:developfrom
jromero:feature/code-reformat
Closed

jromero wants to merge 3 commits into
tronprotocol:developfrom
jromero:feature/code-reformat

Conversation

@jromero

@jromero jromero commented Jan 16, 2018 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Why are these changes required?

  • Code consistency

This PR has been tested by:

  • Unit Tests
  • Manual Testing

Follow up
The thought is to follow this PR up with fixes to the current lint violations and changing them from WARNING to ERROR to prevent future deviation.

Extra details

@Rovak

Rovak commented Jan 16, 2018

Copy link
Copy Markdown
Contributor

You should add a travis-ci script that checks if new code complies with the styleguide. I've seen recent commits from other developers that violate the code guidelines.

@jromero

jromero commented Jan 17, 2018

Copy link
Copy Markdown
Contributor Author

@Rovak Good idea.

I went ahead and elevated the warnings to errors and made test depend on lint.

One thing I must note is that there are A LOT of violations. I suppressed some locally via annotations and others globally by commenting out the rule in the google_checks.xml. Without doing that I would think this PR would be extremely large. This allows those disabled rules to be tackled as independent PRs.

@JohnnyQQQQ

JohnnyQQQQ commented Jan 17, 2018 •

Copy link
Copy Markdown
Contributor

I don't think that this is an approach that scales very well. I would opt-in to go with a checkstyle on the changeset of every pull-request.

Ebay did a neat article on how this can be archived https://ebaytech.berlin/checkstyle-on-changed-files-with-gradle-1619e49dbe4e

Commenting out a rule shouldn't be the approach.

@jromero

jromero commented Jan 17, 2018

Copy link
Copy Markdown
Contributor Author

I think the scenarios are very different. They had a large code base to start off. This repo is still relatively small that all issues can be fixed fairly easily. The only reason why I didn't was to limit the changeset.

After all issues are fixed both solutions work about the same.

@Kerk91

Kerk91 commented Jan 17, 2018

Copy link
Copy Markdown

Update consistancy to consistency

@jromero
jromero force-pushed the feature/code-reformat branch from 2072ef9 to b640406 Compare January 17, 2018 20:27
@jromero

jromero commented Jan 17, 2018

Copy link
Copy Markdown
Contributor Author

Update consistancy to consistency

Everyone's a critic... 😛

@sasaxie

sasaxie commented Jan 19, 2018

Copy link
Copy Markdown
Contributor

Dear developers:
Thank you for your enthusiasm and support to TRON. Recently we will make a standard form of submitting codes, so the new pull requests will not handled temporarily.

@ruchernchong ruchernchong left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You got to fix all the merge conflicts before doing the pull request.

@jromero
jromero force-pushed the feature/code-reformat branch from b640406 to 5eff108 Compare January 20, 2018 19:12
@jromero

jromero commented Jan 20, 2018

Copy link
Copy Markdown
Contributor Author

I've updated the PR an minimized the scope. I've also update the PR description to give a better understanding on what the changes are and what is still to come.

I've seen a lot of chatter in the gitter room about people wanting to help. Addressing lint warnings and setting the rule to error out in the future might be a good low hanging fruit for many.

@jromero jromero closed this Apr 2, 2018
zergweak pushed a commit that referenced this pull request Jun 19, 2018
Federico2014 referenced this pull request in Federico2014/java-tron Jun 30, 2026
feat(vm): merge v4.8.2 build2 into release_post_quantum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants