mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Properly detect multiple licenses and validate them.
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
// SPDX-License-Identifier: GPL-3.0 AND GPL-2.0
|
||||
contract C {}
|
||||
// ----
|
||||
@@ -0,0 +1,3 @@
|
||||
// SPDX-License-Identifier: GPL-3.0 OR GPL-2.0
|
||||
contract C {}
|
||||
// ----
|
||||
@@ -0,0 +1,5 @@
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
contract C {}
|
||||
// ----
|
||||
// ParserError 3716: Multiple SPDX license identifiers found in source file. Use "AND" or "OR" to combine multiple licenses. Please see https://spdx.org for more information.
|
||||
@@ -0,0 +1,5 @@
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
contract C {}
|
||||
// ----
|
||||
// ParserError 3716: Multiple SPDX license identifiers found in source file. Use "AND" or "OR" to combine multiple licenses. Please see https://spdx.org for more information.
|
||||
@@ -0,0 +1,5 @@
|
||||
/* SPDX-License-Identifier: GPL-3.0 OR GPL-2.0
|
||||
SPDX-License-Identifier: GPL-3.0 OR GPL-2.0 */
|
||||
contract C {}
|
||||
// ----
|
||||
// ParserError 3716: Multiple SPDX license identifiers found in source file. Use "AND" or "OR" to combine multiple licenses. Please see https://spdx.org for more information.
|
||||
@@ -0,0 +1,4 @@
|
||||
/* SPDX-License-Identifier: GPL-3.0 OR GPL-2.0 */ /* SPDX-License-Identifier: GPL-3.0 OR GPL-2.0 */
|
||||
contract C {}
|
||||
// ----
|
||||
// ParserError 3716: Multiple SPDX license identifiers found in source file. Use "AND" or "OR" to combine multiple licenses. Please see https://spdx.org for more information.
|
||||
@@ -1,4 +1,4 @@
|
||||
// This is parsed as GPL-3.0:
|
||||
// SPDX-License-Identifier: GPL-3.0 ⡉⡊⡋⡌⡍⡎⡏⡐⡑⡒
|
||||
contract C {}
|
||||
// ----
|
||||
// ParserError 1114: Invalid SPDX license identifier.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-License-Identifier: ⡉⡊⡋⡌⡍⡎⡏⡐⡑⡒
|
||||
contract C {}
|
||||
// ----
|
||||
// Warning 1878: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
|
||||
// ParserError 1114: Invalid SPDX license identifier.
|
||||
|
||||
Reference in New Issue
Block a user