From c474a5d493c862d598cf59bc15c7c804c5962649 Mon Sep 17 00:00:00 2001 From: Boming Zhang Date: Tue, 11 Feb 2025 11:15:23 -0500 Subject: [PATCH] docs(cmd): move README content to package comments (#85) --- README.md | 20 -------------------- cmd/joj3/main.go | 2 ++ cmd/repo-health-checker/main.go | 3 +++ cmd/sample/main.go | 2 ++ 4 files changed, 7 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 3bc6f4d..4d38a8e 100644 --- a/README.md +++ b/README.md @@ -96,26 +96,6 @@ These steps are executed in runner-images. We use `sudo -u tt` to elevate the pe 5. Generate results. - Once the running of stages is done, it will generate a result file where the path is specified in the configuration file. -## Components - -### Binaries (under `/cmd` and `/pkg`) - -#### JOJ3 - -JOJ3 itself. Parsers and executors are compiled into the JOJ3 binary. - -#### Sample - -Just a sample on how to write an executable that can be called by the executor. - -#### HealthCheck - -The repohealth check will return a json list to for check result. The structure follows the score-comment pattern. - -HealthCheck currently includes, `reposize`, `forbidden file`, `Metafile existence`, `non-ascii character` in file and message, `release tag`, and `ci files invariance` check. - -The workflow is `joj3` pass cli args to healthcheck binary. See `./cmd/healthcheck/main.go` to view all flags. - ## Models (for developers only) The program parses the configuration file to run multiple stages. diff --git a/cmd/joj3/main.go b/cmd/joj3/main.go index b9a2f11..dce9402 100644 --- a/cmd/joj3/main.go +++ b/cmd/joj3/main.go @@ -1,3 +1,5 @@ +// Package main provides a joj3 executable, which runs various stages based on +// configuration files and commit message. The output is a JSON file. package main import ( diff --git a/cmd/repo-health-checker/main.go b/cmd/repo-health-checker/main.go index 037fe9c..ba62e43 100644 --- a/cmd/repo-health-checker/main.go +++ b/cmd/repo-health-checker/main.go @@ -1,3 +1,6 @@ +// Package main provides a repo-health-checker executable that checks the +// health of a repository. Its output should be parsed by the healthcheck +// parser. package main import ( diff --git a/cmd/sample/main.go b/cmd/sample/main.go index 1a8fe97..5e5e873 100644 --- a/cmd/sample/main.go +++ b/cmd/sample/main.go @@ -1,3 +1,5 @@ +// Package main provides a sample executable that demonstrates how JOJ3 works. +// Its output should be parsed by the sample parser. package main import (