Remove pre-commit hooks and move linters to CI (#2964)
* Linter rules * add list of old files * Check new files and message fixes * Run linters on travis * Fail travis fast * Remove pre-commit hooks * Remove pre-commit hooks from docs and gulp * Log git cmd used to look for updated files in PR * News file
This commit is contained in:
Родитель
efa175ca29
Коммит
cae8a13854
|
@ -13,6 +13,7 @@ npm-debug.log
|
|||
coverage/
|
||||
.vscode-test/**
|
||||
.venv*/
|
||||
precommit.hook
|
||||
pythonFiles/experimental/ptvsd/**
|
||||
debug_coverage*/**
|
||||
languageServer/**
|
||||
|
|
17
.travis.yml
17
.travis.yml
|
@ -57,14 +57,15 @@ before_install: |
|
|||
npm install -g azure-cli
|
||||
export CI_PYTHON_PATH=`which python`
|
||||
install:
|
||||
- npm ci
|
||||
- npm run clean
|
||||
- npm run vscode:prepublish
|
||||
- npx gulp hygiene-modified
|
||||
- python -m pip install --upgrade -r requirements.txt
|
||||
- python -m pip install -t ./pythonFiles/experimental/ptvsd git+https://github.com/Microsoft/ptvsd/
|
||||
- npm ci
|
||||
|
||||
script:
|
||||
- if [ $DEBUGGER_TEST == "true" ]; then
|
||||
npm run clean;
|
||||
npm run vscode:prepublish;
|
||||
npm run cover:enable;
|
||||
npm run testDebugger --silent;
|
||||
fi
|
||||
|
@ -75,8 +76,6 @@ script:
|
|||
- npm run clean:ptvsd
|
||||
- pip install -t ./pythonFiles/experimental/ptvsd ptvsd --no-cache-dir;
|
||||
- if [ $DEBUGGER_TEST_RELEASE == "true" ]; then
|
||||
npm run clean;
|
||||
npm run vscode:prepublish;
|
||||
npm run cover:enable;
|
||||
npm run testDebugger --silent;
|
||||
fi
|
||||
|
@ -85,8 +84,6 @@ script:
|
|||
bash <(curl -s https://codecov.io/bash);
|
||||
fi
|
||||
- if [ $SINGLE_WORKSPACE_TEST == "true" ]; then
|
||||
npm run clean;
|
||||
npm run vscode:prepublish;
|
||||
npm run cover:enable;
|
||||
npm run testSingleWorkspace --silent;
|
||||
fi
|
||||
|
@ -94,8 +91,6 @@ script:
|
|||
bash <(curl -s https://codecov.io/bash);
|
||||
fi
|
||||
- if [ $MULTIROOT_WORKSPACE_TEST == "true" ]; then
|
||||
npm run clean;
|
||||
npm run vscode:prepublish;
|
||||
npm run cover:enable;
|
||||
npm run testMultiWorkspace --silent;
|
||||
fi
|
||||
|
@ -103,9 +98,7 @@ script:
|
|||
bash <(curl -s https://codecov.io/bash);
|
||||
fi
|
||||
- if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" && "$PERFORMANCE_TEST" == "true" ]]; then
|
||||
yarn run clean;
|
||||
yarn run vscode:prepublish;
|
||||
yarn run testPerformance --silent;
|
||||
npm run testPerformance --silent;
|
||||
fi
|
||||
- if [ "$TRAVIS_PYTHON_VERSION" == "3.7" ]; then
|
||||
python3 -m pip install --upgrade -r news/requirements.txt;
|
||||
|
|
|
@ -32,6 +32,7 @@ yarn.lock
|
|||
languageServer/**
|
||||
languageServer.*/**
|
||||
bin/**
|
||||
build/**
|
||||
BuildOutput/**
|
||||
coverage/**
|
||||
debug_coverage*/**
|
||||
|
@ -44,6 +45,7 @@ out/pythonFiles/**
|
|||
out/src/**
|
||||
out/test/**
|
||||
out/testMultiRootWkspc/**
|
||||
precommit.hook
|
||||
pythonFiles/**/*.pyc
|
||||
requirements.txt
|
||||
scripts/**
|
||||
|
|
|
@ -145,7 +145,9 @@ From there use the ```Extension + Debugger``` launch option.
|
|||
### Coding Standards
|
||||
|
||||
Information on our coding standards can be found [here](https://github.com/Microsoft/vscode-python/blob/master/CODING_STANDARDS.md).
|
||||
We have a pre-commit hook to ensure the code committed will adhere to the above coding standards.
|
||||
We have CI tests to ensure the code committed will adhere to the above coding standards. *You can run this locally by executing the command `npx gulp precommit` or use the `precommit` Task.
|
||||
|
||||
Messages displayed to the user must ve localized using/created constants from/in the [localize.ts](https://github.com/Microsoft/vscode-python/blob/master/src/client/common/utils/localize.ts) file.
|
||||
|
||||
## Development process
|
||||
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
'use-strict';
|
||||
|
||||
var mocha = require('mocha');
|
||||
var MochaJUnitReporter = require('mocha-junit-reporter');
|
||||
module.exports = MochaVstsReporter;
|
||||
|
||||
function MochaVstsReporter(runner, options) {
|
||||
MochaJUnitReporter.call(this, runner, options);
|
||||
var INDENT_BASE = ' ';
|
||||
var indenter = '';
|
||||
var indentLevel = 0;
|
||||
var passes = 0;
|
||||
var failures = 0;
|
||||
var skipped = 0;
|
||||
|
||||
runner.on('suite', function(suite){
|
||||
if (suite.root === true){
|
||||
console.log('Begin test run.............');
|
||||
indentLevel++;
|
||||
indenter = INDENT_BASE.repeat(indentLevel);
|
||||
} else {
|
||||
console.log('%sStart "%s"', indenter, suite.title);
|
||||
indentLevel++;
|
||||
indenter = INDENT_BASE.repeat(indentLevel);
|
||||
}
|
||||
});
|
||||
|
||||
runner.on('suite end', function(suite){
|
||||
if (suite.root === true) {
|
||||
indentLevel=0;
|
||||
indenter = '';
|
||||
console.log('.............End test run.');
|
||||
} else {
|
||||
console.log('%sEnd "%s"', indenter, suite.title);
|
||||
indentLevel--;
|
||||
indenter = INDENT_BASE.repeat(indentLevel);
|
||||
// ##vso[task.setprogress]current operation
|
||||
}
|
||||
});
|
||||
|
||||
runner.on('pass', function(test){
|
||||
passes++;
|
||||
console.log('%s✓ %s (%dms)', indenter, test.title, test.duration);
|
||||
});
|
||||
|
||||
runner.on('pending', function(test){
|
||||
skipped++;
|
||||
console.log('%s- %s', indenter, test.title);
|
||||
console.log('##vso[task.logissue type=warning;sourcepath=%s;]SKIPPED TEST %s :: %s', test.file, test.parent.title, test.title);
|
||||
});
|
||||
|
||||
runner.on('fail', function(test, err){
|
||||
failures++;
|
||||
console.log('%s✖ %s -- error: %s', indenter, test.title, err.message);
|
||||
console.log('##vso[task.logissue type=error;sourcepath=%s;]FAILED %s :: %s', test.file, test.parent.title, test.title);
|
||||
});
|
||||
|
||||
runner.on('end', function(){
|
||||
console.log('SUMMARY: %d/%d passed, %d skipped', passes, passes + failures, skipped);
|
||||
});
|
||||
}
|
||||
|
||||
mocha.utils.inherits(MochaVstsReporter, MochaJUnitReporter);
|
|
@ -0,0 +1 @@
|
|||
%1\vsce package --out %2
|
|
@ -0,0 +1,13 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
'use strict';
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
exports.ExtensionRootDir = path.join(__dirname, '..');
|
||||
const jsonFileWithListOfOldFiles = path.join(__dirname, 'existingFiles.json');
|
||||
function getListOfExcludedFiles() {
|
||||
const files = JSON.parse(fs.readFileSync(jsonFileWithListOfOldFiles).toString());
|
||||
return files.map(file => path.join(exports.ExtensionRootDir, file));
|
||||
}
|
||||
exports.filesNotToCheck = getListOfExcludedFiles();
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
|
||||
export const ExtensionRootDir = path.join(__dirname, '..');
|
||||
|
||||
const jsonFileWithListOfOldFiles = path.join(__dirname, 'existingFiles.json');
|
||||
function getListOfExcludedFiles() {
|
||||
const files = JSON.parse(fs.readFileSync(jsonFileWithListOfOldFiles).toString()) as string[];
|
||||
return files.map(file => path.join(ExtensionRootDir, file));
|
||||
}
|
||||
|
||||
export const filesNotToCheck: string[] = getListOfExcludedFiles();
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"enabled": false,
|
||||
"relativeSourcePath": "../client",
|
||||
"relativeCoverageDir": "../../coverage",
|
||||
"ignorePatterns": [
|
||||
"**/node_modules/**"
|
||||
],
|
||||
"reports": [
|
||||
"text-summary",
|
||||
"json-summary",
|
||||
"json",
|
||||
"html",
|
||||
"lcov",
|
||||
"lcovonly",
|
||||
"cobertura"
|
||||
],
|
||||
"verbose": false
|
||||
}
|
|
@ -0,0 +1,582 @@
|
|||
[
|
||||
"src/client/activation/activationService.ts",
|
||||
"src/client/activation/downloadChannelRules.ts",
|
||||
"src/client/activation/downloader.ts",
|
||||
"src/client/activation/hashVerifier.ts",
|
||||
"src/client/activation/interpreterDataService.ts",
|
||||
"src/client/activation/jedi.ts",
|
||||
"src/client/activation/languageServer/languageServer.ts",
|
||||
"src/client/activation/languageServer/languageServerFolderService.ts",
|
||||
"src/client/activation/languageServer/languageServerHashes.ts",
|
||||
"src/client/activation/languageServer/languageServerPackageRepository.ts",
|
||||
"src/client/activation/languageServer/languageServerPackageService.ts",
|
||||
"src/client/activation/platformData.ts",
|
||||
"src/client/activation/progress.ts",
|
||||
"src/client/activation/serviceRegistry.ts",
|
||||
"src/client/activation/types.ts",
|
||||
"src/client/api.ts",
|
||||
"src/client/application/diagnostics/applicationDiagnostics.ts",
|
||||
"src/client/application/diagnostics/base.ts",
|
||||
"src/client/application/diagnostics/checks/envPathVariable.ts",
|
||||
"src/client/application/diagnostics/checks/invalidDebuggerType.ts",
|
||||
"src/client/application/diagnostics/checks/invalidPythonPathInDebugger.ts",
|
||||
"src/client/application/diagnostics/checks/powerShellActivation.ts",
|
||||
"src/client/application/diagnostics/checks/pythonInterpreter.ts",
|
||||
"src/client/application/diagnostics/commands/base.ts",
|
||||
"src/client/application/diagnostics/commands/execVSCCommand.ts",
|
||||
"src/client/application/diagnostics/commands/factory.ts",
|
||||
"src/client/application/diagnostics/commands/ignore.ts",
|
||||
"src/client/application/diagnostics/commands/launchBrowser.ts",
|
||||
"src/client/application/diagnostics/commands/types.ts",
|
||||
"src/client/application/diagnostics/constants.ts",
|
||||
"src/client/application/diagnostics/filter.ts",
|
||||
"src/client/application/diagnostics/promptHandler.ts",
|
||||
"src/client/application/diagnostics/serviceRegistry.ts",
|
||||
"src/client/application/diagnostics/types.ts",
|
||||
"src/client/application/serviceRegistry.ts",
|
||||
"src/client/application/types.ts",
|
||||
"src/client/common/application/applicationEnvironment.ts",
|
||||
"src/client/common/application/applicationShell.ts",
|
||||
"src/client/common/application/commandManager.ts",
|
||||
"src/client/common/application/debugService.ts",
|
||||
"src/client/common/application/documentManager.ts",
|
||||
"src/client/common/application/extensions.ts",
|
||||
"src/client/common/application/terminalManager.ts",
|
||||
"src/client/common/application/types.ts",
|
||||
"src/client/common/application/workspace.ts",
|
||||
"src/client/common/configSettingMonitor.ts",
|
||||
"src/client/common/configSettings.ts",
|
||||
"src/client/common/configuration/service.ts",
|
||||
"src/client/common/constants.ts",
|
||||
"src/client/common/contextKey.ts",
|
||||
"src/client/common/editor.ts",
|
||||
"src/client/common/envFileParser.ts",
|
||||
"src/client/common/errors/errorUtils.ts",
|
||||
"src/client/common/errors/moduleNotInstalledError.ts",
|
||||
"src/client/common/extensions.ts",
|
||||
"src/client/common/featureDeprecationManager.ts",
|
||||
"src/client/common/helpers.ts",
|
||||
"src/client/common/installer/channelManager.ts",
|
||||
"src/client/common/installer/condaInstaller.ts",
|
||||
"src/client/common/installer/moduleInstaller.ts",
|
||||
"src/client/common/installer/pipEnvInstaller.ts",
|
||||
"src/client/common/installer/pipInstaller.ts",
|
||||
"src/client/common/installer/productInstaller.ts",
|
||||
"src/client/common/installer/productNames.ts",
|
||||
"src/client/common/installer/productPath.ts",
|
||||
"src/client/common/installer/productService.ts",
|
||||
"src/client/common/installer/serviceRegistry.ts",
|
||||
"src/client/common/installer/types.ts",
|
||||
"src/client/common/logger.ts",
|
||||
"src/client/common/markdown/restTextConverter.ts",
|
||||
"src/client/common/net/browser.ts",
|
||||
"src/client/common/net/httpClient.ts",
|
||||
"src/client/common/net/socket/socketCallbackHandler.ts",
|
||||
"src/client/common/net/socket/socketServer.ts",
|
||||
"src/client/common/net/socket/SocketStream.ts",
|
||||
"src/client/common/nuget/azureBlobStoreNugetRepository.ts",
|
||||
"src/client/common/nuget/nugetRepository.ts",
|
||||
"src/client/common/nuget/nugetService.ts",
|
||||
"src/client/common/nuget/types.ts",
|
||||
"src/client/common/open.ts",
|
||||
"src/client/common/persistentState.ts",
|
||||
"src/client/common/platform/constants.ts",
|
||||
"src/client/common/platform/fileSystem.ts",
|
||||
"src/client/common/platform/osinfo.ts",
|
||||
"src/client/common/platform/pathUtils.ts",
|
||||
"src/client/common/platform/platformService.ts",
|
||||
"src/client/common/platform/registry.ts",
|
||||
"src/client/common/platform/serviceRegistry.ts",
|
||||
"src/client/common/platform/types.ts",
|
||||
"src/client/common/process/constants.ts",
|
||||
"src/client/common/process/currentProcess.ts",
|
||||
"src/client/common/process/decoder.ts",
|
||||
"src/client/common/process/proc.ts",
|
||||
"src/client/common/process/processFactory.ts",
|
||||
"src/client/common/process/pythonExecutionFactory.ts",
|
||||
"src/client/common/process/pythonProcess.ts",
|
||||
"src/client/common/process/pythonToolService.ts",
|
||||
"src/client/common/process/serviceRegistry.ts",
|
||||
"src/client/common/process/types.ts",
|
||||
"src/client/common/serviceRegistry.ts",
|
||||
"src/client/common/terminal/activator/base.ts",
|
||||
"src/client/common/terminal/activator/index.ts",
|
||||
"src/client/common/terminal/activator/powershellFailedHandler.ts",
|
||||
"src/client/common/terminal/commandPrompt.ts",
|
||||
"src/client/common/terminal/environmentActivationProviders/baseActivationProvider.ts",
|
||||
"src/client/common/terminal/environmentActivationProviders/bash.ts",
|
||||
"src/client/common/terminal/environmentActivationProviders/commandPrompt.ts",
|
||||
"src/client/common/terminal/environmentActivationProviders/condaActivationProvider.ts",
|
||||
"src/client/common/terminal/environmentActivationProviders/pyenvActivationProvider.ts",
|
||||
"src/client/common/terminal/factory.ts",
|
||||
"src/client/common/terminal/helper.ts",
|
||||
"src/client/common/terminal/service.ts",
|
||||
"src/client/common/terminal/types.ts",
|
||||
"src/client/common/types.ts",
|
||||
"src/client/common/util.ts",
|
||||
"src/client/common/utils/async.ts",
|
||||
"src/client/common/utils/decorators.ts",
|
||||
"src/client/common/utils/enum.ts",
|
||||
"src/client/common/utils/fs.ts",
|
||||
"src/client/common/utils/localize.ts",
|
||||
"src/client/common/utils/logging.ts",
|
||||
"src/client/common/utils/misc.ts",
|
||||
"src/client/common/utils/platform.ts",
|
||||
"src/client/common/utils/random.ts",
|
||||
"src/client/common/utils/stopWatch.ts",
|
||||
"src/client/common/utils/string.ts",
|
||||
"src/client/common/utils/sysTypes.ts",
|
||||
"src/client/common/utils/text.ts",
|
||||
"src/client/common/utils/version.ts",
|
||||
"src/client/common/variables/environment.ts",
|
||||
"src/client/common/variables/environmentVariablesProvider.ts",
|
||||
"src/client/common/variables/serviceRegistry.ts",
|
||||
"src/client/common/variables/systemVariables.ts",
|
||||
"src/client/common/variables/sysTypes.ts",
|
||||
"src/client/common/variables/types.ts",
|
||||
"src/client/debugger/constants.ts",
|
||||
"src/client/debugger/debugAdapter/Common/Contracts.ts",
|
||||
"src/client/debugger/debugAdapter/Common/debugStreamProvider.ts",
|
||||
"src/client/debugger/debugAdapter/Common/processServiceFactory.ts",
|
||||
"src/client/debugger/debugAdapter/Common/protocolLogger.ts",
|
||||
"src/client/debugger/debugAdapter/Common/protocolParser.ts",
|
||||
"src/client/debugger/debugAdapter/Common/protocolWriter.ts",
|
||||
"src/client/debugger/debugAdapter/Common/Utils.ts",
|
||||
"src/client/debugger/debugAdapter/DebugClients/DebugClient.ts",
|
||||
"src/client/debugger/debugAdapter/DebugClients/DebugFactory.ts",
|
||||
"src/client/debugger/debugAdapter/DebugClients/helper.ts",
|
||||
"src/client/debugger/debugAdapter/DebugClients/launcherProvider.ts",
|
||||
"src/client/debugger/debugAdapter/DebugClients/LocalDebugClient.ts",
|
||||
"src/client/debugger/debugAdapter/DebugClients/localDebugClientV2.ts",
|
||||
"src/client/debugger/debugAdapter/DebugClients/nonDebugClientV2.ts",
|
||||
"src/client/debugger/debugAdapter/DebugClients/RemoteDebugClient.ts",
|
||||
"src/client/debugger/debugAdapter/DebugServers/BaseDebugServer.ts",
|
||||
"src/client/debugger/debugAdapter/DebugServers/LocalDebugServerV2.ts",
|
||||
"src/client/debugger/debugAdapter/DebugServers/RemoteDebugServerv2.ts",
|
||||
"src/client/debugger/debugAdapter/main.ts",
|
||||
"src/client/debugger/debugAdapter/serviceRegistry.ts",
|
||||
"src/client/debugger/debugAdapter/types.ts",
|
||||
"src/client/debugger/extension/banner.ts",
|
||||
"src/client/debugger/extension/configProviders/baseProvider.ts",
|
||||
"src/client/debugger/extension/configProviders/configurationProviderUtils.ts",
|
||||
"src/client/debugger/extension/configProviders/pythonV2Provider.ts",
|
||||
"src/client/debugger/extension/configProviders/types.ts",
|
||||
"src/client/debugger/extension/hooks/childProcessAttachHandler.ts",
|
||||
"src/client/debugger/extension/hooks/childProcessAttachService.ts",
|
||||
"src/client/debugger/extension/hooks/constants.ts",
|
||||
"src/client/debugger/extension/hooks/eventHandlerDispatcher.ts",
|
||||
"src/client/debugger/extension/hooks/processTerminationHandler.ts",
|
||||
"src/client/debugger/extension/hooks/processTerminationService.ts",
|
||||
"src/client/debugger/extension/hooks/types.ts",
|
||||
"src/client/debugger/extension/serviceRegistry.ts",
|
||||
"src/client/debugger/extension/types.ts",
|
||||
"src/client/debugger/types.ts",
|
||||
"src/client/extension.ts",
|
||||
"src/client/formatters/autoPep8Formatter.ts",
|
||||
"src/client/formatters/baseFormatter.ts",
|
||||
"src/client/formatters/blackFormatter.ts",
|
||||
"src/client/formatters/dummyFormatter.ts",
|
||||
"src/client/formatters/helper.ts",
|
||||
"src/client/formatters/lineFormatter.ts",
|
||||
"src/client/formatters/serviceRegistry.ts",
|
||||
"src/client/formatters/types.ts",
|
||||
"src/client/formatters/yapfFormatter.ts",
|
||||
"src/client/interpreter/configuration/interpreterComparer.ts",
|
||||
"src/client/interpreter/configuration/interpreterSelector.ts",
|
||||
"src/client/interpreter/configuration/pythonPathUpdaterService.ts",
|
||||
"src/client/interpreter/configuration/pythonPathUpdaterServiceFactory.ts",
|
||||
"src/client/interpreter/configuration/services/globalUpdaterService.ts",
|
||||
"src/client/interpreter/configuration/services/workspaceFolderUpdaterService.ts",
|
||||
"src/client/interpreter/configuration/services/workspaceUpdaterService.ts",
|
||||
"src/client/interpreter/configuration/types.ts",
|
||||
"src/client/interpreter/contracts.ts",
|
||||
"src/client/interpreter/display/index.ts",
|
||||
"src/client/interpreter/display/shebangCodeLensProvider.ts",
|
||||
"src/client/interpreter/helpers.ts",
|
||||
"src/client/interpreter/interpreterService.ts",
|
||||
"src/client/interpreter/interpreterVersion.ts",
|
||||
"src/client/interpreter/locators/helpers.ts",
|
||||
"src/client/interpreter/locators/index.ts",
|
||||
"src/client/interpreter/locators/services/baseVirtualEnvService.ts",
|
||||
"src/client/interpreter/locators/services/cacheableLocatorService.ts",
|
||||
"src/client/interpreter/locators/services/conda.ts",
|
||||
"src/client/interpreter/locators/services/condaEnvFileService.ts",
|
||||
"src/client/interpreter/locators/services/condaEnvService.ts",
|
||||
"src/client/interpreter/locators/services/condaHelper.ts",
|
||||
"src/client/interpreter/locators/services/condaService.ts",
|
||||
"src/client/interpreter/locators/services/currentPathService.ts",
|
||||
"src/client/interpreter/locators/services/globalVirtualEnvService.ts",
|
||||
"src/client/interpreter/locators/services/KnownPathsService.ts",
|
||||
"src/client/interpreter/locators/services/pipEnvService.ts",
|
||||
"src/client/interpreter/locators/services/windowsRegistryService.ts",
|
||||
"src/client/interpreter/locators/services/workspaceVirtualEnvService.ts",
|
||||
"src/client/interpreter/serviceRegistry.ts",
|
||||
"src/client/interpreter/virtualEnvs/index.ts",
|
||||
"src/client/interpreter/virtualEnvs/types.ts",
|
||||
"src/client/ioc/container.ts",
|
||||
"src/client/ioc/index.ts",
|
||||
"src/client/ioc/serviceManager.ts",
|
||||
"src/client/ioc/types.ts",
|
||||
"src/client/jupyter/provider.ts",
|
||||
"src/client/language/braceCounter.ts",
|
||||
"src/client/language/characters.ts",
|
||||
"src/client/language/characterStream.ts",
|
||||
"src/client/language/iterableTextRange.ts",
|
||||
"src/client/language/textBuilder.ts",
|
||||
"src/client/language/textIterator.ts",
|
||||
"src/client/language/textRangeCollection.ts",
|
||||
"src/client/language/tokenizer.ts",
|
||||
"src/client/language/types.ts",
|
||||
"src/client/language/unicode.ts",
|
||||
"src/client/languageServices/jediProxyFactory.ts",
|
||||
"src/client/languageServices/languageServerSurveyBanner.ts",
|
||||
"src/client/languageServices/proposeLanguageServerBanner.ts",
|
||||
"src/client/linters/bandit.ts",
|
||||
"src/client/linters/baseLinter.ts",
|
||||
"src/client/linters/errorHandlers/baseErrorHandler.ts",
|
||||
"src/client/linters/errorHandlers/errorHandler.ts",
|
||||
"src/client/linters/errorHandlers/notInstalled.ts",
|
||||
"src/client/linters/errorHandlers/standard.ts",
|
||||
"src/client/linters/flake8.ts",
|
||||
"src/client/linters/linterCommands.ts",
|
||||
"src/client/linters/linterInfo.ts",
|
||||
"src/client/linters/linterManager.ts",
|
||||
"src/client/linters/lintingEngine.ts",
|
||||
"src/client/linters/mypy.ts",
|
||||
"src/client/linters/pep8.ts",
|
||||
"src/client/linters/prospector.ts",
|
||||
"src/client/linters/pydocstyle.ts",
|
||||
"src/client/linters/pylama.ts",
|
||||
"src/client/linters/pylint.ts",
|
||||
"src/client/linters/serviceRegistry.ts",
|
||||
"src/client/linters/types.ts",
|
||||
"src/client/providers/codeActionsProvider.ts",
|
||||
"src/client/providers/completionProvider.ts",
|
||||
"src/client/providers/completionSource.ts",
|
||||
"src/client/providers/definitionProvider.ts",
|
||||
"src/client/providers/docStringFoldingProvider.ts",
|
||||
"src/client/providers/formatProvider.ts",
|
||||
"src/client/providers/hoverProvider.ts",
|
||||
"src/client/providers/importSortProvider.ts",
|
||||
"src/client/providers/itemInfoSource.ts",
|
||||
"src/client/providers/jediProxy.ts",
|
||||
"src/client/providers/linterProvider.ts",
|
||||
"src/client/providers/objectDefinitionProvider.ts",
|
||||
"src/client/providers/providerUtilities.ts",
|
||||
"src/client/providers/referenceProvider.ts",
|
||||
"src/client/providers/renameProvider.ts",
|
||||
"src/client/providers/replProvider.ts",
|
||||
"src/client/providers/serviceRegistry.ts",
|
||||
"src/client/providers/signatureProvider.ts",
|
||||
"src/client/providers/simpleRefactorProvider.ts",
|
||||
"src/client/providers/symbolProvider.ts",
|
||||
"src/client/providers/terminalProvider.ts",
|
||||
"src/client/providers/types.ts",
|
||||
"src/client/providers/updateSparkLibraryProvider.ts",
|
||||
"src/client/refactor/contracts.ts",
|
||||
"src/client/refactor/proxy.ts",
|
||||
"src/client/telemetry/constants.ts",
|
||||
"src/client/telemetry/index.ts",
|
||||
"src/client/telemetry/types.ts",
|
||||
"src/client/telemetry/vscode-extension-telemetry.d.ts",
|
||||
"src/client/terminals/activation.ts",
|
||||
"src/client/terminals/codeExecution/codeExecutionManager.ts",
|
||||
"src/client/terminals/codeExecution/djangoContext.ts",
|
||||
"src/client/terminals/codeExecution/djangoShellCodeExecution.ts",
|
||||
"src/client/terminals/codeExecution/helper.ts",
|
||||
"src/client/terminals/codeExecution/repl.ts",
|
||||
"src/client/terminals/codeExecution/terminalCodeExecution.ts",
|
||||
"src/client/terminals/serviceRegistry.ts",
|
||||
"src/client/terminals/types.ts",
|
||||
"src/client/typeFormatters/blockFormatProvider.ts",
|
||||
"src/client/typeFormatters/codeBlockFormatProvider.ts",
|
||||
"src/client/typeFormatters/contracts.ts",
|
||||
"src/client/typeFormatters/dispatcher.ts",
|
||||
"src/client/typeFormatters/onEnterFormatter.ts",
|
||||
"src/client/unittests/codeLenses/main.ts",
|
||||
"src/client/unittests/codeLenses/testFiles.ts",
|
||||
"src/client/unittests/common/argumentsHelper.ts",
|
||||
"src/client/unittests/common/constants.ts",
|
||||
"src/client/unittests/common/debugLauncher.ts",
|
||||
"src/client/unittests/common/managers/baseTestManager.ts",
|
||||
"src/client/unittests/common/managers/testConfigurationManager.ts",
|
||||
"src/client/unittests/common/runner.ts",
|
||||
"src/client/unittests/common/services/configSettingService.ts",
|
||||
"src/client/unittests/common/services/storageService.ts",
|
||||
"src/client/unittests/common/services/testManagerService.ts",
|
||||
"src/client/unittests/common/services/testResultsService.ts",
|
||||
"src/client/unittests/common/services/workspaceTestManagerService.ts",
|
||||
"src/client/unittests/common/testUtils.ts",
|
||||
"src/client/unittests/common/testVisitors/flatteningVisitor.ts",
|
||||
"src/client/unittests/common/testVisitors/folderGenerationVisitor.ts",
|
||||
"src/client/unittests/common/testVisitors/resultResetVisitor.ts",
|
||||
"src/client/unittests/common/types.ts",
|
||||
"src/client/unittests/common/xUnitParser.ts",
|
||||
"src/client/unittests/configuration.ts",
|
||||
"src/client/unittests/configurationFactory.ts",
|
||||
"src/client/unittests/display/main.ts",
|
||||
"src/client/unittests/display/picker.ts",
|
||||
"src/client/unittests/main.ts",
|
||||
"src/client/unittests/nosetest/main.ts",
|
||||
"src/client/unittests/nosetest/runner.ts",
|
||||
"src/client/unittests/nosetest/services/argsService.ts",
|
||||
"src/client/unittests/nosetest/services/discoveryService.ts",
|
||||
"src/client/unittests/nosetest/services/parserService.ts",
|
||||
"src/client/unittests/nosetest/testConfigurationManager.ts",
|
||||
"src/client/unittests/pytest/main.ts",
|
||||
"src/client/unittests/pytest/runner.ts",
|
||||
"src/client/unittests/pytest/services/argsService.ts",
|
||||
"src/client/unittests/pytest/services/discoveryService.ts",
|
||||
"src/client/unittests/pytest/services/parserService.ts",
|
||||
"src/client/unittests/pytest/testConfigurationManager.ts",
|
||||
"src/client/unittests/serviceRegistry.ts",
|
||||
"src/client/unittests/types.ts",
|
||||
"src/client/unittests/unittest/helper.ts",
|
||||
"src/client/unittests/unittest/main.ts",
|
||||
"src/client/unittests/unittest/runner.ts",
|
||||
"src/client/unittests/unittest/services/argsService.ts",
|
||||
"src/client/unittests/unittest/services/discoveryService.ts",
|
||||
"src/client/unittests/unittest/services/parserService.ts",
|
||||
"src/client/unittests/unittest/socketServer.ts",
|
||||
"src/client/unittests/unittest/testConfigurationManager.ts",
|
||||
"src/client/workspaceSymbols/contracts.ts",
|
||||
"src/client/workspaceSymbols/generator.ts",
|
||||
"src/client/workspaceSymbols/main.ts",
|
||||
"src/client/workspaceSymbols/parser.ts",
|
||||
"src/client/workspaceSymbols/provider.ts",
|
||||
"src/server/dummy.ts",
|
||||
"src/test/aaFirstTest/aaFirstTest.test.ts",
|
||||
"src/test/activation/activationService.unit.test.ts",
|
||||
"src/test/activation/downloadChannelRules.unit.test.ts",
|
||||
"src/test/activation/downloader.unit.test.ts",
|
||||
"src/test/activation/excludeFiles.ls.test.ts",
|
||||
"src/test/activation/languageServer/languageServer.unit.test.ts",
|
||||
"src/test/activation/languageServer/languageServerFolderService.unit.test.ts",
|
||||
"src/test/activation/languageServer/languageServerPackageRepository.unit.test.ts",
|
||||
"src/test/activation/languageServer/languageServerPackageService.test.ts",
|
||||
"src/test/activation/languageServer/languageServerPackageService.unit.test.ts",
|
||||
"src/test/activation/platformData.unit.test.ts",
|
||||
"src/test/analysisEngineTest.ts",
|
||||
"src/test/application/diagnostics/applicationDiagnostics.unit.test.ts",
|
||||
"src/test/application/diagnostics/checks/envPathVariable.unit.test.ts",
|
||||
"src/test/application/diagnostics/checks/invalidPythonPathInDebugger.unit.test.ts",
|
||||
"src/test/application/diagnostics/checks/powerShellActivation.unit.test.ts",
|
||||
"src/test/application/diagnostics/checks/pythonInterpreter.unit.test.ts",
|
||||
"src/test/application/diagnostics/commands/factory.unit.test.ts",
|
||||
"src/test/application/diagnostics/commands/ignore.unit.test.ts",
|
||||
"src/test/application/diagnostics/commands/launchBrowser.unit.test.ts",
|
||||
"src/test/application/diagnostics/filter.unit.test.ts",
|
||||
"src/test/application/diagnostics/promptHandler.unit.test.ts",
|
||||
"src/test/autocomplete/base.test.ts",
|
||||
"src/test/autocomplete/pep484.test.ts",
|
||||
"src/test/autocomplete/pep526.test.ts",
|
||||
"src/test/ciConstants.ts",
|
||||
"src/test/common.ts",
|
||||
"src/test/common/configSettings.multiroot.test.ts",
|
||||
"src/test/common/configSettings.test.ts",
|
||||
"src/test/common/configSettings.unit.test.ts",
|
||||
"src/test/common/configuration/service.test.ts",
|
||||
"src/test/common/extensions.unit.test.ts",
|
||||
"src/test/common/featureDeprecationManager.unit.test.ts",
|
||||
"src/test/common/helpers.test.ts",
|
||||
"src/test/common/installer.test.ts",
|
||||
"src/test/common/installer/installer.invalidPath.unit.test.ts",
|
||||
"src/test/common/installer/installer.unit.test.ts",
|
||||
"src/test/common/installer/moduleInstaller.unit.test.ts",
|
||||
"src/test/common/installer/productPath.unit.test.ts",
|
||||
"src/test/common/localize.unit.test.ts",
|
||||
"src/test/common/misc.test.ts",
|
||||
"src/test/common/moduleInstaller.test.ts",
|
||||
"src/test/common/net/httpClient.unit.test.ts",
|
||||
"src/test/common/nuget/azureBobStoreRepository.test.ts",
|
||||
"src/test/common/nuget/nugetRepository.unit.test.ts",
|
||||
"src/test/common/nuget/nugetService.unit.test.ts",
|
||||
"src/test/common/platform/filesystem.unit.test.ts",
|
||||
"src/test/common/platform/osinfo.unit.test.ts",
|
||||
"src/test/common/platform/platformService.unit.test.ts",
|
||||
"src/test/common/process/currentProcess.test.ts",
|
||||
"src/test/common/process/decoder.test.ts",
|
||||
"src/test/common/process/execFactory.test.ts",
|
||||
"src/test/common/process/proc.exec.test.ts",
|
||||
"src/test/common/process/proc.observable.test.ts",
|
||||
"src/test/common/process/proc.unit.test.ts",
|
||||
"src/test/common/process/pythonProc.simple.multiroot.test.ts",
|
||||
"src/test/common/socketCallbackHandler.test.ts",
|
||||
"src/test/common/socketStream.test.ts",
|
||||
"src/test/common/terminals/activation.bash.unit.test.ts",
|
||||
"src/test/common/terminals/activation.commandPrompt.unit.test.ts",
|
||||
"src/test/common/terminals/activation.conda.unit.test.ts",
|
||||
"src/test/common/terminals/activation.unit.test.ts",
|
||||
"src/test/common/terminals/activator/base.unit.test.ts",
|
||||
"src/test/common/terminals/activator/index.unit.test.ts",
|
||||
"src/test/common/terminals/activator/powerShellFailedHandler.unit.test.ts",
|
||||
"src/test/common/terminals/commandPrompt.unit.test.ts",
|
||||
"src/test/common/terminals/factory.unit.test.ts",
|
||||
"src/test/common/terminals/helper.activation.unit.test.ts",
|
||||
"src/test/common/terminals/helper.unit.test.ts",
|
||||
"src/test/common/terminals/pyenvActivationProvider.unit.test.ts",
|
||||
"src/test/common/terminals/service.unit.test.ts",
|
||||
"src/test/common/utils/async.unit.test.ts",
|
||||
"src/test/common/utils/platform.unit.test.ts",
|
||||
"src/test/common/utils/string.unit.test.ts",
|
||||
"src/test/common/utils/text.unit.test.ts",
|
||||
"src/test/common/utils/version.unit.test.ts",
|
||||
"src/test/common/variables/envVarsProvider.multiroot.test.ts",
|
||||
"src/test/common/variables/envVarsService.test.ts",
|
||||
"src/test/configuration/interpreterSelector.unit.test.ts",
|
||||
"src/test/constants.ts",
|
||||
"src/test/core.ts",
|
||||
"src/test/debugger/attach.ptvsd.test.ts",
|
||||
"src/test/debugger/capabilities.test.ts",
|
||||
"src/test/debugger/common/constants.ts",
|
||||
"src/test/debugger/common/debugStreamProvider.test.ts",
|
||||
"src/test/debugger/common/protocoloLogger.test.ts",
|
||||
"src/test/debugger/common/protocolparser.test.ts",
|
||||
"src/test/debugger/common/protocolWriter.test.ts",
|
||||
"src/test/debugger/debugClient.ts",
|
||||
"src/test/debugger/envVars.test.ts",
|
||||
"src/test/debugger/extension/banner.unit.test.ts",
|
||||
"src/test/debugger/extension/configProvider/provider.attach.unit.test.ts",
|
||||
"src/test/debugger/extension/configProvider/provider.unit.test.ts",
|
||||
"src/test/debugger/extension/hooks/childProcessAttachHandler.unit.test.ts",
|
||||
"src/test/debugger/extension/hooks/childProcessAttachService.unit.test.ts",
|
||||
"src/test/debugger/extension/hooks/processTerminationHandler.unit.test.ts",
|
||||
"src/test/debugger/extension/hooks/processTerminationService.test.ts",
|
||||
"src/test/debugger/launcherScriptProvider.unit.test.ts",
|
||||
"src/test/debugger/misc.test.ts",
|
||||
"src/test/debugger/portAndHost.test.ts",
|
||||
"src/test/debugger/run.test.ts",
|
||||
"src/test/debugger/utils.ts",
|
||||
"src/test/debuggerTest.ts",
|
||||
"src/test/definitions/hover.jedi.test.ts",
|
||||
"src/test/definitions/hover.ls.test.ts",
|
||||
"src/test/definitions/navigation.test.ts",
|
||||
"src/test/definitions/parallel.jedi.test.ts",
|
||||
"src/test/definitions/parallel.ls.test.ts",
|
||||
"src/test/format/extension.dispatch.test.ts",
|
||||
"src/test/format/extension.format.test.ts",
|
||||
"src/test/format/extension.formatOnSave.test.ts",
|
||||
"src/test/format/extension.lineFormatter.test.ts",
|
||||
"src/test/format/extension.onEnterFormat.test.ts",
|
||||
"src/test/format/extension.onTypeFormat.test.ts",
|
||||
"src/test/format/extension.sort.test.ts",
|
||||
"src/test/format/format.helper.test.ts",
|
||||
"src/test/index.ts",
|
||||
"src/test/initialize.ts",
|
||||
"src/test/install/channelManager.channels.test.ts",
|
||||
"src/test/install/channelManager.messages.test.ts",
|
||||
"src/test/interpreters/condaEnvFileService.unit.test.ts",
|
||||
"src/test/interpreters/condaEnvService.unit.test.ts",
|
||||
"src/test/interpreters/condaHelper.unit.test.ts",
|
||||
"src/test/interpreters/condaService.unit.test.ts",
|
||||
"src/test/interpreters/currentPathService.unit.test.ts",
|
||||
"src/test/interpreters/display.unit.test.ts",
|
||||
"src/test/interpreters/helper.unit.test.ts",
|
||||
"src/test/interpreters/interpreterService.unit.test.ts",
|
||||
"src/test/interpreters/interpreterVersion.unit.test.ts",
|
||||
"src/test/interpreters/knownPathService.unit.test.ts",
|
||||
"src/test/interpreters/locators/helpers.unit.test.ts",
|
||||
"src/test/interpreters/locators/index.unit.test.ts",
|
||||
"src/test/interpreters/mocks.ts",
|
||||
"src/test/interpreters/pipEnvService.unit.test.ts",
|
||||
"src/test/interpreters/pythonPathUpdater.test.ts",
|
||||
"src/test/interpreters/venv.unit.test.ts",
|
||||
"src/test/interpreters/virtualEnvManager.unit.test.ts",
|
||||
"src/test/interpreters/virtualEnvs/index.unit.test.ts",
|
||||
"src/test/interpreters/windowsRegistryService.unit.test.ts",
|
||||
"src/test/language/characterStream.test.ts",
|
||||
"src/test/language/textIterator.test.ts",
|
||||
"src/test/language/textRange.test.ts",
|
||||
"src/test/language/textRangeCollection.test.ts",
|
||||
"src/test/language/tokenizer.test.ts",
|
||||
"src/test/linters/lint.args.test.ts",
|
||||
"src/test/linters/lint.commands.test.ts",
|
||||
"src/test/linters/lint.manager.test.ts",
|
||||
"src/test/linters/lint.multiroot.test.ts",
|
||||
"src/test/linters/lint.provider.test.ts",
|
||||
"src/test/linters/lint.test.ts",
|
||||
"src/test/linters/lintengine.test.ts",
|
||||
"src/test/linters/mypy.unit.test.ts",
|
||||
"src/test/linters/pylint.test.ts",
|
||||
"src/test/markdown/restTextConverter.test.ts",
|
||||
"src/test/mockClasses.ts",
|
||||
"src/test/mocks/mementos.ts",
|
||||
"src/test/mocks/moduleInstaller.ts",
|
||||
"src/test/mocks/proc.ts",
|
||||
"src/test/mocks/process.ts",
|
||||
"src/test/mocks/vsc/arrays.ts",
|
||||
"src/test/mocks/vsc/extHostedTypes.ts",
|
||||
"src/test/mocks/vsc/htmlContent.ts",
|
||||
"src/test/mocks/vsc/index.ts",
|
||||
"src/test/mocks/vsc/position.ts",
|
||||
"src/test/mocks/vsc/range.ts",
|
||||
"src/test/mocks/vsc/selection.ts",
|
||||
"src/test/mocks/vsc/strings.ts",
|
||||
"src/test/mocks/vsc/telemetryReporter.ts",
|
||||
"src/test/mocks/vsc/uri.ts",
|
||||
"src/test/multiRootTest.ts",
|
||||
"src/test/performance/load.perf.test.ts",
|
||||
"src/test/performanceTest.ts",
|
||||
"src/test/providers/codeActionsProvider.test.ts",
|
||||
"src/test/providers/completionSource.unit.test.ts",
|
||||
"src/test/providers/foldingProvider.test.ts",
|
||||
"src/test/providers/importSortProvider.unit.test.ts",
|
||||
"src/test/providers/pythonSignatureProvider.unit.test.ts",
|
||||
"src/test/providers/repl.unit.test.ts",
|
||||
"src/test/providers/shebangCodeLenseProvider.test.ts",
|
||||
"src/test/providers/symbolProvider.unit.test.ts",
|
||||
"src/test/providers/terminal.unit.test.ts",
|
||||
"src/test/pythonFiles/formatting/dummy.ts",
|
||||
"src/test/refactor/extension.refactor.extract.method.test.ts",
|
||||
"src/test/refactor/extension.refactor.extract.var.test.ts",
|
||||
"src/test/refactor/rename.test.ts",
|
||||
"src/test/serviceRegistry.ts",
|
||||
"src/test/signature/signature.jedi.test.ts",
|
||||
"src/test/signature/signature.ls.test.ts",
|
||||
"src/test/standardTest.ts",
|
||||
"src/test/stub.ts",
|
||||
"src/test/terminals/codeExecution/codeExecutionManager.unit.test.ts",
|
||||
"src/test/terminals/codeExecution/djangoShellCodeExect.unit.test.ts",
|
||||
"src/test/terminals/codeExecution/helper.test.ts",
|
||||
"src/test/terminals/codeExecution/terminalCodeExec.unit.test.ts",
|
||||
"src/test/testRunner.ts",
|
||||
"src/test/textUtils.ts",
|
||||
"src/test/unittests.ts",
|
||||
"src/test/unittests/argsService.test.ts",
|
||||
"src/test/unittests/banners/languageServerSurvey.unit.test.ts",
|
||||
"src/test/unittests/banners/proposeNewLanguageServerBanner.unit.test.ts",
|
||||
"src/test/unittests/common/argsHelper.unit.test.ts",
|
||||
"src/test/unittests/common/debugLauncher.test.ts",
|
||||
"src/test/unittests/common/managers/testConfigurationManager.unit.test.ts",
|
||||
"src/test/unittests/common/services/configSettingService.unit.test.ts",
|
||||
"src/test/unittests/configuration.unit.test.ts",
|
||||
"src/test/unittests/configurationFactory.unit.test.ts",
|
||||
"src/test/unittests/debugger.test.ts",
|
||||
"src/test/unittests/display/main.test.ts",
|
||||
"src/test/unittests/helper.ts",
|
||||
"src/test/unittests/mocks.ts",
|
||||
"src/test/unittests/nosetest/nosetest.argsService.unit.test.ts",
|
||||
"src/test/unittests/nosetest/nosetest.discovery.unit.test.ts",
|
||||
"src/test/unittests/nosetest/nosetest.disovery.test.ts",
|
||||
"src/test/unittests/nosetest/nosetest.run.test.ts",
|
||||
"src/test/unittests/nosetest/nosetest.test.ts",
|
||||
"src/test/unittests/pytest/pytest_unittest_parser_data.ts",
|
||||
"src/test/unittests/pytest/pytest.argsService.unit.test.ts",
|
||||
"src/test/unittests/pytest/pytest.discovery.test.ts",
|
||||
"src/test/unittests/pytest/pytest.discovery.unit.test.ts",
|
||||
"src/test/unittests/pytest/pytest.run.test.ts",
|
||||
"src/test/unittests/pytest/pytest.test.ts",
|
||||
"src/test/unittests/pytest/pytest.testparser.unit.test.ts",
|
||||
"src/test/unittests/rediscover.test.ts",
|
||||
"src/test/unittests/serviceRegistry.ts",
|
||||
"src/test/unittests/stoppingDiscoverAndTest.test.ts",
|
||||
"src/test/unittests/unittest/unittest.argsService.unit.test.ts",
|
||||
"src/test/unittests/unittest/unittest.discovery.test.ts",
|
||||
"src/test/unittests/unittest/unittest.discovery.unit.test.ts",
|
||||
"src/test/unittests/unittest/unittest.run.test.ts",
|
||||
"src/test/unittests/unittest/unittest.test.ts",
|
||||
"src/test/vscode-mock.ts",
|
||||
"src/test/workspaceSymbols/common.ts",
|
||||
"src/test/workspaceSymbols/multiroot.test.ts",
|
||||
"src/test/workspaceSymbols/standard.test.ts"
|
||||
]
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"outDir": ".",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"allowJs": true,
|
||||
"checkJs": true,
|
||||
"sourceMap": false,
|
||||
"rootDir": ".",
|
||||
"removeComments": false,
|
||||
"experimentalDecorators": true,
|
||||
"noImplicitThis": false,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": false,
|
||||
"strict": true
|
||||
},
|
||||
"include": [
|
||||
"**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
".vscode-test",
|
||||
"src"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
'use strict';
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const Lint = require("tslint");
|
||||
const constants_1 = require("../constants");
|
||||
class BaseRuleWalker extends Lint.RuleWalker {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.filesToIgnore = constants_1.filesNotToCheck;
|
||||
}
|
||||
sholdIgnoreCcurrentFile(node) {
|
||||
const sourceFile = node.getSourceFile();
|
||||
return sourceFile && sourceFile.fileName && this.filesToIgnore.indexOf(sourceFile.fileName) >= 0;
|
||||
}
|
||||
}
|
||||
exports.BaseRuleWalker = BaseRuleWalker;
|
|
@ -0,0 +1,16 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as Lint from 'tslint';
|
||||
import * as ts from 'typescript';
|
||||
import { filesNotToCheck } from '../constants';
|
||||
|
||||
export class BaseRuleWalker extends Lint.RuleWalker {
|
||||
private readonly filesToIgnore = filesNotToCheck;
|
||||
protected sholdIgnoreCcurrentFile(node: ts.Node) {
|
||||
const sourceFile = node.getSourceFile();
|
||||
return sourceFile && sourceFile.fileName && this.filesToIgnore.indexOf(sourceFile.fileName) >= 0;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
'use strict';
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const os_1 = require("os");
|
||||
const Lint = require("tslint");
|
||||
const baseRuleWalker_1 = require("./baseRuleWalker");
|
||||
const copyrightHeader = [
|
||||
'// Copyright (c) Microsoft Corporation. All rights reserved.',
|
||||
'// Licensed under the MIT License.',
|
||||
'',
|
||||
'\'use strict\';'
|
||||
];
|
||||
const allowedCopyrightHeaders = [copyrightHeader.join('\n'), copyrightHeader.join('\r\n')];
|
||||
const failureMessage = 'Header must contain copyright and \'use strict\' in the Python Extension';
|
||||
class NoFileWithoutCopyrightHeader extends baseRuleWalker_1.BaseRuleWalker {
|
||||
visitSourceFile(sourceFile) {
|
||||
if (!this.sholdIgnoreCcurrentFile(sourceFile)) {
|
||||
const sourceFileContents = sourceFile.getFullText();
|
||||
if (sourceFileContents) {
|
||||
this.validateHeader(sourceFile, sourceFileContents);
|
||||
}
|
||||
}
|
||||
super.visitSourceFile(sourceFile);
|
||||
}
|
||||
validateHeader(_sourceFile, sourceFileContents) {
|
||||
for (const allowedHeader of allowedCopyrightHeaders) {
|
||||
if (sourceFileContents.startsWith(allowedHeader)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
const line1 = sourceFileContents.length > 0 ? sourceFileContents.split(/\r\n|\r|\n/)[0] : '';
|
||||
const fix = Lint.Replacement.appendText(0, `${copyrightHeader.join(os_1.EOL)}\n\n`);
|
||||
this.addFailure(this.createFailure(0, line1.length, failureMessage, fix));
|
||||
}
|
||||
}
|
||||
class Rule extends Lint.Rules.AbstractRule {
|
||||
apply(sourceFile) {
|
||||
return this.applyWithWalker(new NoFileWithoutCopyrightHeader(sourceFile, this.getOptions()));
|
||||
}
|
||||
}
|
||||
Rule.FAILURE_STRING = failureMessage;
|
||||
exports.Rule = Rule;
|
|
@ -0,0 +1,49 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
'use strict';
|
||||
|
||||
import { EOL } from 'os';
|
||||
import * as Lint from 'tslint';
|
||||
import * as ts from 'typescript';
|
||||
import { BaseRuleWalker } from './baseRuleWalker';
|
||||
|
||||
const copyrightHeader = [
|
||||
'// Copyright (c) Microsoft Corporation. All rights reserved.',
|
||||
'// Licensed under the MIT License.',
|
||||
'',
|
||||
'\'use strict\';'
|
||||
];
|
||||
const allowedCopyrightHeaders = [copyrightHeader.join('\n'), copyrightHeader.join('\r\n')];
|
||||
const failureMessage = 'Header must contain copyright and \'use strict\' in the Python Extension';
|
||||
|
||||
class NoFileWithoutCopyrightHeader extends BaseRuleWalker {
|
||||
public visitSourceFile(sourceFile: ts.SourceFile) {
|
||||
if (!this.sholdIgnoreCcurrentFile(sourceFile)) {
|
||||
const sourceFileContents = sourceFile.getFullText();
|
||||
if (sourceFileContents) {
|
||||
this.validateHeader(sourceFile, sourceFileContents);
|
||||
}
|
||||
}
|
||||
|
||||
super.visitSourceFile(sourceFile);
|
||||
}
|
||||
private validateHeader(_sourceFile: ts.SourceFile, sourceFileContents: string) {
|
||||
for (const allowedHeader of allowedCopyrightHeaders) {
|
||||
if (sourceFileContents.startsWith(allowedHeader)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const line1 = sourceFileContents.length > 0 ? sourceFileContents.split(/\r\n|\r|\n/)[0] : '';
|
||||
const fix = Lint.Replacement.appendText(0, `${copyrightHeader.join(EOL)}\n\n`);
|
||||
this.addFailure(this.createFailure(0, line1.length, failureMessage, fix));
|
||||
}
|
||||
}
|
||||
|
||||
export class Rule extends Lint.Rules.AbstractRule {
|
||||
public static FAILURE_STRING = failureMessage;
|
||||
public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
|
||||
return this.applyWithWalker(new NoFileWithoutCopyrightHeader(sourceFile, this.getOptions()));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
'use strict';
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const Lint = require("tslint");
|
||||
const ts = require("typescript");
|
||||
const baseRuleWalker_1 = require("./baseRuleWalker");
|
||||
const methodNames = [
|
||||
// From IApplicationShell (vscode.window)
|
||||
'showErrorMessage', 'showInformationMessage',
|
||||
'showWarningMessage', 'setStatusBarMessage',
|
||||
// From IOutputChannel (vscode.OutputChannel)
|
||||
'appendLine', 'appendLine'
|
||||
];
|
||||
const failureMessage = 'Messages must be localized in the Python Extension';
|
||||
class NoStringLiteralsInMessages extends baseRuleWalker_1.BaseRuleWalker {
|
||||
visitCallExpression(node) {
|
||||
const prop = node.expression;
|
||||
if (!this.sholdIgnoreCcurrentFile(node) &&
|
||||
ts.isPropertyAccessExpression(node.expression) &&
|
||||
methodNames.indexOf(prop.name.text) >= 0) {
|
||||
node.arguments
|
||||
.filter(arg => ts.isStringLiteral(arg) || ts.isTemplateLiteral(arg))
|
||||
.forEach(arg => {
|
||||
this.addFailureAtNode(arg, failureMessage);
|
||||
});
|
||||
}
|
||||
super.visitCallExpression(node);
|
||||
}
|
||||
}
|
||||
class Rule extends Lint.Rules.AbstractRule {
|
||||
apply(sourceFile) {
|
||||
return this.applyWithWalker(new NoStringLiteralsInMessages(sourceFile, this.getOptions()));
|
||||
}
|
||||
}
|
||||
Rule.FAILURE_STRING = failureMessage;
|
||||
exports.Rule = Rule;
|
|
@ -0,0 +1,41 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as Lint from 'tslint';
|
||||
import * as ts from 'typescript';
|
||||
import { BaseRuleWalker } from './baseRuleWalker';
|
||||
|
||||
const methodNames = [
|
||||
// From IApplicationShell (vscode.window)
|
||||
'showErrorMessage', 'showInformationMessage',
|
||||
'showWarningMessage', 'setStatusBarMessage',
|
||||
// From IOutputChannel (vscode.OutputChannel)
|
||||
'appendLine', 'appendLine'
|
||||
];
|
||||
|
||||
const failureMessage = 'Messages must be localized in the Python Extension (use src/client/common/utils/localize.ts)';
|
||||
|
||||
class NoStringLiteralsInMessages extends BaseRuleWalker {
|
||||
protected visitCallExpression(node: ts.CallExpression): void {
|
||||
const prop = node.expression as ts.PropertyAccessExpression;
|
||||
if (!this.sholdIgnoreCcurrentFile(node) &&
|
||||
ts.isPropertyAccessExpression(node.expression) &&
|
||||
methodNames.indexOf(prop.name.text) >= 0) {
|
||||
node.arguments
|
||||
.filter(arg => ts.isStringLiteral(arg) || ts.isTemplateLiteral(arg))
|
||||
.forEach(arg => {
|
||||
this.addFailureAtNode(arg, failureMessage);
|
||||
});
|
||||
}
|
||||
super.visitCallExpression(node);
|
||||
}
|
||||
}
|
||||
|
||||
export class Rule extends Lint.Rules.AbstractRule {
|
||||
public static FAILURE_STRING = failureMessage;
|
||||
public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
|
||||
return this.applyWithWalker(new NoStringLiteralsInMessages(sourceFile, this.getOptions()));
|
||||
}
|
||||
}
|
94
gulpfile.js
94
gulpfile.js
|
@ -34,6 +34,9 @@ const nativeDependencyChecker = require('node-has-native-dependencies');
|
|||
const flat = require('flat');
|
||||
const inlinesource = require('gulp-inline-source');
|
||||
|
||||
const isCI = process.env.TRAVIS === 'true' || process.env.TF_BUILD !== undefined;
|
||||
|
||||
const noop = function () { };
|
||||
/**
|
||||
* Hygiene works by creating cascading subsets of all our files and
|
||||
* passing them through a sequence of checks. Here are the current subsets,
|
||||
|
@ -79,13 +82,15 @@ const copyrightHeader = [
|
|||
];
|
||||
const copyrightHeaders = [copyrightHeader.join('\n'), copyrightHeader.join('\r\n')];
|
||||
|
||||
gulp.task('hygiene-modified', () => gulp.series('compile', run({ mode: 'changes' })));
|
||||
gulp.task('precommit', (done) => run({ exitOnError: true, mode: 'staged' }, done));
|
||||
|
||||
gulp.task('hygiene-watch', () => gulp.watch(tsFilter, debounce(() => run({ mode: 'changes', skipFormatCheck: true, skipIndentationCheck: true, skipCopyrightCheck: true }), 100)));
|
||||
|
||||
gulp.task('hygiene', () => run({ mode: 'all', skipFormatCheck: true, skipIndentationCheck: true }));
|
||||
gulp.task('hygiene', (done) => run({ mode: 'all', skipFormatCheck: true, skipIndentationCheck: true }, done));
|
||||
|
||||
gulp.task('compile', () => run({ mode: 'compile', skipFormatCheck: true, skipIndentationCheck: true, skipLinter: true }));
|
||||
gulp.task('compile', (done) => run({ mode: 'compile', skipFormatCheck: true, skipIndentationCheck: true, skipLinter: true }, done));
|
||||
|
||||
gulp.task('hygiene-modified', gulp.series('compile', (done) => run({ mode: 'changes' }, done)));
|
||||
|
||||
gulp.task('watch', gulp.parallel('hygiene-modified', 'hygiene-watch'));
|
||||
|
||||
|
@ -94,7 +99,7 @@ gulp.task('watchProblems', gulp.parallel('hygiene-modified', 'hygiene-watch'));
|
|||
|
||||
gulp.task('debugger-coverage', buildDebugAdapterCoverage);
|
||||
|
||||
gulp.task('hygiene-all', () => run({ mode: 'all' }));
|
||||
gulp.task('hygiene-all', (done) => run({ mode: 'all' }, done));
|
||||
|
||||
gulp.task('cover:clean', () => del(['coverage', 'debug_coverage*']));
|
||||
|
||||
|
@ -112,7 +117,7 @@ gulp.task('checkNativeDependencies', (done) => {
|
|||
});
|
||||
|
||||
gulp.task('cover:enable', () => {
|
||||
return gulp.src("./coverconfig.json")
|
||||
return gulp.src("./build/coverconfig.json")
|
||||
.pipe(jeditor((json) => {
|
||||
json.enabled = true;
|
||||
return json;
|
||||
|
@ -121,7 +126,7 @@ gulp.task('cover:enable', () => {
|
|||
});
|
||||
|
||||
gulp.task('cover:disable', () => {
|
||||
return gulp.src("./coverconfig.json")
|
||||
return gulp.src("./build/coverconfig.json")
|
||||
.pipe(jeditor((json) => {
|
||||
json.enabled = false;
|
||||
return json;
|
||||
|
@ -135,8 +140,8 @@ gulp.task('cover:disable', () => {
|
|||
*/
|
||||
gulp.task('inlinesource', () => {
|
||||
return gulp.src('./coverage/lcov-report/*.html')
|
||||
.pipe(inlinesource({attribute: false}))
|
||||
.pipe(gulp.dest('./coverage/lcov-report-inline'));
|
||||
.pipe(inlinesource({ attribute: false }))
|
||||
.pipe(gulp.dest('./coverage/lcov-report-inline'));
|
||||
});
|
||||
|
||||
function hasNativeDependencies() {
|
||||
|
@ -214,15 +219,15 @@ let reRunCompilation = false;
|
|||
* @param {hygieneOptions} options
|
||||
* @returns {NodeJS.ReadWriteStream}
|
||||
*/
|
||||
const hygiene = (options) => {
|
||||
const hygiene = (options, done) => {
|
||||
if (compilationInProgress) {
|
||||
reRunCompilation = true;
|
||||
return;
|
||||
return done();
|
||||
}
|
||||
const fileListToProcess = options.mode === 'compile' ? undefined : getFileListToProcess(options);
|
||||
if (Array.isArray(fileListToProcess) && fileListToProcess !== all
|
||||
&& fileListToProcess.filter(item => item.endsWith('.ts')).length === 0) {
|
||||
return;
|
||||
return done();
|
||||
}
|
||||
|
||||
const started = new Date().getTime();
|
||||
|
@ -230,7 +235,6 @@ const hygiene = (options) => {
|
|||
options = options || {};
|
||||
let errorCount = 0;
|
||||
const addedFiles = options.skipCopyrightCheck ? [] : getAddedFilesSync();
|
||||
console.log(colors.blue('Hygiene started.'));
|
||||
const copyrights = es.through(function (file) {
|
||||
if (addedFiles.indexOf(file.path) !== -1) {
|
||||
const contents = file.contents.toString('utf8');
|
||||
|
@ -431,9 +435,13 @@ const hygiene = (options) => {
|
|||
hygiene(options);
|
||||
}, 10);
|
||||
}
|
||||
done();
|
||||
this.emit('end');
|
||||
}))
|
||||
.on('error', exitHandler.bind(this, options));
|
||||
.on('error', ex => {
|
||||
exitHandler(options, ex);
|
||||
done();
|
||||
});
|
||||
|
||||
return result;
|
||||
};
|
||||
|
@ -471,14 +479,16 @@ function exitHandler(options, ex) {
|
|||
* Run the linters.
|
||||
* @param {runOptions} options
|
||||
*/
|
||||
function run(options) {
|
||||
function run(options, done) {
|
||||
done = done || noop;
|
||||
options = options ? options : {};
|
||||
options.exitOnError = typeof options.exitOnError === 'undefined' ? isCI : options.exitOnError;
|
||||
process.once('unhandledRejection', (reason, p) => {
|
||||
console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
|
||||
exitHandler(options);
|
||||
});
|
||||
|
||||
return hygiene(options);
|
||||
hygiene(options, done);
|
||||
}
|
||||
function getStagedFilesSync() {
|
||||
const out = cp.execSync('git diff --cached --name-only', { encoding: 'utf8' });
|
||||
|
@ -494,13 +504,45 @@ function getAddedFilesSync() {
|
|||
.filter(l => _.intersection(['A', '?', 'U'], l.substring(0, 2).trim().split('')).length > 0)
|
||||
.map(l => path.join(__dirname, l.substring(2).trim()));
|
||||
}
|
||||
function getAzureDevOpsVarValue(varName) {
|
||||
return process.env[varName.replace(/\./g, '_').toUpperCase()]
|
||||
}
|
||||
function getModifiedFilesSync() {
|
||||
const out = cp.execSync('git status -u -s', { encoding: 'utf8' });
|
||||
return out
|
||||
.split(/\r?\n/)
|
||||
.filter(l => !!l)
|
||||
.filter(l => _.intersection(['M', 'A', 'R', 'C', 'U', '?'], l.substring(0, 2).trim().split('')).length > 0)
|
||||
.map(l => path.join(__dirname, l.substring(2).trim()));
|
||||
if (isCI) {
|
||||
const isAzurePR = getAzureDevOpsVarValue('System.PullRequest.SourceBranch') !== undefined;
|
||||
const isTravisPR = process.env.TRAVIS_PULL_REQUEST !== undefined && process.env.TRAVIS_PULL_REQUEST !== 'true';
|
||||
if (!isAzurePR && !isTravisPR) {
|
||||
return [];
|
||||
}
|
||||
const targetBranch = process.env.TRAVIS_BRANCH || getAzureDevOpsVarValue('System.PullRequest.TargetBranch');
|
||||
if (targetBranch !== 'master') {
|
||||
return [];
|
||||
}
|
||||
|
||||
const repo = process.env.TRAVIS_REPO_SLUG || getAzureDevOpsVarValue('Build.Repository.Name');
|
||||
const originOrUpstream = (repo.toUpperCase() === 'MICROSOFT/VSCODE-PYTHON' || repo.toUpperCase() === 'VSCODE-PYTHON-DATASCIENCE/VSCODE-PYTHON') ? 'origin' : 'upstream';
|
||||
|
||||
// If on CI, get a list of modified files comparing against
|
||||
// PR branch and master of current (assumed 'origin') repo.
|
||||
cp.execSync(`git remote set-branches --add ${originOrUpstream} master`, { encoding: 'utf8', cwd: __dirname });
|
||||
cp.execSync('git fetch', { encoding: 'utf8', cwd: __dirname });
|
||||
const cmd = `git diff --name-only HEAD ${originOrUpstream}/master`;
|
||||
console.info(cmd);
|
||||
const out = cp.execSync(cmd, { encoding: 'utf8', cwd: __dirname });
|
||||
return out
|
||||
.split(/\r?\n/)
|
||||
.filter(l => !!l)
|
||||
.filter(l => l.length > 0)
|
||||
.map(l => l.trim())
|
||||
.map(l => path.join(__dirname, l));
|
||||
} else {
|
||||
const out = cp.execSync('git status -u -s', { encoding: 'utf8' });
|
||||
return out
|
||||
.split(/\r?\n/)
|
||||
.filter(l => !!l)
|
||||
.filter(l => _.intersection(['M', 'A', 'R', 'C', 'U', '?'], l.substring(0, 2).trim().split('')).length > 0)
|
||||
.map(l => path.join(__dirname, l.substring(2).trim()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -529,9 +571,17 @@ function getFileListToProcess(options) {
|
|||
|
||||
return all;
|
||||
}
|
||||
|
||||
exports.hygiene = hygiene;
|
||||
|
||||
// this allows us to run hygiene as a git pre-commit hook.
|
||||
// this allows us to run hygiene via CLI (e.g. `node gulfile.js`).
|
||||
if (require.main === module) {
|
||||
const args = process.argv0.length > 2 ? process.argv.slice(2) : [];
|
||||
const isPreCommit = args.findIndex(arg => arg.startsWith('precommit='));
|
||||
const performPreCommitCheck = isPreCommit >= 0 ? args[isPreCommit].split('=')[1].trim().toUpperCase().startsWith('T') : false;
|
||||
// Allow precommit hooks for those with a file `./out/precommit.hook`.
|
||||
if (args.length > 0 && (!performPreCommitCheck || !fs.existsSync(path.join(__dirname, 'precommit.hook')))) {
|
||||
return;
|
||||
}
|
||||
run({ exitOnError: true, mode: 'staged' });
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Remove pre-commit hooks.
|
|
@ -1281,9 +1281,9 @@
|
|||
}
|
||||
},
|
||||
"ci-info": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.3.tgz",
|
||||
"integrity": "sha512-SK/846h/Rcy8q9Z9CAwGBLfCJ6EkjJWdpelWDufQpqVDYq2Wnnv8zlSO6AMQap02jvhVruKKpEtQOufo3pFhLg==",
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz",
|
||||
"integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==",
|
||||
"dev": true
|
||||
},
|
||||
"circular-json": {
|
||||
|
@ -1612,6 +1612,29 @@
|
|||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
||||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
|
||||
},
|
||||
"cosmiconfig": {
|
||||
"version": "5.0.6",
|
||||
"resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.0.6.tgz",
|
||||
"integrity": "sha512-6DWfizHriCrFWURP1/qyhsiFvYdlJzbCzmtFWh744+KyWsJo5+kPzUZZaMRSSItoYc0pxFX7gEO7ZC1/gN/7AQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-directory": "^0.3.1",
|
||||
"js-yaml": "^3.9.0",
|
||||
"parse-json": "^4.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"parse-json": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
|
||||
"integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"error-ex": "^1.3.1",
|
||||
"json-parse-better-errors": "^1.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"cross-spawn": {
|
||||
"version": "6.0.5",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
|
||||
|
@ -2401,6 +2424,34 @@
|
|||
"through": "~2.3.1"
|
||||
}
|
||||
},
|
||||
"execa": {
|
||||
"version": "0.9.0",
|
||||
"resolved": "https://registry.npmjs.org/execa/-/execa-0.9.0.tgz",
|
||||
"integrity": "sha512-BbUMBiX4hqiHZUA5+JujIjNb6TyAlp2D5KLheMjMluwOuzcnylDL4AxZYLLn1n2AGB49eSWwyKvvEQoRpnAtmA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"cross-spawn": "^5.0.1",
|
||||
"get-stream": "^3.0.0",
|
||||
"is-stream": "^1.1.0",
|
||||
"npm-run-path": "^2.0.0",
|
||||
"p-finally": "^1.0.0",
|
||||
"signal-exit": "^3.0.0",
|
||||
"strip-eof": "^1.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"cross-spawn": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
|
||||
"integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lru-cache": "^4.0.1",
|
||||
"shebang-command": "^1.2.0",
|
||||
"which": "^1.2.9"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"expand-brackets": {
|
||||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
|
||||
|
@ -5498,26 +5549,63 @@
|
|||
}
|
||||
},
|
||||
"husky": {
|
||||
"version": "0.14.3",
|
||||
"resolved": "https://registry.npmjs.org/husky/-/husky-0.14.3.tgz",
|
||||
"integrity": "sha512-e21wivqHpstpoiWA/Yi8eFti8E+sQDSS53cpJsPptPs295QTOQR0ZwnHo2TXy1XOpZFD9rPOd3NpmqTK6uMLJA==",
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/husky/-/husky-1.1.2.tgz",
|
||||
"integrity": "sha512-9TdkUpBeEOjz0AnFdUN4i3w8kEbOsVs9/WSeJqWLq2OO6bcKQhVW64Zi+pVd/AMRLpN3QTINb6ZXiELczvdmqQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-ci": "^1.0.10",
|
||||
"normalize-path": "^1.0.0",
|
||||
"strip-indent": "^2.0.0"
|
||||
"cosmiconfig": "^5.0.6",
|
||||
"execa": "^0.9.0",
|
||||
"find-up": "^3.0.0",
|
||||
"get-stdin": "^6.0.0",
|
||||
"is-ci": "^1.2.1",
|
||||
"pkg-dir": "^3.0.0",
|
||||
"please-upgrade-node": "^3.1.1",
|
||||
"read-pkg": "^4.0.1",
|
||||
"run-node": "^1.0.0",
|
||||
"slash": "^2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"normalize-path": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-1.0.0.tgz",
|
||||
"integrity": "sha1-MtDkcvkf80VwHBWoMRAY07CpA3k=",
|
||||
"find-up": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
|
||||
"integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"locate-path": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"get-stdin": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz",
|
||||
"integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==",
|
||||
"dev": true
|
||||
},
|
||||
"strip-indent": {
|
||||
"parse-json": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
|
||||
"integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"error-ex": "^1.3.1",
|
||||
"json-parse-better-errors": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"read-pkg": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-4.0.1.tgz",
|
||||
"integrity": "sha1-ljYlN48+HE1IyFhytabsfV0JMjc=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"normalize-package-data": "^2.3.2",
|
||||
"parse-json": "^4.0.0",
|
||||
"pify": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"slash": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz",
|
||||
"integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=",
|
||||
"resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz",
|
||||
"integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
|
@ -5690,12 +5778,12 @@
|
|||
}
|
||||
},
|
||||
"is-ci": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.1.0.tgz",
|
||||
"integrity": "sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg==",
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz",
|
||||
"integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ci-info": "^1.0.0"
|
||||
"ci-info": "^1.5.0"
|
||||
}
|
||||
},
|
||||
"is-data-descriptor": {
|
||||
|
@ -5737,6 +5825,12 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"is-directory": {
|
||||
"version": "0.3.1",
|
||||
"resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz",
|
||||
"integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=",
|
||||
"dev": true
|
||||
},
|
||||
"is-dotfile": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz",
|
||||
|
@ -6118,6 +6212,12 @@
|
|||
"jsonparse": "~1.2.0"
|
||||
}
|
||||
},
|
||||
"json-parse-better-errors": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
|
||||
"integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==",
|
||||
"dev": true
|
||||
},
|
||||
"json-schema": {
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
|
||||
|
@ -6304,6 +6404,24 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"locate-path": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
|
||||
"integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-locate": "^3.0.0",
|
||||
"path-exists": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"path-exists": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
|
||||
"integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"lodash": {
|
||||
"version": "4.17.11",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
|
||||
|
@ -6672,6 +6790,16 @@
|
|||
"integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==",
|
||||
"dev": true
|
||||
},
|
||||
"lru-cache": {
|
||||
"version": "4.1.3",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz",
|
||||
"integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"pseudomap": "^1.0.2",
|
||||
"yallist": "^2.1.2"
|
||||
}
|
||||
},
|
||||
"lru-queue": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz",
|
||||
|
@ -7183,6 +7311,15 @@
|
|||
"pify": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"npm-run-path": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
|
||||
"integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"path-key": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"number-is-nan": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
|
||||
|
@ -7435,6 +7572,24 @@
|
|||
"integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=",
|
||||
"dev": true
|
||||
},
|
||||
"p-limit": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.0.0.tgz",
|
||||
"integrity": "sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-try": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"p-locate": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
|
||||
"integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-limit": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"p-map": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz",
|
||||
|
@ -7450,6 +7605,12 @@
|
|||
"p-finally": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"p-try": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz",
|
||||
"integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==",
|
||||
"dev": true
|
||||
},
|
||||
"parse-filepath": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz",
|
||||
|
@ -7652,6 +7813,35 @@
|
|||
"pinkie": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"pkg-dir": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz",
|
||||
"integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"find-up": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"find-up": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
|
||||
"integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"locate-path": "^3.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"please-upgrade-node": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.1.1.tgz",
|
||||
"integrity": "sha512-KY1uHnQ2NlQHqIJQpnh/i54rKkuxCEBx+voJIS/Mvb+L2iYd2NMotwduhKTMjfC1uKoX3VXOxLjIYG66dfJTVQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"semver-compare": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"plugin-error": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz",
|
||||
|
@ -8200,6 +8390,12 @@
|
|||
"glob": "^7.0.5"
|
||||
}
|
||||
},
|
||||
"run-node": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/run-node/-/run-node-1.0.0.tgz",
|
||||
"integrity": "sha512-kc120TBlQ3mih1LSzdAJXo4xn/GWS2ec0l3S+syHDXP9uRr0JAT8Qd3mdMuyjqCzeZktgP3try92cEgf9Nks8A==",
|
||||
"dev": true
|
||||
},
|
||||
"rxjs": {
|
||||
"version": "5.5.12",
|
||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz",
|
||||
|
@ -8263,6 +8459,12 @@
|
|||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
|
||||
"integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg=="
|
||||
},
|
||||
"semver-compare": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz",
|
||||
"integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=",
|
||||
"dev": true
|
||||
},
|
||||
"semver-greatest-satisfied-range": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz",
|
||||
|
@ -8769,6 +8971,12 @@
|
|||
"is-natural-number": "^4.0.1"
|
||||
}
|
||||
},
|
||||
"strip-eof": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
|
||||
"integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=",
|
||||
"dev": true
|
||||
},
|
||||
"strip-indent": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz",
|
||||
|
|
|
@ -1565,7 +1565,7 @@
|
|||
"testMultiWorkspace": "node ./out/test/multiRootTest.js",
|
||||
"testAnalysisEngine": "node ./out/test/analysisEngineTest.js",
|
||||
"testPerformance": "node ./out/test/performanceTest.js",
|
||||
"precommit": "node gulpfile.js",
|
||||
"precommit": "node gulpfile.js precommit=true",
|
||||
"lint-staged": "node gulpfile.js",
|
||||
"lint": "tslint src/**/*.ts -t verbose",
|
||||
"clean": "gulp clean",
|
||||
|
@ -1663,7 +1663,7 @@
|
|||
"gulp-sourcemaps": "^2.6.4",
|
||||
"gulp-typescript": "^4.0.1",
|
||||
"gulp-watch": "^5.0.0",
|
||||
"husky": "^0.14.3",
|
||||
"husky": "^1.1.2",
|
||||
"is-running": "^2.1.0",
|
||||
"istanbul": "^0.4.5",
|
||||
"mocha": "^5.0.4",
|
||||
|
|
|
@ -61,5 +61,5 @@ process.on('unhandledRejection', (ex: string | Error, a) => {
|
|||
console.error(`Unhandled Promise Rejection with the message ${message.join(', ')}`);
|
||||
});
|
||||
|
||||
testRunner.configure(options, { coverageConfig: '../coverconfig.json' });
|
||||
testRunner.configure(options, { coverageConfig: '../build/coverconfig.json' });
|
||||
module.exports = testRunner;
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
"src/server/node_modules",
|
||||
"src/client/node_modules",
|
||||
"src/server/src/typings",
|
||||
"src/client/src/typings"
|
||||
"src/client/src/typings",
|
||||
"build"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
{
|
||||
"rulesDirectory": [
|
||||
"./build/tslint-rules"
|
||||
],
|
||||
"extends": [
|
||||
"tslint-eslint-rules",
|
||||
"tslint-microsoft-contrib"
|
||||
],
|
||||
"rules": {
|
||||
"messages-must-be-localized": true,
|
||||
"copyright-and-strict-header": true,
|
||||
"no-unused-expression": true,
|
||||
"no-duplicate-variable": true,
|
||||
"no-unused-variable": true,
|
||||
|
@ -62,4 +67,4 @@
|
|||
"no-redundant-jsdoc": false,
|
||||
"binary-expression-operand-order": false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче