From 64858e467d81badfe001864d3084b739cd36ab34 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 9 Jan 2023 20:41:46 +0100 Subject: [PATCH] chore: remove unversioned file classification (#523) --- ansiblelater/candidate.py | 20 ++++++-------------- ansiblelater/rules/CheckVersion.py | 2 +- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/ansiblelater/candidate.py b/ansiblelater/candidate.py index 4ae896c..2bfb3ae 100644 --- a/ansiblelater/candidate.py +++ b/ansiblelater/candidate.py @@ -245,15 +245,7 @@ class Vars(Candidate): pass -class Unversioned(Candidate): - """Object classified as unversioned file.""" - - def __init__(self, filename, settings={}, standards=[]): - super(Unversioned, self).__init__(filename, settings, standards) - self.expected_version = False - - -class InventoryVars(Unversioned): +class InventoryVars(Candidate): """Object classified as Ansible inventory vars.""" pass @@ -289,13 +281,13 @@ class ArgumentSpecs(RoleFile): pass -class Inventory(Unversioned): +class Inventory(Candidate): """Object classified as Ansible inventory file.""" pass -class Code(Unversioned): +class Code(Candidate): """Object classified as code file.""" pass @@ -307,13 +299,13 @@ class Template(RoleFile): pass -class Doc(Unversioned): +class Doc(Candidate): """Object classified as documentation file.""" pass -class Makefile(Unversioned): +class Makefile(Candidate): """Object classified as makefile.""" pass @@ -325,7 +317,7 @@ class File(RoleFile): pass -class Rolesfile(Unversioned): +class Rolesfile(Candidate): """Object classified as Ansible roles file.""" pass diff --git a/ansiblelater/rules/CheckVersion.py b/ansiblelater/rules/CheckVersion.py index 1ec80b3..1e0fa25 100644 --- a/ansiblelater/rules/CheckVersion.py +++ b/ansiblelater/rules/CheckVersion.py @@ -6,7 +6,7 @@ class CheckVersion(StandardBase): sid = "ANSIBLE9998" description = "Standards version should be pinned" helptext = "Standards version not set. Using latest standards version {version}" - types = ["playbook", "task", "handler"] + types = ["task", "handler", "rolevars", "meta", "template", "file", "playbook"] def check(self, candidate, settings): errors = []