From 894c6694d5a44f130bae6372a3fd4a5b23639758 Mon Sep 17 00:00:00 2001 From: Ketan Verma Date: Fri, 2 Jul 2021 04:36:16 +0530 Subject: [PATCH] Enabled automated license header checks (#36) 1. Re-enabled the 'licenseHeaders' check in the build.gradle file. 2. Added an IntelliJ copyright profile to auto-generate the SPDX license header. Signed-off-by: Ketan Verma --- .gitignore | 3 ++- .idea/copyright/SPDX_ALv2.xml | 6 ++++++ .idea/copyright/profiles_settings.xml | 3 +++ build.gradle | 3 +-- sample-extension-plugin/build.gradle | 2 +- 5 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 .idea/copyright/SPDX_ALv2.xml create mode 100644 .idea/copyright/profiles_settings.xml diff --git a/.gitignore b/.gitignore index 94376640..7c8c0f1b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ -.idea +.idea/* +!.idea/copyright *.iml .gradle out diff --git a/.idea/copyright/SPDX_ALv2.xml b/.idea/copyright/SPDX_ALv2.xml new file mode 100644 index 00000000..a2485bee --- /dev/null +++ b/.idea/copyright/SPDX_ALv2.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml new file mode 100644 index 00000000..c2b6d3d5 --- /dev/null +++ b/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/build.gradle b/build.gradle index 3c070aba..d8e96643 100644 --- a/build.gradle +++ b/build.gradle @@ -59,8 +59,7 @@ ext { noticeFile = rootProject.file('NOTICE') } -// TODO: enable -licenseHeaders.enabled = false +licenseHeaders.enabled = true testingConventions.enabled = false forbiddenApis.ignoreFailures = false diff --git a/sample-extension-plugin/build.gradle b/sample-extension-plugin/build.gradle index 8c0053c4..db62aa9c 100644 --- a/sample-extension-plugin/build.gradle +++ b/sample-extension-plugin/build.gradle @@ -51,7 +51,7 @@ dependencies { compileOnly project(path: ":${rootProject.name}-spi", configuration: 'shadow') } -licenseHeaders.enabled = false +licenseHeaders.enabled = true validateNebulaPom.enabled = false testingConventions.enabled = false loggerUsageCheck.enabled = false