Closed IjayAbby closed 1 month ago
What issue is this associated with?
Ah. For this one, you'll want to make a change somewhere around here:
The easiest solution (and the one I'd recommend) is skipping the self.check(...)
call if link.url == link.title
.
So when am pushing I should reverse the other files to their original state?
Yep! If you can add a test with an autolink to show that your change works as expected, that'd be great too.
Quick question: If I run npm install it should be able to set up my local environment? My test should be in this file https://github.com/ethereum/eipw/blob/93266e615fcc32fef89d703aaad1357cbe229463/eipw-lint/tests/lint_markdown_regex.rs ?
You'll need to setup Rust, and use cargo (not npm.)
See https://doc.rust-lang.org/book/ch01-00-getting-started.html
Hello @SamWilsn, I have set up my project on my local and I would love to mimic the error from the issue above but anytime I run cargo test on regex.rs file all the test are passing. Do you have any idea of where am going wrong. Rather any documentation I can use to replicate the tests?
There is no test yet for this issue, so there's nothing to fail.
A test might look something like:
#[tokio::test]
async fn excludes_autolink() {
let src = r#"---
header: value1
---
A link <https://example.com>.
"#;
let reports = Linter::<Text<String>>::default()
.clear_lints()
.deny(
"markdown-re",
Regex {
message: "boop",
mode: Mode::Excludes,
pattern: "example",
},
)
.check_slice(None, src)
.run()
.await
.unwrap()
.into_inner();
assert_eq!(
reports,
""
);
}
I haven't tried the above, so you might need to tweak it a bit. This should live in lint_markdown_regex.rs
Thank you, will consider this.
Ah. For this one, you'll want to make a change somewhere around here:
The easiest solution (and the one I'd recommend) is skipping the
self.check(...)
call iflink.url == link.title
.
Hello am trying to wrap my head around the meaning of this ast: &Ast
Am having this error after pulling the recent changes
The expected issue was fixed using the explanation below
Error
The Fix
EIP-1234
.EIP-1234
.