Updated syntax-description.json and lint tests for new syntax elements - #220
Merged
Conversation
(cherry picked from commit 4b6e2d6)
Updated the expected output of the bundle type lint test to include the new reactor bundle type, and added a lint test exercising the reactor bundle type, the strtotime() function, and the silence attribute in body changes. Changelog: none
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #220 +/- ##
=======================================
Coverage 52.33% 52.33%
=======================================
Files 32 32
Lines 4108 4108
=======================================
Hits 2150 2150
Misses 1958 1958 🚀 New features to boost your workflow:
|
olehermanse
approved these changes
Aug 26, 2026
craigcomstock
approved these changes
Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Ole Herman · Slack thread
Before:
cfengine lintdoes not know about the newest CFEngine syntax elements: policy using thereactorbundle type is rejected with "Bundle type must be one of (agent, common, edit_line, edit_xml, monitor, server, watch)", calls to thestrtotime()function are reported as calls to an unknown function, and thesilenceattribute forbody changesis missing from the bundled syntax description.After:
cfengine lintacceptsbundle reactor,strtotime()calls, and thesilenceattribute inbody changes, and the bundle type error message now listsreactoras a valid bundle type. All test suites (unit, format, lint, shell) pass.The first commit is taken from #219 (#219), with the original authorship preserved.
How: the second commit updates the tests to match - the expected output of the bundle type lint test now includes
reactor, and a new lint test exercises thereactorbundle type, thestrtotime()function, and thesilenceattribute.