Skip to content

Commit

Permalink
[license_checker] Allow different license templates
Browse files Browse the repository at this point in the history
  • Loading branch information
konovalovsergey committed Apr 24, 2024
1 parent da02b35 commit 0679c0f
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 147 deletions.
35 changes: 3 additions & 32 deletions scripts/license_checker/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@ save text files with reports.
"reportFolder": "build_tools/scripts/license_checker/reports"
```

* `licensePath` specifies the path to the license template.
**For example:**

```json
"licensePath": "build_tools/scripts/license_checker/license_template.txt"
```

* `printChecking` specifies whether to output
information about which file is
being checked to the console.
Expand Down Expand Up @@ -110,36 +103,14 @@ Possible array values:
```json
"fileExtensions": [".js"]
```

* `startMultiComm` the line that starts the multiline comment.
**For example:**

```json
"startMultiComm": "/*"
```

* `endMultiComm` the line that ends the multiline comment.
You should carefully consider the formatting
of the string, all spaces are taken into account.
This affects how the license check works.
* `licensePath` specifies the path to the license template.
**For example:**

```json
"endMultiComm": " */"
"licensePath": "header.license"
```

Space at the beginning for a prettier comment.

* `prefix` the line on which each comment
line will begin, except for the
beginning and end.
**For example:**

```json
"prefix": " *"
```

Space at the beginning for a prettier comment.

* `ignoreListDir` folder paths to ignore.
**For example:**

Expand Down
49 changes: 12 additions & 37 deletions scripts/license_checker/config.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
{
"basePath": "../../../",
"reportFolder": "build_tools/scripts/license_checker/reports",
"licensePath": "build_tools/scripts/license_checker/header.license",
"printChecking": false,
"printReports": false,
"fix": ["OUTDATED"],
"configs": [
{
"dir": "core",
"fileExtensions": [".h", ".c", ".hpp", ".cpp", ".hxx", ".cxx", ".cs", ".js", ".m", ".mm", ".license"],
"startMultiComm": "/*",
"endMultiComm": " */",
"prefix": " *",
"licensePath": "header.license",
"ignoreListDir": [
"core/build",
"core/Common/cfcpp/test",
Expand Down Expand Up @@ -59,9 +56,7 @@
{
"dir": "core-ext",
"fileExtensions": [".h", ".c", ".hpp", ".cpp", ".hxx", ".cxx", ".m", ".mm"],
"startMultiComm": "/*",
"endMultiComm": " */",
"prefix": " *",
"licensePath": "header.license",
"ignoreListDir": [
"core-ext/AutoTester",
"core-ext/cell_android",
Expand All @@ -83,9 +78,7 @@
{
"dir": "sdkjs",
"fileExtensions": [".js"],
"startMultiComm": "/*",
"endMultiComm": " */",
"prefix": " *",
"licensePath": "header.license",
"ignoreListDir": [
"sdkjs/deploy",
"sdkjs/develop",
Expand All @@ -106,9 +99,7 @@
{
"dir": "sdkjs-forms",
"fileExtensions": [".js"],
"startMultiComm": "/*",
"endMultiComm": " */",
"prefix": " *",
"licensePath": "header.license",
"ignoreListDirName": [
"node_modules",
"vendor"
Expand All @@ -117,9 +108,7 @@
{
"dir": "sdkjs-ooxml",
"fileExtensions": [".js"],
"startMultiComm": "/*",
"endMultiComm": " */",
"prefix": " *",
"licensePath": "header.license",
"ignoreListDirName": [
"node_modules",
"vendor"
Expand All @@ -128,9 +117,7 @@
{
"dir": "web-apps",
"fileExtensions": [".js"],
"startMultiComm": "/*",
"endMultiComm": " */",
"prefix": " *",
"licensePath": "header.license",
"ignoreListDirName": [
"node_modules",
"vendor",
Expand All @@ -154,9 +141,7 @@
{
"dir": "web-apps-mobile",
"fileExtensions": [".js"],
"startMultiComm": "/*",
"endMultiComm": " */",
"prefix": " *",
"licensePath": "header.license",
"ignoreListDirName": [
"node_modules",
"vendor"
Expand All @@ -165,9 +150,7 @@
{
"dir": "server",
"fileExtensions": [".js"],
"startMultiComm": "/*",
"endMultiComm": " */",
"prefix": " *",
"licensePath": "header.license",
"ignoreListDir": [
"server/FileConverter/bin"
],
Expand All @@ -178,39 +161,31 @@
{
"dir": "server-lockstorage",
"fileExtensions": [".js"],
"startMultiComm": "/*",
"endMultiComm": " */",
"prefix": " *",
"licensePath": "header.license",
"ignoreListDirName": [
"node_modules"
]
},
{
"dir": "server-license",
"fileExtensions": [".js"],
"startMultiComm": "/*",
"endMultiComm": " */",
"prefix": " *",
"licensePath": "header.license",
"ignoreListDirName": [
"node_modules"
]
},
{
"dir": "server-license-key",
"fileExtensions": [".js"],
"startMultiComm": "/*",
"endMultiComm": " */",
"prefix": " *",
"licensePath": "header.license",
"ignoreListDirName": [
"node_modules"
]
},
{
"dir": "editors-ios",
"fileExtensions": [".h", ".c", ".hpp", ".cpp", ".hxx", ".cxx", ".m", ".mm"],
"startMultiComm": "/*",
"endMultiComm": " */",
"prefix": " *",
"licensePath": "header.license",
"ignoreListDirName": [
"vendor",
"Vendor",
Expand Down
59 changes: 31 additions & 28 deletions scripts/license_checker/header.license
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
(c) Copyright Ascensio System SIA 2010-2023

This program is a free software product. You can redistribute it and/or
modify it under the terms of the GNU Affero General Public License (AGPL)
version 3 as published by the Free Software Foundation. In accordance with
Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
that Ascensio System SIA expressly excludes the warranty of non-infringement
of any third-party rights.

This program is distributed WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html

You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
street, Riga, Latvia, EU, LV-1050.

The interactive user interfaces in modified source and object code versions
of the Program must display Appropriate Legal Notices, as required under
Section 5 of the GNU AGPL version 3.

Pursuant to Section 7(b) of the License you must retain the original Product
logo when distributing the program. Pursuant to Section 7(e) we decline to
grant you any rights under trademark law for use of our trademarks.

All the Product's GUI elements, including illustrations and icon sets, as
well as technical writing content are licensed under the terms of the
Creative Commons Attribution-ShareAlike 4.0 International. See the License
terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
/*
* (c) Copyright Ascensio System SIA 2010-2024
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
Loading

0 comments on commit 0679c0f

Please sign in to comment.