Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions .github/actions/rust-test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,13 @@ description: "Run Rust tests"
runs:
using: "composite"
steps:
- name: Check Cargo fmt
- name: Lint native module
shell: bash
run: |
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.2.23/prek-installer.sh | sh
git config --global --add safe.directory /__w/datafusion-comet/datafusion-comet
cd native
cargo fmt --all -- --check --color=never

- name: Check Cargo clippy
shell: bash
run: |
cd native
cargo clippy --color=never --all-targets --workspace -- -D warnings

- name: Check compilation
shell: bash
run: |
cd native
cargo check --benches
~/.local/bin/prek run --all-files

- name: Check unused dependencies
shell: bash
Expand Down
47 changes: 47 additions & 0 deletions native/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 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.
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml

- repo: local
hooks:
- id: cargo-fmt
name: check cargo fmt
entry: cargo fmt --all -- --check --color=never
language: system
types: [ rust ]
pass_filenames: false # This makes it a lot faster

- id: cargo-clippy
name: check cargo clippy
entry: cargo clippy --color=never --all-targets --workspace -- -D warnings
language: system
types: [ rust ]
pass_filenames: false

- id: cargo-check
name: check cargo compilation
entry: cargo check --benches
language: system
types: [ rust ]
pass_filenames: false
1 change: 0 additions & 1 deletion native/core/testdata/backtrace.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@
at /Users/somebody/src/arrow-datafusion-comet/core/src/errors.rs:369:43
10: Java_org_apache_comet_NativeBase_init
at /Users/somebody/src/arrow-datafusion-comet/core/src/lib.rs:53:5

2 changes: 1 addition & 1 deletion native/fs-hdfs/c_src/libhdfs/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@

#define HAVE_INTEL_SSE_INTRINSICS

#endif
#endif
2 changes: 1 addition & 1 deletion native/fs-hdfs/c_src/libhdfs/exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
* @param excErrno (out param) The POSIX error number associated with the
* exception.
* @param shouldPrint (out param) Nonzero if we should print this exception,
* based on the noPrintFlags and its name.
* based on the noPrintFlags and its name.
*/
LIBHDFS_EXTERNAL
void getExceptionInfo(const char *excName, int noPrintFlags,
Expand Down
Loading
Loading