-
Notifications
You must be signed in to change notification settings - Fork 88
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
Use Reuse tool for license handling #1460
Conversation
e9131ea
to
d578455
Compare
d578455
to
f89317d
Compare
e2418ca
to
1cce135
Compare
something is not rebased yet |
70aa938
to
802a3da
Compare
370e9cc
to
e43ec94
Compare
802a3da
to
5b9c90f
Compare
|
@greole yes, but the major drawback is that the official hook doesn't automatically add the license. |
|
||
add_custom_target(add_license | ||
COMMAND ${Ginkgo_SOURCE_DIR}/dev_tools/scripts/add_license.sh | ||
WORKING_DIRECTORY ${Ginkgo_SOURCE_DIR}) | ||
add_dependencies(format add_license) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the format will handle the license now, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the pre-commit hook will handle it.
5b9c90f
to
b351be9
Compare
bc15c7a
to
1b657ff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@@ -12,11 +12,11 @@ | |||
#if GKO_HAVE_PAPI_SDE | |||
|
|||
|
|||
#include <sde_lib.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this automatic ? Should this probably be in a separate section ?
#include <sde_lib.h> | ||
#include <cstddef> | ||
#include <iostream> | ||
#include <map> | ||
#include <mutex> | ||
#include <sde_lib.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it be changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is missing format_header
. But I think we should just leave it, since it will most likely change again in #1466.
This uses 1 empty line after the license consistently.
1b657ff
to
3e16aa4
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information The version of Java (11.0.3) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. |
This PR enables using the reuse tool [1] for adding our license to our files. This replaces the current
add_license.sh
script. The tool is automatically invoked as part of our pre-commit hooks.Sidenote: There is an official pre-commit hook for the reuse tool, but only for the linting. This has several drawbacks, 1. it requires that EVERY file has a license (I think we should still do that, but in another PR), 2. our current workflow is to add the license automatically, not just warn about it. There is some discussion for adding an official hook to do the annotation, so perhaps we can remove our manual hook in the future.