-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Keep table aligned when generating docs
- Loading branch information
Showing
1 changed file
with
7 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -204,16 +204,20 @@ def generate_docs(codemod): | |
] | ||
markdown_references = "\n".join(formatted_references) or "N/A" | ||
|
||
# A bit of a hack but keeps the table aligned | ||
spacing = " " * (len(codemod.review_guidance) - 19) | ||
spacers = "-" * (len(codemod.review_guidance) - 19) | ||
|
||
output = f"""--- | ||
title: {codemod.summary} | ||
sidebar_position: 1 | ||
--- | ||
## {codemod.id} | ||
| Importance | Review Guidance | Requires Scanning Tool | | ||
|------------|----------------------------|---------------------| | ||
| {codemod_data.importance} | {codemod.review_guidance} | {codemod_data.need_sarif} | | ||
| Importance | Review Guidance {spacing}| Requires Scanning Tool | | ||
|------------|---------------------{spacers}|------------------------| | ||
| {codemod_data.importance:10} | {codemod.review_guidance:19} | {codemod_data.need_sarif:22} | | ||
{codemod.description} | ||
If you have feedback on this codemod, [please let us know](mailto:[email protected])! | ||
|