-
Notifications
You must be signed in to change notification settings - Fork 673
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
add a circleci integration: check unclosed tags #3786
Conversation
This reverts commit 6056fb3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job! LGTM 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-2.1 in PR #3806 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-3.0 in PR #3807 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-3.1 in PR #3808 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-4.0 in PR #3809 |
result_findall = re.findall(r'<([^\n`>]*)>', content) | ||
if len(result_findall) == 0: | ||
# print("The edited markdown file " + filename + " has no tags!\n") | ||
status_code = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line has been modified since merged.
What is changed, added or deleted? (Required)
After we migrate to the new website implementation, unclosed HTML tags will cause a build failure. If we just rely on people to review and find all unclosed tags from possibly large changes, it is not realistic at all.
So I wrote a python script as a new circleci integration, which detects the unclosed tags from all changed files in a PR.
This script can:
Note this script cannot yet skip scanning tags from code blocks wrapped by
~~~ ~~~
, but our markdown documents use``` ```
style of code blocks consistently so it should be okay.Note: authors may find unexpectedly changed files in the CI check if their branches are outdated, merge master branch will help in such scenario. (from #1406)
Which TiDB version(s) do your changes apply to? (Required)
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?