diff --git a/CHANGELOG.rst b/CHANGELOG.rst index fc1c7fa..4c54070 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -11,6 +11,12 @@ Change Log .. There should always be an "Unreleased" section for changes pending release. +[0.10.2] - 2020-11-09 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* Improve logging when we fail to process a file because it has an incomplete + annotation group. + [0.10.1] - 2020-11-09 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/code_annotations/__init__.py b/code_annotations/__init__.py index 3a99389..f87461a 100644 --- a/code_annotations/__init__.py +++ b/code_annotations/__init__.py @@ -2,4 +2,4 @@ Extensible tools for parsing annotations in codebases. """ -__version__ = '0.10.1' +__version__ = '0.10.2' diff --git a/code_annotations/base.py b/code_annotations/base.py index 8ca88b2..ca6d0bc 100644 --- a/code_annotations/base.py +++ b/code_annotations/base.py @@ -480,7 +480,7 @@ def check_results(self, all_results): found_group_members = [] if current_group: - self.errors.append('File finished with an incomplete group {}!'.format(current_group)) + self.errors.append('File("{}") finished with an incomplete group {}!'.format(filename, current_group)) return not self.errors diff --git a/tests/extensions/test_extension_javascript.py b/tests/extensions/test_extension_javascript.py index fd7019d..4ced6c7 100644 --- a/tests/extensions/test_extension_javascript.py +++ b/tests/extensions/test_extension_javascript.py @@ -10,8 +10,8 @@ ('simple_success.js', EXIT_CODE_SUCCESS, 'Search found 26 annotations in'), ('group_ordering_1.js', EXIT_CODE_SUCCESS, 'Search found 3 annotations in'), ('group_ordering_2.js', EXIT_CODE_SUCCESS, 'Search found 9 annotations in'), - ('group_failures_1.js', EXIT_CODE_FAILURE, 'File finished with an incomplete group'), - ('group_failures_2.js', EXIT_CODE_FAILURE, 'File finished with an incomplete group'), + ('group_failures_1.js', EXIT_CODE_FAILURE, 'File("group_failures_1.js") finished with an incomplete group'), + ('group_failures_2.js', EXIT_CODE_FAILURE, 'File("group_failures_2.js") finished with an incomplete group'), ('group_failures_4.js', EXIT_CODE_FAILURE, '".. no_pii:" is not in the group that starts with'), ('group_failures_5.js', EXIT_CODE_FAILURE, '".. pii_types:" is already in the group that starts with'), ('choice_failures_1.js', EXIT_CODE_FAILURE, '"doesnotexist" is not a valid choice for ".. ignored:"'), diff --git a/tests/extensions/test_extension_python.py b/tests/extensions/test_extension_python.py index fc8f7a2..5b0794a 100644 --- a/tests/extensions/test_extension_python.py +++ b/tests/extensions/test_extension_python.py @@ -13,8 +13,8 @@ ('simple_success.pyt', EXIT_CODE_SUCCESS, 'Search found 20 annotations in'), ('group_ordering_1.pyt', EXIT_CODE_SUCCESS, 'Search found 3 annotations in'), ('group_ordering_2.pyt', EXIT_CODE_SUCCESS, 'Search found 9 annotations in'), - ('group_failures_1.pyt', EXIT_CODE_FAILURE, 'File finished with an incomplete group'), - ('group_failures_2.pyt', EXIT_CODE_FAILURE, 'File finished with an incomplete group'), + ('group_failures_1.pyt', EXIT_CODE_FAILURE, 'File("group_failures_1.pyt") finished with an incomplete group'), + ('group_failures_2.pyt', EXIT_CODE_FAILURE, 'File("group_failures_2.pyt") finished with an incomplete group'), ('choice_failures_1.pyt', EXIT_CODE_FAILURE, '"doesnotexist" is not a valid choice for ".. ignored:"'), ('choice_failures_2.pyt', EXIT_CODE_FAILURE, '"doesnotexist" is not a valid choice for ".. ignored:"'), ('choice_failures_3.pyt', EXIT_CODE_FAILURE, '"terrible|silly-silly" is not a valid choice for ".. ignored:"'),