Skip to content

Commit

Permalink
Expose and use new flag from ansible-community/antsibull-changelog#73.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Feb 23, 2022
1 parent 867d905 commit b3aa016
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/antsibull-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: antsibull-lint changelog-yaml (own changelog)
run: |
coverage run -p --source antsibull -m antsibull.cli.antsibull_lint changelog-yaml changelogs/changelog.yaml
coverage run -p --source antsibull -m antsibull.cli.antsibull_lint changelog-yaml changelogs/changelog.yaml --no-semantic-versioning
- name: Lint changelog fragments
run: |
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ aiocontextvars = {version = "*", python = "~3.6"}
aiofiles = "*"
aiohttp = ">= 3.0.0"
ansible-pygments = "*"
antsibull-changelog = ">= 0.10.0"
antsibull-changelog = ">= 0.14.0"
asyncio-pool = "*"
docutils = "*"
importlib-metadata = {version = "*", python = "<3.8"}
Expand Down
8 changes: 7 additions & 1 deletion src/antsibull/cli/antsibull_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ def run(args: List[str]) -> int:
metavar='/path/to/changelog.yaml',
help='path to changelogs/changelog.yaml')

changelog_yaml.add_argument('--no-semantic-versioning', action='store_true',
help='Assume that use_semantic_versioning=false in the'
' changelog config. Do not use this for Ansible'
' collections!')

collection_docs = subparsers.add_parser('collection-docs',
parents=[common],
help='Collection extra docs linter for inclusion'
Expand Down Expand Up @@ -97,7 +102,8 @@ def command_lint_changelog(args: Any) -> int:
:arg args: Parsed arguments
"""
errors = lint_changelog_yaml(args.changelog_yaml_path)
errors = lint_changelog_yaml(
args.changelog_yaml_path, no_semantic_versioning=args.no_semantic_versioning)

messages = sorted(set(f'{error[0]}:{error[1]}:{error[2]}: {error[3]}' for error in errors))

Expand Down

0 comments on commit b3aa016

Please sign in to comment.