-
Notifications
You must be signed in to change notification settings - Fork 68
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
Adjust Vale rules to ignore links #753
Conversation
Signed-off-by: Tokesh <tokesh789@gmail.com>
Changes AnalysisCommit SHA: 9b2b62d API ChangesSummaryNO CHANGES ReportThe full API changes report is available at: https://github.com/opensearch-project/opensearch-api-specification/actions/runs/12516178491/artifacts/2365785178 API Coverage
|
Signed-off-by: Tokesh <tokesh789@gmail.com>
Signed-off-by: Tokesh <tokesh789@gmail.com>
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.
- Add tests, make sure there's one with 1 link and 2 links to https://github.com/opensearch-project/opensearch-api-specification/tree/main/tools/tests/prepare-for-vale.
- Extract
line.replace(/\[([^\]]+)\]\([^)]+\)/g, '$1')
into a method, similar toprune_vars
, maybe something descriptive likeremove_links
.
Signed-off-by: Tokesh <tokesh789@gmail.com>
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.
One more place where the transformation needs to be applied, see below.
Iterate till unit tests and linter are green (this repo uses a slightly different convention that the default TS with variable_names
).
Add an integration test to https://github.com/opensearch-project/opensearch-api-specification/blob/main/tools/tests/prepare-for-vale/fixtures.
Signed-off-by: Tokesh <tokesh789@gmail.com>
Signed-off-by: Tokesh <tokesh789@gmail.com>
Signed-off-by: Tokesh <tokesh789@gmail.com>
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.
The way this works is that we remove all text that doesn’t need to be checked.
So, you have to replace the text with an equal number of spaces otherwise the comments from the tool appear in the wrong place on GitHub.
Signed-off-by: Tokesh <tokesh789@gmail.com>
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.
Sorry to be annoying.
Signed-off-by: Tokesh <tokesh789@gmail.com>
* ignoring hyperlinks in descriptions for vale Signed-off-by: Tokesh <tokesh789@gmail.com> * hotfix linter Signed-off-by: Tokesh <tokesh789@gmail.com> * deleting not necessary sign to pass ci linter Signed-off-by: Tokesh <tokesh789@gmail.com> * added separate method and tests Signed-off-by: Tokesh <tokesh789@gmail.com> * added expect with contain Signed-off-by: Tokesh <tokesh789@gmail.com> * added tests and fixing code style Signed-off-by: Tokesh <tokesh789@gmail.com> * hotfix code style in keepdescriptions Signed-off-by: Tokesh <tokesh789@gmail.com> * chore: added spaces outside of regex match Signed-off-by: Tokesh <tokesh789@gmail.com> * chore: formatting code by linter Signed-off-by: Tokesh <tokesh789@gmail.com> --------- Signed-off-by: Tokesh <tokesh789@gmail.com>
Description
Updated the
process_file
method to remove markdown links, leaving only their text content. This ensures the tool processesdescription
andx-deprecation-message
fields cleanly, aligning with Vale style-checking requirements.Issues Resolved
[#752]
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.