Skip to content

Commit

Permalink
fix: allow whitespace character in license SLUG
Browse files Browse the repository at this point in the history
This PR fixes the regex for the license SLUG by (1) allowing the space
character to occur and (2) moving the `-` to the beginning of the list
of allowed characters where it belongs.

Signed-off-by: Ingo Müller <[email protected]>
  • Loading branch information
ingomueller-net committed Nov 14, 2024
1 parent c40e51b commit 31751e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion verify-spdx-headers
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import os
import re

SLUG = re.compile('[a-zA-Z0-9.-]+')
SLUG = re.compile('[- a-zA-Z0-9.]+')
SPDX = re.compile(f'SPDX-License-Identifier:\s+({SLUG.pattern})')

class Language:
Expand Down

0 comments on commit 31751e3

Please sign in to comment.