Skip to content

Commit 7d346b7

Browse files
committed
GH-10: Add basic pre-commit-config with Apache RAT
Fixes #10.
1 parent 4ed7c73 commit 7d346b7

File tree

106 files changed

+338
-183
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+338
-183
lines changed

.github/ISSUE_TEMPLATE/usage_question.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,30 +23,30 @@ body:
2323
- type: markdown
2424
attributes:
2525
value: >
26-
While we enable issues as a mechanism for new contributors and passers-by who
27-
are unfamiliar with Apache Software Foundation projects to ask questions and
28-
interact with the project, we encourage users to ask such questions on public
26+
While we enable issues as a mechanism for new contributors and passers-by who
27+
are unfamiliar with Apache Software Foundation projects to ask questions and
28+
interact with the project, we encourage users to ask such questions on public
2929
mailing lists:
30-
31-
* Development discussions: [email protected] (first subscribe by sending an
30+
31+
* Development discussions: [email protected] (first subscribe by sending an
3232
e-mail to [email protected]).
33-
34-
* User discussions: [email protected] (first subscribe by sending an e-mail
33+
34+
* User discussions: [email protected] (first subscribe by sending an e-mail
3535
36-
36+
3737
* Mailing list archives: https://arrow.apache.org/community/
38-
39-
40-
Do not be surprised by responses to issues raised here directing you to those
38+
39+
40+
Do not be surprised by responses to issues raised here directing you to those
4141
mailing lists, or to report a bug or feature request here.
4242
4343
4444
Thank you!
4545
- type: textarea
4646
id: description
4747
attributes:
48-
label: >
49-
Describe the usage question you have. Please include as many useful details as
48+
label: >
49+
Describe the usage question you have. Please include as many useful details as
5050
possible.
5151
validations:
5252
required: true

.github/workflows/dev.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: Dev
19+
20+
on:
21+
pull_request: {}
22+
push: {}
23+
24+
concurrency:
25+
group: ${{ github.repository }}-${{ github.ref }}-${{ github.workflow }}
26+
cancel-in-progress: true
27+
28+
permissions:
29+
contents: read
30+
31+
jobs:
32+
pre-commit:
33+
name: "pre-commit"
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v4
37+
with:
38+
fetch-depth: 0
39+
persist-credentials: false
40+
41+
- uses: actions/setup-python@v5
42+
with:
43+
python-version: '3.x'
44+
- name: pre-commit (cache)
45+
uses: actions/cache@v4
46+
with:
47+
path: ~/.cache/pre-commit
48+
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
49+
- name: pre-commit (--all-files)
50+
run: |
51+
python -m pip install pre-commit
52+
pre-commit run --show-diff-on-failure --color=always --all-files

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,18 @@
1111
.idea/
1212
.project
1313
.settings/
14-
/build/
1514
/*-build/
15+
/.mvn/.develocity/
16+
/build/
17+
/dev/release/apache-rat-0.16.1.jar
18+
/dev/release/filtered_rat.txt
19+
/dev/release/rat.xml
1620
CMakeCache.txt
1721
CMakeFiles/
1822
Makefile
1923
TAGS
2024
arrow-git.properties
2125
cmake_install.cmake
26+
dependency-reduced-pom.xml
2227
install_manifest.txt
2328
target/

.pre-commit-config.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
repos:
19+
- repo: https://github.com/pre-commit/pre-commit-hooks
20+
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # v5.0.0
21+
hooks:
22+
- id: trailing-whitespace
23+
- id: end-of-file-fixer
24+
- id: check-yaml
25+
- id: check-added-large-files
26+
- id: file-contents-sorter
27+
files: .gitignore
28+
29+
- repo: local
30+
hooks:
31+
- id: rat
32+
name: Release Audit Tool
33+
language: system
34+
entry: |
35+
bash -c " \
36+
git archive HEAD \
37+
--prefix=apache-arrow-go/ \
38+
--output=apache-arrow-go.tar.gz && \
39+
dev/release/run_rat.sh apache-arrow-go.tar.gz"
40+
always_run: true
41+
pass_filenames: false

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121

2222
* [Code of Conduct for The Apache Software Foundation][1]
2323

24-
[1]: https://www.apache.org/foundation/policies/conduct.html
24+
[1]: https://www.apache.org/foundation/policies/conduct.html

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121

2222
## Did you find a bug?
2323

24-
The Arrow Java project uses GitHub as a bug tracker. To report a bug, sign in
24+
The Arrow Java project uses GitHub as a bug tracker. To report a bug, sign in
2525
to your GitHub account, navigate to [GitHub issues](https://github.com/apache/arrow-java/issues)
2626
and click on **New issue** .
2727

28-
Before you create a new bug entry, we recommend you first search among
28+
Before you create a new bug entry, we recommend you first search among
2929
existing Arrow issues in [GitHub](https://github.com/apache/arrow-java/issues).
3030

3131
## Did you write a patch that fixes a bug or brings an improvement?

adapter/jdbc/src/test/resources/h2/comment.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ create table table1(
1818
COMMENT ON TABLE table1 IS 'This is super special table with valuable data';
1919
COMMENT ON COLUMN table1.id IS 'Record identifier';
2020
COMMENT ON COLUMN table1.name IS 'Name of record';
21-
COMMENT ON COLUMN table1.columnN IS 'Informative description of columnN';
21+
COMMENT ON COLUMN table1.columnN IS 'Informative description of columnN';

adapter/jdbc/src/test/resources/h2/test1_all_datatypes_h2.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ data:
6666
PARSEDATETIME(''2018-02-12 GMT'', ''yyyy-MM-dd z''), PARSEDATETIME(''2018-02-12 12:45:35 GMT'', ''yyyy-MM-dd HH:mm:ss z''),
6767
''736f6d6520746578742074686174206e6565647320746f20626520636f6e76657274656420746f2062696e617279'', ''some text that needs to be converted to varchar'',
6868
''736f6d6520746578742074686174206e6565647320746f20626520636f6e76657274656420746f2062696e617279'', ''some text that needs to be converted to clob'', ''some char text'', 1, null, ARRAY[],''{"s":"t"}'');'
69-
69+
7070
query: 'select int_field1, bool_field2, tinyint_field3, smallint_field4, bigint_field5, decimal_field6, double_field7, real_field8,
7171
time_field9, date_field10, timestamp_field11, binary_field12, varchar_field13, blob_field14, clob_field15, char_field16, bit_field17, null_field18, list_field19, map_field20 from table1'
7272

@@ -77,7 +77,7 @@ rowCount: '10'
7777
values:
7878
- 'INT_FIELD1=101,102,103,104,null,null,107,108,109,110'
7979
- 'BOOL_FIELD2=1,1,1,1,1,1,1,1,1,1'
80-
- 'BIT_FIELD17=1,1,1,1,1,1,1,1,1,1'
80+
- 'BIT_FIELD17=1,1,1,1,1,1,1,1,1,1'
8181
- 'TINYINT_FIELD3=45,45,45,45,45,45,45,45,45,45'
8282
- 'SMALLINT_FIELD4=12000,12000,12000,12000,12000,12000,12000,12000,12000,12000'
8383
- 'BIGINT_FIELD5=92233720,92233720,92233720,92233720,92233720,92233720,92233720,92233720,92233720,92233720'
@@ -120,4 +120,4 @@ values:
120120
some text that needs to be converted to clob,some text that needs to be converted to clob,
121121
some text that needs to be converted to clob,some text that needs to be converted to clob'
122122
- 'LIST_FIELD19=(1;2;3),(1;2),(1),(2;3;4),(2;3),(2),(3;4;5),(3;4),(3),()'
123-
- 'MAP_FIELD20={"a":"b"|"key":"12345"},{"c":"d"},{"e":"f"},{"g":"h"},{"i":"j"},{"k":"l"},{"m":"n"},{"o":"p"},{"q":"r"},{"s":"t"}'
123+
- 'MAP_FIELD20={"a":"b"|"key":"12345"},{"c":"d"},{"e":"f"},{"g":"h"},{"i":"j"},{"k":"l"},{"m":"n"},{"o":"p"},{"q":"r"},{"s":"t"}'

adapter/jdbc/src/test/resources/h2/test1_all_datatypes_null_h2.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ vectors:
1919
- 'TINYINT_FIELD3'
2020
- 'SMALLINT_FIELD4'
2121
- 'BIGINT_FIELD5'
22-
- 'DECIMAL_FIELD6'
22+
- 'DECIMAL_FIELD6'
2323
- 'DOUBLE_FIELD7'
2424
- 'REAL_FIELD8'
2525
- 'TIME_FIELD9'
26-
- 'DATE_FIELD10'
26+
- 'DATE_FIELD10'
2727
- 'TIMESTAMP_FIELD11'
2828
- 'BINARY_FIELD12'
2929
- 'VARCHAR_FIELD13'
3030
- 'BLOB_FIELD14'
31-
- 'CLOB_FIELD15'
31+
- 'CLOB_FIELD15'
3232
- 'CHAR_FIELD16'
3333
- 'BIT_FIELD17'
3434
- 'LIST_FIELD19'
@@ -52,4 +52,4 @@ query: 'select int_field1, bool_field2, tinyint_field3, smallint_field4, bigint_
5252
time_field9, date_field10, timestamp_field11, binary_field12, varchar_field13, blob_field14, clob_field15, char_field16, bit_field17,
5353
list_field19 from table1'
5454

55-
drop: 'DROP table table1;'
55+
drop: 'DROP table table1;'

adapter/jdbc/src/test/resources/h2/test1_charset_ch_h2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ values:
4040
一些帶有char編碼的文本需要轉換為varchar,一些帶有char編碼的文本需要轉換為varchar'
4141
- 'CLOB_FIELD15=一些带有char编码的文本需要转换为clob,一些带有char编码的文本需要转换为clob,一些带有char编码的文本需要转换为clob,
4242
一些带有char编码的文本需要转换为clob,一些带有char编码的文本需要转换为clob'
43-
- 'CHAR_FIELD16=一些char编码的字符文本,一些char编码的字符文本,一些char编码的字符文本,一些char编码的字符文本,一些char编码的字符文本'
43+
- 'CHAR_FIELD16=一些char编码的字符文本,一些char编码的字符文本,一些char编码的字符文本,一些char编码的字符文本,一些char编码的字符文本'

0 commit comments

Comments
 (0)