Closed hsnodgrass closed 3 hours ago
Attention: Patch coverage is 0%
with 1 line
in your changes missing coverage. Please review.
Project coverage is 93.19%. Comparing base (
66ed4a2
) to head (0a278ac
).
Files | Patch % | Lines |
---|---|---|
lib/puppet-lint/data.rb | 0.00% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Summary
Currently, the method
function_indexes
inlib/puppet-lint/data.rb
doesn't work and only returns empty arrays. This is because, when iterating over thetoken
array, tokens are skipped if their type does not equal:NAME
but tokens that represent function call declarations have the type:FUNCTION_NAME
and are skipped during iteration.Additional Context
Steps to reproduce:
lib/puppet-lint/plugins/<what ever your plugin name is>.rb
file, addrequire 'pry'; binding.pry
as the first line in the plugin's#check
method definition.:code
block that your plugin test will execute against has a Puppet function call in it (i.e.notice('This is the func')
)function_indexes
and see that it returns an empty array.Checklist
I didn't see any spec tests specific to this method so I didn't update any tests. Let me know if there are tests I should have updated for this.