-
Notifications
You must be signed in to change notification settings - Fork 551
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
Fixes #1882: NumericInput tests are shifted to a new folder and their package is updated to match the directory structure. #1919
Conversation
@BenHenning @rt4914 PTAL. |
Hey @rt4914 @BenHenning, Why are the Kotlin tests failing due to import statements, even though the last PR passed these tests? |
@soamOne the lints are failing. Could you fix those ? Also you can check locally by running ktlint --android |
@aggarwalpulkit596 can you please help with this? |
Hi @soamOne Ktlint is failing because you have a few unused imports in these files. I had mentioned the files and the line number, you can check and remove these lines which are unused. Also, remember while removing that the imports should be in lexicographical order else ktlint fail again. To automate this lexicographical order you can reformat the code from the menu option.
You can simply remove them using optimize imports. Also, for the future works, I suggest you set macro as per description here https://github.com/oppia/oppia-android/wiki/Ktlint-Guide#macros This will reformat your code and also optimize the imports, so there will be few chances of ktlint fails. |
You can also run the ktlint tool on the command line with '-F' to automatically fix linter errors, though it's good practice to make sure that you know how to manually fix them as well. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @soamOne! The changes generally look good, but please fix the ktlint errors and I'll take one more pass on this PR.
R.styleable.ProfileInputView_isPasswordInput, | ||
/** defVal= */ false | ||
) | ||
R.styleable.ProfileInputView_isPasswordInput, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@soamOne You have changed indentation here, fixing that would solve the ktlint error
@@ -68,8 +68,8 @@ class StartSnapHelper : LinearSnapHelper() { | |||
return if (helper.getDecoratedEnd(child) >= | |||
helper.getDecoratedMeasurement(child) / 2 && | |||
helper.getDecoratedEnd( | |||
child | |||
) > 0 | |||
child |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same applies here
Thanks a lot @rt4914 @aggarwalpulkit596 @anandwana001 @prayutsu !! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@soamOne thanks
LGTM, one last thing.
@@ -61,7 +61,8 @@ class ProfileInputView @JvmOverloads constructor( | |||
if ( | |||
attributes.getBoolean( | |||
R.styleable.ProfileInputView_isPasswordInput, | |||
/** defVal= */ false | |||
/** defVal= */ | |||
false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last thing from my side, could you make these in one line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, will do!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't appear done yet--please fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@soamOne Looks good to me, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Thanks @soamOne
This reverts commit 37a57fd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @soamOne! The PR LGTM, but please fix the extra change in ProfileInputView.kt.
@@ -61,7 +61,8 @@ class ProfileInputView @JvmOverloads constructor( | |||
if ( | |||
attributes.getBoolean( | |||
R.styleable.ProfileInputView_isPasswordInput, | |||
/** defVal= */ false | |||
/** defVal= */ | |||
false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't appear done yet--please fix.
@BenHenning i tried fixing that but for some reason the checks were failing, so i reverted it. |
@soamOne what specific check was failing? It's important to make sure we don't undo work that we previously mentioned was completed, and to be specific about why changes can't be done otherwise reviewers don't have sufficient context to review the code. :) |
@BenHenning I get your point :) |
Thanks @soamOne! Feel free to ask for help if needed (e.g. if an error that you encounter doesn't make sense). |
Also, when you encounter an exception you should provide:
Without this information, it’s hard for others to help since they don’t have as much context as you on the inner workings of your PR. |
@BenHenning can you PTAL now, thanks :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, thanks @soamOne!
Going ahead and merging this since everything is looking good. |
Explanation
Fixes #1882: In this PR we shift the numericinput test files to a new folder called numericinput. The package in the files is
updated to match the directory structure of the files. The Bazel files are also updated
with the correct directory structure.
Checklist