Skip to content

Commit

Permalink
Add license header check/fix using spotless (#51)
Browse files Browse the repository at this point in the history
* Add license header check/fix using spotless

Signed-off-by: Daniel Widdis <[email protected]>

* Remove extra white space and end with newline

Signed-off-by: Daniel Widdis <[email protected]>
  • Loading branch information
dbwiddis authored Jul 15, 2022
1 parent 2ca7fb1 commit 940c647
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 10 deletions.
7 changes: 7 additions & 0 deletions formatter/license-header.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/
7 changes: 6 additions & 1 deletion gradle/formatting.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,10 @@ allprojects {
paddedCell()
}
}
format("license", {
licenseHeaderFile("${rootProject.file("formatter/license-header.txt")}", "package ");
target("src/main/java/**/*.java")
targetExclude("**/netty4/*")
})
}
}
}
1 change: 0 additions & 1 deletion src/main/java/org/opensearch/sdk/ActionListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/

package org.opensearch.sdk;

import org.opensearch.common.SuppressForbidden;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/
package org.opensearch.sdk;

import org.apache.logging.log4j.LogManager;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/
package org.opensearch.sdk;

import org.apache.logging.log4j.LogManager;
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/org/opensearch/sdk/ExtensionSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

package org.opensearch.sdk;

/**
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/org/opensearch/sdk/ExtensionsRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

package org.opensearch.sdk;

import com.fasterxml.jackson.databind.ObjectMapper;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/
package org.opensearch.sdk;

import org.apache.logging.log4j.LogManager;
Expand Down

0 comments on commit 940c647

Please sign in to comment.