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
64bc267300
refactor: remove backward compatibility fields
submodules sync / sync (push) Successful in 2m4s
build / build (push) Waiting to run
build / trigger-build-image (push) Blocked by required conditions
build / build (pull_request) Failing after 13m25s
build / trigger-build-image (pull_request) Has been skipped
2026-03-22 03:02:21 -07:00
be12f79a4e
chore(deps): bump google.golang.org/grpc from v1.79.1 to v1.79.3
submodules sync / sync (push) Successful in 3m39s
build / build (push) Failing after 10m1s
build / trigger-build-image (push) Has been skipped
2026-03-18 22:18:52 -07:00
bd15d5ce05
fix: groups recording for [all]
submodules sync / sync (push) Successful in 4m20s
build / build (push) Failing after 12m42s
build / trigger-build-image (push) Has been skipped
2026-03-18 10:50:39 -07:00
e20ebfaa81
fix: check conf file ownership ( #98 )
...
submodules sync / sync (push) Successful in 2m48s
build / build (push) Successful in 8m6s
build / trigger-build-image (push) Successful in 22s
Co-authored-by: arthurcai <arthurcai@sjtu.edu.cn>
Reviewed-on: #98
Co-authored-by: Boming Zhang <bomingzh@sjtu.edu.cn>
Co-committed-by: Boming Zhang <bomingzh@sjtu.edu.cn>
2026-03-13 17:13:39 +08:00
0a5b3bdc71
chore(deps): bump google.golang.org/grpc from v1.77.0 to v1.79.1
submodules sync / sync (push) Successful in 1m28s
build / build (push) Successful in 2m52s
build / trigger-build-image (push) Successful in 14s
2026-02-13 01:35:36 -08:00
032a99ff39
chore(deps): bump github.com/go-git/go-git/v5 from v5.16.2 to v5.16.5
2026-02-13 01:33:36 -08:00
a085c7ecba
chore(deps): bump github.com/criyle/go-judge/pb from v1.0.1 to v1.3.2
submodules sync / sync (push) Successful in 47s
build / build (push) Successful in 2m22s
build / trigger-build-image (push) Successful in 12s
2026-01-07 05:24:01 -08:00
ad3c29a4df
chore(deps): bump github.com/criyle/go-judge/pb from v1.0.0 to v1.0.1
submodules sync / sync (push) Successful in 1m33s
build / build (push) Successful in 2m55s
build / trigger-build-image (push) Successful in 15s
2026-01-06 23:30:47 -08:00
91a452e23d
feat(parser/log): log string line by line
submodules sync / sync (push) Successful in 48s
build / build (push) Successful in 3m0s
build / trigger-build-image (push) Successful in 14s
2025-11-27 22:47:52 -08:00
e800bc5c2a
fix(parser/log): handle non json input
submodules sync / sync (push) Successful in 50s
build / build (push) Successful in 2m54s
build / trigger-build-image (push) Successful in 18s
2025-11-27 22:09:49 -08:00
8155de0c92
chore(deps): bump golang.org/x/crypto from 0.43.0 to 0.45.0
submodules sync / sync (push) Successful in 1m16s
build / build (push) Successful in 4m42s
build / trigger-build-image (push) Successful in 13s
2025-11-27 20:12:06 -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
d08d33a300
chore: update deps
submodules sync / sync (push) Successful in 53s
build / build (push) Successful in 2m9s
build / trigger-build-image (push) Successful in 12s
2025-10-22 20:15:13 -07:00
c3e3e9a452
fix: copy in dir does not overwrite copy in
submodules sync / sync (push) Successful in 1m8s
build / build (push) Successful in 2m48s
build / trigger-build-image (push) Successful in 12s
2025-10-21 14:26:28 -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
8739504d45
docs: list links
submodules sync / sync (push) Successful in 1m10s
build / build (push) Successful in 3m25s
build / trigger-build-image (push) Successful in 15s
2025-10-13 02:58:43 -07:00
6aa8b96a6b
feat: remove unused field
submodules sync / sync (push) Successful in 1m41s
build / build (push) Successful in 4m33s
build / trigger-build-image (push) Successful in 12s
2025-10-13 02:39:55 -07:00
341ab39435
fix: typo
submodules sync / sync (push) Successful in 1m13s
build / build (push) Successful in 3m16s
build / trigger-build-image (push) Successful in 11s
2025-10-07 21:27:22 -07:00
1c70191ea8
fix(parser/cppcheck): monkey patch stderr
submodules sync / sync (push) Successful in 44s
build / build (push) Successful in 2m10s
build / trigger-build-image (push) Successful in 13s
2025-10-07 21:18:35 -07:00
2a35a27f7d
feat: debug log stage score
submodules sync / sync (push) Successful in 40s
build / build (push) Successful in 1m29s
build / trigger-build-image (push) Successful in 8s
2025-10-05 17:59:02 -07:00
398ac92a5c
fix: group = all when using tag
submodules sync / sync (push) Successful in 43s
build / build (push) Successful in 1m38s
build / trigger-build-image (push) Successful in 9s
2025-10-05 01:50:54 -07:00
47051675af
feat: no fallback with non-empty tag
submodules sync / sync (push) Successful in 46s
build / build (push) Successful in 1m45s
build / trigger-build-image (push) Successful in 9s
2025-10-04 23:30:35 -07:00
e31006563f
chore: update deps
submodules sync / sync (push) Successful in 1m39s
build / build (push) Successful in 4m1s
build / trigger-build-image (push) Successful in 13s
2025-10-02 00:08:39 -07:00
e24fea65a0
ci: fix typo
submodules sync / sync (push) Successful in 38s
build / build (push) Successful in 1m34s
build / trigger-build-image (push) Successful in 7s
2025-09-27 01:41:10 -07:00
13408fdd73
chore: update submodule references [skip-ci]
submodules sync / sync (push) Successful in 1m2s
build / build (push) Successful in 2m24s
build / trigger-build-image (push) Successful in 8s
2025-09-27 08:27:37 +00:00
b12b542d2a
fix: new conf format
build / trigger-build-image (push) Blocked by required conditions
build / build (push) Has been cancelled
submodules sync / sync (push) Successful in 1m28s
2025-09-27 01:26:23 -07:00
7bd216efda
chore: flatten nested conf fields
submodules sync / sync (push) Successful in 44s
build / build (push) Successful in 1m54s
build / trigger-build-image (push) Successful in 11s
2025-09-27 01:01:17 -07:00
9a109372f2
test: add tests back
submodules sync / sync (push) Successful in 46s
build / build (push) Successful in 2m20s
build / trigger-build-image (push) Successful in 15s
2025-09-24 21:27:42 -07:00
9f1a097cfa
fix: always run stage when group & groups empty
2025-09-24 21:27:05 -07:00
b419c1c643
chore: remove deps for local test
submodules sync / sync (push) Successful in 1m3s
build / build (push) Successful in 2m31s
build / trigger-build-image (push) Successful in 12s
2025-09-24 03:42:46 -07:00
fd47361268
fix: empty groups
submodules sync / sync (push) Successful in 39s
build / build (push) Successful in 2m16s
build / trigger-build-image (push) Successful in 14s
2025-09-24 03:32:34 -07:00
7e12c333b5
feat: support groups in stages
submodules sync / sync (push) Successful in 51s
build / build (push) Failing after 2m23s
build / trigger-build-image (push) Has been skipped
2025-09-24 03:13:17 -07:00
fce18b60cf
chore: remove time validation
submodules sync / sync (push) Successful in 44s
build / build (push) Successful in 3m2s
build / trigger-build-image (push) Successful in 16s
2025-09-14 17:53:25 -07:00
e1e49fb05a
chore(deps): update
submodules sync / sync (push) Successful in 58s
build / build (push) Successful in 3m4s
build / trigger-build-image (push) Successful in 13s
2025-07-20 12:10:45 -07:00
c9401e0987
chore(test): for local tests only
2025-07-20 12:03:17 -07:00
0b15a50f48
chore: migrate to golangci-lint v2
submodules sync / sync (push) Successful in 1m10s
build / build (push) Successful in 3m25s
build / trigger-build-image (push) Successful in 9s
2025-07-20 00:56:08 -07:00
1c559ed2e5
chore(parser/diff): double max diff length as it is for 2 files now
submodules sync / sync (push) Successful in 1m11s
build / build (push) Successful in 2m51s
build / trigger-build-image (push) Successful in 11s
2025-07-19 18:35:25 -07:00
a16cf89244
chore: remove stretchr/testify
submodules sync / sync (push) Successful in 40s
build / build (push) Successful in 1m48s
build / trigger-build-image (push) Successful in 13s
2025-07-17 17:33:11 -07:00
43bfbba327
feat(parser/diff): limit max diff output in the end
submodules sync / sync (push) Successful in 47s
build / build (push) Successful in 2m41s
build / trigger-build-image (push) Successful in 12s
2025-07-16 23:03:17 -07:00
997e7dde20
refactor(parser/diff): split to smaller functions
submodules sync / sync (push) Successful in 49s
build / build (push) Successful in 2m53s
build / trigger-build-image (push) Successful in 12s
2025-07-16 21:05:28 -07:00
c3ba14d321
fix(parser/diff): try n-1
submodules sync / sync (push) Successful in 1m41s
build / build (push) Successful in 4m15s
build / trigger-build-image (push) Successful in 25s
2025-07-15 09:22:24 -07:00
787aa0e0e8
chore(internal/stage): extra newlines to split different parser comments
submodules sync / sync (push) Successful in 1m0s
build / build (push) Successful in 2m40s
build / trigger-build-image (push) Successful in 8s
2025-07-02 13:07:15 -04:00
a22a48ec3d
chore(cmd/joj3): CAPITALIZE actor name spaceholder
submodules sync / sync (push) Successful in 40s
build / build (push) Successful in 1m52s
build / trigger-build-image (push) Successful in 9s
2025-07-02 13:02:26 -04:00
386b1c0fd6
fix(cmd/joj3): set runID to env var
submodules sync / sync (push) Successful in 44s
build / build (push) Successful in 2m23s
build / trigger-build-image (push) Successful in 13s
2025-07-02 12:50:24 -04:00
1dd7f7161b
fix(cmd/joj3): set runID properly
submodules sync / sync (push) Successful in 42s
build / build (push) Successful in 2m19s
build / trigger-build-image (push) Successful in 14s
2025-07-01 22:30:27 -04: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
3bd89e9aa5
refactor(cmd/joj3): use getter/setter in env
submodules sync / sync (push) Successful in 41s
build / build (push) Successful in 2m30s
build / trigger-build-image (push) Successful in 12s
2025-07-01 21:27:30 -04:00
439e64be0c
feat(cmd/joj3): default actor name & actor id placeholder
submodules sync / sync (push) Successful in 1m0s
build / build (push) Successful in 2m31s
build / trigger-build-image (push) Successful in 12s
2025-06-30 17:36:48 -04:00