This is an automated email from the ASF dual-hosted git repository.

sciabarracom pushed a commit to branch 0.9.0
in repository https://gitbox.apache.org/repos/asf/openserverless-cli.git

commit 4e52354f45b275a16bf17f6ef4c681a92332ea19
Author: Michele Sciabarra <[email protected]>
AuthorDate: Sat Sep 12 17:23:34 2026 +0200

    added headers to test files
---
 .gitignore                                         | 20 ++++++---
 .licenserc.yaml                                    |  2 +-
 .gitignore => .rat-excludes                        | 50 +++++++++-------------
 Taskfile.yml                                       | 27 ++++++++++++
 tests/oplugins-plugin/sub/opts/docopts.txt         |  7 ---
 .../oplugins-plugin/sub/opts/docopts.txt.licensed  | 37 +++-------------
 tests/oplugins/docopts/both/docopts.txt            |  2 -
 .../oplugins/docopts/both/docopts.txt.licensed     | 32 +-------------
 tests/oplugins/docopts/legacy/docopts.txt          |  6 ---
 .../oplugins/docopts/legacy/docopts.txt.licensed   | 36 +++-------------
 tests/oplugins/grep.txt                            |  3 --
 .gitignore => tests/oplugins/grep.txt.licensed     | 33 ++------------
 tests/oplugins/sub/opts/docopts.txt                |  7 ---
 .../oplugins/sub/opts/docopts.txt.licensed         | 37 +++-------------
 tests/testdata/testfiletype.txt                    |  1 -
 .../testdata/testfiletype.txt.licensed             | 31 +-------------
 .../testdata/no_main_files/sample.txt.licensed     | 30 -------------
 17 files changed, 89 insertions(+), 272 deletions(-)

diff --git a/.gitignore b/.gitignore
index 476dc80..baca7a1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,11 +36,21 @@ tests/test_helper/bats-support/
 tests/prereq/olaris/bin
 tests/coreutils*
 tests/7z*
-!_patch
-_patch/bin/task
-_patch/bin/gosh
-_patch/bin/wsk
-_patch/bin/openwhisk-wskdeploy
+
 # generated
 WARN
 tools/empty_file
