Change rule page links in README from GitHub to beta.ruff.rs

This commit is contained in:
Martin Fischer 2023-02-13 06:41:32 +01:00 committed by Charlie Marsh
parent c858804ed4
commit 8120d7c974
2 changed files with 47 additions and 47 deletions

View file

@ -14,7 +14,7 @@ const TABLE_END_PRAGMA: &str = "<!-- End auto-generated sections. -->";
const TOC_BEGIN_PRAGMA: &str = "<!-- Begin auto-generated table of contents. -->";
const TOC_END_PRAGMA: &str = "<!-- End auto-generated table of contents. -->";
const URL_PREFIX: &str = "https://github.com/charliermarsh/ruff/blob/main/docs/rules";
const URL_PREFIX: &str = "https://beta.ruff.rs/docs/rules";
#[derive(clap::Args)]
pub struct Args {
@ -42,7 +42,7 @@ fn generate_table(table_out: &mut String, rules: impl IntoIterator<Item = Rule>)
rule.code(),
rule.explanation()
.is_some()
.then_some(format_args!("[{rule_name}]({URL_PREFIX}/{rule_name}.md)",))
.then_some(format_args!("[{rule_name}]({URL_PREFIX}/{rule_name}/)",))
.unwrap_or(format_args!("{rule_name}")),
rule.message_formats()[0].replace('|', r"\|"),
fix_token