Skip to content

Commit

Permalink
Updates checkstyle to look for incorrect license header
Browse files Browse the repository at this point in the history
Signed-off-by: Darshit Chanpura <[email protected]>
  • Loading branch information
DarshitChanpura committed Jun 6, 2022
1 parent ac3eca8 commit f531900
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
8 changes: 8 additions & 0 deletions config/checkstyle/sun_checks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,12 @@
<property name="severity" value="warning"/>
</module>

<!-- Checks for Headers to not contain old license text -->
<module name="RegexpSingleline">
<property name="format" value="\*( Portions)? Copyright OpenSearch Contributors"/>
<property name="ignoreCase" value="true"/>
<property name="message" value="Incorrect license header" />
<property name="severity" value="error"/>
</module>

</module>
10 changes: 10 additions & 0 deletions src/main/resources/license_headers/license_header.txt
Original file line number Diff line number Diff line change
@@ -0,0 +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.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

0 comments on commit f531900

Please sign in to comment.