As there was some confusion in #21 (unfortunately caused by a misunderstanding), I try to sketch the expected behavior as a new issue:
If the current version is not in the revision history (independent from the current release date): throw an error
The config (and command line) option fix_current_version_not_in_revision_history (feel free to choose a different name) has the default value false. When it is set to true, the converter adds the current version in the revision history if it is missing (independently whether the previous version exists) and adds a warning that the current version was not in the revision history and was added and that this might impact the revision history's integrity.
This requires the following changes:
Rename the config option --force-update-revision-history as it is not intuitive. When I read --force-update-revision-history I would expect that this option updates any revision history (independently whether valid before or invalid as e.g. A, B, C) to a valid integer versioning.
CSAF uses the terminology of quick-fixes for recommended actions if one of the tests from section 6 fails. That's why I came up with fix_current_version_not_in_revision_history. However, I'm also happy with a --force~ if it conveys that it adds only the current version if it is missing.
if fix_current_version_not_in_revision_history is True:
logging.warning('Forcing update of the revision history and adding the current version. '
'This may lead to inconsistent history.')
else:
logging.error('Current version is missing in revision history. '
'This can be fixed by using --fix_current_version_not_in_revision_history')
return
This suggestion tries to point out the intended function and might not fulfill coding standards nor be in the right place...
Obviously, the config parsing code and related code has to be adopted.
As there was some confusion in #21 (unfortunately caused by a misunderstanding), I try to sketch the expected behavior as a new issue:
fix_current_version_not_in_revision_history
(feel free to choose a different name) has the default valuefalse
. When it is set totrue
, the converter adds the current version in the revision history if it is missing (independently whether the previous version exists) and adds a warning that the current version was not in the revision history and was added and that this might impact the revision history's integrity.This requires the following changes:
--force-update-revision-history
as it is not intuitive. When I read--force-update-revision-history
I would expect that this option updates any revision history (independently whether valid before or invalid as e.g. A, B, C) to a valid integer versioning. CSAF uses the terminology ofquick-fixes
for recommended actions if one of the tests from section 6 fails. That's why I came up withfix_current_version_not_in_revision_history
. However, I'm also happy with a--force~
if it conveys that it adds only the current version if it is missing.This suggestion tries to point out the intended function and might not fulfill coding standards nor be in the right place...