mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode e558dc6ea73a75bd69d7a0b485f0e7e4194c66bf (#6864)
This commit is contained in:
37
build/azure-pipelines/exploration-build.yml
Normal file
37
build/azure-pipelines/exploration-build.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
trigger:
|
||||
branches:
|
||||
include: ['master']
|
||||
pr:
|
||||
branches:
|
||||
include: ['master']
|
||||
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "10.15.1"
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
displayName: 'Azure Key Vault: Get Secrets'
|
||||
inputs:
|
||||
azureSubscription: 'vscode-builds-subscription'
|
||||
KeyVaultName: vscode
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
|
||||
cat << EOF > ~/.netrc
|
||||
machine github.com
|
||||
login vscode
|
||||
password $(github-distro-mixin-password)
|
||||
EOF
|
||||
|
||||
git config user.email "vscode@microsoft.com"
|
||||
git config user.name "VSCode"
|
||||
|
||||
git checkout origin/ben/electron-test
|
||||
git merge origin/master
|
||||
|
||||
# Push master branch into exploration branch
|
||||
git push origin HEAD:ben/electron-test
|
||||
|
||||
displayName: Sync & Merge Exploration
|
||||
@@ -19,18 +19,23 @@ class AbstractGlobalsRuleWalker extends Lint.RuleWalker {
|
||||
const checker = this.program.getTypeChecker();
|
||||
const symbol = checker.getSymbolAtLocation(node);
|
||||
if (symbol) {
|
||||
const valueDeclaration = symbol.valueDeclaration;
|
||||
if (valueDeclaration) {
|
||||
const parent = valueDeclaration.parent;
|
||||
if (parent) {
|
||||
const sourceFile = parent.getSourceFile();
|
||||
if (sourceFile) {
|
||||
const fileName = sourceFile.fileName;
|
||||
if (fileName && fileName.indexOf(this.getDefinitionPattern()) >= 0) {
|
||||
this.addFailureAtNode(node, `Cannot use global '${node.text}' in '${this._config.target}'`);
|
||||
const declarations = symbol.declarations;
|
||||
if (Array.isArray(declarations) && symbol.declarations.some(declaration => {
|
||||
if (declaration) {
|
||||
const parent = declaration.parent;
|
||||
if (parent) {
|
||||
const sourceFile = parent.getSourceFile();
|
||||
if (sourceFile) {
|
||||
const fileName = sourceFile.fileName;
|
||||
if (fileName && fileName.indexOf(this.getDefinitionPattern()) >= 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
})) {
|
||||
this.addFailureAtNode(node, `Cannot use global '${node.text}' in '${this._config.target}'`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,18 +30,24 @@ export abstract class AbstractGlobalsRuleWalker extends Lint.RuleWalker {
|
||||
const checker = this.program.getTypeChecker();
|
||||
const symbol = checker.getSymbolAtLocation(node);
|
||||
if (symbol) {
|
||||
const valueDeclaration = symbol.valueDeclaration;
|
||||
if (valueDeclaration) {
|
||||
const parent = valueDeclaration.parent;
|
||||
if (parent) {
|
||||
const sourceFile = parent.getSourceFile();
|
||||
if (sourceFile) {
|
||||
const fileName = sourceFile.fileName;
|
||||
if (fileName && fileName.indexOf(this.getDefinitionPattern()) >= 0) {
|
||||
this.addFailureAtNode(node, `Cannot use global '${node.text}' in '${this._config.target}'`);
|
||||
const declarations = symbol.declarations;
|
||||
if (Array.isArray(declarations) && symbol.declarations.some(declaration => {
|
||||
if (declaration) {
|
||||
const parent = declaration.parent;
|
||||
if (parent) {
|
||||
const sourceFile = parent.getSourceFile();
|
||||
if (sourceFile) {
|
||||
const fileName = sourceFile.fileName;
|
||||
if (fileName && fileName.indexOf(this.getDefinitionPattern()) >= 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
})) {
|
||||
this.addFailureAtNode(node, `Cannot use global '${node.text}' in '${this._config.target}'`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user