Skip to content

Commit 9a281fb

Browse files
olehermanseclaude
andcommitted
cfengine lint: Include .cf.sub files
Among all the policy files in core and masterfiles, there are several .cf.sub files. We want to include these for linting. They (should) contain valid policy, and sometimes they contain body / bundle definitions used in other policy files. Eventually, we might choose to rename all of them to .sub.cf for a more "correc" file extension. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Ole Herman Schumacher Elgesem <ole@northern.tech>
1 parent ed7ba40 commit 9a281fb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/cfengine_cli/lint.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
from cfbs.utils import find
4141
from cfengine_cli.utils import UserError
4242

43-
LINT_EXTENSIONS = (".cf", ".json")
43+
LINT_EXTENSIONS = (".cf", ".cf.sub", ".json")
4444
DEFAULT_NAMESPACE = "default"
4545
VARS_TYPES = {
4646
"data",
@@ -1012,7 +1012,7 @@ def _lint_main(
10121012
if filename.endswith(".json"):
10131013
errors += _lint_json_selector(filename)
10141014
continue
1015-
assert filename.endswith(".cf")
1015+
assert filename.endswith((".cf", ".cf.sub"))
10161016
policy_file = PolicyFile(filename, snippet)
10171017
r = _check_syntax(policy_file, state)
10181018
errors += r

0 commit comments

Comments
 (0)