-
-
Notifications
You must be signed in to change notification settings - Fork 1
style: format code with Google Java Format and Ktlint #64
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
base: master
Are you sure you want to change the base?
Conversation
This commit fixes the style issues introduced in e008933 according to the output from Google Java Format and Ktlint. Details: None
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.
Sorry, we are unable to review this pull request
The GitHub API does not allow us to fetch diffs exceeding 20000 lines
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
|
Here's the code health analysis summary for commits Analysis Summary
|
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.
Important
Looks good to me! 👍
Reviewed everything up to 4fbafbc in 3 minutes and 47 seconds. Click for details.
- Reviewed
38812lines of code in140files - Skipped
0files when reviewing. - Skipped posting
22draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. AppUtils.java:87
- Draft comment:
The formatting changes are consistent with Google Java Format. No logic changes were introduced – the refactoring improves readability without affecting functionality. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
2. ThemedActivity.java:143
- Draft comment:
Formatting improvements make the lifecycle methods cleaner. The TODO note about deprecated TaskDescription APIs is a good reminder; consider planning a migration in future releases. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
3. NetworkModule.java:70
- Draft comment:
The inline anonymous SocketFactory is now formatted more clearly. Consider refactoring it into a helper class if additional customization is needed in the future. - Reason this comment was not posted:
Confidence changes required:20%<= threshold50%None
4. FavoriteManager.kt:56
- Draft comment:
The Kotlin formatting adheres to style guidelines. The LiveData update (setLiveValue) usage is clear, though clearing the live data immediately might be re-checked to ensure observers process the change as expected. - Reason this comment was not posted:
Confidence changes required:20%<= threshold50%None
5. FavoriteRecyclerViewAdapter.java:320
- Draft comment:
Good use of WeakReference for VoteCallback to avoid memory leaks. The swipe and undo logic is clearly formatted; no logic changes were introduced. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
6. ItemRecyclerViewAdapter.java:143
- Draft comment:
The reformatting makes binding methods and property retrieval much more readable. Consider caching values like getItemViewType results if used frequently in performance-critical lists. - Reason this comment was not posted:
Confidence changes required:20%<= threshold50%None
7. SinglePageItemRecyclerViewAdapter.java:425
- Draft comment:
The SavedState implementation with recursive removal is now clearer. Ensure that deep nesting in comments is tested, as the recursion may be heavy – however, the formatting readably expresses the intended logic. - Reason this comment was not posted:
Confidence changes required:20%<= threshold50%None
8. HelpListView.java:40
- Draft comment:
The formatting improvements in HelpListView improve readability of the Spannable styling code. Good usage of custom span for asterisk. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
9. MaterialisticDatabase.java:130
- Draft comment:
The reformatting to use Room annotations and migrations follows best practices. The synchronized getInstance method is correctly implemented. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
10. Cache.kt:46
- Draft comment:
The RxJava usage for updating live data is now more clearly formatted. The use of 'observeOn(mainScheduler)' ensures UI updates occur on the correct thread. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
11. WidgetService.java:60
- Draft comment:
Formatting of the RemoteViewsFactory and widget configuration is now more consistent. No functional changes detected. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
12. WidgetHelper.java:140
- Draft comment:
Formatting changes in WidgetHelper (e.g. proper indentations and clear string formatting) improve maintainability without altering behavior. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
13. WebFragment.java:90
- Draft comment:
WebFragment shows improved readability with the addition of static imports and clear handling of JavaScript interfaces. The code remains complex due to functionality, but formatting is much improved. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
14. app/src/main/java/io/github/sheepdestroyer/materialisheep/BaseFragment.java:53
- Draft comment:
Typo in comment: Instead of "restored in to the view", consider using "restored into the view" for clarity. - Reason this comment was not posted:
Comment was on unchanged code.
15. app/src/main/java/io/github/sheepdestroyer/materialisheep/Preferences.java:718
- Draft comment:
Typo: The parameter name 'isTransulcent' appears to be misspelled. It should probably be renamed to 'isTranslucent' for clarity. - Reason this comment was not posted:
Comment was on unchanged code.
16. app/src/main/java/io/github/sheepdestroyer/materialisheep/UserActivity.java:60
- Draft comment:
Typo found: The field name 'mItemManger' appears to be misspelled. It likely should be 'mItemManager'. - Reason this comment was not posted:
Comment was on unchanged code.
17. app/src/main/java/io/github/sheepdestroyer/materialisheep/data/AlgoliaClient.java:36
- Draft comment:
Typo: In the class-level Javadoc, the phrase "forHN Search" is missing a space. Consider changing it to "for HN Search" for clarity. - Reason this comment was not posted:
Comment was on unchanged code.
18. app/src/main/java/io/github/sheepdestroyer/materialisheep/data/HackerNewsItem.java:263
- Draft comment:
Minor grammatical note in the TODO comment: consider changing "poll need to display options" to "poll needs to display options" for better clarity. - Reason this comment was not posted:
Comment was on unchanged code.
19. app/src/main/java/io/github/sheepdestroyer/materialisheep/data/SyncDelegate.java:311
- Draft comment:
Typo in comment: "// TODO may never done". Consider changing to "// TODO may never be done". - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50% The comment is about a typo in a TODO comment. Looking at the rules: 1) The comment is not about a change made by the diff - the TODO comment existed before and wasn't modified (just reformatted). 2) The rule states "Do NOT comment unless there is clearly a code change required" - fixing a typo in a comment is not a code change. 3) The rule also says "Do NOT comment on anything that would be obviously caught by the build" - while this wouldn't be caught by the build, it's a minor typo in a comment. 4) Most importantly, the rule states "is_about_changes: Whether the comment is about a change made by the diff. If the comment is about unchanged code, this should be False, and the comment should be deleted." The TODO comment was not changed in this diff, it was just reformatted along with everything else. While fixing typos can improve code quality, this particular typo was already present in the codebase and wasn't introduced or modified by this PR. The diff appears to be purely a formatting/style change (reformatting indentation and import organization), not a functional change. The comment is about pre-existing code that wasn't changed in this diff. According to the rules, comments should only be about changes made by the diff. Since this TODO comment existed before and wasn't modified (only reformatted), this comment should be deleted. This comment should be deleted because it's about unchanged code. The typo in the TODO comment existed before this PR and wasn't introduced or modified by the changes in this diff, which appears to be purely a formatting/style change.
20. app/src/main/java/io/github/sheepdestroyer/materialisheep/data/SyncDelegate.java:312
- Draft comment:
Typo in comment: "// TODO finish once only". Consider rephrasing to "// TODO: finish only once". - Reason this comment was not posted:
Comment was on unchanged code.
21. app/src/main/java/io/github/sheepdestroyer/materialisheep/widget/AsteriskSpan.java:45
- Draft comment:
Typo in comment: Consider changing "padding let" to "padding left". - Reason this comment was not posted:
Comment was on unchanged code.
22. app/src/main/java/io/github/sheepdestroyer/materialisheep/widget/ListRecyclerViewAdapter.java:148
- Draft comment:
Typo: The method name and parameter 'setHotThresHold' appears to be a misspelling. Consider renaming it to 'setHotThreshold' (and the parameter to 'hotThreshold') for consistency with the rest of the code. - Reason this comment was not posted:
Comment was on unchanged code.
Workflow ID: wflow_W7xCuUoocc6rSYpv
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
This commit fixes the style issues introduced in e008933 according to the output
from Google Java Format and Ktlint.
Details: None
Important
Reformatted codebase using Google Java Format and Ktlint for consistent style and readability.
AppUtils.java,ApplicationComponent.java, andBaseListActivity.javausing Google Java Format.ItemActivity.java,NetworkModule.java, andUserActivity.java.WebFragment.java,WidgetService.java, andFavoriteManager.kt.HackerNewsItem.javaandMaterialisticDatabase.java.ItemRecyclerViewAdapter.javaandSinglePageItemRecyclerViewAdapter.java.This description was created by
for 4fbafbc. You can customize this summary. It will automatically update as commits are pushed.