-
Notifications
You must be signed in to change notification settings - Fork 5.6k
[LintDiff] Skip readme.md files with no "input-file:" string #35174
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
13 changes: 13 additions & 0 deletions
13
eng/tools/lint-diff/test/fixtures/buildState/specification/no-input-file/readme.md
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Widget | ||
|
Check failure on line 1 in eng/tools/lint-diff/test/fixtures/buildState/specification/no-input-file/readme.md
|
||
|
|
||
| > see https://aka.ms/autorest | ||
| > This is the AutoRest configuration file for Widget. | ||
|
|
||
| ## Configuration | ||
|
|
||
| Required if any services under this folder are RPaaS. | ||
|
|
||
| ```yaml | ||
| openapi-type: arm | ||
| openapi-subtype: rpaas | ||
| ``` | ||
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is this true? I thought
https://aka.ms/autorestor the yaml blocks were the markers?Uh oh!
There was an error while loading. Please reload this page.
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.
Check is here in autorest:
https://github.com/Azure/autorest/blob/e57564401c49ed6eb6085d5c474dceb772f47391/packages/extensions/core/src/lib/autorest-core.ts#L153
I did add
https://aka.ms/autorestto the RPaaS readme, to make Avocado pass. Another option here, might be to removehttps://aka.ms/autorestfrom the RPaaS readme, which might make LintDiff think it's a no-op, but then we need to patch Avocado.Sample readme: https://github.com/Azure/azure-rest-api-specs/blob/547503202d2e64df5b4d73bab6d64914133aee66/specification/widget/resource-manager/readme.md?plain=1
I think the decision point, should this readme.md we need for RPaaS be an "autorest readme" or not? If yes, we make this patch to LintDiff. If no, then we remove the url, and patch Avocado. But patching Avocado might be trickier, because we do want Avocado to fail if the URL is missing from a service readme.
Since autorest fails on the file (due to no input files), maybe it's better to make it a non-autorest file?
Finally, we hope the RPaaS readme is a temporary solution that can be removed in 6 months.
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.
I tried removing the autorest marker, but LintDiff still fails, so we might as well keep the marker to avoid needing to patch avocado as well.