-
Notifications
You must be signed in to change notification settings - Fork 6
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
Autodetect issues #30
Comments
Hi. |
Hey latest build, linux x64, and reading from stdin. |
Auto-detection works on the file name and the first lines of the file. To do this, the prototype description must specify the appropriate regular expressions for them. If you look at proto.hrc, then there are no regular expressions for the first lines for the "database" group. |
Ah roger that. I'll come up with some regex for a few and issue a PR |
I'll roll out all the changes for now. Even the changes that remained broke the tests. In the meantime, there is no time to figure it out. |
Ah excellent, thanks! |
(FYI I did not update changelog sorry, might want to!) |
Hey I've found a few issues with autodetect, and wondering if I am doing something wrong or if there are limitations I don't understand? Primarily, many many things autodetect as 'C'.
Eg
WITH employee_ranking AS ( SELECT employee_id, last_name, RANK() OVER (ORDER BY salary DESC) as ranking FROM employee ) SELECT employee_id, last_name, FROM employee_ranking WHERE ranking <= 5 ORDER BY ranking
I'd expect to very clearly be SQL, and then
<meta property="og:description" content="One of the best ways to learn advanced SQL is by reading examples of queries. Check 25 advanced queries that will help you build your SQL skills." /> <meta property="og:type" content="article" /> <meta property="og:url" content="https://learnsql.com/blog/25-advanced-sql-query-examples/" /><meta property="article:published_time" content="2023-02-28T18:00:00+02:00"/> <meta property="article:modified_time" content="2023-02-28T18:00:00+02:00"/><meta property="og:site_name" content="LearnSQL.com" /> <meta property="article:publisher" content="https://www.facebook.com/groups/welearnsql/" /> <meta property="article:section" content="blog" /> <meta property="article:tag" content="sql" /> <meta property="article:tag" content="learn sql" /> <meta property="article:tag" content="online practice" /> <meta property="article:tag" content="advanced sql" />
is quite clearly HTML.
Both auto-detect as 'C' though. Tested with a few releases, same result. Putting at the start obviously works, but is not always how it'll be used.
Any ideas?
The text was updated successfully, but these errors were encountered: