Skip to content
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 OASv2 and OASv3 languages #6116

Merged
merged 3 commits into from
Oct 20, 2022
Merged

Add OASv2 and OASv3 languages #6116

merged 3 commits into from
Oct 20, 2022

Conversation

alfred-sa
Copy link
Contributor

@alfred-sa alfred-sa commented Oct 14, 2022

Description

Add OASv2 and OASv3 disambiguation as heuristics for JSON and YAML (see #6115)

Checklist:

  • I am adding a new language.
    • The extension of the new language is used in hundreds of repositories on GitHub.com.
    • I have included a real-world usage sample for all extensions added in this PR
    • I have included a syntax highlighting grammar: (I have reused YAML and JSON grammars)
    • I have updated the heuristics to distinguish my language from others using the same extension.

Copy link
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See inline comments.

The ghes-3.4.* samples are also massive. Please replace these with much smaller samples (ProTip: it the diff collapses them, they're too big 😉).

lib/linguist/languages.yml Outdated Show resolved Hide resolved
lib/linguist/languages.yml Outdated Show resolved Hide resolved
lib/linguist/languages.yml Outdated Show resolved Hide resolved
lib/linguist/languages.yml Outdated Show resolved Hide resolved
lib/linguist/languages.yml Outdated Show resolved Hide resolved
lib/linguist/languages.yml Outdated Show resolved Hide resolved
lib/linguist/languages.yml Outdated Show resolved Hide resolved
lib/linguist/languages.yml Outdated Show resolved Hide resolved
lib/linguist/languages.yml Outdated Show resolved Hide resolved
lib/linguist/languages.yml Outdated Show resolved Hide resolved
@alfred-sa
Copy link
Contributor Author

I have implemented all requested changes.
I know that OAS is data but I didn't know it was possible to configure GitHub to show that in languages card, that is why I set it to programming. In that regards, I didn't find how to override this setting, can you please guide me?

@lildude
Copy link
Member

lildude commented Oct 18, 2022

In that regards, I didn't find how to override this setting, can you please guide me?

https://github.com/github/linguist/blob/master/docs/overrides.md#detectable

lildude
lildude previously approved these changes Oct 19, 2022
@lildude lildude dismissed their stale review October 19, 2022 09:06

Whoops. Spotted a problem

Copy link
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just noticed you've not added tests specifically for your new heuristics for matching the OAS files. Please add these.

@alfred-sa
Copy link
Contributor Author

@lildude Yes, just added them + rebase from master for f-f merging.

Thanks !

@lildude lildude merged commit deb13a4 into github-linguist:master Oct 20, 2022
@github-linguist github-linguist locked as resolved and limited conversation to collaborators Jun 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants