Skip to content

ENT-13833: Added checks for correct number of args for bundle-/body-calls#72

Merged
olehermanse merged 3 commits into
cfengine:mainfrom
SimonThalvorsen:ENT-13833
Apr 20, 2026
Merged

ENT-13833: Added checks for correct number of args for bundle-/body-calls#72
olehermanse merged 3 commits into
cfengine:mainfrom
SimonThalvorsen:ENT-13833

Conversation

@SimonThalvorsen
Copy link
Copy Markdown
Contributor

No description provided.

@SimonThalvorsen SimonThalvorsen marked this pull request as draft April 17, 2026 13:50
@SimonThalvorsen SimonThalvorsen marked this pull request as ready for review April 17, 2026 14:01
Comment thread tests/lint/013_function_call_arg_count.expected.txt Outdated
Comment thread tests/lint/013_function_call_arg_count.expected.txt Outdated
Comment thread src/cfengine_cli/lint.py Outdated
Comment thread tests/lint/014_num_args_bundle_body.expected.txt Outdated
Copy link
Copy Markdown
Member

@nickanderson nickanderson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks nicer than cf-promises today:

bundle agent main
{
      methods:
        "t" usebundle => t();
}
bundle agent t( param )
{
  defaults:
      "param" string => "DEFAULT VALUE", if_match_regex => "";

      reports: "$(param)";
}
cf-promises -cf ./test.cf 
./test.cf:5:0: error: Conflicting arity in calling bundle t, expected 1 arguments, 0 given
   error: There are syntax errors in policy files

@olehermanse olehermanse merged commit c586010 into cfengine:main Apr 20, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants