Skip to content

Commit 0361a22

Browse files
docs(core): annotate CLI entrypoint helpers
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
1 parent 45f4ef3 commit 0361a22

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

internal/cli/root.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ var errDBNotInitialized = trace.New("database not initialized")
2525

2626
const skipDBInitAnnotation = "skipDBInit"
2727

28+
// shouldSkipDBInit checks if the command requires skipping database initialization.
29+
// @intent 특정 커맨드나 플래그 설정에 따라 DB 초기화 단계를 건너뛸지 결정한다.
2830
func shouldSkipDBInit(cmd *cobra.Command) bool {
2931
for c := cmd; c != nil; c = c.Parent() {
3032
if c.Annotations[skipDBInitAnnotation] == "true" {
@@ -220,6 +222,8 @@ func resolveExcludes(flagPatterns []string) []string {
220222
return combined
221223
}
222224

225+
// resolveIncludePaths merges include paths from the config file and the command-line flag.
226+
// @intent 전역 설정과 CLI로 입력받은 포함 경로들을 하나로 병합하여 분석 대상을 결정한다.
223227
func resolveIncludePaths(flagPaths []string) []string {
224228
cfgPaths := viper.GetStringSlice("include_paths")
225229
if len(cfgPaths) == 0 {
@@ -234,13 +238,17 @@ func resolveIncludePaths(flagPaths []string) []string {
234238
return combined
235239
}
236240

241+
// resolveMaxFileBytes returns the maximum file size in bytes to be parsed.
242+
// @intent 분석 대상 단일 파일의 최대 크기 제한을 설정 파일 혹은 플래그로부터 결정한다.
237243
func resolveMaxFileBytes(flagValue int64) int64 {
238244
if flagValue != 0 {
239245
return flagValue
240246
}
241247
return viper.GetInt64("parse.max_file_bytes")
242248
}
243249

250+
// resolveMaxTotalParsedBytes returns the maximum total bytes to be parsed.
251+
// @intent 전체 분석 과정에서 파싱할 소스 코드의 총량(Byte) 제한을 결정한다.
244252
func resolveMaxTotalParsedBytes(flagValue int64) int64 {
245253
if flagValue != 0 {
246254
return flagValue

0 commit comments

Comments
 (0)