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

Suggestion: add dml and ddl for SQL file-extensions #263

Closed
jhelberg opened this issue Jun 1, 2021 · 3 comments
Closed

Suggestion: add dml and ddl for SQL file-extensions #263

jhelberg opened this issue Jun 1, 2021 · 3 comments
Labels
enhancement New feature or request
Projects

Comments

@jhelberg
Copy link

jhelberg commented Jun 1, 2021

Data Definition files and Data Manipulation files, part of the coiding effort, can be missed when using the filename-extension .ddl and .dml.

scc as a command-line tool will miss these.

The suggestion is to add "dml" and "ddl" to the list of extensions for the SQL-language as these are quite commonly used for these types of SQL files.

This needs editing of languages.json.

@boyter
Copy link
Owner

boyter commented Jun 2, 2021

Sounds fairly reasonable. Got any examples of a common place this happens for testing? Also do you think perhaps they should have their own name?

@boyter boyter added the enhancement New feature or request label Jun 2, 2021
@jhelberg
Copy link
Author

jhelberg commented Jun 3, 2021

I dont think their own name adds value. I edited the languages.json with respect to SQL to support extensions dml,ddl,dql,sql and some keywords which add complexity. I'll try and find some examples later:

"SQL": {
   "complexitychecks": [
    "select",
    "create table",
    "create or replace view",
    "create view",
    "with",
    "join",
    "case",
    "or ",
    "and ",
    "references"
  ],
  "extensions": [
      "sql", "dml", "ddl", "dql"
  ],
  "line_comment": [
    "--"
  ],
  "multi_line": [
    [
      "/*",
      "*/"
    ]
  ],
  "quotes": [
    {
      "end": "'",
      "start": "'"
    }
  ]
},

@boyter boyter added this to Todo in 3.1.0 Jul 19, 2021
boyter added a commit that referenced this issue Dec 16, 2021
@boyter boyter moved this from Todo to Done in 3.1.0 Dec 16, 2021
@boyter
Copy link
Owner

boyter commented Dec 16, 2021

Done. Now sitting in mainline. Feel free to build from latest to get this any all of the other fixes in there.

@boyter boyter closed this as completed Dec 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
3.1.0
Done
Development

No branches or pull requests

2 participants