boyter / lc

licensechecker (lc) a command line application which scans directories and identifies what software license things are under producing reports as either SPDX, CSV, JSON, XLSX or CLI Tabular output. Dual-licensed under MIT or the UNLICENSE.
GNU Affero General Public License v3.0
124 stars 17 forks source link

Resolve bug with single line SPDX Identifier match #20

Closed boyter closed 6 years ago

boyter commented 6 years ago

Found a bug in the regular expression for SPDX Identifier matches that would fail if a file consisted of just the Identifier, E.G.

# SPDX-License-Identifier: GPL-2.0

This adds some tests over the method itself and resolves the bug.