openwhisk-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From houshen...@apache.org
Subject [incubator-openwhisk-utilities] branch master updated: Add .sh and .md scanning support in new .cfg file. (#29)
Date Tue, 01 May 2018 21:41:22 GMT
This is an automated email from the ASF dual-hosted git repository.

houshengbo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-utilities.git


The following commit(s) were added to refs/heads/master by this push:
     new 00384d0  Add .sh and .md scanning support in new .cfg file. (#29)
00384d0 is described below

commit 00384d01ed047fefb8630dde8bc6a7ba95d7531e
Author: Matt Rutkowski <mrutkows@us.ibm.com>
AuthorDate: Tue May 1 16:41:20 2018 -0500

    Add .sh and .md scanning support in new .cfg file. (#29)
    
    * Update CONTRIBUTING.md to have ASF header at top-of-file.
    
    * Add .sh and .md scanning support in new .cfg file.
    
    * Add README and new unit tests data files for .md and .sh file types.
---
 scancode/{ASF-Release.cfg => ASF-Release-v2.cfg} |  5 +++-
 scancode/ASF-Release.cfg                         |  3 +-
 scancode/ASFLicenseHeaderHash.txt                | 15 ++++++++++
 scancode/tests/include/README.md                 | 36 ++++++++++++++++++++++++
 scancode/tests/include/good-bash.sh              | 25 ++++++++++++++++
 5 files changed, 82 insertions(+), 2 deletions(-)

diff --git a/scancode/ASF-Release.cfg b/scancode/ASF-Release-v2.cfg
similarity index 90%
copy from scancode/ASF-Release.cfg
copy to scancode/ASF-Release-v2.cfg
index 4cf26bb..f8f9f66 100644
--- a/scancode/ASF-Release.cfg
+++ b/scancode/ASF-Release-v2.cfg
@@ -9,6 +9,7 @@ ASFMinifiedLicenseHeader.txt
 ASFMinifiedLicenseHashHeader.txt
 ASFLicenseHeaderLua.txt
 ASFLicenseHeaderBash.txt
+ASFLicenseHeaderHash.txt
 
 # Filters (path/filename) with wildcards and associated scan checks
 # that are to be run against them.  The checks are actual valid
@@ -23,6 +24,8 @@ ASFLicenseHeaderBash.txt
 *.md=no_tabs, eol_at_eof
 *.go=has_block_license, no_trailing_spaces, eol_at_eof
 *.lua=has_block_license
+*.md=has_block_license, no_trailing_spaces, eol_at_eof
+*.sh=has_block_license, no_trailing_spaces, eol_at_eof
 build.xml=no_tabs, no_trailing_spaces, eol_at_eof
 deploy.xml=no_tabs, no_trailing_spaces, eol_at_eof
 
@@ -33,7 +36,7 @@ deploy.xml=no_tabs, no_trailing_spaces, eol_at_eof
 .git
 .bin
 
-# Gohgradle build tool exclusions for created 'vendor' and cache directories
+# Go gradle build tool exclusions for created 'vendor' and cache directories
 .gogradle
 vendor
 
diff --git a/scancode/ASF-Release.cfg b/scancode/ASF-Release.cfg
index 4cf26bb..71063c0 100644
--- a/scancode/ASF-Release.cfg
+++ b/scancode/ASF-Release.cfg
@@ -9,6 +9,7 @@ ASFMinifiedLicenseHeader.txt
 ASFMinifiedLicenseHashHeader.txt
 ASFLicenseHeaderLua.txt
 ASFLicenseHeaderBash.txt
+ASFLicenseHeaderHash.txt
 
 # Filters (path/filename) with wildcards and associated scan checks
 # that are to be run against them.  The checks are actual valid
@@ -33,7 +34,7 @@ deploy.xml=no_tabs, no_trailing_spaces, eol_at_eof
 .git
 .bin
 
-# Gohgradle build tool exclusions for created 'vendor' and cache directories
+# Go gradle build tool exclusions for created 'vendor' and cache directories
 .gogradle
 vendor
 
diff --git a/scancode/ASFLicenseHeaderHash.txt b/scancode/ASFLicenseHeaderHash.txt
new file mode 100644
index 0000000..fb92375
--- /dev/null
+++ b/scancode/ASFLicenseHeaderHash.txt
@@ -0,0 +1,15 @@
+#
+# 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.
+#
\ No newline at end of file
diff --git a/scancode/tests/include/README.md b/scancode/tests/include/README.md
new file mode 100644
index 0000000..def6c36
--- /dev/null
+++ b/scancode/tests/include/README.md
@@ -0,0 +1,36 @@
+<!--
+#
+# 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.
+#
+-->
+
+[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)
+
+## Test descriptions
+
+The following test files exist in this directory to confirm that scanCode.py can detect an
ASF License in various types of files which have varying comment syntax:
+
+| Test file | Description |
+| --- | --- |
+| README.md | Detect ASF License in markdown (*.md) file. |
+| good-apache-license.go | Detect ASF License in GoLang (*.go) file. |
+| python/good-fuzzy-script.py | Detect License in Python (*.py) file.|
+| good-apache-license.scala | Detect ASF License in Scala (*.scala) file. |
+| good-hello.lua | Detect ASF License in Lua (*.lua) file. |
+| good_hello.js | Detect ASF License in JavaScript (*.js) file. |
+| good-bash.sh | Detect ASF License in Bash (*.sh) file. |
+
+### Notes
+- We also include the ASF License "badge" in this file to not only exhibit best practice
for README markdown files, but also prove these statements can appear after the ASF License
successfully.
diff --git a/scancode/tests/include/good-bash.sh b/scancode/tests/include/good-bash.sh
new file mode 100755
index 0000000..e8d0740
--- /dev/null
+++ b/scancode/tests/include/good-bash.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+#
+# 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.
+#
+#
+set -e
+
+SCRIPTDIR=$(cd $(dirname "$0") && pwd)
+echo $SCRIPTDIR

-- 
To stop receiving notification emails like this one, please contact
houshengbo@apache.org.

Mime
View raw message