Update literals to named arguments in TopicLessonsFragmentTest.kt
See original GitHub issueIs your feature request related to a problem? Please describe. Update the literals passed as argument to named arguments. This improves code readability and provides better context to the readers. One such instance is shown as an example below.
Describe the solution you’d like Update the argument in line 246 below: https://github.com/oppia/oppia-android/blob/bb7351b4c0700b3dadd1a51edd99e8e51c696eb4/app/src/sharedTest/java/org/oppia/android/app/topic/lessons/TopicLessonsFragmentTest.kt#L244-L248
to the following code:
atPositionOnView(
R.id.story_summary_recycler_view,
position = 1,
R.id.chapter_recycler_view
)
Additional context
- Identify other instances of such changes in
TopicLessonsFragmentTest
, update the code with named arguments. - Identify other files/classes where such changes, update with named arguments for better readability.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Add an analyzer to recommend using named parameters ...
We employ a guideline to always use named parameters when the meaning of an argument is not obvious from the argument itself.
Read more >Named and Optional Arguments in JavaScript | by Jim Rottinger
If you are not yet familiar with destructuring, it is the ability to map an object literal or array literal to multiple assignment...
Read more >Named and Optional Arguments - C# Programming Guide
Named arguments in C# specify arguments by name, not position. Optional arguments can be omitted.
Read more >Code Inspection: Use preferred argument style for literal values
If you prefer to use named arguments for specific types of parameters, ReSharper can help you enforce this practice.
Read more >High-order functions and lambdas - Kotlin
In the code above, the combine parameter has the function type (R, ... literal, which is equivalent to the following named function:.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Renamed this issue specifically for
TopicLessonsFragmentTest
. I will create new issues for tracking changes at the package level.yes, let’s create issues package vice.