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

.sql heuristic falls back to SQL #4888

Merged
merged 2 commits into from
Sep 1, 2020
Merged

Conversation

smola
Copy link
Contributor

@smola smola commented Jun 11, 2020

Description

This is part of a series of PRs for SQL, see #4884.

Do not use the classifier strategy for .sql, fallback to SQL. The premise here is that classifying any SQL variant as SQL is less wrong than classifying it as the wrong variant.

Adds some new patterns to SQL PL and T-SQL to keep everything working, at least for current samples.

Checklist:

  • I am fixing a misclassified language
    • I have included a new sample for the misclassified language:
      • Sample source(s):
        • [URL to each sample source, if applicable]
      • Sample license(s):
    • I have included a change to the heuristics to distinguish my language from others using the same extension.

@smola smola mentioned this pull request Jun 11, 2020
4 tasks
@stale
Copy link

stale bot commented Jul 11, 2020

This pull request has been automatically marked as stale because it has not had recent activity, and will be closed if no further activity occurs. If this pull request was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions.

@stale stale bot added the Stale label Jul 11, 2020
@lildude lildude removed the Stale label Jul 13, 2020
@smola smola changed the title [WIP] .sql heuristic falls back to SQL sql heuristic falls back to SQL Jul 13, 2020
@smola smola changed the title sql heuristic falls back to SQL .sql heuristic falls back to SQL Jul 13, 2020
@smola smola marked this pull request as ready for review July 13, 2020 18:00
@lildude lildude requested review from Alhadis and pchaigno July 22, 2020 15:42
@stale
Copy link

stale bot commented Aug 22, 2020

This pull request has been automatically marked as stale because it has not had recent activity, and will be closed if no further activity occurs. If this pull request was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions.

@lildude
Copy link
Member

lildude commented Aug 30, 2020

Makes sense to me. Any thoughts @pchaigno and @Alhadis?

lib/linguist/heuristics.yml Outdated Show resolved Hide resolved
lib/linguist/heuristics.yml Outdated Show resolved Hide resolved
lib/linguist/heuristics.yml Outdated Show resolved Hide resolved
- add SQL as fallback for .sql extension.

- SQL PL: add SYSCAT.|SYSPROC.|ASSOCIATE RESULT SET|END\!

- T-SQL: [dbo]
@lildude lildude merged commit 1fa9432 into github-linguist:master Sep 1, 2020
@smola smola deleted the sql-fallback branch September 1, 2020 10:55
sambacha pushed a commit to freight-trust/linguist that referenced this pull request Sep 4, 2020
* .sql falls back to SQL

- add SQL as fallback for .sql extension.

- SQL PL: add SYSCAT.|SYSPROC.|ASSOCIATE RESULT SET|END\!

- T-SQL: [dbo]

* improve sql heuristics
ioistired added a commit to EmoteBot/EmoteCollector that referenced this pull request Dec 20, 2020
@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.

3 participants