apache / apache/grails-core

In tests: standardizing on parentheses for method calls

Open
#15,701 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Groovy
Stars
2.9k
Forks
975
Avg merge
1d 22h
Merged PRs (30d)
92

Description

### Issue description

Standardizing on parentheses for method calls. It is the majority

on `origin/8.0.x`

Combined `eq` + `like`:

| Scope | paren | no-paren | split |
|-------|------:|------:|:-----:|
| All `.groovy` | **109** (92 + 17) | 97 (77 + 20) | ~53 / 47 |
| `*Spec.groovy` only | **94** (79 + 15) | 78 (69 + 9) | ~55 / 45 |

Per-method breakdown:

| Method / scope | paren | no-paren |
|---|------:|------:|
| `eq` - all groovy | **92** | 77 |
| `eq` - specs only | **79** | 69 |
| `like` - all groovy | 17 | **20** |
| `like` - specs only | **15** | 9 |

## Verdict
- Historically on `8.0.x`, the **parenthesized form is the plurality** - roughly 55/45 in specs, 53/47 overall.

Contributor guide

Open the contributing guide

Research direction

Review the .groovy files, especially *Spec.groovy tests, on origin/8.0.x and inspect the existing eq and like call styles. Confirm the intended parenthesized convention from the issue's counts, then identify the affected test calls. Done means the relevant method calls consistently use parentheses and the test suite still passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy
Domain
testing
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.