Skip to content

enforce if brackets with checkstyle - #2582

Open
samfreund wants to merge 2 commits into
PhotonVision:mainfrom
samfreund:checkstyle
Open

enforce if brackets with checkstyle#2582
samfreund wants to merge 2 commits into
PhotonVision:mainfrom
samfreund:checkstyle

Conversation

@samfreund

Copy link
Copy Markdown
Member

Description

What changed?

We enforce brackets for if statements now using checkStyle.

Why?

if statements without brackets can easily lead to mistakes and confusion.

Testing

  • I have tested this change locally

AI Disclosure

  • This PR was authored entirely by me
  • This PR includes AI-generated code (e.g., from GitHub Copilot, ChatGPT)
    • If yes, I have reviewed all AI-generated code for correctness
    • If yes, please describe which parts were AI-assisted:

Describe AI involvement here if applicable

Ngl, I didn't change all the brackets by hand


Merge Checklist

Additional Checks (if applicable)

  • User-facing changes? User documentation is updated
  • Breaking changes? Migration guide is included in description and migrations are marked with // MIGRATION: <dataYear> where <dataYear> is the last season the pre-migration data was used in
  • Bug fix? Regression test is added
  • New dependency? License compatibility is verified and steps have been taken to follow it
  • Serde changes? All messages are regenerated with no unexpected hash changes
  • Configuration changes? Changes are backwards compatible with previous season's last release
  • Pipeline/data exchange changes? Frontend types are updated in ./photon-client/src/types

@samfreund
samfreund requested a review from a team as a code owner August 6, 2026 19:28
@github-actions github-actions Bot added photonlib Things related to the PhotonVision library backend Things relating to photon-core and photon-server labels Aug 7, 2026
@spacey-sooty

Copy link
Copy Markdown
Member

I don't like stopping this as one liner early returns are more readable IMO

@thatcomputerguy0101

Copy link
Copy Markdown
Contributor

I agree that conditional return/break/continue statements are better on a single line.

Signed-off-by: samfreund <samf.236@proton.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Things relating to photon-core and photon-server photonlib Things related to the PhotonVision library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants