From 1252323e341703b06b0c7e8dc0b4f571cadb958d Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 21 Aug 2020 18:33:08 +0200 Subject: [PATCH] Make changelog tool be more strict about suffixes (#70909) (#71135) * Bump antsibull-changelog version. * Flag all dotfiles, except .keep and .gitkeep. * Enable ignoring other fragment extensions. (cherry picked from commit fbfc0f99eb2562644ae73688827cfeea2aaf1045) --- changelogs/config.yaml | 1 + test/lib/ansible_test/_data/requirements/constraints.txt | 2 +- test/lib/ansible_test/_data/sanity/code-smell/changelog.py | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/changelogs/config.yaml b/changelogs/config.yaml index 0f6a2a832d8..4c4bde19625 100644 --- a/changelogs/config.yaml +++ b/changelogs/config.yaml @@ -6,6 +6,7 @@ changes_file: changelog.yaml changes_format: combined keep_fragments: true always_refresh: true +ignore_other_fragment_extensions: true mention_ancestor: false notesdir: fragments prelude_section_name: release_summary diff --git a/test/lib/ansible_test/_data/requirements/constraints.txt b/test/lib/ansible_test/_data/requirements/constraints.txt index b02bcf76289..78dd5d0d7d6 100644 --- a/test/lib/ansible_test/_data/requirements/constraints.txt +++ b/test/lib/ansible_test/_data/requirements/constraints.txt @@ -45,7 +45,7 @@ setuptools < 37 ; python_version == '2.6' # setuptools 37 and later require pyth setuptools < 45 ; python_version == '2.7' # setuptools 45 and later require python 3.5 or later # freeze antsibull-changelog for consistent test results -antsibull-changelog == 0.3.1 +antsibull-changelog == 0.7.0 # freeze pylint and its requirements for consistent test results astroid == 2.2.5 diff --git a/test/lib/ansible_test/_data/sanity/code-smell/changelog.py b/test/lib/ansible_test/_data/sanity/code-smell/changelog.py index 60bbdfc2c60..710b10f6c08 100755 --- a/test/lib/ansible_test/_data/sanity/code-smell/changelog.py +++ b/test/lib/ansible_test/_data/sanity/code-smell/changelog.py @@ -21,6 +21,10 @@ def main(): continue if path.startswith('changelogs/fragments/.'): + if path in ('changelogs/fragments/.keep', 'changelogs/fragments/.gitkeep'): + continue + + print('%s:%d:%d: file must not be a dotfile' % (path, 0, 0)) continue ext = os.path.splitext(path)[1]