• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

davidcole1340 / ext-php-rs / 15425631619

03 Jun 2025 07:02PM CUT coverage: 20.885% (-0.04%) from 20.927%
15425631619

Pull #436

github

Xenira
chore(macro)!: change rename defaults to match psr

BREAKING CHANGE: Methods and Properties are renamed to camelCase by default. Classes to PascalCase and constants to UPPER_CASE.

Refs: #189
Pull Request #436: chore(macro)!: change rename defaults to match psr

16 of 35 new or added lines in 5 files covered. (45.71%)

2 existing lines in 2 files now uncovered.

821 of 3931 relevant lines covered (20.89%)

2.31 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/crates/macros/src/helpers.rs
1
use crate::prelude::*;
2
use syn::{Attribute, Expr, Lit, Meta};
3

4
/// Takes a list of attributes and returns a list of doc comments retrieved from
5
/// the attributes.
6
pub fn get_docs(attrs: &[Attribute]) -> Result<Vec<String>> {
×
7
    attrs
×
8
        .iter()
9
        .filter(|attr| attr.path().is_ident("doc"))
×
10
        .map(|attr| {
×
11
            let Meta::NameValue(meta) = &attr.meta else {
×
12
                bail!(attr.meta => "Invalid format for `#[doc]` attribute.");
×
13
            };
14

15
            let Expr::Lit(value) = &meta.value else {
×
16
                bail!(attr.meta => "Invalid format for `#[doc]` attribute.");
×
17
            };
18

19
            let Lit::Str(doc) = &value.lit else {
×
20
                bail!(value.lit => "Invalid format for `#[doc]` attribute.");
×
21
            };
22

23
            Ok(doc.value())
×
24
        })
25
        .collect::<Result<Vec<_>>>()
26
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc