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

[COMPLIANCE] Add copyright and license headers #130

Merged
merged 10 commits into from
Jun 8, 2023

Conversation

bendbennett
Copy link
Contributor

@bendbennett bendbennett commented Jun 2, 2023

Closes #93

This PR introduces:

  • modification to make generate command that will auto-generate documentation and all copyright headers for this repo (hooks into go generate)
  • GH workflow that will error if copyright headers aren't present or if license is malformed
  • Addition to the CONTRIBUTING.md on how to run license autogenerating commands
  • Add new copywrite module and add to dependabot

@bendbennett bendbennett added this to the v2.4.0 milestone Jun 2, 2023
@bendbennett bendbennett requested a review from a team as a code owner June 2, 2023 16:38
@github-actions github-actions bot added dependencies Pull requests that update a dependency file size/L labels Jun 2, 2023
tools/go.mod Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might need to run a go mod tidy on this? Was expecting terraform-plugin-docs and copywrite to be dependencies here

main.go Outdated
Copy link
Member

@austinvalle austinvalle Jun 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running into a similar thing with terraform-plugin-go with it's own tools directory. Adding tools as it's own module will remove terraform-plugin-docs from the root go.mod next time you run go mod tidy.

If the doc tool is removed from the root go.mod, then you'll get this error running go generate:

 $ go generate ./...  

no required module provides package github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs; to add it:
        go get github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs
main.go:20: running "go": exit status 1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just switched to using separate directories for copywrite and tools. Seems to be behaving as desired.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool 👍🏻, I'll follow suit in terraform-plugin-go

Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me 🚀 Excited for cleaner Go modules. 🧹

…ding go generate command for formatting terraform code to tools.go
@bendbennett bendbennett merged commit add08cb into main Jun 8, 2023
32 checks passed
@bendbennett bendbennett deleted the bendbennett/compliance branch June 8, 2023 05:59
@austinvalle austinvalle modified the milestones: v2.4.0, v2.3.3 Nov 27, 2023
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Pull requests that update a dependency file size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants