Improve sanity test, improve README. (#102)

This commit is contained in:
Felix Fontein 2022-07-20 23:05:15 +02:00 committed by GitHub
parent 7973f58661
commit 1abaa8e7ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

View file

@ -168,6 +168,10 @@ We plan to regularly release minor and patch versions, whenever new features are
## Licensing
GNU General Public License v3.0 or later.
This collection is primarily licensed and distributed as a whole under the GNU General Public License v3.0 or later.
See [COPYING](https://www.gnu.org/licenses/gpl-3.0.txt) to see the full text.
See [LICENSES/GPL-3.0-or-later.txt](https://github.com/ansible-collections/community.routeros/blob/main/COPYING) for the full text.
Parts of the collection are licensed under the [BSD 2-Clause license](https://github.com/ansible-collections/community.routeros/blob/main/LICENSES/BSD-2-Clause.txt).
Most files in the collection that are not automatically generated have a machine readable `SDPX-License-Identifier:` comment denoting its respective license(s).

View file

@ -21,7 +21,7 @@ def find_licenses(filename, relax=False):
spdx_license_identifiers = []
other_license_identifiers = []
has_copyright = False
with open(filename, 'r') as f:
with open(filename, 'r', encoding='utf-8') as f:
for line in f:
line = line.rstrip()
if 'Copyright ' in line:
@ -58,6 +58,7 @@ def main():
"""Main entry point."""
paths = sys.argv[1:] or sys.stdin.read().splitlines()
# The following paths are allowed to have no license identifier
no_comments_allowed = [
'changelogs/fragments/*.yml',
'tests/sanity/extra/*.json',
@ -68,11 +69,13 @@ def main():
'COPYING',
]
# Files of this name are allowed to be empty
empty_allowed = [
'.keep',
'__init__.py',
]
# These files are completely ignored
ignore_paths = [
'CHANGELOG.rst',
'changelogs/changelog.yaml',