Skip to content

Feature/fetch ip list#24

Open
minjae999 wants to merge 2 commits intomainfrom
feature/fetch_ip_list
Open

Feature/fetch ip list#24
minjae999 wants to merge 2 commits intomainfrom
feature/fetch_ip_list

Conversation

@minjae999
Copy link
Contributor

No description provided.

@minjae999 minjae999 requested a review from pokeum February 11, 2026 06:14
@minjae999 minjae999 self-assigned this Feb 11, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 11, 2026

Walkthrough

NetworkFetcher.swift의 공개 API가 리팩토링되었습니다. InterfaceType의 필드들이 내부에서 공개로 변경되었고, IP 구조체의 속성명이 ip에서 address로 변경되었으며, 이에 맞춰 초기화 함수 서명과 생성 호출이 업데이트되었습니다.

Changes

Cohort / File(s) Summary
API 시그니처 및 접근성 변경
Source/AppleFetcher/Implement/NetworkFetcher.swift
InterfaceTypenamefamily 필드를 public으로 변경하고, IP 구조체의 ip 속성을 address로 이름 변경. IP 초기화 함수 매개변수도 ip에서 address로 업데이트되었으며, 해당 생성 호출 위치가 반영됨.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 IP 주소가 새 이름을 얻었네,
투명해진 인터페이스, 공개의 길을 걷네,
간단한 리팩토링, 명확한 의도,
코드의 정원이 더 밝아졌어! ✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive PR 설명이 작성되지 않아 변경 사항에 대한 자세한 정보가 부족합니다. 변경 내용, 변경 이유, 영향을 받는 API 등에 대한 설명을 추가하시기 바랍니다.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목은 변경 사항의 주요 의도(IP 주소 목록을 가져오는 기능)와 관련이 있지만, 실제 변경 내용은 공개 API 리팩토링(필드명 변경, 접근성 수정)이 주요 사항입니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/fetch_ip_list

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
Source/AppleFetcher/Implement/NetworkFetcher.swift (2)

32-34: 외부에서 InterfaceType을 생성해야 한다면 public init 추가를 권장합니다.
현재 공개 프로퍼티만 열려 있어 외부 모듈에서 생성이 불가합니다. 의도가 외부 생성 허용이라면 명시적 public init을 추가하는 게 명확합니다.

✅ 예시 수정안
 public struct InterfaceType: Hashable {
     public let name: String
     public let family: sa_family_t
+
+    public init(name: String, family: sa_family_t) {
+        self.name = name
+        self.family = family
+    }
 }

37-39: ip → address 공개 API 변경에 대한 호환성 계층을 고려해 주세요.
외부 사용자가 기존 ip 프로퍼티/이니셜라이저를 쓰고 있었다면 소스 호환이 깨집니다. deprecated 래퍼를 추가하면 마이그레이션이 부드러워집니다.

✅ 예시 수정안
 public struct IP {
     public let address: String
     public let interfaceType: InterfaceType
+
+    public init(address: String, interfaceType: InterfaceType) {
+        self.address = address
+        self.interfaceType = interfaceType
+    }
+
+    `@available`(*, deprecated, renamed: "address")
+    public var ip: String { address }
+
+    `@available`(*, deprecated, message: "Use init(address:interfaceType:)")
+    public init(ip: String, interfaceType: InterfaceType) {
+        self.init(address: ip, interfaceType: interfaceType)
+    }
 }

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant