Skip to content

Commit

Permalink
Improve licensing information (#1298)
Browse files Browse the repository at this point in the history
Add license details on a per-file basis for internal docs using the SPDX
license ID standard [1]. This is in line with the existing practice of
defining explicitly the applicable license for all source code (such as
scripts and tests) as well as external facing docs on the file level.

Also use SPDX license IDs[1] for external facing docs as a way of having
a standardized license declaration for these files (in addition to the
human-readable declaration in the documentation file footers).

Correspondlgy, expand the "License" section in README with more detail
regarding both "supporting code" as well as the fact that individual
files have their license declared in banner comments.

Lastly, use SPDX license IDs [1] for git hook scripts as well and add a
missing banner comment (with license info) to `testing.d.ts`.

--
1. https://spdx.dev/learn/handling-license-info/
  • Loading branch information
ericcornelissen authored Nov 19, 2023
1 parent f9141fb commit 71b680e
Show file tree
Hide file tree
Showing 13 changed files with 35 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: CC0-1.0 -->

# Changelog

All notable changes to _Shescape_ will be documented in this file.
Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: CC0-1.0 -->

# Contributing Guidelines

The _Shescape_ project welcomes contributions and corrections of all forms. This
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: CC-BY-SA-4.0 -->

# Shescape

[![GitHub Actions][ci-image]][ci-url]
Expand Down Expand Up @@ -78,6 +80,13 @@ The source code is licensed under the `MPL-2.0` license, see [LICENSE] for
the full license text. The documentation text is licensed under [CC BY-SA 4.0];
code snippets under the [MIT license].

Supporting code, such a scripts and tests, is generally licensed under the `MIT`
license. However, individual files may be licensed differently depending on the
intend or origin.

The license under which a given file is available can always be found in the
file's banner comment.

[ci-url]: https://github.com/ericcornelissen/shescape/actions/workflows/checks.yml
[ci-image]: https://github.com/ericcornelissen/shescape/actions/workflows/checks.yml/badge.svg
[coverage-url]: https://codecov.io/gh/ericcornelissen/shescape
Expand Down
2 changes: 2 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: CC0-1.0 -->

# Release Guidelines

If you need to release a new version of _Shescape_, follow the guidelines found
Expand Down
2 changes: 2 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: CC0-1.0 -->

# Security Policy

The maintainers of the _Shescape_ project take security issues seriously. We
Expand Down
2 changes: 2 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: CC-BY-SA-4.0 -->

# Shescape API

This document provides a description of the full Application Programming
Expand Down
2 changes: 2 additions & 0 deletions docs/recipes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: CC-BY-SA-4.0 -->

# Shescape Recipes

This document provides examples, called _recipes_, for how to use Shescape in
Expand Down
2 changes: 2 additions & 0 deletions docs/testing.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: CC-BY-SA-4.0 -->

# Testing with Shescape

This document provides an overview of why and how to use Shescape's testing
Expand Down
2 changes: 2 additions & 0 deletions docs/tips.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- SPDX-License-Identifier: CC-BY-SA-4.0 -->

# Tips

This document provides tips to avoid shell injection beyond using a shell
Expand Down
1 change: 1 addition & 0 deletions script/hooks/common.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
# SPDX-License-Identifier: MIT

get_stash_count () {
readonly count="$(git rev-list --walk-reflogs --count refs/stash 2> /dev/null)"
Expand Down
2 changes: 2 additions & 0 deletions script/hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/sh
# SPDX-License-Identifier: MIT

. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/common.sh"

Expand Down
2 changes: 2 additions & 0 deletions script/hooks/pre-push
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/sh
# SPDX-License-Identifier: MIT

. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/common.sh"

Expand Down
5 changes: 5 additions & 0 deletions testing.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* @overview Contains TypeScript type definitions for shescape/testing.
* @license MPL-2.0
*/

import type { Shescape as ShescapeType } from "shescape";

/**
Expand Down

0 comments on commit 71b680e

Please sign in to comment.