Skip to content

Commit

Permalink
ci(java/scala): auto check and insert unified license header (#3296)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanghua authored Jan 3, 2025
1 parent f730f75 commit 45fde4c
Show file tree
Hide file tree
Showing 72 changed files with 61 additions and 122 deletions.
17 changes: 9 additions & 8 deletions java/core/src/main/java/com/lancedb/lance/Dataset.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
/*
* Licensed 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
* Licensed 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
* 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.
*/

package com.lancedb.lance;

import com.lancedb.lance.index.IndexParams;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance;

import com.lancedb.lance.ipc.LanceScanner;
Expand Down
1 change: 0 additions & 1 deletion java/core/src/main/java/com/lancedb/lance/Fragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance;

import org.apache.arrow.c.ArrowArray;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance;

import org.apache.arrow.util.Preconditions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance;

import org.apache.arrow.c.ArrowSchema;
Expand Down
1 change: 0 additions & 1 deletion java/core/src/main/java/com/lancedb/lance/JniLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance;

import io.questdb.jar.jni.JarJniLoader;
Expand Down
1 change: 0 additions & 1 deletion java/core/src/main/java/com/lancedb/lance/LockManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance;

import java.util.concurrent.locks.ReentrantReadWriteLock;
Expand Down
17 changes: 9 additions & 8 deletions java/core/src/main/java/com/lancedb/lance/ReadOptions.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
/*
* Licensed 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
* Licensed 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
* 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.
*/

package com.lancedb.lance;

import org.apache.commons.lang3.builder.ToStringBuilder;
Expand Down
1 change: 0 additions & 1 deletion java/core/src/main/java/com/lancedb/lance/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance;

import org.apache.arrow.c.ArrowSchema;
Expand Down
1 change: 0 additions & 1 deletion java/core/src/main/java/com/lancedb/lance/WriteParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance;

import org.apache.commons.lang3.builder.ToStringBuilder;
Expand Down
15 changes: 0 additions & 15 deletions java/core/src/main/java/com/lancedb/lance/index/DistanceType.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/*
* Licensed 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.
*/

package com.lancedb.lance.index;

public enum DistanceType {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance.index;

import com.lancedb.lance.index.vector.VectorIndexParams;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance.index;

public enum IndexType {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance.index.vector;

import org.apache.commons.lang3.builder.ToStringBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance.index.vector;

import org.apache.commons.lang3.builder.ToStringBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance.index.vector;

import org.apache.commons.lang3.builder.ToStringBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance.index.vector;

import org.apache.commons.lang3.builder.ToStringBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance.index.vector;

import com.lancedb.lance.index.DistanceType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance.ipc;

import org.apache.arrow.util.Preconditions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance.ipc;

import com.lancedb.lance.Dataset;
Expand Down
1 change: 0 additions & 1 deletion java/core/src/main/java/com/lancedb/lance/ipc/Query.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance.ipc;

import com.lancedb.lance.index.DistanceType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance.ipc;

import org.apache.arrow.util.Preconditions;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
/*
* Licensed 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
* Licensed 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
* 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.
*/

package com.lancedb.lance.schema;

import org.apache.arrow.vector.types.pojo.ArrowType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance.test;

import com.lancedb.lance.JniLoader;
Expand Down
16 changes: 9 additions & 7 deletions java/core/src/test/java/com/lancedb/lance/DatasetTest.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
/*
* Licensed 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
* Licensed 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
* 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.
*/
package com.lancedb.lance;

Expand Down
1 change: 0 additions & 1 deletion java/core/src/test/java/com/lancedb/lance/FilterTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance;

import com.lancedb.lance.ipc.LanceScanner;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance;

import com.lancedb.lance.ipc.LanceScanner;
Expand Down
1 change: 0 additions & 1 deletion java/core/src/test/java/com/lancedb/lance/JNITest.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance;

import com.lancedb.lance.index.DistanceType;
Expand Down
1 change: 0 additions & 1 deletion java/core/src/test/java/com/lancedb/lance/ScannerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance;

import com.lancedb.lance.ipc.ColumnOrdering;
Expand Down
1 change: 0 additions & 1 deletion java/core/src/test/java/com/lancedb/lance/TestUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance;

import org.apache.arrow.c.ArrowArrayStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance;

import com.lancedb.lance.index.DistanceType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance;

import org.junit.jupiter.api.io.TempDir;
Expand Down
4 changes: 4 additions & 0 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,10 @@
<file>${maven.multiModuleProjectDirectory}/.scalafmt.conf</file>
</scalafmt>
</scala>
<licenseHeader>
<content>${spotless.license.header}</content>
<delimiter>${spotless.delimiter}</delimiter>
</licenseHeader>
</configuration>
<executions>
<execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance.spark;

import com.lancedb.lance.WriteParams;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance.spark;

import org.apache.spark.sql.util.CaseInsensitiveStringMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.lancedb.lance.spark;

import com.lancedb.lance.spark.internal.LanceDatasetAdapter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
/*
* Licensed 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
* Licensed 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
* 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.
*/

package com.lancedb.lance.spark;

import com.lancedb.lance.spark.read.LanceScanBuilder;
Expand Down
Loading

0 comments on commit 45fde4c

Please sign in to comment.