Juanpe / Juanpe/Counter

Swift Syntax

Open
#2 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
53
Forks
5
PR merge metrics
No merged PRs in 30d

Description

Looks great!

Just had some quick thoughts when looking it over:

  1. Would turn both of these into guard let delegate = delegate else { return }. Perfect use for guards

https://github.com/Juanpe/Counter/blob/38f1da47e54b3cf8bbc1f301d0ce386050ba4aa2/Counter/Classes/Counter.swift#L102

https://github.com/Juanpe/Counter/blob/38f1da47e54b3cf8bbc1f301d0ce386050ba4aa2/Counter/Classes/Counter.swift#L113

  1. After quick look over I thought you could include these 2 statements into one guard. AKA guard !self.handledMilestones.contains(milestone), value >= milestone else { return }. Also, not sure if you need a return or continue...

https://github.com/Juanpe/Counter/blob/38f1da47e54b3cf8bbc1f301d0ce386050ba4aa2/Counter/Classes/Counter.swift#L104-L105

https://github.com/Juanpe/Counter/blob/38f1da47e54b3cf8bbc1f301d0ce386050ba4aa2/Counter/Classes/Counter.swift#L116-L117

Anyways, looks great man!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in Counter/Classes/Counter.swift around lines 102-117 and review the linked statements. Check whether the suggested guard changes preserve the intended return or continue behavior. Done means the syntax suggestions are addressed and the resulting control flow is confirmed.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.