File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -81,14 +81,18 @@ for module in "${!module_files[@]}"; do
8181 continue
8282 fi
8383
84- echo " - 运行 Checkstyle 检查..."
84+ echo " - 运行 Checkstyle 检查(增量扫描) ..."
8585 set +e
8686 PROJECT_ROOT=$( pwd)
87- # 捕获输出(包括 stderr)
88- output=$( cd " $module " && mvn checkstyle:check \
89- -Dcheckstyle.config.location=" $PROJECT_ROOT /checkstyle/huawei-checkstyle.xml" \
90- -Dcheckstyle.includes=" src/main/java/com/tinyengine/it/common/utils/testCheckstyle.java,src/main/java/com/tinyengine/it/test/SampleViolations.java" \
91- -Dcheckstyle.violationSeverity=warning 2>&1 )
87+ (cd " $module " && \
88+ echo " Current directory: $( pwd) " && \
89+ echo " Checking file existence:" && \
90+ ls -l src/main/java/com/tinyengine/it/common/utils/testCheckstyle.java 2> /dev/null || echo " ⚠️ testCheckstyle.java not found" && \
91+ ls -l src/main/java/com/tinyengine/it/test/SampleViolations.java 2> /dev/null || echo " ⚠️ SampleViolations.java not found" && \
92+ mvn checkstyle:check \
93+ -Dcheckstyle.config.location=" $PROJECT_ROOT /checkstyle/huawei-checkstyle.xml" \
94+ -Dcheckstyle.violationSeverity=warning \
95+ -Dcheckstyle.includes=" src/main/java/com/tinyengine/it/common/utils/testCheckstyle.java,src/main/java/com/tinyengine/it/test/SampleViolations.java" )
9296 mvn_exit=$?
9397 if [ $mvn_exit -ne 0 ]; then
9498 echo " ⚠️ 模块 $module 的 Checkstyle 检查失败(但继续)"
You can’t perform that action at this time.
0 commit comments