Skip to content

Commit

Permalink
Run rustfilt in coverage.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Jan 20, 2024
1 parent 2b2ed03 commit 8092561
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ jobs:
- name: Install dylint-link
run: cargo install --path ./dylint-link

- name: Install cargo-llvm-cov
run: cargo install cargo-llvm-cov
- name: Install cargo-llvm-cov and rustfilt
run: |
cargo install cargo-llvm-cov
cargo install rustfilt
- name: Free up space on Ubuntu
run: |
Expand All @@ -39,11 +41,13 @@ jobs:
run: |
for X in . driver utils/linting; do
pushd "$X"
cargo llvm-cov --coverage-target-only --target x86_64-unknown-linux-gnu --workspace --exclude examples --failure-mode all --lcov --output-path coverage.lcov
TMP="$(mktemp)"
cargo llvm-cov --coverage-target-only --target x86_64-unknown-linux-gnu --workspace --exclude examples --failure-mode all --lcov --output-path "$TMP"
# smoelius: Collapse crate disambiguators. See:
# - https://github.com/rust-lang/rust/blob/5ad7a646a5df1c7e37fc4529f0f1000091ac902d/compiler/rustc_symbol_mangling/src/typeid/typeid_itanium_cxx_abi.rs#L416-L417
# - https://github.com/rust-lang/rust/blob/5ad7a646a5df1c7e37fc4529f0f1000091ac902d/compiler/rustc_symbol_mangling/src/typeid/typeid_itanium_cxx_abi.rs#L58-L64
sed -i 's/Cs[^_]*_/Cs_/g' coverage.lcov
# sed -i 's/Cs[^_]*_/Cs_/g' coverage.lcov
rustfilt -i "$TMP" -o coverage.lcov
popd
done
Expand Down

0 comments on commit 8092561

Please sign in to comment.