refactor: Move Linter::url and Linter::name generation to proc macro

This lets us get rid of the build.rs script and results
in more developer-friendly compile error messages.
This commit is contained in:
Martin Fischer 2023-01-22 21:19:16 +01:00 committed by Charlie Marsh
parent f472fbc6d4
commit 991d3c1ef6
4 changed files with 78 additions and 90 deletions

View file

@ -84,7 +84,8 @@ mod tests {
fp.write(f"{indent}// {plugin}")
fp.write("\n")
elif line.strip() == '#[prefix = "RUF"]':
elif line.strip() == '/// Ruff-specific rules':
fp.write(f"/// [{plugin}]({url})\n")
fp.write(f'{indent}#[prefix = "{prefix_code}"]\n')
fp.write(f"{indent}{pascal_case(plugin)},")
fp.write("\n")