Skip to content

Commit fe363a9

Browse files
authored
chore: update license check to allow spdx header (#18205)
1 parent 40853ca commit fe363a9

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

bin/licenses

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ for fn in $(find . -type f \( \
99
-name "*.scss" -o \
1010
! -name "*.min.js" \
1111
-name "*.js" \) \
12+
! -path "./.cache*" \
1213
! -path "./.state*" \
14+
! -path "./.venv*" \
1315
! -path "./docs*" \
1416
! -path "./htmlcov*" \
1517
! -path "./node_modules*" \
@@ -18,7 +20,7 @@ for fn in $(find . -type f \( \
1820
! -path "./warehouse/static/html*" \
1921
! -path "./warehouse/static/js/vendor*"); do
2022
# Check for license in first 5 lines (allows for shebang, encoding and handles comment character in various languages)
21-
if [[ ! "$(head -5 $fn | grep "^ *\(#\|\*\|\/\/\) .* License\(d*\)")" ]]; then
23+
if [[ ! "$(head -5 $fn | grep "^ *\(#\|\*\|\/\/\|\/\*\|{#\).*License")" ]]; then
2224
echo $fn is missing a license
2325
EXIT_CODE=1
2426
fi

docs/dev/development/submitting-patches.rst

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,7 @@ Every code file must start with the boilerplate licensing notice:
3434

3535
.. code-block:: python
3636
37-
# Licensed under the Apache License, Version 2.0 (the "License");
38-
# you may not use this file except in compliance with the License.
39-
# You may obtain a copy of the License at
40-
#
41-
# http://www.apache.org/licenses/LICENSE-2.0
42-
#
43-
# Unless required by applicable law or agreed to in writing, software
44-
# distributed under the License is distributed on an "AS IS" BASIS,
45-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
46-
# See the License for the specific language governing permissions and
47-
# limitations under the License.
37+
# SPDX-License-Identifier: Apache-2.0
4838
4939
You can view :doc:`patterns` to see more patterns that should be used within
5040
Warehouse.

0 commit comments

Comments
 (0)