Skip to content

Commit

Permalink
[incubator-kie-issues-1613] Add .rat-excludes file to each repository (
Browse files Browse the repository at this point in the history
…apache#6149)

* [incubator-kie-issues-1613] Add .rat-excludes file to each repository

* removing apache-rat-plugin as we can check it with command line
  • Loading branch information
tkobayas committed Nov 21, 2024
1 parent d8f43e3 commit 6f82712
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 43 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/pr-rat-check.yml
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."
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ local/
!.github
!.git-blame-ignore-revs
!.openrewrite
!.rat-excludes
nbproject
*.ipr
*.iws
Expand Down
41 changes: 41 additions & 0 deletions .rat-excludes
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
43 changes: 0 additions & 43 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@
<properties>
<project.build.outputTimestamp>2024-07-16T16:09:06Z</project.build.outputTimestamp>
<version.maven.artifact.plugin>3.4.1</version.maven.artifact.plugin>
<version.apache-rat-plugin>0.16.1</version.apache-rat-plugin>
</properties>

<build>
Expand All @@ -129,48 +128,6 @@
<outputTimestamp>${project.build.outputTimestamp}</outputTimestamp>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<version>${version.apache-rat-plugin}</version>
<configuration>
<excludes>
<exclude>.git-blame-ignore-revs</exclude>
<exclude>**/dependency-reduced-pom.xml</exclude>
<exclude>**/lunr-2.3.9.min.js</exclude>
<exclude>**/search-ui.js</exclude>
<exclude>**/branch.yaml</exclude>
<exclude>**/main.yaml</exclude>
<exclude>**/mvel.jj</exclude>
<exclude>**/*.csv</exclude>
<exclude>**/*.sdo</exclude>
<exclude>**/*.sdt</exclude>
<exclude>**/TestingEmptyFile.txt</exclude>
<exclude>**/*.test_json</exclude>
<exclude>**/*.pmml_json</exclude>
<exclude>**/*.drl_json</exclude>
<exclude>**/*.dslr</exclude>
<exclude>**/DMN*.xsd</exclude>
<exclude>**/DC.xsd</exclude>
<exclude>**/DI.xsd</exclude>
<exclude>**/KiePMML*.txt</exclude>
<exclude>**/TargetValueFactoryTest_01.txt</exclude>
<exclude>**/TargetFieldFactoryTest_01.txt</exclude>
<exclude>**/*.uml</exclude>
<exclude>**/drools-model</exclude>
<exclude>**/testFile.txt</exclude>
<exclude>**/simple.dot</exclude>
<exclude>**/*.log</exclude>
<exclude>**/*.lst</exclude>
<exclude>**/checkstyle-cachefile</exclude>
<exclude>**/test*.txt</exclude>
<exclude>**/test*.yml</exclude>
<exclude>**/drl.ftl</exclude>
<exclude>**/goal.txt</exclude>
<exclude>**/adult.txt</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down

0 comments on commit 6f82712

Please sign in to comment.