Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ jobs:
- run: cargo +nightly llvm-cov --workspace --branch --exclude-from-report pastey-test-suite --doctests --lcov --output-path lcov.info
env:
RUSTFLAGS: -C instrument-coverage -C llvm-args=-pgo-warn-missing-function
- name: Print coverage summary and thresould check
run: cargo +nightly llvm-cov --workspace --branch --exclude-from-report pastey-test-suite --doctests --fail-under-lines 100 --fail-under-regions 100
env:
RUSTFLAGS: -C instrument-coverage -C llvm-args=-pgo-warn-missing-function
Comment on lines 105 to +111

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we just keep the single run command instead of similar two run commands, so that in future it eliminates the chances of the commands not synced

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no i think because the above one is storing the result in lcov.info which we can not print directly on CI.

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
Expand Down
6 changes: 3 additions & 3 deletions src/attr.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use crate::error::Result;
use crate::segment::{self, Segment};
use core::iter;
use core::mem;
use core::str::FromStr;
use proc_macro::{Delimiter, Group, Spacing, Span, TokenStream, TokenTree};
use std::iter;
use std::mem;
use std::str::FromStr;

pub fn expand_attr(
attr: TokenStream,
Expand Down
4 changes: 2 additions & 2 deletions src/error.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use core::iter::FromIterator;
use proc_macro::{Delimiter, Group, Ident, Literal, Punct, Spacing, Span, TokenStream, TokenTree};
use std::iter::FromIterator;

pub type Result<T> = std::result::Result<T, Error>;
pub type Result<T> = core::result::Result<T, Error>;

pub struct Error {
begin: Span,
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ mod test_helpers;
use crate::attr::expand_attr;
use crate::error::{Error, Result};
use crate::segment::Segment;
use core::char;
use core::iter;
use core::str::FromStr;
use proc_macro::{
Delimiter, Group, Ident, LexError, Literal, Punct, Spacing, Span, TokenStream, TokenTree,
};
use std::char;
use std::iter;
use std::panic;
use std::str::FromStr;

#[proc_macro]
pub fn paste(input: TokenStream) -> TokenStream {
Expand Down
2 changes: 1 addition & 1 deletion src/segment.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::error::{Error, Result};
use core::iter::Peekable;
use proc_macro::{token_stream, Delimiter, Group, Ident, Literal, Span, TokenTree};
use std::iter::Peekable;

pub(crate) enum Segment {
String(LitStr),
Expand Down
2 changes: 1 addition & 1 deletion src/test_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
// not production code.

use crate::attr::expand_attr;
use core::str::FromStr;
use proc_macro::{Delimiter, Group, Ident, Punct, Spacing, Span, TokenStream, TokenTree};
use std::str::FromStr;

use super::{expand, parse_bracket_as_segments, pasted_to_tokens};

Expand Down
Loading