adoroszlai commented on code in PR #9684: URL: https://github.com/apache/ozone/pull/9684#discussion_r2794511667
########## hadoop-ozone/dev-support/checks/lint.sh: ########## @@ -0,0 +1,54 @@ +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#checks:basic + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +cd "$DIR/../../.." || exit 1 + +BASE_DIR="$(pwd -P)" +REPORT_DIR=${OUTPUT_DIR:-"$DIR/../../../target/lint"} +mkdir -p "$REPORT_DIR" +REPORT_FILE="$REPORT_DIR/lint-summary.txt" Review Comment: CI expects report file to be `summary.txt` (or `summary.md` for rich content). ########## hadoop-ozone/dev-support/checks/lint.sh: ########## @@ -0,0 +1,54 @@ +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#checks:basic Review Comment: `basic` checks are run in a matrix strategy. But `lint` is also run in its own separate check. ```suggestion ``` ########## hadoop-ozone/dev-support/checks/checkstyle.sh: ########## @@ -38,6 +39,16 @@ fi cat "${REPORT_DIR}/output.log" +# Run eslint for ozone-ui and capture unix-style violations +if [[ -d "${BASE_DIR}/ozone-ui/src" ]]; then + ( + cd "${BASE_DIR}/ozone-ui/src" || exit 1 + pnpm -s run lint -- --format unix + ) > "$UI_REPORT_FILE" 2>&1 +else + echo "ozone-ui/src not found. Skipping UI lint." > "$UI_REPORT_FILE" +fi + Review Comment: I think `checkstyle.sh` should not have any changes. ########## dev-support/ci/selective_ci_checks.sh: ########## @@ -576,5 +594,6 @@ check_needs_checkstyle check_needs_docs check_needs_findbugs check_needs_pmd +check_needs_ui_lint Review Comment: nit: please move it before the "calculate basic checks" line, since it should not be a basic check. Basic checks (checkstyle, bats, etc.) do not have their own `needs-...` output, rather a list of `basic-checks=[...]`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
