Skip to content

Add license checking to lint #3449

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

Merged
merged 2 commits into from
Apr 21, 2025
Merged

Conversation

afbjorklund
Copy link
Member

@afbjorklund afbjorklund commented Apr 20, 2025

Previously these were only tested in GitHub Actions.

Since PR #3293

Add the same checks to "make lint", to match "Lints".

Closes #3443

Previously these were only tested in GitHub Actions.

Add the same checks to "make lint", to match "Lints".

Signed-off-by: Anders F Björklund <[email protected]>
Makefile Outdated
@@ -467,13 +467,17 @@ check-generated:
((git diff $$(find . -name '*.pb.desc') | cat) && \
(echo "Please run 'make generate' when making changes to proto files and check-in the generated file changes" && false))

LICENSES = Apache-2.0,BSD-2-Clause,BSD-2-Clause-FreeBSD,BSD-3-Clause,MIT,ISC,Python-2.0,PostgreSQL,X11,Zlib
Copy link
Member

Choose a reason for hiding this comment

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

I don't like that we list allowed licenses in 2 places. The other place is:

run: go-licenses check --include_tests ./... --allowed_licenses=Apache-2.0,BSD-2-Clause,BSD-2-Clause-FreeBSD,BSD-3-Clause,MIT,ISC,Python-2.0,PostgreSQL,X11,Zlib
)

Can't we just put that line into a textfile and use it like this:

go-licenses check … --allowed-licenses="$(cat allowed-licenses.txt)"

Copy link
Member

Choose a reason for hiding this comment

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

Probably GHA should just run make lint ?

Copy link
Member Author

Choose a reason for hiding this comment

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

The only thing is how to install the tools

@afbjorklund
Copy link
Member Author

Added hack/allowed-licenses.txt, next to hack/ltag template.

Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

Thanks

@AkihiroSuda AkihiroSuda merged commit 5cc5c5e into lima-vm:master Apr 21, 2025
31 of 32 checks passed
@AkihiroSuda AkihiroSuda added this to the v1.1.0 milestone Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add target for running license checking
3 participants