04ae1c8674
feat: add whitelist char support to nonascii check ( #100 )
...
submodules sync / sync (push) Successful in 4m27s
build / build (push) Successful in 6m32s
build / trigger-build-image (push) Successful in 23s
This commit brings support of whitelisted characters during repo healthcheck/non-ascii file check. Supported by an extra switch to `repo-health-checker`, `-whitelistedChars`. The argument takes a comma-separated list of non-ASCII characters and ignores them during repo healthcheck. Illegal cmdline input is logged by the logger.
Co-Authored-By: GitHub Copilot <noreply@microsoft.com>
<details>
<summary>Copilot Prompt</summary>
<br>
This is a repo for an online judge orchestrator system «JOJ3». Under `cmd/` lies a source directory for a Go command, `repo-health-checker`. You tell from its name that it checks the repo for stuff like repo size, commit message, non-ASCII character usage, etc. before sending the work to the actual judging and grading system.
Now, I want the non-ASCII character checking function of the repo health checker to be flexible - it shall accept a list of non-ASCII characters and deem them acceptable.
## Your task
- Accept this new cmdline arg. In `cmd/repo-health-checker/main.go`, accept a new command line flag `-whitelisted-chars`, which shall take exactly one string of comma-separated non-ASCII characters. This string shall be passed to the actual healthcheck package.
- Respect this list while scanning the files. In `pkg/healthcheck/nonascii.go`, function `getNonASCII()`, we utilize a bufio *Scanner* to scan through all files for non-ASCII characters. We would like the list of acceptable chars to be passed from the cmdline to here, and modify the scanner logic to actually accept the corresponding characters.
- Error handling and reporting. This command line arg, `-whitelisted-chars`, could be completely abscent; in which case, no characters shall be escaped by default. The comma-separated list passed to the command may contain ASCII characters or multiple characters that are not properly separated; in which case, ignore that element, and report the incident via the SLog logging framework used in this project.
- Test your work. Create new testcases under `examples/healthcheck/` to reflect this change. Reflect to `examples/healthcheck/asciifile/` to learn about how to configure the repo health checker. Integrate your work to the Go test framework such that it could be invoked by running `make test` at the terminal.
- Note: Use `git init` to init your testcase directory and make a initial commit - this project, JOJ3, only runs in Git repos.
## Notes
- Directory structure. `cmd/` for invokable commands, `pkg/` for the actual logic, `internal` - something you don't need to worry about.
- JOJ3 vs. Health Check. `joj3` is a separate executable; in this session we are only working on the `repo-health-checker`.
- Extras. Make sure to read `README.md` and the directory structure before you go; also, create To-do before you execute your plan.
</details>
Reviewed-on: #100
Reviewed-by: 张泊明518370910136 <bomingzh@sjtu.edu.cn>
Co-authored-by: Mack Wang <mac-wang@sjtu.edu.cn>
Co-committed-by: Mack Wang <mac-wang@sjtu.edu.cn>
2026-04-26 08:23:33 +08:00
9d75e359af
feat: skip git module for non ascii check ( #95 )
...
submodules sync / sync (push) Successful in 4m29s
build / build (push) Failing after 14m42s
build / trigger-build-image (push) Has been skipped
Skip git submodule non ascii check
check with by directly running `./build/repo-health-checker` at root after build
Co-authored-by: zzjc1234 <107383618+zzjc1234@users.noreply.github.com>
Reviewed-on: #95
Reviewed-by: 张泊明518370910136 <bomingzh@sjtu.edu.cn>
Co-authored-by: 周赵嘉程521432910016 <zzjc123@sjtu.edu.cn>
Co-committed-by: 周赵嘉程521432910016 <zzjc123@sjtu.edu.cn>
2026-04-22 17:07:16 +08:00
d316a179f2
feat: abs path git
submodules sync / sync (push) Successful in 1m57s
build / build (push) Successful in 2m39s
build / trigger-build-image (push) Has been skipped
2025-10-25 08:33:12 -07:00
9321218181
feat: match empty groups to empty groups
submodules sync / sync (push) Successful in 1m7s
build / build (push) Successful in 2m54s
build / trigger-build-image (push) Successful in 14s
2025-10-21 14:21:58 -07:00
e7b0a0f1fd
feat(healthcheck): check actor csv for email
submodules sync / sync (push) Successful in 41s
build / build (push) Successful in 2m36s
build / trigger-build-image (push) Successful in 11s
2025-07-01 22:13:28 -04:00
8506887680
chore(healthcheck): extra newline
submodules sync / sync (push) Successful in 50s
build / build (push) Successful in 1m55s
build / trigger-build-image (push) Successful in 9s
2025-06-29 03:53:43 -04:00
8ca0125f23
feat(healthcheck): git lfs with safe.directory
submodules sync / sync (push) Successful in 40s
build / build (push) Successful in 2m52s
build / trigger-build-image (push) Successful in 12s
2025-06-28 09:50:17 -04:00
d19271c7ef
chore(healthcheck): tmp disable repoLFS
submodules sync / sync (push) Successful in 1m5s
build / build (push) Successful in 3m8s
build / trigger-build-image (push) Successful in 10s
2025-06-28 09:30:35 -04:00
6643644865
feat(healthcheck): git lfs fsck --pointers
build / trigger-build-image (push) Blocked by required conditions
build / build (push) Has been cancelled
submodules sync / sync (push) Has been cancelled
2025-06-28 08:29:03 -04:00
dff6e35572
feat(healthcheck): use simpler ignore.Match
submodules sync / sync (push) Successful in 1m13s
build / build (push) Successful in 3m27s
build / trigger-build-image (push) Successful in 10s
2025-06-10 21:20:21 -04:00
47ef28516b
feat(healthcheck): better check commit author email message
submodules sync / sync (push) Successful in 1m5s
build / build (push) Successful in 2m12s
build / trigger-build-image (push) Successful in 21s
2025-06-04 06:29:58 -04:00
9cf640dee5
feat(healthcheck): check commit author email
build / trigger-build-image (push) Blocked by required conditions
submodules sync / sync (push) Has been cancelled
build / build (push) Has been cancelled
2025-06-04 06:05:11 -04:00
015ff49021
feat(healthcheck): succeed msg ( #88 )
...
build / trigger-build-image (push) Blocked by required conditions
build / build (push) Has been cancelled
submodules sync / sync (push) Has been cancelled
Reviewed-on: #88
Co-authored-by: BoYanZh <boyanzh233@gmail.com>
Co-committed-by: BoYanZh <boyanzh233@gmail.com>
2025-05-31 06:20:34 +08:00
4c15ac48d9
feat(healthcheck): support score
build / build (push) Successful in 2m16s
build / trigger-build-image (push) Successful in 13s
submodules sync / sync (push) Has been cancelled
2025-05-29 00:06:06 -04:00
f99ad5eae4
style: more linters
2025-03-28 05:53:30 -04:00
63a4636341
chore(healthcheck): remove tmp fix of stdout & stderr file
submodules sync / sync (push) Successful in 1m2s
build / build (push) Successful in 2m39s
build / trigger-build-image (push) Successful in 12s
2025-03-22 05:41:30 -04:00
53c794c88c
style: resolve codefactor issue
submodules sync / sync (push) Successful in 47s
build / build (push) Successful in 1m48s
build / trigger-build-image (push) Successful in 8s
2025-03-05 20:26:09 -05:00
7af18aebe8
fix(healthcheck): remove meta check extra prefix
submodules sync / sync (push) Successful in 1m2s
build / build (push) Failing after 2m8s
build / trigger-build-image (push) Has been skipped
2025-02-26 02:20:03 -05:00
787e0526dc
chore(pkg): remove unused util
2025-02-21 12:28:34 -05:00
1150cc4697
docs: better packages docs
2025-02-18 06:21:17 -05:00
e06f7e6b95
chore: remove extra s in pkg name
2025-02-17 12:40:30 -05:00
c2aaa56b39
fix(healthcheck): use our fork of go-gitignore ( #78 )
build / build (push) Successful in 1m26s
build / trigger-build-image (push) Successful in 7s
2025-02-12 05:47:22 -05:00
fb78026736
fix(healthcheck): typo
submodules sync / sync (push) Successful in 36s
build / build (push) Failing after 0s
build / trigger-build-image (push) Has been skipped
2025-02-09 10:11:17 -05:00
837f9d9981
feat(healthcheck): set safe dir in count-objects
submodules sync / sync (push) Successful in 43s
build / build (push) Successful in 1m26s
build / trigger-build-image (push) Successful in 9s
2025-02-09 10:03:24 -05:00
1bbc589897
feat(healthcheck): remove joj3-check
submodules sync / sync (push) Successful in 32s
build / build (push) Successful in 1m11s
build / trigger-build-image (push) Successful in 6s
2025-02-01 04:59:25 -05:00
1bc539a80f
feat(healthcheck): use joj3-check
submodules sync / sync (push) Successful in 32s
build / build (push) Successful in 1m5s
build / trigger-build-image (push) Successful in 6s
2025-02-01 04:18:13 -05:00
45b4bdd369
feat(healthcheck): error log for teapot
submodules sync / sync (push) Successful in 30s
build / build (push) Successful in 59s
build / trigger-build-image (push) Successful in 6s
2025-01-31 20:06:08 -05:00
55c53ea124
feat(healthcheck): debug log args for teapot
submodules sync / sync (push) Successful in 35s
build / build (push) Successful in 1m7s
build / trigger-build-image (push) Successful in 6s
2025-01-31 20:01:25 -05:00
df8ed72765
feat(healthcheck): debug log output of joj3-check-env
submodules sync / sync (push) Successful in 33s
build / build (push) Successful in 1m7s
build / trigger-build-image (push) Successful in 6s
2025-01-31 19:48:53 -05:00
3d828b6168
feat(healthcheck): run joj3-check-env
submodules sync / sync (push) Successful in 51s
build / build (push) Successful in 1m48s
build / trigger-build-image (push) Successful in 8s
2025-01-31 19:23:05 -05:00
536dae6350
chore(healthcheck): remove gitignore log
2024-12-05 16:40:48 -05:00
85e53f4f90
chore(healthcheck): better repo size log
submodules sync / sync (push) Successful in 38s
build / build (push) Successful in 1m18s
build / trigger-build-image (push) Successful in 8s
2024-12-05 12:45:28 -05:00
0f5ccf8af2
feat(healthcheck): add teapot-checker to repo-health-checker
submodules sync / sync (push) Successful in 44s
build / build (push) Successful in 1m28s
build / trigger-build-image (push) Successful in 8s
2024-12-05 12:05:22 -05:00
38f11788a0
feat(healthcheck): log error on .gitignore error
submodules sync / sync (push) Successful in 50s
build / build (push) Failing after 39s
build / trigger-build-image (push) Has been skipped
2024-11-27 03:59:10 -05:00
4b848bf1f1
feat(parser/cpplint): better summary
build / trigger-build-image (push) Blocked by required conditions
build / build (push) Has been cancelled
submodules sync / sync (push) Has been cancelled
2024-11-01 21:21:15 -04:00
fc86f93dc9
fix(healthcheck/meta): always end line with period
submodules sync / sync (push) Successful in 39s
build / build (push) Successful in 1m20s
build / trigger-build-image (push) Successful in 7s
2024-11-01 07:55:46 -04:00
03bfb41ecf
feat(healthcheck): cleaner return tips
build / trigger-build-image (push) Blocked by required conditions
submodules sync / sync (push) Has been cancelled
build / build (push) Has been cancelled
2024-11-01 07:43:33 -04:00
0b1a20d8b5
feat(healthcheck): simpler repo verify message ( #62 )
build / trigger-build-image (push) Blocked by required conditions
build / build (push) Has been cancelled
submodules sync / sync (push) Has been cancelled
2024-10-30 18:48:11 -04:00
35f0f5c829
fix(healthcheck/asciifile): file with attribute set as text
2024-10-22 06:58:23 -04:00
cfc455e0fb
fix(healthcheck): determine non-ascii file from git attributes ( #69 )
...
build / build (push) Successful in 1m27s
build / trigger-build-image (push) Has been skipped
submodules sync / sync (push) Successful in 31s
Co-authored-by: zzjc1234 <2359047351@qq.com>
Reviewed-on: #69
Reviewed-by: 张泊明518370910136 <bomingzh@sjtu.edu.cn>
Co-authored-by: 周赵嘉程521432910016 <zzjc123@sjtu.edu.cn>
Co-committed-by: 周赵嘉程521432910016 <zzjc123@sjtu.edu.cn>
2024-10-21 17:04:52 +08:00
9a57b701fd
fix(healthcheck): tmp fix for ignoring stdout & stderr file again
build / build (push) Successful in 1m5s
build / trigger-build-image (push) Successful in 7s
2024-10-18 03:19:41 -04:00
db2f2e859b
fix(healthcheck): tmp fix for ignoring stdout & stderr file
build / build (push) Successful in 1m6s
build / trigger-build-image (push) Successful in 7s
2024-10-18 03:06:12 -04:00
b75a756998
feat(healthcheck): forbidden check guided by .gitignore file ( #58 ) ( #60 )
...
build / build (push) Failing after 19s
build / trigger-build-image (push) Has been skipped
Co-authored-by: Hydraallen <wangruiallen@gmail.com>
Co-authored-by: zzjc1234 <2359047351@qq.com>
Reviewed-on: #60
Reviewed-by: 张泊明518370910136 <bomingzh@sjtu.edu.cn>
Co-authored-by: 周赵嘉程521432910016 <zzjc123@sjtu.edu.cn>
Co-committed-by: 周赵嘉程521432910016 <zzjc123@sjtu.edu.cn>
2024-10-18 14:41:09 +08:00
1ab6fa4583
fix(healthcheck): remove unused args ( #59 )
...
build / build (push) Successful in 1m14s
build / trigger-build-image (push) Successful in 9s
Reviewed-on: #59
Co-authored-by: Boming Zhang <bomingzh@sjtu.edu.cn>
Co-committed-by: Boming Zhang <bomingzh@sjtu.edu.cn>
2024-10-14 22:44:30 +08:00
bb3743d4cc
feat(healthcheck): remove redundant tag checker
build / build (push) Successful in 1m3s
build / trigger-build-image (push) Successful in 7s
2024-10-13 04:37:52 -04:00
901290d263
feat: check repo size with conf ( #56 )
...
build / build (push) Successful in 1m11s
build / trigger-build-image (push) Successful in 7s
Co-authored-by: zzjc1234 <2359047351@qq.com>
Co-authored-by: Boming Zhang <bomingzh@sjtu.edu.cn>
Reviewed-on: #56
Reviewed-by: 张泊明518370910136 <bomingzh@sjtu.edu.cn>
Co-authored-by: 周赵嘉程521432910016 <zzjc123@sjtu.edu.cn>
Co-committed-by: 周赵嘉程521432910016 <zzjc123@sjtu.edu.cn>
2024-10-12 18:30:54 +08:00
3f9ec1a71d
feat: get release tag from msg scope ( #49 )
...
build / build (push) Successful in 1m46s
build / trigger-build-image (push) Successful in 6s
Check release tag from msg scope.
Co-authored-by: zzjc1234 <2359047351@qq.com>
Reviewed-on: #49
Reviewed-by: 张泊明518370910136 <bomingzh@sjtu.edu.cn>
Co-authored-by: 周赵嘉程521432910016 <zzjc123@sjtu.edu.cn>
Co-committed-by: 周赵嘉程521432910016 <zzjc123@sjtu.edu.cn>
2024-10-08 11:16:14 +08:00
70012012c4
fix: milestone number ( #48 )
...
build / build (push) Successful in 1m39s
build / trigger-build-image (push) Successful in 5s
Co-authored-by: zzjc1234 <2359047351@qq.com>
Reviewed-on: #48
Co-authored-by: 周赵嘉程521432910016 <zzjc123@sjtu.edu.cn>
Co-committed-by: 周赵嘉程521432910016 <zzjc123@sjtu.edu.cn>
2024-10-08 09:10:55 +08:00
4a56cd81aa
docs: update for NonAsciiMsg
build / build (push) Successful in 1m17s
build / trigger-build-image (push) Successful in 5s
2024-10-04 02:11:21 -04:00
dee296143f
feat: non-ascii not in the first line of commit msg
build / build (push) Successful in 1m20s
build / trigger-build-image (push) Successful in 5s
2024-10-04 02:06:32 -04:00