mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Python: Convert indentation to spaces for VS Code snippets
This commit is contained in:
84
python/.vscode/ql.code-snippets
vendored
84
python/.vscode/ql.code-snippets
vendored
@@ -1,24 +1,24 @@
|
|||||||
{
|
{
|
||||||
// Place your python workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
|
// Place your python workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
|
||||||
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
|
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
|
||||||
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
|
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
|
||||||
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
|
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
|
||||||
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
|
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
|
||||||
// Placeholders with the same ids are connected.
|
// Placeholders with the same ids are connected.
|
||||||
// Example:
|
// Example:
|
||||||
// "Print to console": {
|
// "Print to console": {
|
||||||
// "scope": "javascript,typescript",
|
// "scope": "javascript,typescript",
|
||||||
// "prefix": "log",
|
// "prefix": "log",
|
||||||
// "body": [
|
// "body": [
|
||||||
// "console.log('$1');",
|
// "console.log('$1');",
|
||||||
// "$2"
|
// "$2"
|
||||||
// ],
|
// ],
|
||||||
// "description": "Log output to console"
|
// "description": "Log output to console"
|
||||||
// }
|
// }
|
||||||
|
|
||||||
"Has relative path": {
|
"Has relative path": {
|
||||||
"scope": "ql",
|
"scope": "ql",
|
||||||
"prefix": "has relative path",
|
"prefix": "has relative path",
|
||||||
"body": [
|
"body": [
|
||||||
"exists($1.getLocation().getFile().getRelativePath())"
|
"exists($1.getLocation().getFile().getRelativePath())"
|
||||||
],
|
],
|
||||||
@@ -26,8 +26,8 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"Exists": {
|
"Exists": {
|
||||||
"scope": "ql",
|
"scope": "ql",
|
||||||
"prefix": "exists",
|
"prefix": "exists",
|
||||||
"body": [
|
"body": [
|
||||||
"exists(${1:DataFlow::Node node} |",
|
"exists(${1:DataFlow::Node node} |",
|
||||||
" $2",
|
" $2",
|
||||||
@@ -37,8 +37,8 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"Predicate": {
|
"Predicate": {
|
||||||
"scope": "ql",
|
"scope": "ql",
|
||||||
"prefix": "predicate",
|
"prefix": "predicate",
|
||||||
"body": [
|
"body": [
|
||||||
"predicate ${1:isFoo}(${2:DataFlow::Node node}) {",
|
"predicate ${1:isFoo}(${2:DataFlow::Node node}) {",
|
||||||
" ${3:any()}",
|
" ${3:any()}",
|
||||||
@@ -48,8 +48,8 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"Class": {
|
"Class": {
|
||||||
"scope": "ql",
|
"scope": "ql",
|
||||||
"prefix": "class",
|
"prefix": "class",
|
||||||
"body": [
|
"body": [
|
||||||
"class ${1:MyClass} extends ${2:DataFlow::MethodCallNode} {",
|
"class ${1:MyClass} extends ${2:DataFlow::MethodCallNode} {",
|
||||||
" $1() { ${3:getMethodName() = \"foo\"} }",
|
" $1() { ${3:getMethodName() = \"foo\"} }",
|
||||||
@@ -61,8 +61,8 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"Abstract class": {
|
"Abstract class": {
|
||||||
"scope": "ql",
|
"scope": "ql",
|
||||||
"prefix": "abstract class",
|
"prefix": "abstract class",
|
||||||
"body": [
|
"body": [
|
||||||
"abstract class ${1:AdditionalThing} extends ${2:DataFlow::Node} {",
|
"abstract class ${1:AdditionalThing} extends ${2:DataFlow::Node} {",
|
||||||
" abstract ${3:DataFlow::Node} ${4:getThing}($5);",
|
" abstract ${3:DataFlow::Node} ${4:getThing}($5);",
|
||||||
@@ -72,8 +72,8 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"Class::Range": {
|
"Class::Range": {
|
||||||
"scope": "ql",
|
"scope": "ql",
|
||||||
"prefix": "range class",
|
"prefix": "range class",
|
||||||
"body": [
|
"body": [
|
||||||
"class ${1:MyClass} extends ${2:DataFlow::Node} {",
|
"class ${1:MyClass} extends ${2:DataFlow::Node} {",
|
||||||
" $1::Range range;",
|
" $1::Range range;",
|
||||||
@@ -93,8 +93,8 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"Class::Range delegate": {
|
"Class::Range delegate": {
|
||||||
"scope": "ql",
|
"scope": "ql",
|
||||||
"prefix": "range delegate",
|
"prefix": "range delegate",
|
||||||
"body": [
|
"body": [
|
||||||
"${1:DataFlow::Node} ${2:getThing}() { result = range.$2() }"
|
"${1:DataFlow::Node} ${2:getThing}() { result = range.$2() }"
|
||||||
],
|
],
|
||||||
@@ -102,8 +102,8 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"Type tracking predicate": {
|
"Type tracking predicate": {
|
||||||
"scope": "ql",
|
"scope": "ql",
|
||||||
"prefix": "type tracking",
|
"prefix": "type tracking",
|
||||||
"body": [
|
"body": [
|
||||||
"/** Gets a reference to a ${3:thing}. */",
|
"/** Gets a reference to a ${3:thing}. */",
|
||||||
"private DataFlow::Node ${1:myType}(DataFlow::TypeTracker t) {",
|
"private DataFlow::Node ${1:myType}(DataFlow::TypeTracker t) {",
|
||||||
@@ -124,8 +124,8 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"Type tracking module": {
|
"Type tracking module": {
|
||||||
"scope": "ql",
|
"scope": "ql",
|
||||||
"prefix": "type tracking module",
|
"prefix": "type tracking module",
|
||||||
"body": [
|
"body": [
|
||||||
"// ---------------------------------------------------------------------------",
|
"// ---------------------------------------------------------------------------",
|
||||||
"// ${1:modulename}",
|
"// ${1:modulename}",
|
||||||
@@ -189,8 +189,8 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"Type tracking module member": {
|
"Type tracking module member": {
|
||||||
"scope": "ql",
|
"scope": "ql",
|
||||||
"prefix": "type tracking module member",
|
"prefix": "type tracking module member",
|
||||||
"body": [
|
"body": [
|
||||||
"/** Gets a reference to the `${1:module}.${2:member}` ${3:object/class}. */",
|
"/** Gets a reference to the `${1:module}.${2:member}` ${3:object/class}. */",
|
||||||
"private DataFlow::Node ${4:$2}(DataFlow::TypeTracker t) {",
|
"private DataFlow::Node ${4:$2}(DataFlow::TypeTracker t) {",
|
||||||
@@ -210,8 +210,8 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"Taint tracking configuration": {
|
"Taint tracking configuration": {
|
||||||
"scope": "ql",
|
"scope": "ql",
|
||||||
"prefix": "taint tracking",
|
"prefix": "taint tracking",
|
||||||
"body": [
|
"body": [
|
||||||
"/** @kind path-problem */",
|
"/** @kind path-problem */",
|
||||||
"import python",
|
"import python",
|
||||||
@@ -239,8 +239,8 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"Type tracking submodule": {
|
"Type tracking submodule": {
|
||||||
"scope": "ql",
|
"scope": "ql",
|
||||||
"prefix": "type tracking submodule",
|
"prefix": "type tracking submodule",
|
||||||
"body": [
|
"body": [
|
||||||
" // -------------------------------------------------------------------------",
|
" // -------------------------------------------------------------------------",
|
||||||
" // ${1:parent}.${2:submodule}",
|
" // ${1:parent}.${2:submodule}",
|
||||||
@@ -295,8 +295,8 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"Type tracking class": {
|
"Type tracking class": {
|
||||||
"scope": "ql",
|
"scope": "ql",
|
||||||
"prefix": "type tracking class",
|
"prefix": "type tracking class",
|
||||||
"body": [
|
"body": [
|
||||||
" /**",
|
" /**",
|
||||||
" * Provides models for the `${1:module}.${2:classname}` class",
|
" * Provides models for the `${1:module}.${2:classname}` class",
|
||||||
|
|||||||
Reference in New Issue
Block a user