+tests/bats/**
+tests/test_helper/**
+
+# Build/tooling artifacts and downloaded binaries.
+.task/**
+.vscode/**
+tests/_bin/**
+
+tests/oplugins-plugin/sub/opts/docopts.txt
+tests/oplugins/docopts/both/docopts.txt
+tests/oplugins/docopts/legacy/docopts.txt
+tests/oplugins/grep.txt
+tests/oplugins/sub/opts/docopts.txt
+tests/testdata/testfiletype.txt
diff --git a/.licenserc.yaml b/.licenserc.yaml
index d97c74d..04089e4 100644
--- a/.licenserc.yaml
+++ b/.licenserc.yaml
@@ -24,7 +24,7 @@ header:
   languages:
     Text:
       extensions:
-        - ".txt"
+      - ".txt"
       comment_style_id: Hashtag
 
   paths-ignore:
diff --git a/.gitignore b/.rat-excludes
similarity index 58%
copy from .gitignore
copy to .rat-excludes
index 476dc80..b14a660 100644
--- a/.gitignore
+++ b/.rat-excludes
@@ -14,33 +14,23 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-#
-.DS_Store
-.git-hooks/
-.vscode/
-.idea/
-.task/
-.latestcheck
-.test_fail_then_succeed
-.direnv/
-cookie.txt
-attic/
-*.zip
-_*
-7*
-!cmd/ops/
-ops
-tests/bats/
-tests/test_helper/bats-assert/
-tests/test_helper/bats-support/
-tests/prereq/olaris/bin
-tests/coreutils*
-tests/7z*
-!_patch
-_patch/bin/task
-_patch/bin/gosh
-_patch/bin/wsk
-_patch/bin/openwhisk-wskdeploy
-# generated
-WARN
-tools/empty_file
+# Exclusions for Apache RAT (used together with --input-exclude-parsed-scm 
GIT).
+# Kept in sync with the paths-ignore section of .licenserc.yaml.
+
+# Vendored third-party test frameworks, cloned by the "bats" task.
+# Not part of the source release; each carries its own license.
+tests/bats/**
+tests/test_helper/**
+
+# Build/tooling artifacts and downloaded binaries.
+.task/**
+.vscode/**
+tests/_bin/**
+
+# Generated files.
+go.sum
+
+# Data files parsed verbatim by the code or asserted on by the tests:
+# a license header would corrupt their contents.
+**/*.txt
+**/*.json
diff --git a/Taskfile.yml b/Taskfile.yml
index 262f169..fa5a4a8 100644
--- a/Taskfile.yml
+++ b/Taskfile.yml
@@ -164,6 +164,7 @@ tasks:
     dir: tests
     cmds:
       - task: bats
+      - task: strip-header
       #- rm -Rf ~/.ops/oplugins ~/.ops/olaris
       - ops -reset force
       - ops -t
@@ -178,6 +179,32 @@ tasks:
         else bats/bin/bats {{.F}} {{.T}}.bats
         fi
 
+  rat:
+    desc: check ASF license compliance with Apache RAT
+    cmds:
+    - rat --input-exclude-parsed-scm GIT --input-exclude-file .rat-excludes -- 
.
+
+  rat-list:
+    desc: list files RAT does not approve, one per line (T=all to list every 
file)
+    vars:
+      XML: .task/rat.xml
+    cmds:
+    - mkdir -p .task
+    - defer: rm -f {{.XML}}
+    - rat --input-exclude-parsed-scm GIT --input-exclude-file .rat-excludes 
--output-file {{.XML}} --output-style xml -- . >/dev/null 2>&1 || true
+    - |
+      python3 - {{.XML}} {{.T}} <<'EOF'
+      import sys, xml.etree.ElementTree as ET
+      xml = sys.argv[1]
+      show_all = len(sys.argv) > 2 and sys.argv[2] == 'all'
+      for res in ET.parse(xml).getroot().iter('resource'):
+          approved = any(l.get('approval') == 'true' for l in 
res.findall('license'))
+          if approved and not show_all:
+              continue
+          lic = ','.join(l.get('id') or '?' for l in res.findall('license')) 
or '-'
+          print(f"{res.get('type'):9} {res.get('mediaType'):26} {lic:12} 
{res.get('name')}")
+      EOF
+
   clean:
     - rm ops || true
     - go clean -cache -modcache -testcache -fuzzcache
diff --git a/tests/oplugins-plugin/sub/opts/docopts.txt 
b/tests/oplugins-plugin/sub/opts/docopts.txt
deleted file mode 100644
index ad9f328..0000000
--- a/tests/oplugins-plugin/sub/opts/docopts.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Usage:
-  opts hello
-  opts ciao <name>... [-c] [-e $TEST_VAR]
-  opts salve <name> hi <x> <y> [--fl=<flag>]
-  opts sayonara (opt1|opt2) <x> <y> [--fa|--fb]
-  opts -h | --help | --version
-
diff --git a/.gitignore b/tests/oplugins-plugin/sub/opts/docopts.txt.licensed
similarity index 67%
copy from .gitignore
copy to tests/oplugins-plugin/sub/opts/docopts.txt.licensed
index 476dc80..d09f0d2 100644
--- a/.gitignore
+++ b/tests/oplugins-plugin/sub/opts/docopts.txt.licensed
@@ -14,33 +14,10 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-#
-.DS_Store
-.git-hooks/
-.vscode/
-.idea/
-.task/
-.latestcheck
-.test_fail_then_succeed
-.direnv/
-cookie.txt
-attic/
-*.zip
-_*
-7*
-!cmd/ops/
-ops
-tests/bats/
-tests/test_helper/bats-assert/
-tests/test_helper/bats-support/
-tests/prereq/olaris/bin
-tests/coreutils*
-tests/7z*
-!_patch
-_patch/bin/task
-_patch/bin/gosh
-_patch/bin/wsk
-_patch/bin/openwhisk-wskdeploy
-# generated
-WARN
-tools/empty_file
+Usage:
+  opts hello
+  opts ciao <name>... [-c] [-e $TEST_VAR]
+  opts salve <name> hi <x> <y> [--fl=<flag>]
+  opts sayonara (opt1|opt2) <x> <y> [--fa|--fb]
+  opts -h | --help | --version
+
diff --git a/tests/oplugins/docopts/both/docopts.txt 
b/tests/oplugins/docopts/both/docopts.txt
deleted file mode 100644
index 0657e8d..0000000
--- a/tests/oplugins/docopts/both/docopts.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-
-This should be ignored
diff --git a/.gitignore b/tests/oplugins/docopts/both/docopts.txt.licensed
similarity index 67%
copy from .gitignore
copy to tests/oplugins/docopts/both/docopts.txt.licensed
index 476dc80..1fd209e 100644
--- a/.gitignore
+++ b/tests/oplugins/docopts/both/docopts.txt.licensed
@@ -14,33 +14,5 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-#
-.DS_Store
-.git-hooks/
-.vscode/
-.idea/
-.task/
-.latestcheck
-.test_fail_then_succeed
-.direnv/
-cookie.txt
-attic/
-*.zip
-_*
-7*
-!cmd/ops/
-ops
-tests/bats/
-tests/test_helper/bats-assert/
-tests/test_helper/bats-support/
-tests/prereq/olaris/bin
-tests/coreutils*
-tests/7z*
-!_patch
-_patch/bin/task
-_patch/bin/gosh
-_patch/bin/wsk
-_patch/bin/openwhisk-wskdeploy
-# generated
-WARN
-tools/empty_file
+
+This should be ignored
diff --git a/tests/oplugins/docopts/legacy/docopts.txt 
b/tests/oplugins/docopts/legacy/docopts.txt
deleted file mode 100644
index 42bbbce..0000000
--- a/tests/oplugins/docopts/legacy/docopts.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-Task: docopts legacy
-
-Simple task with flag
-
-Usage:
-  legacy simple [-f]
diff --git a/.gitignore b/tests/oplugins/docopts/legacy/docopts.txt.licensed
similarity index 67%
copy from .gitignore
copy to tests/oplugins/docopts/legacy/docopts.txt.licensed
index 476dc80..31872dc 100644
--- a/.gitignore
+++ b/tests/oplugins/docopts/legacy/docopts.txt.licensed
@@ -14,33 +14,9 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-#
-.DS_Store
-.git-hooks/
-.vscode/
-.idea/
-.task/
-.latestcheck
-.test_fail_then_succeed
-.direnv/
-cookie.txt
-attic/
-*.zip
-_*
-7*
-!cmd/ops/
-ops
-tests/bats/
-tests/test_helper/bats-assert/
-tests/test_helper/bats-support/
-tests/prereq/olaris/bin
-tests/coreutils*
-tests/7z*
-!_patch
-_patch/bin/task
-_patch/bin/gosh
-_patch/bin/wsk
-_patch/bin/openwhisk-wskdeploy
-# generated
-WARN
-tools/empty_file
+Task: docopts legacy
+
+Simple task with flag
+
+Usage:
+  legacy simple [-f]
diff --git a/tests/oplugins/grep.txt b/tests/oplugins/grep.txt
deleted file mode 100644
index ff6e6b1..0000000
--- a/tests/oplugins/grep.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-first
-second
-third
diff --git a/.gitignore b/tests/oplugins/grep.txt.licensed
similarity index 67%
copy from .gitignore
copy to tests/oplugins/grep.txt.licensed
index 476dc80..a242831 100644
--- a/.gitignore
+++ b/tests/oplugins/grep.txt.licensed
@@ -14,33 +14,6 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-#
-.DS_Store
-.git-hooks/
-.vscode/
-.idea/
-.task/
-.latestcheck
-.test_fail_then_succeed
-.direnv/
-cookie.txt
-attic/
-*.zip
-_*
-7*
-!cmd/ops/
-ops
-tests/bats/
-tests/test_helper/bats-assert/
-tests/test_helper/bats-support/
-tests/prereq/olaris/bin
-tests/coreutils*
-tests/7z*
-!_patch
-_patch/bin/task
-_patch/bin/gosh
-_patch/bin/wsk
-_patch/bin/openwhisk-wskdeploy
-# generated
-WARN
-tools/empty_file
+first
+second
+third
diff --git a/tests/oplugins/sub/opts/docopts.txt 
b/tests/oplugins/sub/opts/docopts.txt
deleted file mode 100644
index ad9f328..0000000
--- a/tests/oplugins/sub/opts/docopts.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Usage:
-  opts hello
-  opts ciao <name>... [-c] [-e $TEST_VAR]
-  opts salve <name> hi <x> <y> [--fl=<flag>]
-  opts sayonara (opt1|opt2) <x> <y> [--fa|--fb]
-  opts -h | --help | --version
-
diff --git a/.gitignore b/tests/oplugins/sub/opts/docopts.txt.licensed
similarity index 67%
copy from .gitignore
copy to tests/oplugins/sub/opts/docopts.txt.licensed
index 476dc80..d09f0d2 100644
--- a/.gitignore
+++ b/tests/oplugins/sub/opts/docopts.txt.licensed
@@ -14,33 +14,10 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-#
-.DS_Store
-.git-hooks/
-.vscode/
-.idea/
-.task/
-.latestcheck
-.test_fail_then_succeed
-.direnv/
-cookie.txt
-attic/
-*.zip
-_*
-7*
-!cmd/ops/
-ops
-tests/bats/
-tests/test_helper/bats-assert/
-tests/test_helper/bats-support/
-tests/prereq/olaris/bin
-tests/coreutils*
-tests/7z*
-!_patch
-_patch/bin/task
-_patch/bin/gosh
-_patch/bin/wsk
-_patch/bin/openwhisk-wskdeploy
-# generated
-WARN
-tools/empty_file
+Usage:
+  opts hello
+  opts ciao <name>... [-c] [-e $TEST_VAR]
+  opts salve <name> hi <x> <y> [--fl=<flag>]
+  opts sayonara (opt1|opt2) <x> <y> [--fa|--fb]
+  opts -h | --help | --version
+
diff --git a/tests/testdata/testfiletype.txt b/tests/testdata/testfiletype.txt
deleted file mode 100644
index d9d9ed8..0000000
--- a/tests/testdata/testfiletype.txt
+++ /dev/null
@@ -1 +0,0 @@
-a sample text
diff --git a/.gitignore b/tests/testdata/testfiletype.txt.licensed
similarity index 67%
copy from .gitignore
copy to tests/testdata/testfiletype.txt.licensed
index 476dc80..d8b59d6 100644
--- a/.gitignore
+++ b/tests/testdata/testfiletype.txt.licensed
@@ -14,33 +14,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-#
-.DS_Store
-.git-hooks/
-.vscode/
-.idea/
-.task/
-.latestcheck
-.test_fail_then_succeed
-.direnv/
-cookie.txt
-attic/
-*.zip
-_*
-7*
-!cmd/ops/
-ops
-tests/bats/
-tests/test_helper/bats-assert/
-tests/test_helper/bats-support/
-tests/prereq/olaris/bin
-tests/coreutils*
-tests/7z*
-!_patch
-_patch/bin/task
-_patch/bin/gosh
-_patch/bin/wsk
-_patch/bin/openwhisk-wskdeploy
-# generated
-WARN
-tools/empty_file
+a sample text
diff --git a/.gitignore b/tools/testdata/no_main_files/sample.txt.licensed
similarity index 67%
copy from .gitignore
copy to tools/testdata/no_main_files/sample.txt.licensed
index 476dc80..13a8339 100644
--- a/.gitignore
+++ b/tools/testdata/no_main_files/sample.txt.licensed
@@ -14,33 +14,3 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-#
-.DS_Store
-.git-hooks/
-.vscode/
-.idea/
-.task/
-.latestcheck
-.test_fail_then_succeed
-.direnv/
-cookie.txt
-attic/
-*.zip
-_*
-7*
-!cmd/ops/
-ops
-tests/bats/
-tests/test_helper/bats-assert/
-tests/test_helper/bats-support/
-tests/prereq/olaris/bin
-tests/coreutils*
-tests/7z*
-!_patch
-_patch/bin/task
-_patch/bin/gosh
-_patch/bin/wsk
-_patch/bin/openwhisk-wskdeploy
-# generated
-WARN
-tools/empty_file

Reply via email to