Skip to content

Commit

Permalink
Extend checkstyle license checking and update licenses (typedb#53)
Browse files Browse the repository at this point in the history
## What is the goal of this PR?

We introduce a test that ensures that the license text is correct.

## What are the changes implemented in this PR?

* Bring all the `checkstyle_test()` invocations in line with the updated definition in dependencies;
* Use checkstyle to confirm that the license text is correct.
  • Loading branch information
dmitrii-ubskii authored Jul 19, 2022
1 parent a3aaac9 commit a4d5e36
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 34 deletions.
15 changes: 13 additions & 2 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,23 @@ exports_files(["VERSION", "RELEASE_TEMPLATE.md"])
checkstyle_test(
name = "checkstyle",
include = glob([
"*",
".bazelrc",
".gitignore",
".grabl/automation.yml",
"BUILD",
"WORKSPACE",
"deployment.bzl",
"test/deployment/pom.xml",
"test/deployment/src/test/**/*",
]),
license_type = "apache",
license_type = "apache-header",
size = "small",
)

checkstyle_test(
name = "checkstyle-license",
include = ["LICENSE"],
license_type = "apache-fulltext",
size = "small",
)

Expand Down
25 changes: 0 additions & 25 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -174,28 +174,3 @@
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
2 changes: 1 addition & 1 deletion client/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ java_library(
checkstyle_test(
name = "checkstyle",
include = glob(["*"]),
license_type = "apache",
license_type = "apache-header",
size = "small",
)

Expand Down
2 changes: 1 addition & 1 deletion client/test/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ java_test(
checkstyle_test(
name = "checkstyle",
include = glob(["*"]),
license_type = "apache",
license_type = "apache-header",
size = "small",
)
2 changes: 1 addition & 1 deletion dependencies/maven/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ checkstyle_test(
name = "checkstyle",
include = glob(["*"]),
exclude = ["artifacts.snapshot"],
license_type = "apache",
license_type = "apache-header",
size = "small",
)
2 changes: 1 addition & 1 deletion dependencies/vaticle/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ load("@vaticle_dependencies//tool/checkstyle:rules.bzl", "checkstyle_test")
checkstyle_test(
name = "checkstyle",
include = glob(["*"]),
license_type = "apache",
license_type = "apache-header",
size = "small",
)
2 changes: 1 addition & 1 deletion dependencies/vaticle/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ def vaticle_dependencies():
git_repository(
name = "vaticle_dependencies",
remote = "https://github.com/vaticle/dependencies",
commit = "57617a9978129f5d6b50f69146caaa9e86c3c85e", # sync-marker: do not remove this comment, this is used for sync-dependencies by @vaticle_dependencies
commit = "a8b3b714a5e0562d41f4c05ca8f266d48b7d0fd3", # sync-marker: do not remove this comment, this is used for sync-dependencies by @vaticle_dependencies
)
2 changes: 1 addition & 1 deletion example/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ java_binary(
checkstyle_test(
name = "checkstyle",
include = glob(["*"]),
license_type = "apache",
license_type = "apache-header",
size = "small",
)
2 changes: 1 addition & 1 deletion protocol/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ checkstyle_test(
"*",
"util/*",
]),
license_type = "apache",
license_type = "apache-header",
size = "small",
)

Expand Down

0 comments on commit a4d5e36

Please sign in to comment.