Skip to content
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

Irregular indentation in a lot of places in the application files. #3405

Open
yashk2000 opened this issue Feb 12, 2020 · 6 comments
Open

Irregular indentation in a lot of places in the application files. #3405

yashk2000 opened this issue Feb 12, 2020 · 6 comments

Comments

@yashk2000
Copy link
Contributor

Summary:

Irregular indentation in a lot of places in the application files.
In several places, the code-style of the app might not be followed. For example, in some places the following style is used:

if(condition){ }

In some other places the following style is used:

if (condition) { }

We should be using the second type of style since we are following the Google Java Code Style.
In order to fix this, and prevent any future discrepancies, we should consider using the spotless gradle plugin. Once added, on running the spotlessApply command just once, it will automatically fix the existing faults in the code. And we can also add the check(spotlessCheck) to Travis so that if while contributing in future commits the style isn't followed, the Travis check won't pass.
This will enhance the maintainability and code style of the app a lot.

Would you like to work on the issue?

Yes.

yashk2000 added a commit to yashk2000/apps-android-commons that referenced this issue Feb 12, 2020
yashk2000 added a commit to yashk2000/apps-android-commons that referenced this issue Feb 12, 2020
yashk2000 added a commit to yashk2000/apps-android-commons that referenced this issue Feb 12, 2020
@maskaravivek
Copy link
Member

And we can also add the check(spotlessCheck) to Travis so that if while contributing in future commits the style isn't followed, the Travis check won't pass.
This will enhance the maintainability and code style of the app a lot.

@yashk2000 Is there a way to check for only the files that were changed by the PR?

yashk2000 added a commit to yashk2000/apps-android-commons that referenced this issue Feb 13, 2020
yashk2000 added a commit to yashk2000/apps-android-commons that referenced this issue Feb 13, 2020
@yashk2000
Copy link
Contributor Author

And we can also add the check(spotlessCheck) to Travis so that if while contributing in future commits the style isn't followed, the Travis check won't pass.
This will enhance the maintainability and code style of the app a lot.

@yashk2000 Is there a way to check for only the files that were changed by the PR?

@maskaravivek if the build passes for this pr, it means that all the changed files are properly formatted now. The Travis build will be executed with the changed script in which I have added the spotlessCheck

yashk2000 added a commit to yashk2000/apps-android-commons that referenced this issue Feb 13, 2020
@maskaravivek
Copy link
Member

A few points were discussed in the PR ie #3406. Thanks @sivaraam for your research. :)

Please reference the linked PR for details about the discussion and lets continue the discussion here.

@yashk2000 As I mentioned earlier, please wait for the issue to be assigned to you before making a PR for it until and unless is a very straight forward issue. Have updated #3363 to clarify the same.

@yashk2000
Copy link
Contributor Author

@yashk2000 As I mentioned earlier, please wait for the issue to be assigned to you before making a PR for it until and unless is a very straight forward issue. Have updated #3363 to clarify the same.

I'll keep that in mind 👍

@yashk2000
Copy link
Contributor Author

For proceeding with this issue, the past points that were discussed were:

  • Not to make all the changes in a go. We should make the changes in small batches and push them.
  • Add the check to travis after the last set of changes has been made.
  • Files in batches can be indented properly using this command.

@yashk2000
Copy link
Contributor Author

@maskaravivek how should we proceed then now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants