https://github.com/senorprogrammer/spdx-racer
🏂 Tool to automatically insert SPDX short license identifiers into the tops of files
https://github.com/senorprogrammer/spdx-racer
Last synced: about 1 year ago
JSON representation
🏂 Tool to automatically insert SPDX short license identifiers into the tops of files
- Host: GitHub
- URL: https://github.com/senorprogrammer/spdx-racer
- Owner: senorprogrammer
- License: mpl-2.0
- Created: 2021-05-05T22:25:16.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-05-06T22:43:32.000Z (almost 5 years ago)
- Last Synced: 2025-01-24T11:27:31.571Z (about 1 year ago)
- Language: Go
- Homepage:
- Size: 1.2 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
_____ ____ ____ _ __ ____
/ ___// __ \/ __ \ |/ / / __ \____ _________ _____
\__ \/ /_/ / / / / / / /_/ / __ `/ ___/ _ \/ ___/
___/ / ____/ /_/ / | / _, _/ /_/ / /__/ __/ /
/____/_/ /_____/_/|_| /_/ |_|\__,_/\___/\___/_/
A command line tool for inserting [SPDX](https://spdx.dev) [short identifiers](https://spdx.github.io/spdx-spec/appendix-V-using-SPDX-short-identifiers-in-source-files/) into the tops of files.
* [Usage](#usage)
* [Adding a License](#adding-a-license)
* [Removing a License](#removing-a-license)
## Usage
### Adding a License
```
> spdx-racer --files go,rs --license MPL-2.0
```
will insert `// SPDX-License-Identifier: MPL-2.0` at the top of all Go and Rust files in the current directory.
If the file already has a license entry, it ignores the file.
### Removing a License
To delete a license, add the `--delete` or `-d` flag to the command:
```
> spdx-racer --files go,rs --license MPL-2.0 -d
```
will delete `// SPDX-License-Identifier: MPL-2.0` from the top of all Go and Rust files in the current directory.