Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/xbmc/addon-check
Browse files Browse the repository at this point in the history
  • Loading branch information
razzeee committed Nov 14, 2018
2 parents cef01bc + 7909a12 commit 061e0cd
Show file tree
Hide file tree
Showing 23 changed files with 910 additions and 5 deletions.
674 changes: 674 additions & 0 deletions LICENSES/GPL-3.0-only

Large diffs are not rendered by default.

67 changes: 67 additions & 0 deletions LICENSES/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
![Kodi Logo](https://github.com/xbmc/xbmc/blob/master/docs/resources/banner_slim.png)

# Kodi addon-check's licensing rules
Kodi addon-check is provided under the terms of the GNU General Public License v3.0.

The license described in the **[LICENSE](https://github.com/xbmc/addon-check/blob/master/LICENSE)** file applies to **Kodi addon-check's source as a whole**, though individual source files can have a different license which is required to be compatible with the **GPL-3.0**. Aside from that, individual files can be provided under a dual license, e.g. one of the compatible GPL variants and alternatively under a permissive license like BSD, MIT etc.

## The SPDX License Identifier
The common way of expressing the license of a source file is to add the matching boilerplate text into the top comment of the file. Due to formatting, typos etc. these "boilerplates" are hard to validate for tools which are used in the context of license compliance.

An alternative to boilerplate text is the use of Software Package Data Exchange (SPDX) license identifiers in each source file. SPDX license identifiers are machine parsable and precise shorthands for the license under which the content of the file is contributed. SPDX license identifiers are managed by the SPDX Workgroup at the Linux Foundation and have been agreed on by partners throughout the industry, tool vendors, and legal teams. For further information see **[spdx.org](https://spdx.org/)**.

Kodi addon-check requires the precise SPDX identifier in all source files. The valid identifiers used in Kodi addon-check have been retrieved from the official **[SPDX License List](https://spdx.org/licenses/)** along with the license texts.

### License Identifier Placement
The SPDX license identifier in Kodi addon-check files shall be added at the top of the file.

### License Identifier Syntax
A `<SPDX License Expression>` is either an SPDX short form license identifier found on the **[SPDX License List](https://spdx.org/licenses/)**, or the combination of two SPDX short form license identifiers separated by `WITH` when a license exception applies. When multiple licenses apply, an expression consists of keywords `AND`, `OR` separating sub-expressions. See SPDX License Expression **[usage guide](https://spdx.org/ids)** for more information.

### License Identifier Style
The SPDX license identifier is added in the form of a comment. The comment style depends on the file type. For a Python source file, the format must be

```
/*
* Copyright (C) <year> <copyright holders>
* This file is part of <software> - <URL>
*
* SPDX-License-Identifier: <SPDX License Expression>
* See <license file/license index file> for more information.
*/
```

Since most source files in Kodi addon-check are `GPL-3.0-only` licensed, the typical copyright notice will look like this:
```
/*
* Copyright (C) 2017-2018 Team Kodi
* This file is part of Kodi - https://kodi.tv
*
* SPDX-License-Identifier: GPL-3.0-only
* See LICENSES/README.md for more information.
*/
```

**NOTE:** Kodi addon-check is developed and maintained by Kodi Team members and the open-source community. We thank all of our **[contributors](https://github.com/xbmc/addon-check/graphs/contributors)**! **For the detailed history of contributions** of a given file, use `git blame <filename>` to see line-by-line credits or `git log --follow <filename>` to see the changelog across renames, rewrites and code shuffle.

### License Files
All SPDX license identifiers must have a corresponding file in the **LICENSES** subdirectory. This is required to allow tool verification (e.g. **[ScanCode toolkit](https://github.com/nexB/scancode-toolkit)**) and to have the licenses ready to read and extract right from the source, which is recommended by various FOSS organizations, e.g. the **[FSFE REUSE Initiative](https://reuse.software/)**.

The typical license file looks like this:
```
Valid-License-Identifier: GPL-3.0-only
SPDX-URL: https://spdx.org/licenses/GPL-3.0-only.html
Usage-Guide:
To use the GNU General Public License v3.0 or later put the following SPDX
tag/value pair into a comment according to the placement guidelines in
the licensing rules documentation:
SPDX-License-Identifier: GPL-3.0-only
License-Text:
Full license text
```

Kodi addon-check currently contains files and code licensed under:

* **[GPL-3.0-only](GPL-3.0-only)**: GNU General Public License v3.0 only

These licensing rules were adapted from the **[Linux kernel licensing rules](https://github.com/torvalds/linux/blob/master/Documentation/process/license-rules.rst)**.
8 changes: 8 additions & 0 deletions kodi_addon_checker/__main__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
"""
Copyright (C) 2017-2018 Team Kodi
This file is part of Kodi - kodi.tv
SPDX-License-Identifier: GPL-3.0-only
See LICENSES/README.md for more information.
"""

import argparse
import os
import sys
Expand Down
8 changes: 8 additions & 0 deletions kodi_addon_checker/check_addon.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
"""
Copyright (C) 2017-2018 Team Kodi
This file is part of Kodi - kodi.tv
SPDX-License-Identifier: GPL-3.0-only
See LICENSES/README.md for more information.
"""

import os
import xml.etree.ElementTree as ET
import requests
Expand Down
8 changes: 8 additions & 0 deletions kodi_addon_checker/check_artwork.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
"""
Copyright (C) 2017-2018 Team Kodi
This file is part of Kodi - kodi.tv
SPDX-License-Identifier: GPL-3.0-only
See LICENSES/README.md for more information.
"""

import os
import re
import logging
Expand Down
8 changes: 8 additions & 0 deletions kodi_addon_checker/check_dependencies.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
"""
Copyright (C) 2017-2018 Team Kodi
This file is part of Kodi - kodi.tv
SPDX-License-Identifier: GPL-3.0-only
See LICENSES/README.md for more information.
"""

import logging
from distutils.version import LooseVersion

Expand Down
8 changes: 8 additions & 0 deletions kodi_addon_checker/check_entrypoint.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
"""
Copyright (C) 2017-2018 Team Kodi
This file is part of Kodi - kodi.tv
SPDX-License-Identifier: GPL-3.0-only
See LICENSES/README.md for more information.
"""

import os
from radon.raw import analyze
from .report import Report
Expand Down
8 changes: 8 additions & 0 deletions kodi_addon_checker/check_files.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
"""
Copyright (C) 2017-2018 Team Kodi
This file is part of Kodi - kodi.tv
SPDX-License-Identifier: GPL-3.0-only
See LICENSES/README.md for more information.
"""

import os
import re
import json
Expand Down
8 changes: 8 additions & 0 deletions kodi_addon_checker/check_old_addon.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
"""
Copyright (C) 2017-2018 Team Kodi
This file is part of Kodi - kodi.tv
SPDX-License-Identifier: GPL-3.0-only
See LICENSES/README.md for more information.
"""

import os
import logging
import xml.etree.ElementTree as ET
Expand Down
8 changes: 8 additions & 0 deletions kodi_addon_checker/check_py3_compatibility.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
"""
Copyright (C) 2017-2018 Team Kodi
This file is part of Kodi - kodi.tv
SPDX-License-Identifier: GPL-3.0-only
See LICENSES/README.md for more information.
"""

import os

from lib2to3 import refactor
Expand Down
8 changes: 8 additions & 0 deletions kodi_addon_checker/check_repo.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
"""
Copyright (C) 2017-2018 Team Kodi
This file is part of Kodi - kodi.tv
SPDX-License-Identifier: GPL-3.0-only
See LICENSES/README.md for more information.
"""

import os
import kodi_addon_checker.check_addon as check_addon
from .record import INFORMATION, PROBLEM, Record
Expand Down
8 changes: 8 additions & 0 deletions kodi_addon_checker/check_string.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
"""
Copyright (C) 2017-2018 Team Kodi
This file is part of Kodi - kodi.tv
SPDX-License-Identifier: GPL-3.0-only
See LICENSES/README.md for more information.
"""

import os

from .report import Report
Expand Down
8 changes: 8 additions & 0 deletions kodi_addon_checker/common.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
"""
Copyright (C) 2017-2018 Team Kodi
This file is part of Kodi - kodi.tv
SPDX-License-Identifier: GPL-3.0-only
See LICENSES/README.md for more information.
"""

import importlib
import os
import pkgutil
Expand Down
8 changes: 8 additions & 0 deletions kodi_addon_checker/config.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
"""
Copyright (C) 2017-2018 Team Kodi
This file is part of Kodi - kodi.tv
SPDX-License-Identifier: GPL-3.0-only
See LICENSES/README.md for more information.
"""

import json
import os
from argparse import ArgumentParser
Expand Down
8 changes: 8 additions & 0 deletions kodi_addon_checker/handle_files.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
"""
Copyright (C) 2017-2018 Team Kodi
This file is part of Kodi - kodi.tv
SPDX-License-Identifier: GPL-3.0-only
See LICENSES/README.md for more information.
"""

import pathlib
import re
import os
Expand Down
8 changes: 8 additions & 0 deletions kodi_addon_checker/logger.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
"""
Copyright (C) 2017-2018 Team Kodi
This file is part of Kodi - kodi.tv
SPDX-License-Identifier: GPL-3.0-only
See LICENSES/README.md for more information.
"""

import logging
import logging.handlers

Expand Down
8 changes: 8 additions & 0 deletions kodi_addon_checker/plugins/array_reporter.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
"""
Copyright (C) 2017-2018 Team Kodi
This file is part of Kodi - kodi.tv
SPDX-License-Identifier: GPL-3.0-only
See LICENSES/README.md for more information.
"""

from kodi_addon_checker.report import Record
from kodi_addon_checker.reporter import Reporter, reporter

Expand Down
8 changes: 8 additions & 0 deletions kodi_addon_checker/plugins/console_reporter.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
"""
Copyright (C) 2017-2018 Team Kodi
This file is part of Kodi - kodi.tv
SPDX-License-Identifier: GPL-3.0-only
See LICENSES/README.md for more information.
"""

from kodi_addon_checker.record import INFORMATION, WARNING, PROBLEM
from kodi_addon_checker.report import Record
from kodi_addon_checker.reporter import Reporter, reporter
Expand Down
8 changes: 8 additions & 0 deletions kodi_addon_checker/record.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
"""
Copyright (C) 2018-201 Team Kodi
This file is part of Kodi - kodi.tv
SPDX-License-Identifier: GPL-3.0-only
See LICENSES/README.md for more information.
"""

PROBLEM = "ERROR"
WARNING = "WARN"
INFORMATION = "INFO"
Expand Down
8 changes: 8 additions & 0 deletions kodi_addon_checker/report.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
"""
Copyright (C) 2017-2018 Team Kodi
This file is part of Kodi - kodi.tv
SPDX-License-Identifier: GPL-3.0-only
See LICENSES/README.md for more information.
"""

from .record import Record, PROBLEM, WARNING
from .reporter import ReportManager

Expand Down
8 changes: 8 additions & 0 deletions kodi_addon_checker/reporter.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
"""
Copyright (C) 2017-2018 Team Kodi
This file is part of Kodi - kodi.tv
SPDX-License-Identifier: GPL-3.0-only
See LICENSES/README.md for more information.
"""

import inspect
from abc import ABC

Expand Down
8 changes: 8 additions & 0 deletions kodi_addon_checker/schema_validation.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
"""
Copyright (C) 2017-2018 Team Kodi
This file is part of Kodi - kodi.tv
SPDX-License-Identifier: GPL-3.0-only
See LICENSES/README.md for more information.
"""

from os.path import abspath, dirname, join, exists, split
import copy
import logging
Expand Down
14 changes: 9 additions & 5 deletions kodi_addon_checker/xml_schema/gotham_metadata.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
<xs:element name="description" type="translatedString" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="disclaimer" type="translatedString" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="platform" type="platformList" minOccurs="0" maxOccurs="1"/>
<xs:element name="language" type="nonEmptyString" minOccurs="0" maxOccurs="1"/>
<xs:element name="language" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="license" type="nonEmptyString" minOccurs="0" maxOccurs="1" />
<xs:element name="forum" type="nonEmptyString" minOccurs="0" maxOccurs="1"/>
<xs:element name="forum" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="website" type="nonEmptyString" minOccurs="0" maxOccurs="1"/>
<xs:element name="source" type="nonEmptyString" minOccurs="0" maxOccurs="1"/>
<xs:element name="email" type="nonEmptyString" minOccurs="0" maxOccurs="1"/>
<xs:element name="email" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="broken" type="nonEmptyString" minOccurs="0" maxOccurs="1"/>
<xs:element name="news" type="nonEmptyString" minOccurs="0" maxOccurs="1"/>
<xs:element name="news" type="nonEmptyStringCapped" minOccurs="0" maxOccurs="1"/>
<xs:element name="reuselanguageinvoker" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
<xs:element name="assets" type="assetsList" minOccurs="0" maxOccurs="1"/>
</xs:choice>
Expand All @@ -32,12 +32,16 @@
<xs:simpleType name="nonEmptyString">
<xs:restriction base="xs:string">
<xs:pattern value="\s*([^\s]\s*)+"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="nonEmptyStringCapped">
<xs:restriction base="nonEmptyString">
<xs:maxLength value="1500"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="translatedString">
<xs:simpleContent>
<xs:extension base="nonEmptyString">
<xs:extension base="nonEmptyStringCapped">
<xs:attribute name="lang" type="langIdentifier" use="required"/>
</xs:extension>
</xs:simpleContent>
Expand Down

3 comments on commit 061e0cd

@Rechi
Copy link
Member

@Rechi Rechi commented on 061e0cd Nov 15, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@razzeee why is upstream/master not the first parent of this merge commit?

@razzeee
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what your asking. All in all, this merge was something I didn't want to happen, but vscode did for me :/

@Rechi
Copy link
Member

@Rechi Rechi commented on 061e0cd Nov 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First parent of this commit is your commit and 2nd parent is upstream/master. Because of this you broke the first-parent history of master.
For more info search for foxtrot merge.

Please sign in to comment.