Skip to content

Groovy-Developer SKILL - Ternary operator - #16055

Merged
jdaugherty merged 1 commit into
apache:8.0.xfrom
gsartori:groovy-developer-ternary-operator
Jul 29, 2026
Merged

Groovy-Developer SKILL - Ternary operator#16055
jdaugherty merged 1 commit into
apache:8.0.xfrom
gsartori:groovy-developer-ternary-operator

Conversation

@gsartori

Copy link
Copy Markdown
Contributor

Description

Adds guidance to the groovy-developer skill for formatting Groovy ternary expressions.

The new section recommends:

  • Using ternary operators only for simple conditions.
  • Splitting longer expressions across multiple lines.
  • Aligning the ? and : branches for readability.

This is a documentation-only change to the agent skill and does not affect Grails runtime behavior or public APIs. No automated tests are required.

No related issue exists; the change provides missing formatting guidance for generated Groovy code.

Contributor Checklist

Issue and Scope

  • Background is provided above because no approved issue exists.
  • This PR addresses the complete intended scope.
  • This PR contains a single, focused change.
  • This documentation-only change targets the appropriate patch release branch.

Code Quality

  • Automated tests are not applicable because no executable code was changed.
  • I have verified that all existing tests pass by running ./gradlew build --rerun-tasks.
  • I have run ./gradlew codeStyle.
  • This PR does not include mass reformatting or unrelated refactoring.
  • Generative AI tooling, if used, was reviewed for consistency with project standards.

Licensing and Attribution

  • The change is provided under the Apache License 2.0; no new source files were added.
  • I have the necessary rights to submit this contribution.
  • If generative AI tooling was used, its use has been attributed according to ASF policy.

Documentation

  • The relevant groovy-developer skill documentation was updated.
  • A “What’s New” update is not applicable because this is not a Grails feature.
  • Upgrade notes are not required because there are no breaking changes or user actions.
  • The PR description explains what changed and why.

@borinquenkid borinquenkid added this to the grails:8.0.0-RC1 milestone Jul 27, 2026
@jdaugherty

Copy link
Copy Markdown
Contributor

Can you please rebase this PR on top of 8.0.x so there aren't extra commits in it?

@gsartori

Copy link
Copy Markdown
Contributor Author

@jdaugherty I did a rebase on top of 8.0.x, not sure if that resolved the extra commits you are referring

@jdaugherty

Copy link
Copy Markdown
Contributor

@gsartori there's something wrong with your history - it's including many more changes. Are you ok if I rebase your changes so it doesn't include the extra?

@gsartori

Copy link
Copy Markdown
Contributor Author

@jdaugherty yes please, I haven't spent enough time on the github forking thing and I am very bad with it, I am sorry for that, but that's it at the moment :/

@jdaugherty
jdaugherty force-pushed the groovy-developer-ternary-operator branch from e93587f to 46ded9f Compare July 29, 2026 13:23
@jdaugherty
jdaugherty force-pushed the groovy-developer-ternary-operator branch from 46ded9f to e0e7dd3 Compare July 29, 2026 13:26
@jdaugherty

Copy link
Copy Markdown
Contributor

@gsartori can you please confirm this looks right now? The diff shows only a single change to me.

@gsartori

Copy link
Copy Markdown
Contributor Author

@jdaugherty it looks okay to me

@jdaugherty
jdaugherty merged commit 2bf0cf0 into apache:8.0.x Jul 29, 2026
@jdaugherty

Copy link
Copy Markdown
Contributor

@gsartori Thank you! I've merged this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants