diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 676267ef3b7..68767c2d333 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -50,15 +50,22 @@ repos: name: maven spotless apply description: automatically formats Java and Scala code using mvn spotless:apply. entry: mvn spotless:apply - language: system # Indicates that the 'entry' command should be run directly as a system command. - types: [java, scala] # Specifies that this hook should run on Java and Scala files. - pass_filenames: - false # Crucial: tells pre-commit NOT to pass filenames as arguments to 'mvn spotless:apply'. - # Spotless typically scans the whole project based on its configuration. - always_run: - true # Ensures this hook runs even if no Java files are changed. - # This is useful for spotless:apply which might affect files not staged. - stages: [pre-commit] # Specifies that this hook runs during the 'commit' stage. + language: system # Indicates that the 'entry' command should be run directly as a system command. + types: [java, scala] # Specifies that this hook should run on Java and Scala files. + pass_filenames: false # Crucial: tells pre-commit NOT to pass filenames as arguments to 'mvn spotless:apply'. + # Spotless typically scans the whole project based on its configuration. + always_run: true # Ensures this hook runs even if no Java files are changed. + # This is useful for spotless:apply which might affect files not staged. + stages: [pre-commit] # Specifies that this hook runs during the 'commit' stage. + - id: checkstyle + name: run checkstyle + description: check Java code style with Checkstyle + entry: mvn checkstyle:check + language: system + types: [java] + pass_filenames: false + always_run: true + stages: [pre-commit] - id: check-zip-file-is-not-committed name: check no zip files are committed description: Zip files are not allowed in the repository @@ -69,11 +76,11 @@ repos: files: (?i)\.zip$ - id: check-makefiles-tabs name: check Makefiles files for tabs - entry: ./scripts/pre-commit/check_makefiles_for_tabs.sh # Path to your script + entry: ./scripts/pre-commit/check_makefiles_for_tabs.sh # Path to your script language: system files: '(?i)makefile$' - pass_filenames: true # <-- Crucial change: pass filenames to the script - types: [file] # Ensure only regular files are passed, not directories + pass_filenames: true # <-- Crucial change: pass filenames to the script + types: [file] # Ensure only regular files are passed, not directories stages: [manual] - repo: https://github.com/Lucas-C/pre-commit-hooks rev: v1.5.5 diff --git a/docker/build.sh b/docker/build.sh index 0f5aac67197..324688e2493 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -1,20 +1,21 @@ #!/bin/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. +# 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. # SPARK_VERSION=$1 diff --git a/docker/install-sedona.sh b/docker/install-sedona.sh index fec6184bbc3..ddf14759926 100755 --- a/docker/install-sedona.sh +++ b/docker/install-sedona.sh @@ -1,19 +1,22 @@ #!/bin/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 +# 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. # -# 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. set -e diff --git a/docker/install-spark.sh b/docker/install-spark.sh index ed4a077a2e7..9d4bfd74662 100755 --- a/docker/install-spark.sh +++ b/docker/install-spark.sh @@ -1,19 +1,22 @@ #!/bin/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 +# 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. # -# 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. set -e diff --git a/docker/install-zeppelin.sh b/docker/install-zeppelin.sh index 20dfe4078dd..14aa8e9e8c8 100755 --- a/docker/install-zeppelin.sh +++ b/docker/install-zeppelin.sh @@ -1,19 +1,23 @@ #!/bin/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 +# 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. # -# 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. + set -e # Define Zeppelin version and target directory diff --git a/docker/start.sh b/docker/start.sh index c9beeaafe56..a6c072c6474 100755 --- a/docker/start.sh +++ b/docker/start.sh @@ -1,19 +1,22 @@ #!/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 +# 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. # -# 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. DRIVER_MEM=${DRIVER_MEM:-4g} EXECUTOR_MEM=${EXECUTOR_MEM:-4g} diff --git a/python/build_wheel.sh b/python/build_wheel.sh index e5658255f9c..1b6dcf0e821 100755 --- a/python/build_wheel.sh +++ b/python/build_wheel.sh @@ -1,5 +1,5 @@ #!/bin/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 @@ -16,6 +16,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. +# pipenv run python setup.py sdist bdist_wheel