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
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
8a893b14f4
chore: update submodule references
submodules sync / sync (push) Successful in 1m10s
build / build (push) Successful in 2m45s
build / trigger-build-image (push) Successful in 12s
2025-06-28 12:46:59 +00:00
0ea7672640
chore: update submodule references
submodules sync / sync (push) Successful in 1m18s
build / build (push) Successful in 8m55s
build / trigger-build-image (push) Successful in 11s
2025-06-05 10:30:32 +00:00
9e8bbc5cc1
chore: update submodule references
submodules sync / sync (push) Successful in 47s
build / build (push) Successful in 2m24s
build / trigger-build-image (push) Successful in 9s
2025-06-04 10:06:15 +00:00
e1f7e9b22d
chore: update submodule references
submodules sync / sync (push) Successful in 58s
build / build (push) Successful in 2m32s
build / trigger-build-image (push) Successful in 11s
2025-05-30 22:21:15 +00:00
79182161f4
chore: update submodule references
submodules sync / sync (push) Successful in 1m12s
build / build (push) Successful in 2m40s
build / trigger-build-image (push) Successful in 13s
2025-05-29 06:06:08 +00:00
6a4af46222
chore: update submodule references
submodules sync / sync (push) Successful in 36s
build / build (push) Successful in 2m6s
build / trigger-build-image (push) Successful in 11s
2025-05-27 09:06:09 +00:00
d56fc12e3a
chore: update submodule references
submodules sync / sync (push) Successful in 51s
build / build (push) Successful in 2m12s
build / trigger-build-image (push) Successful in 8s
2025-03-28 11:14:48 +00:00
815cf6506e
fix(parser/diff): newline after strings
build / trigger-build-image (push) Blocked by required conditions
build / build (push) Has been cancelled
submodules sync / sync (push) Has been cancelled
2025-03-28 07:13:58 -04:00
985e9c43a2
chore: update submodule references
submodules sync / sync (push) Failing after 3s
build / build (push) Successful in 2m7s
build / trigger-build-image (push) Successful in 13s
2025-03-28 10:51:39 +00:00
372bac8f4b
chore: update submodule references
submodules sync / sync (push) Successful in 56s
build / build (push) Successful in 2m39s
build / trigger-build-image (push) Successful in 13s
2025-03-26 09:14:08 +00:00
b80431c624
chore: update submodule references
submodules sync / sync (push) Successful in 59s
build / build (push) Successful in 2m20s
build / trigger-build-image (push) Successful in 9s
2025-03-02 04:00:19 +00:00
5228a97cc1
chore(stage): rename score map var
build / trigger-build-image (push) Blocked by required conditions
build / build (push) Has been cancelled
submodules sync / sync (push) Has been cancelled
2025-03-01 22:59:17 -05:00
65b53b3424
chore: update submodule references
submodules sync / sync (push) Successful in 53s
build / build (push) Successful in 2m12s
build / trigger-build-image (push) Successful in 17s
2025-03-02 01:50:05 +00:00
cd36469f49
test: remove unstable clangtidy test
build / trigger-build-image (push) Blocked by required conditions
build / build (push) Has been cancelled
submodules sync / sync (push) Has been cancelled
2025-03-01 20:49:18 -05:00
29f715fe82
chore: update submodule references
submodules sync / sync (push) Successful in 55s
build / build (push) Failing after 1m47s
build / trigger-build-image (push) Has been skipped
2025-01-29 20:53:31 +00:00
31c310960f
chore: update submodule references
submodules sync / sync (push) Successful in 39s
build / build (push) Failing after 43s
build / trigger-build-image (push) Has been skipped
2024-11-28 15:06:36 +00:00
7b4d167448
chore: update submodule references
submodules sync / sync (push) Successful in 38s
build / build (push) Successful in 1m21s
build / trigger-build-image (push) Successful in 7s
2024-11-10 06:04:46 +00:00
f2000a2a11
chore: update submodule references
submodules sync / sync (push) Successful in 39s
build / build (push) Successful in 1m23s
build / trigger-build-image (push) Successful in 8s
2024-11-04 01:44:44 +00:00
28777fa68c
chore: update submodule references
submodules sync / sync (push) Successful in 40s
build / build (push) Successful in 1m24s
build / trigger-build-image (push) Successful in 7s
2024-11-03 18:18:11 -05:00
4d4f9d100a
chore: update submodule references
submodules sync / sync (push) Successful in 36s
build / build (push) Successful in 1m19s
build / trigger-build-image (push) Successful in 8s
2024-11-03 10:43:34 +00:00
ccc1510aec
chore: update submodule references
submodules sync / sync (push) Successful in 37s
build / build (push) Successful in 1m13s
build / trigger-build-image (push) Successful in 7s
2024-11-03 02:31:13 -05:00
685f13255a
chore: update submodule references
submodules sync / sync (push) Successful in 35s
build / build (push) Successful in 1m15s
build / trigger-build-image (push) Successful in 7s
2024-11-03 07:13:40 +00:00
c642f04aef
test(cpplint): simpler test
submodules sync / sync (push) Failing after 8s
build / build (push) Failing after 1m0s
build / trigger-build-image (push) Has been skipped
2024-11-03 01:45:02 -05:00
f0349a461b
fix(parser/cppcheck): backward compatibility
submodules sync / sync (push) Successful in 43s
build / build (push) Failing after 1m28s
build / trigger-build-image (push) Has been skipped
2024-11-03 01:20:50 -05:00
d09a172a2d
chore: update submodule references
submodules sync / sync (push) Successful in 50s
build / build (push) Successful in 1m32s
build / trigger-build-image (push) Successful in 7s
2024-11-03 06:01:23 +00:00
3eab0e732b
chore: update submodule references
submodules sync / sync (push) Successful in 35s
build / build (push) Successful in 1m12s
build / trigger-build-image (push) Successful in 8s
2024-11-02 08:35:42 +00:00
291e739eee
chore: update submodule references
build / trigger-build-image (push) Blocked by required conditions
submodules sync / sync (push) Has been cancelled
build / build (push) Has been cancelled
2024-11-02 05:03:13 +00:00
cd15f1175c
fix(cmd/joj3): add runID to debug log
build / trigger-build-image (push) Blocked by required conditions
submodules sync / sync (push) Has been cancelled
build / build (push) Has been cancelled
2024-11-02 01:02:32 -04:00
d151540f1f
chore: update submodule references
submodules sync / sync (push) Successful in 39s
build / build (push) Successful in 1m23s
build / trigger-build-image (push) Successful in 8s
2024-11-02 01:28:17 +00:00
3b89d70343
chore: update submodule references
submodules sync / sync (push) Successful in 37s
build / build (push) Successful in 1m19s
build / trigger-build-image (push) Successful in 7s
2024-11-01 11:44:41 +00: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
e65fd1e675
chore: update submodule references
submodules sync / sync (push) Successful in 35s
build / build (push) Successful in 1m17s
build / trigger-build-image (push) Successful in 7s
2024-11-01 09:37:37 +00:00
419da6c19b
fix(parser/clangtidy): skip empty category
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 05:36:53 -04:00
e2adcda10d
chore: update submodule references
submodules sync / sync (push) Successful in 36s
build / build (push) Successful in 1m16s
build / trigger-build-image (push) Successful in 7s
2024-11-01 09:26:52 +00:00
23c9f3d453
chore: update submodule references
submodules sync / sync (push) Successful in 36s
build / build (push) Successful in 1m18s
build / trigger-build-image (push) Successful in 7s
2024-10-30 23:01:00 +00:00
c512900c55
feat(cmd/joj3): show run ID in issue body
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 19:00:14 -04:00
df9dd48651
chore: update submodule references
submodules sync / sync (push) Successful in 39s
build / build (push) Successful in 1m22s
build / trigger-build-image (push) Successful in 7s
2024-10-30 22:48:54 +00:00
555760bf1f
test(cppcheck): remove unstable test case
submodules sync / sync (push) Successful in 42s
build / build (push) Successful in 1m30s
build / trigger-build-image (push) Successful in 9s
2024-10-23 04:31:34 -04:00
gitea-actions[bot]
8b282e5b5c
chore: update submodule references
submodules sync / sync (push) Successful in 40s
build / build (push) Failing after 1m21s
build / trigger-build-image (push) Has been skipped
2024-10-23 08:10:13 +00:00
4c601d8ef7
test(keyword/script): add
build / trigger-build-image (push) Blocked by required conditions
build / build (push) Has been cancelled
submodules sync / sync (push) Has been cancelled
2024-10-23 04:09:25 -04:00
gitea-actions[bot]
7608bd8456
chore: update submodule references
submodules sync / sync (push) Successful in 40s
build / build (push) Successful in 1m15s
build / trigger-build-image (push) Successful in 8s
2024-10-21 09:52:30 +00:00
gitea-actions[bot]
213bff201f
chore: update submodule references
submodules sync / sync (push) Successful in 28s
build / trigger-build-image (push) Blocked by required conditions
build / build (push) Has been cancelled
2024-10-19 21:19:59 +00:00
gitea-actions[bot]
94cb68b40a
chore: update submodule references
submodules sync / sync (push) Successful in 30s
build / build (push) Successful in 1m0s
build / trigger-build-image (push) Successful in 6s
2024-10-19 02:07:37 +00:00
1a33e08c50
ci: more steps in submodule
submodules sync / sync (push) Failing after 30s
build / build (push) Successful in 1m2s
build / trigger-build-image (push) Failing after 5s
2024-10-18 21:53:28 -04:00
b61291b5cb
chore: update submodules
build / build (push) Successful in 2m9s
build / trigger-build-image (push) Successful in 7s
2024-10-09 05:57:23 -04:00
b799c15248
ci(submodule): sync submodule ( #50 )
...
submodules sync / sync (push) Successful in 49s
build / build (push) Successful in 2m15s
build / trigger-build-image (push) Successful in 14s
Co-authored-by: gitea-actions[bot] <gitea-actions[bot]@users.noreply.gitea.com>
Reviewed-on: #50
Co-authored-by: Boming Zhang <bomingzh@sjtu.edu.cn>
Co-committed-by: Boming Zhang <bomingzh@sjtu.edu.cn>
2024-10-09 05:33:07 +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
cab7861494
chore: update submodules
2024-10-06 07:39:35 -04:00