Skip to content
Prev Previous commit
Next Next commit
changelog fix
  • Loading branch information
cperaltah committed Jun 10, 2024
commit ee2b51b85a1d666d9e21e59e79f6835d1ee6afc4
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def __init__(self, stable: Dict, current: Dict, diff: Dict, package_name: str, *
self.function_name = None
self.parameter_name = None
self.ignore = kwargs.get("ignore", None)
self.changelog = kwargs.get("changelog", False)

def __str__(self):
formatted = "\n"
Expand All @@ -128,8 +129,8 @@ def __str__(self):
return formatted

def run_checks(self) -> None:
# TODO: this should be conditional based on what folks want reported
self.run_non_breaking_change_diff_checks()
if self.changelog:
self.run_non_breaking_change_diff_checks()
self.run_breaking_change_diff_checks()
self.check_parameter_ordering() # not part of diff

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def test_compare_reports(pkg_dir: str, version: str, changelog: bool) -> None:
current = json.load(fd)
diff = jsondiff.diff(stable, current)

bc = BreakingChangesTracker(stable, current, diff, package_name)
bc = BreakingChangesTracker(stable, current, diff, package_name, changelog=changelog)
bc.run_checks()

remove_json_files(pkg_dir)
Expand Down