From 6a0fa0bc878a12e73f92fc46f977965640b81770 Mon Sep 17 00:00:00 2001 From: Marcin Wieczorek Date: Mon, 21 Nov 2022 11:27:29 +0100 Subject: [PATCH 1/3] Added progressive to example config --- .ansible-lint | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.ansible-lint b/.ansible-lint index 4e330706ad..11305f22e5 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -72,6 +72,11 @@ warn_list: # Offline mode disables installation of requirements.yml offline: false +# Return success if number of violations compared with previous git +# commit has not increased. This feature works only in git +# repositories. +progressive: false + # Define required Ansible's variables to satisfy syntax check extra_vars: foo: bar From 48592df85e9199e24a0e0b30f7286a09c3e38b49 Mon Sep 17 00:00:00 2001 From: Marcin Wieczorek Date: Mon, 21 Nov 2022 11:27:47 +0100 Subject: [PATCH 2/3] Changed progressive option help in cli Now it indicates that if would return success if the number of violations is not increased --- src/ansiblelint/cli.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ansiblelint/cli.py b/src/ansiblelint/cli.py index f270cecae3..1a37a6b3bd 100644 --- a/src/ansiblelint/cli.py +++ b/src/ansiblelint/cli.py @@ -284,9 +284,9 @@ def get_cli_parser() -> argparse.ArgumentParser: dest="progressive", default=False, action="store_true", - help="Return success if it detects a reduction in number" - " of violations compared with previous git commit. This " - "feature works only in git repositories.", + help="Return success if number of violations compared with" + "previous git commit has not increased. This feature works" + "only in git repositories.", ) parser.add_argument( "--project-dir", From ad0b32a49709bfef258878430966e63f2ea71b6e Mon Sep 17 00:00:00 2001 From: Marcin Wieczorek Date: Mon, 21 Nov 2022 14:02:46 +0100 Subject: [PATCH 3/3] added "progressive" to ansible-lint-config schema --- src/ansiblelint/schemas/ansible-lint-config.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ansiblelint/schemas/ansible-lint-config.json b/src/ansiblelint/schemas/ansible-lint-config.json index 5a91a95798..c007519438 100644 --- a/src/ansiblelint/schemas/ansible-lint-config.json +++ b/src/ansiblelint/schemas/ansible-lint-config.json @@ -70,6 +70,11 @@ "title": "Offline", "type": "boolean" }, + "progressive": { + "default": false, + "title": "Progressive", + "type": "boolean" + }, "parseable": { "default": true, "title": "Parseable",