Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce spotless and use it to fix copyright headers #3056

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 18 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ plugins {
alias(libs.plugins.artifactory)
alias(libs.plugins.download)
alias(libs.plugins.sonarqube)
alias(libs.plugins.spotless)
}

ext {
Expand Down Expand Up @@ -268,6 +269,23 @@ subprojects {
check.dependsOn quickCheck
}

// Spotless

spotless {
ratchetFrom('HEAD')
java {
target "**/src/main/java/**/*.java", "**/src/test/java/**/*.java", "**/src/testFixtures/java/**/*.java"
// target "fdb-record-layer-core/src/main/java/", "fdb-record-layer-core/src/test/java/", "fdb-record-layer-core/src/testFixtures/java/"
targetExclude "**/.out/", "**/protogen/", "fdb-record-layer-lucene/src/main/java/org/apache/"
licenseHeaderFile("${rootDir}/gradle/codequality/java-copyright.txt")
removeUnusedImports()
}
protobuf {
target "**/src/main/proto/**/*.proto", "**/src/test/proto/**/*.proto", "**/src/testFixtures/proto/**/*.proto"
licenseHeaderFile("${rootDir}/gradle/codequality/java-copyright.txt")
}
}

// Script for upgrading gradle. To upgrade the gradle version, set the property to the version
// you want and run the command _twice_.
wrapper {
Expand Down
1 change: 1 addition & 0 deletions examples/src/main/proto/sample.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

syntax = "proto2";

package com.apple.foundationdb.record.sample;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* ErrorCodes.java
* FDBError.java
*
* This source file is part of the FoundationDB open source project
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2020 Apple Inc. and the FoundationDB project authors
* Copyright 2015-2020 Apple Inc. and the FoundationDB project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
* VersionstampFromDate.java
* VersionFromTimestamp.java
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2020 Apple Inc. and the FoundationDB project authors
* Copyright 2015-2020 Apple Inc. and the FoundationDB project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2024 Apple Inc. and the FoundationDB project authors
* Copyright 2015-2024 Apple Inc. and the FoundationDB project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* FDBExtension.java
* TestDatabaseExtension.java
*
* This source file is part of the FoundationDB open source project
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2024 Apple Inc. and the FoundationDB project authors
* Copyright 2015-2024 Apple Inc. and the FoundationDB project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* IntState.java
* DoubleState.java
*
* This source file is part of the FoundationDB open source project
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* IntState.java
* FloatState.java
*
* This source file is part of the FoundationDB open source project
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* IntState.java
* IntegerState.java
*
* This source file is part of the FoundationDB open source project
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* IntState.java
* LongState.java
*
* This source file is part of the FoundationDB open source project
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* GroupAggregator.java
* StreamGrouping.java
*
* This source file is part of the FoundationDB open source project
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2023 Apple Inc. and the FoundationDB project authors
* Copyright 2015-2023 Apple Inc. and the FoundationDB project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* ArithmethicFunctionKeyExpression.java
* LongArithmethicFunctionKeyExpression.java
*
* This source file is part of the FoundationDB open source project
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2024 Apple Inc. and the FoundationDB project authors
* Copyright 2015-2024 Apple Inc. and the FoundationDB project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
* OrderFunctionKeyExpressionFactoryRE.java
* OrderFunctionKeyExpressionFactory.java
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2024 Apple Inc. and the FoundationDB project authors
* Copyright 2015-2024 Apple Inc. and the FoundationDB project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2021 Apple Inc. and the FoundationDB project authors
* Copyright 2015-2021 Apple Inc. and the FoundationDB project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* EventKeeperDelegator.java
* EventKeeperTranslator.java
*
* This source file is part of the FoundationDB open source project
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* FDBDatabaseFactory.java
* FDBDatabaseFactoryImpl.java
*
* This source file is part of the FoundationDB open source project
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* FDBIndexedRecord.java
* FDBIndexedRawRecord.java
*
* This source file is part of the FoundationDB open source project
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* FDBSystemDatabase.java
* FDBSystemOperations.java
*
* This source file is part of the FoundationDB open source project
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* IndexDeferredMaintenancePolicy.java
* IndexDeferredMaintenanceControl.java
*
* This source file is part of the FoundationDB open source project
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* IndexRangeKeyValueCursor.java
* IndexPrefetchRangeKeyValueCursor.java
*
* This source file is part of the FoundationDB open source project
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2022 Apple Inc. and the FoundationDB project authors
* Copyright 2015-2022 Apple Inc. and the FoundationDB project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2022 Apple Inc. and the FoundationDB project authors
* Copyright 2015-2022 Apple Inc. and the FoundationDB project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2022 Apple Inc. and the FoundationDB project authors
* Copyright 2015-2022 Apple Inc. and the FoundationDB project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2022 Apple Inc. and the FoundationDB project authors
* Copyright 2015-2022 Apple Inc. and the FoundationDB project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* IndexingRepair.java
* IndexingScrubDangling.java
*
* This source file is part of the FoundationDB open source project
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* IndexingRepair.java
* IndexingScrubMissing.java
*
* This source file is part of the FoundationDB open source project
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* KeyValueCursor.java
* KeyValueCursorBase.java
*
* This source file is part of the FoundationDB open source project
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2022 Apple Inc. and the FoundationDB project authors
* Copyright 2015-2022 Apple Inc. and the FoundationDB project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2022 Apple Inc. and the FoundationDB project authors
* Copyright 2015-2022 Apple Inc. and the FoundationDB project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* OnlineIndexerBaseBuilder.java
* OnlineIndexOperationBaseBuilder.java
*
* This source file is part of the FoundationDB open source project
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* OnlineScrubber.java
* OnlineIndexScrubber.java
*
* This source file is part of the FoundationDB open source project
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2021 Apple Inc. and the FoundationDB project authors
* Copyright 2015-2021 Apple Inc. and the FoundationDB project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* UnsupportedFormatVersionException.java
* UnsupportedMethodException.java
*
* This source file is part of the FoundationDB open source project
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* UnsupportedFormatVersionException.java
* UnsupportedRemoteFetchIndexException.java
*
* This source file is part of the FoundationDB open source project
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2020 Apple Inc. and the FoundationDB project authors
* Copyright 2015-2020 Apple Inc. and the FoundationDB project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2020 Apple Inc. and the FoundationDB project authors
* Copyright 2015-2020 Apple Inc. and the FoundationDB project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
* BitmapValueIndexMaintainer.java
* BitmapValueIndexMaintainerFactory.java
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2020 Apple Inc. and the FoundationDB project authors
* Copyright 2015-2020 Apple Inc. and the FoundationDB project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2023 Apple Inc. and the FoundationDB project authors
* Copyright 2015-2023 Apple Inc. and the FoundationDB project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2023 Apple Inc. and the FoundationDB project authors
* Copyright 2015-2023 Apple Inc. and the FoundationDB project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
* RankIndexMaintainerFactory.java
* MultidimensionalIndexMaintainerFactory.java
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2023 Apple Inc. and the FoundationDB project authors
* Copyright 2015-2023 Apple Inc. and the FoundationDB project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2020 Apple Inc. and the FoundationDB project authors
* Copyright 2015-2020 Apple Inc. and the FoundationDB project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Loading