Skip to content
This repository was archived by the owner on Feb 16, 2024. It is now read-only.
This repository was archived by the owner on Feb 16, 2024. It is now read-only.

Not all files receive coverage report #145

@Razican

Description

@Razican

As you can see here, in both static_analysis and results modules we have some files missing.

In the first, we are missing the mod.rs file and the certificate.rs file, I guess that this last one is because we are not running the coverage with the unstable features.

On the results module, seems that the mod.rs file and the handlebars_helpers.rs files are not being tracked. The mod.rs file seems to be the same issue as in the static_analysis module, and the handlebars_helpers.rs file could be related to us not testing those helpers (and thus, no code gets compiled into tests).

On the results module, the whole report submodule is missing from the test coverage reports. There are three files in this submodule, the handlebars.rs file, that generates the context for our HTML report, the json.rs file, that generates the context for our JSON report, and the mod.rs file, that contains the trait used by both reports for easier use. This trait also enables in the future to have more submodules that can generate reports.

I think that since we are not trying to generate HTML/JSON reports in tests, they are not being tracked by the coverage report. Also, since we have no comments, no documentation tests get generated. In the case of the main.rs file, for example, the only reported line is the module-level comment.

This also brings into the table the fact that some files do not have reported lines apart from the comments, as it happens with the main.rs file. We need to add tests for all files so that they all get properly reported. Each function should have a test and a comment.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions