elastic / elastic-package

elastic-package - Command line tool for developing Elastic Integrations
Other
49 stars 112 forks source link

Ignore commented lines in pipeline code coverage #2045

Open ebeahan opened 2 weeks ago

ebeahan commented 2 weeks ago

Interested if it's possible to remove comment lines for the code coverage scoring for ingest pipelines.

As an example, the coverage score (65.7% when submitting) of this ingest pipeline is pulled down significantly with all the comment lines counting as uncovered code.

haetamoudi commented 2 weeks ago

Empty lines are also currently marked as 'uncovered code'. It would make sense to ignore them too

Image

jsoriano commented 2 weeks ago

We'll take a look, maybe this is a regression from https://github.com/elastic/elastic-package/pull/1915.

jsoriano commented 2 weeks ago

When generating the base coverage we can probably ignore empty lines and comments depending on the format.

We do this in: