Add ColumnSelectionDsl.cols(vararg resolvers: ColumnsResolver) overload to help avoid code duplication
- Dominant language
- Kotlin
- Stars
- 1.1k
- Forks
- 83
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 30
Description
I'd like to be able to refactor code with multiple remove:
```
.remove { nameStartsWith("local") }
.remove { colsOf().nameStartsWith("has") }
.remove { colsOf().nameStartsWith("num") }
.remove { modifiers }
.remove { isInitialized and fullyQualifiedName }
.remove { moduleName and path and text }
```
to singular remove + cols with multiple arbitrary grouped selectors
```
remove {
cols(
nameStartsWith("local"),
colsOf().nameStartsWith("has"),
colsOf().nameStartsWith("num"),
modifiers,
isInitialized and fullyQualifiedName,
moduleName and path and text,
)
}
```
What's possible now:
```
.remove {
nameStartsWith("local") and
colsOf().nameStartsWith("has") and
colsOf().nameStartsWith("num") and
modifiers and
isInitialized and fullyQualifiedName and
moduleName and path and text
}
```
Contributor guide
Research direction
Start by locating ColumnSelectionDsl and the existing ColumnsResolver and cols APIs. Add the requested vararg overload so the shown grouped selectors can be passed to one remove call, then verify that the refactoring example is supported by the relevant tests or usage checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- data
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100