diff --git a/bin/licenses b/bin/licenses index c73be8a3a8d1..4ba0d11ba921 100755 --- a/bin/licenses +++ b/bin/licenses @@ -9,7 +9,9 @@ for fn in $(find . -type f \( \ -name "*.scss" -o \ ! -name "*.min.js" \ -name "*.js" \) \ + ! -path "./.cache*" \ ! -path "./.state*" \ + ! -path "./.venv*" \ ! -path "./docs*" \ ! -path "./htmlcov*" \ ! -path "./node_modules*" \ @@ -18,7 +20,7 @@ for fn in $(find . -type f \( \ ! -path "./warehouse/static/html*" \ ! -path "./warehouse/static/js/vendor*"); do # Check for license in first 5 lines (allows for shebang, encoding and handles comment character in various languages) - if [[ ! "$(head -5 $fn | grep "^ *\(#\|\*\|\/\/\) .* License\(d*\)")" ]]; then + if [[ ! "$(head -5 $fn | grep "^ *\(#\|\*\|\/\/\|\/\*\|{#\).*License")" ]]; then echo $fn is missing a license EXIT_CODE=1 fi diff --git a/docs/dev/development/submitting-patches.rst b/docs/dev/development/submitting-patches.rst index 9e5c022dc170..32e2d3b2c1af 100644 --- a/docs/dev/development/submitting-patches.rst +++ b/docs/dev/development/submitting-patches.rst @@ -34,17 +34,7 @@ Every code file must start with the boilerplate licensing notice: .. code-block:: python - # Licensed 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. + # SPDX-License-Identifier: Apache-2.0 You can view :doc:`patterns` to see more patterns that should be used within Warehouse.