Format! not tested

Description

The format! macro in Rust, which is a basic component, is always marked as untested. Please see line 43 in the linked repository for one example.

Repository

https://codecov.io/gh/NicolasLagaillardie/mpst_rust_github/src/4c9e07f869636334c47537ec8b0fc54a600babfa/src/role/all_to_a.rs

CI/CD

Travis

Uploader

script:
- docker run --security-opt seccomp=unconfined -v "$PWD:/volume" xd009642/tarpaulin:latest sh -c "cargo tarpaulin --out Xml"
- bash <(curl -s https://codecov.io/bash)

Commit SHAs

4c9e07f869636334c47537ec8b0fc54a600babfa

Codecov YAML

codecov:
  require_ci_to_pass: yes

coverage:
  precision: 2
  round: down
  range: "70...100"

parsers:
  gcov:
    branch_detection:
      conditional: yes
      loop: yes
      method: no
      macro: no

comment:
  layout: "reach,diff,flags,files,footer"
  behavior: default
  require_changes: no

@NicolasLagaillardie, looking at the raw reports that are uploaded to Codecov, I see that this line is not in fact covered

<class name="all_to_a" filename="src/role/all_to_a.rs" line-rate="0.9583333333333334" branch-rate="0" complexity="0">
   <methods />
   <lines>
      ...
      <line number="31" hits="2" />
      <line number="37" hits="1" />
      <line number="42" hits="1" />
      <line number="43" hits="0" /> <--
      ...

This likely is due to how you are running coverage or a configuration.

@tom thanks for the answer. Beside the Codecov YAML and the Uploader that I provided, where should I look to fix this issue?

@NicolasLagaillardie, sorry if I was unclear. This is due to the way that you are collecting Rust coverage reports. I would take a look at configuration options for whatever tool you are using. For example, if you are using grcov, I would take a look at their documentation to see if there is a configuration option or caveat.

It is the coverage tool, that is currently marking that line as uncovered, thus, that is what we are displaying on our UI.