You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by "DaanHoogland (via GitHub)" <gi...@apache.org> on 2025/08/12 13:02:22 UTC

[PR] rat cli check and exclude list [cloudstack-go]

DaanHoogland opened a new pull request, #116:
URL: https://github.com/apache/cloudstack-go/pull/116

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] rat cli check and exclude list [cloudstack-go]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #116:
URL: https://github.com/apache/cloudstack-go/pull/116#discussion_r2303640359


##########
.github/workflows/rat.yaml:
##########
@@ -0,0 +1,36 @@
+name: RAT Check
+
+on:
+  push:
+    branches:
+      - main
+  pull_request:
+    branches:
+      - '**'
+
+jobs:
+  rat:
+    name: Apache RAT Check
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v4
+
+      - name: Set up Java
+        uses: actions/setup-java@v4
+        with:
+          distribution: temurin
+          java-version: 17
+
+      - name: Download Apache RAT
+        run: |
+          curl -L -O https://downloads.apache.org/creadur/apache-rat-0.16.1/apache-rat-0.16.1-bin.tar.gz
+          tar -xzf apache-rat-0.16.1-bin.tar.gz
+
+      - name: Run RAT
+        run: |
+          java -jar apache-rat-0.16.1/apache-rat-0.16.1.jar -d . -E .rat-excludes > rat-report.txt
+          cat rat-report.txt
+          # Fail if unapproved licenses are found
+          grep -qe '^0 Unknown Licenses' rat-report.txt && exit 0 || exit 1

Review Comment:
   The grep pattern '^0 Unknown Licenses' may not reliably detect the absence of license issues. RAT output format could vary, and this pattern might miss cases where there are unknown licenses but the exact format differs. Consider using a more robust pattern or checking the RAT exit code directly.
   ```suggestion
             # The RAT command returns a non-zero exit code if unapproved licenses are found
             exit $?
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] rat cli check and exclude list [cloudstack-go]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #116:
URL: https://github.com/apache/cloudstack-go/pull/116#discussion_r2269789783


##########
.rat-excludes:
##########
@@ -0,0 +1,3 @@
+.rat-excludes
+go.mod
+go.sum

Review Comment:
   ```suggestion
   .rat-excludes
   go.mod
   go.sum
   rat-report.txt
   apache-rat-0.16.1
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] rat cli check and exclude list [cloudstack-go]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland merged PR #116:
URL: https://github.com/apache/cloudstack-go/pull/116


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org