Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lints to ensure link text for EIPs should match the EIP's number #99

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add test for repeated text in markdown-link-eip
  • Loading branch information
SamWilsn committed Aug 23, 2024
commit 0da655d6562f69d1e5e248124ec9936f86e0f55f
24 changes: 23 additions & 1 deletion eipw-lint/tests/lint_markdown_link_eip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,29 @@ header: value1
}

#[tokio::test]
async fn link_text_missing_extended_section_description_with_huphen() {
async fn link_text_extended_section_description_with_bold() {
let src = r#"---
header: value1
---
[EIP-1: eip motivation**EIP-1: eip motivation**](./eip-1.md#eip-motivation)
"#;

let reports = Linter::<Text<String>>::default()
.clear_lints()
.deny(
"markdown-link-eip",
LinkEip(r"(eip-)([^.]*)\.md(#(.+))?$".to_string()),
)
.check_slice(None, src)
.run()
.await
.unwrap()
.into_inner();
assert_ne!(reports, "");
}

#[tokio::test]
async fn link_text_missing_extended_section_description_with_hyphen() {
let src = r#"---
header: value1
---
Expand Down