-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[incubator-kie-issues-1613] Add .rat-excludes file to each repository #6149
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you 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. | ||
# | ||
|
||
name: Run Apache RAT check | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened, ready_for_review] | ||
|
||
jobs: | ||
apache-rat-check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download Apache RAT | ||
run: | | ||
curl -LO https://repo1.maven.org/maven2/org/apache/rat/apache-rat/0.16.1/apache-rat-0.16.1.jar | ||
|
||
- name: Run Apache RAT | ||
run: | | ||
java -jar apache-rat-0.16.1.jar -d . -E .rat-excludes | grep "== File:" && echo "The files listed above are missing license headers." && exit 1 || echo "All files have license headers." | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ local/ | |
!.github | ||
!.git-blame-ignore-revs | ||
!.openrewrite | ||
!.rat-excludes | ||
nbproject | ||
*.ipr | ||
*.iws | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
\.rat-excludes | ||
\.gitignore | ||
DISCLAIMER-WIP | ||
ui-bundle\.zip | ||
\.git-blame-ignore-revs | ||
dependency-reduced-pom\.xml | ||
lunr-2\.3\.9\.min\.js | ||
search-ui\.js | ||
branch\.yaml | ||
main\.yaml | ||
mvel\.jj | ||
JavaLexer\.g4 | ||
JavaParser\.g4 | ||
.*\.csv | ||
.*\.sdo | ||
.*\.sdt | ||
TestingEmptyFile\.txt | ||
.*\.test_json | ||
.*\.pmml_json | ||
.*\.drl_json | ||
.*\.dslr | ||
DMN.*\.xsd | ||
DC\.xsd | ||
DI\.xsd | ||
KiePMML.*\.txt | ||
TargetValueFactoryTest_01\.txt | ||
TargetFieldFactoryTest_01\.txt | ||
.*\.uml | ||
drools-model | ||
testFile\.txt | ||
simple\.dot | ||
.*\.log | ||
.*\.lst | ||
checkstyle-cachefile | ||
test.*\.txt | ||
test.*\.yml | ||
drl\.ftl | ||
goal\.txt | ||
adult\.txt | ||
antora\.yml | ||
.*\.iml |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,10 @@ This product also includes the following third-party components: | |
Downloaded from: https://gitlab.com/antora/antora-lunr-extension | ||
License: Mozilla Public License 2.0 | ||
|
||
* antora ui-bundle | ||
Downloaded from: https://github.com/stephengold/antora-ui-bundle | ||
License: Mozilla Public License 2.0 | ||
Comment on lines
+25
to
+27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cool, thank you for keeping mind to update all aspects of the codebase, just sharing, you probably noticed already, we will need to refactor and move content from NOTICE to LICENSE apache/incubator-kie-issues#1616 and apache/incubator-kie-issues#1618 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for the heads-up! |
||
|
||
* JavaParser, JavaLexer | ||
Downloaded from: https://github.com/antlr/grammars-v4/tree/master/java/java | ||
License: BSD License |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -135,6 +135,10 @@ | |
<version>${version.apache-rat-plugin}</version> | ||
<configuration> | ||
<excludes> | ||
<exclude>.rat-excludes</exclude> | ||
<exclude>.gitignore</exclude> | ||
<exclude>DISCLAIMER-WIP</exclude> | ||
<exclude>**/ui-bundle.zip</exclude> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately, we cannot share the same With this PR, we can check license headers with GHA and also with command line locally. Shall I remove There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, I am fine removing the plugin. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks. Removing the plugin... |
||
<exclude>.git-blame-ignore-revs</exclude> | ||
<exclude>**/dependency-reduced-pom.xml</exclude> | ||
<exclude>**/lunr-2.3.9.min.js</exclude> | ||
|
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.
If a file doesn't have a license header and it's not listed in
.rat-excludes
, this GHA fails.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.
nice