Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sambacha/spdx-runner

SPDX License check via CI/CLI with expandable dict
https://github.com/sambacha/spdx-runner

bash ethereum foss git grep oss python shell solidity spdx spdx-license-identifier zsh

Last synced: 13 days ago
JSON representation

SPDX License check via CI/CLI with expandable dict

Awesome Lists containing this project

README

        

# SPDX Runner

> CLI/CI Software License check

[![Code Style: Black](https://github.com/sambacha/spdx-runner/actions/workflows/black.yml/badge.svg?branch=master)](https://github.com/sambacha/spdx-runner/actions/workflows/black.yml)

## Overview

Verifies that files include SPDX license headers

Check file extensions have the allowed/acceptable SPDX headers for them.

```
C source: // SPDX-License-Identifier:
C header: /* SPDX-License-Identifier: */
ASM: /* SPDX-License-Identifier: */
scripts: # SPDX-License-Identifier:
.rst: .. SPDX-License-Identifier:
.dts{i}: // SPDX-License-Identifier:
```

## Usage

Provide a dictionary, with file types as the keys and a list of accepted licenses as the values.

### Example

```python
{
"sol": ["MIT", "BSD-3"],
"py": ["ISC"]
}
```

### License Header Examples

#### MDX/JSX

```
/_SPDX-License-Identifier: Apache-2.0
SPDXVersion: SPDX-2.2
SPDX-FileCopyrightText: Copyright 2020 _/
```

#### REGULAR

```
// SPDX-License-Identifier: Apache-2.0
// SPDXVersion: SPDX-2.2
// SPDX-FileCopyrightText: Copyright 2020
```

#### BASH/YAML/ENV

```
# SPDX-License-Identifier: Apache-2.0

# SPDXVersion: SPDX-2.2

# SPDX-FileCopyrightText: Copyright 2020
```

#### MARKUP SYNTAX (HTML/MARKDOWN, ETC)

```html

```

## License

SPDX-License-Identifier: Apache-2.0