Skip to content

Commit bc483fe

Browse files
committed
Enabled automated license header checks
1. Added the SPDX license header to the files with missing license headers. 2. Re-enabled the 'licenseHeaders' check in the build.gradle file. 3. Added an IntelliJ copyright profile to auto-generate the SPDX license header. 4. Updated the .gitignore file. Signed-off-by: Ketan Verma <ketan9495@gmail.com>
1 parent 3dd0717 commit bc483fe

File tree

7 files changed

+75
-12
lines changed

7 files changed

+75
-12
lines changed

.gitignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Compiled class file
2+
*.class
3+
4+
# Log file
5+
*.log
6+
7+
# BlueJ files
8+
*.ctxt
9+
10+
# Mobile Tools for Java (J2ME)
11+
.mtj.tmp/
12+
13+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
14+
hs_err_pid*
15+
16+
# IntelliJ files
17+
.idea/*
18+
*.iml
19+
*.ipr
20+
*.iws
21+
build-idea/
22+
out/
23+
24+
# Include Copyright template for IntelliJ
25+
!.idea/copyright
26+
27+
# Gradle files
28+
.gradle
29+
build
30+
31+
# OSX files
32+
.DS_Store

.idea/copyright/SPDX_ALv2.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/copyright/profiles_settings.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,7 @@ tasks.named("integTest").configure {
113113
it.dependsOn(project.tasks.named("bundlePlugin"))
114114
}
115115

116-
//TODO enable license headers
117-
licenseHeaders.enabled = false
116+
licenseHeaders.enabled = true
118117
dependencyLicenses.enabled = false
119118
thirdPartyAudit.enabled = false
120119
validateNebulaPom.enabled = false

src/main/java/org/opensearch/search/asynchronous/settings/LegacyOpendistroAsynchronousSearchSettings.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* The OpenSearch Contributors require contributions made to
5+
* this file be licensed under the Apache-2.0 license or a
6+
* compatible open source license.
7+
*
8+
* Modifications Copyright OpenSearch Contributors. See
9+
* GitHub history for details.
10+
*/
11+
112
package org.opensearch.search.asynchronous.settings;
213

314
import org.opensearch.common.settings.Setting;

src/test/java/org/opensearch/search/asynchronous/settings/AsynchronousSearchSettingsTests.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* The OpenSearch Contributors require contributions made to
5+
* this file be licensed under the Apache-2.0 license or a
6+
* compatible open source license.
7+
*
8+
* Modifications Copyright OpenSearch Contributors. See
9+
* GitHub history for details.
10+
*/
11+
112
package org.opensearch.search.asynchronous.settings;
213

314
import org.junit.Before;

src/test/java/org/opensearch/search/asynchronous/utils/QuadConsumer.java

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* The OpenSearch Contributors require contributions made to
5+
* this file be licensed under the Apache-2.0 license or a
6+
* compatible open source license.
7+
*
8+
* Modifications Copyright OpenSearch Contributors. See
9+
* GitHub history for details.
10+
*/
11+
112
/*
213
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
314
*
@@ -12,16 +23,6 @@
1223
* express or implied. See the License for the specific language governing
1324
* permissions and limitations under the License.
1425
*/
15-
/*
16-
* SPDX-License-Identifier: Apache-2.0
17-
*
18-
* The OpenSearch Contributors require contributions made to
19-
* this file be licensed under the Apache-2.0 license or a
20-
* compatible open source license.
21-
*
22-
* Modifications Copyright OpenSearch Contributors. See
23-
* GitHub history for details.
24-
*/
2526

2627
package org.opensearch.search.asynchronous.utils;
2728

0 commit comments

Comments
 (0)