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

Add automated license header checks #49

Closed
saratvemulapalli opened this issue Jun 10, 2021 · 7 comments
Closed

Add automated license header checks #49

saratvemulapalli opened this issue Jun 10, 2021 · 7 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed v1.0.0 OpenSearch 1.0 Release

Comments

@saratvemulapalli
Copy link
Member

We have to standardize the way to develop on opensearch-project.
We should be able to have license header checks.

@saratvemulapalli saratvemulapalli added enhancement New feature or request v1.0.0 OpenSearch 1.0 Release labels Jun 10, 2021
@dblock dblock changed the title Add license header checks Add automated license header checks Jun 10, 2021
@ketanv3
Copy link
Contributor

ketanv3 commented Jun 11, 2021

OpenSearch plugins' source code should include a valid SPDX license header (along with the existing license headers, if any).

Further, plugins should enable the 'licenseHeaders' check in their build.gradle file if it was previously disabled.
Example - https://github.com/opensearch-project/asynchronous-search/blob/main/build.gradle#L117

Plugin authors can also use IntelliJ's Copyright functionality to auto-generate this license header. This Copyright profile can be made a part of the plugin repo itself so that headers are consistently generated for all contributors.

@saratvemulapalli saratvemulapalli added the help wanted Extra attention is needed label Jun 11, 2021
@dblock
Copy link
Member

dblock commented Jun 11, 2021

@ketanv3 any interest in picking this up, writing it up in this repo, and helping track it across plugins?

@ketanv3
Copy link
Contributor

ketanv3 commented Jun 12, 2021

@dblock Sure, please assign this to me.

@ketanv3
Copy link
Contributor

ketanv3 commented Jun 12, 2021

Update: Turns out that a few plugins prefer auto-generating the license headers using plugins like Spotless. Rather than imposing these plugins to use IntelliJ's Copyright feature, letting each plugin decide what's best for them. For now, simply enabling the license header checks for such plugins.

Plugin checklist:

@saratvemulapalli
Copy link
Member Author

saratvemulapalli commented Jun 16, 2021

@ketanv3 thanks for taking care of this. You don't have to make changes in every plugin.
Let the plugins own it.

Can you document the process on how to setup the license header checks in this repository and we can take @MMakaria's help to drive it across all the plugins to make sure all plugins will follow the steps you have recommended.

@ketanv3
Copy link
Contributor

ketanv3 commented Jun 17, 2021

@saratvemulapalli Sure! I'll raise a PR documenting this process.

@saratvemulapalli
Copy link
Member Author

Closing this as documentation for setting up license headers is done.
Plugin owners can follow the process recommended in https://github.com/opensearch-project/opensearch-plugins/blob/main/HEADERS.md#automated-license-headers-checks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed v1.0.0 OpenSearch 1.0 Release
Projects
None yet
Development

No branches or pull requests

3 participants