Skip to content

Commit

Permalink
Adoptions for Diagnostics (#75)
Browse files Browse the repository at this point in the history
* 90 percent only and ignoring Changelog

Signed-off-by: Christian Henkel <[email protected]>

* license in code is declared correctly

Signed-off-by: Christian Henkel <[email protected]>

* also here bsd-3-clause is correct

Signed-off-by: Christian Henkel <[email protected]>

---------

Signed-off-by: Christian Henkel <[email protected]>
  • Loading branch information
ct2034 authored Jan 27, 2025
1 parent 3c08378 commit a16a2aa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/ros_license_toolkit/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@
import os
from typing import Any, Dict, List, Optional

REQUIRED_PERCENTAGE_OF_LICENSE_TEXT = 95.0
REQUIRED_PERCENTAGE_OF_LICENSE_TEXT = 90.0

# files we ignore in scan results
IGNORED = [
"CHANGELOG.rst",
".scanignore",
"package.xml",
"setup.py",
Expand Down
5 changes: 3 additions & 2 deletions test/systemtest/test_separate_pkgs.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def test_pkg_one_correct_one_license_file_missing(self):
process, stdout = open_subprocess("test_pkg_one_correct_one_license_file_missing")
self.assertEqual(os.EX_DATAERR, process.returncode)
self.assertTrue(
check_output_status(stdout, WARNING, SUCCESS, WARNING, FAILURE, FAILURE, SUCCESS)
check_output_status(stdout, WARNING, SUCCESS, WARNING, FAILURE, SUCCESS, SUCCESS)
)

def test_pkg_scheme1_conform(self):
Expand Down Expand Up @@ -274,9 +274,10 @@ def test_pkg_with_multiple_licenses_one_referenced_incorrect(self):
"test_pkg_with_multiple_licenses_one_referenced_incorrect"
)
self.assertEqual(os.EX_OK, process.returncode)
print(stdout)
self.assertIn(b"WARNING Licenses ['BSD'] are not in SPDX list", stdout)
self.assertTrue(
check_output_status(stdout, WARNING, SUCCESS, WARNING, WARNING, WARNING, WARNING)
check_output_status(stdout, WARNING, SUCCESS, WARNING, WARNING, SUCCESS, WARNING)
)

def test_pkg_wrong_license_file(self):
Expand Down

0 comments on commit a16a2aa

Please sign in to comment.