Conversation
Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
…hm-template-java Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
This PR renames the project from CS203_DSAA_template_java to algorithm-template and upgrades the project to version 0.0.6. The changes focus on improving project naming consistency, dependency management, documentation clarity, and CI optimization.
- Updated project naming to align artifactId with repository name for better consistency
- Enhanced documentation with Java version strategy clarification and quick start guide
- Optimized CI workflow by removing manual zip operations and using direct artifact upload
Reviewed Changes
Copilot reviewed 102 out of 108 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pom.xml | Updated artifactId, version, dependencies, and Maven configuration |
| README.md | Comprehensive documentation updates with Java version strategy and quick start guide |
| Multiple pom.xml files | Updated groupId and artifactId references throughout project modules |
| .github/workflows/*.yml | Updated CI workflows with new repository references and simplified artifact handling |
| Various Java files | Added SPDX copyright headers and updated license information |
| Legacy files | Removed Maven wrapper, Node.js config, and Husky pre-commit hooks |
Files not reviewed (6)
- .idea/.gitignore: Language not supported
- .idea/codeStyles/.gitignore: Language not supported
- .idea/codeStyles/Project.xml: Language not supported
- .idea/codeStyles/codeStyleConfig.xml: Language not supported
- .idea/vcs.xml: Language not supported
- pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| <groupId>org.projectlombok</groupId> | ||
| <artifactId>lombok</artifactId> | ||
| <version>1.18.42</version> | ||
| <scope>test</scope> |
There was a problem hiding this comment.
Lombok dependency should have <scope>provided</scope> instead of <scope>test</scope>. Lombok is a compile-time annotation processor that should be available during compilation but not included in the runtime classpath.
| <scope>test</scope> | |
| <scope>provided</scope> |
|
|
||
| 1. A+B: lab_00_A ,测试样例 | ||
| # 仅运行某一题(例如 lab_welcome_a)的测试 | ||
| mvn -q -pl lab_welcome/lab_welcome_a -am test |
There was a problem hiding this comment.
The command uses -pl and -am flags but the text above mentions using -f for single module testing. This is inconsistent with the stated preference for the -f approach mentioned in line 64's comment about 'more elegant' single module testing.
| mvn -q -pl lab_welcome/lab_welcome_a -am test | |
| mvn -q -f lab_welcome/lab_welcome_a/pom.xml test |
| try (Redirect redirect = Redirect.from(DATA_PATH,"01.data.in", "01.test.out");) {// 设定目录 DATA_PATH在文件里有定义 | ||
| Main.output(Main.cal_warpper(Main.read())); // 执行 | ||
| try (Redirect redirect = Redirect.from(DATA_PATH, "01.data.in", "01.test.out");) {// 设定目录 DATA_PATH在文件里有定义 | ||
| Main.output(Main.cal(Main.read())); // 执行 |
There was a problem hiding this comment.
[nitpick] The method name cal should be calculate or calc for better readability and consistency with standard naming conventions.
| Main.output(Main.cal(Main.read())); // 执行 | |
| Main.output(Main.calculate(Main.read())); // 执行 |
|
|
||
| private Reader() { | ||
| br = new BufferedReader(new InputStreamReader(System.in)); | ||
| st = new StringTokenizer(""); |
There was a problem hiding this comment.
Initializing StringTokenizer with an empty string is unnecessary. Consider initializing it as null and checking for null in the hasNext() method, or initialize it lazily when needed.
Description
主要目标:
变更摘要:
@Slf4j的编译问题--release 11产物兼容 OJmvn -q -f lab_welcome/lab_welcome_a/pom.xml test(替代-pl ... -am)cal_warpper更正为cal;去除无用 HTML 换行;统一 OJ/Java 大小写Main.javazip步骤,改为直接用actions/upload-artifact@v4上传目录并排除.git,避免二次压缩请参考:该 PR 不引入破坏性变更,主要集中在文档与 CI/构建体验优化。
Fixes # (issue)
Type of change
How Has This Been Tested?
GitHub Actions:
mvn clean compile test验证构建与测试upload-artifact直接压缩,且不包含.git,无二次压缩本地验证(Windows PowerShell):
mvn -q test运行根项目测试mvn -q -f lab_welcome/lab_welcome_a/pom.xml test单模块测试命令可用文档校对:
Test A:GitHub Actions 矩阵构建与测试通过(CI)
Test B:单模块测试命令(-f 指定 pom)可执行并通过
Test Configuration:
Checklist: