question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update literals to named arguments in TopicLessonsFragmentTest.kt

See original GitHub issue

Is 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

  1. Identify other instances of such changes in TopicLessonsFragmentTest, update the code with named arguments.
  2. Identify other files/classes where such changes, update with named arguments for better readability.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
srikanthkbcommented, Jan 21, 2021

yes, let’s create issues package vice.

Renamed this issue specifically for TopicLessonsFragmentTest. I will create new issues for tracking changes at the package level.

0reactions
anandwana001commented, Jan 21, 2021

yes, let’s create issues package vice.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found