Skip to content

Commit

Permalink
Merge branch 'main' into fix-NoSource-import-bug
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeNikitinNV authored Dec 17, 2024
2 parents 3b3dea1 + 6971fda commit 1739660
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 16 deletions.
17 changes: 1 addition & 16 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ src/test/utils/fs.ts

src/test/api.functional.test.ts

src/test/testing/mocks.ts
src/test/testing/common/debugLauncher.unit.test.ts
src/test/testing/common/services/configSettingService.unit.test.ts

Expand Down Expand Up @@ -85,9 +84,7 @@ src/test/common/application/commands/reloadCommand.unit.test.ts

src/test/common/installer/channelManager.unit.test.ts
src/test/common/installer/pipInstaller.unit.test.ts
src/test/common/installer/installer.invalidPath.unit.test.ts
src/test/common/installer/pipEnvInstaller.unit.test.ts
src/test/common/installer/productPath.unit.test.ts

src/test/common/socketCallbackHandler.test.ts

Expand All @@ -103,27 +100,22 @@ src/test/common/process/proc.unit.test.ts
src/test/common/interpreterPathService.unit.test.ts


src/test/python_files/formatting/dummy.ts

src/test/debugger/extension/adapter/adapter.test.ts
src/test/debugger/extension/adapter/outdatedDebuggerPrompt.unit.test.ts
src/test/debugger/extension/adapter/factory.unit.test.ts
src/test/debugger/extension/adapter/activator.unit.test.ts
src/test/debugger/extension/adapter/logging.unit.test.ts
src/test/debugger/extension/hooks/childProcessAttachHandler.unit.test.ts
src/test/debugger/extension/hooks/childProcessAttachService.unit.test.ts
src/test/debugger/utils.ts
src/test/debugger/common/protocolparser.test.ts
src/test/debugger/envVars.test.ts

src/test/telemetry/index.unit.test.ts
src/test/telemetry/envFileTelemetry.unit.test.ts

src/test/application/diagnostics/checks/macPythonInterpreter.unit.test.ts
src/test/application/diagnostics/checks/pythonInterpreter.unit.test.ts
src/test/application/diagnostics/checks/invalidLaunchJsonDebugger.unit.test.ts
src/test/application/diagnostics/checks/powerShellActivation.unit.test.ts
src/test/application/diagnostics/checks/invalidPythonPathInDebugger.unit.test.ts
src/test/application/diagnostics/checks/envPathVariable.unit.test.ts
src/test/application/diagnostics/applicationDiagnostics.unit.test.ts
src/test/application/diagnostics/promptHandler.unit.test.ts
Expand Down Expand Up @@ -154,25 +146,18 @@ src/client/activation/extensionSurvey.ts
src/client/activation/common/analysisOptions.ts
src/client/activation/languageClientMiddleware.ts

src/client/formatters/serviceRegistry.ts
src/client/formatters/helper.ts
src/client/formatters/dummyFormatter.ts
src/client/formatters/baseFormatter.ts

src/client/testing/serviceRegistry.ts
src/client/testing/main.ts
src/client/testing/configurationFactory.ts
src/client/testing/common/constants.ts
src/client/testing/common/testUtils.ts
src/client/testing/common/socketServer.ts
src/client/testing/common/runner.ts

src/client/common/helpers.ts
src/client/common/net/browser.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/editor.ts
src/client/common/contextKey.ts
src/client/common/experiments/telemetry.ts
src/client/common/platform/serviceRegistry.ts
Expand Down Expand Up @@ -257,7 +242,6 @@ src/client/debugger/extension/attachQuickPick/psProcessParser.ts
src/client/debugger/extension/attachQuickPick/picker.ts

src/client/application/serviceRegistry.ts
src/client/application/diagnostics/surceMapSupportService.ts
src/client/application/diagnostics/base.ts
src/client/application/diagnostics/applicationDiagnostics.ts
src/client/application/diagnostics/filter.ts
Expand All @@ -267,3 +251,4 @@ src/client/application/diagnostics/commands/ignore.ts
src/client/application/diagnostics/commands/factory.ts
src/client/application/diagnostics/commands/execVSCCommand.ts
src/client/application/diagnostics/commands/launchBrowser.ts

44 changes: 44 additions & 0 deletions scripts/cleanup-eslintignore.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
const fs = require('fs');
const path = require('path');

const baseDir = process.cwd();
const eslintignorePath = path.join(baseDir, '.eslintignore');

fs.readFile(eslintignorePath, 'utf8', (err, data) => {
if (err) {
console.error('Error reading .eslintignore file:', err);
return;
}

const lines = data.split('\n');
const files = lines.map((line) => line.trim()).filter((line) => line && !line.startsWith('#'));
const nonExistentFiles = [];

files.forEach((file) => {
const filePath = path.join(baseDir, file);
if (!fs.existsSync(filePath) && file !== 'pythonExtensionApi/out/') {
nonExistentFiles.push(file);
}
});

if (nonExistentFiles.length > 0) {
console.log('The following files listed in .eslintignore do not exist:');
nonExistentFiles.forEach((file) => console.log(file));

const updatedLines = lines.filter((line) => {
const trimmedLine = line.trim();
return !nonExistentFiles.includes(trimmedLine) || trimmedLine === 'pythonExtensionApi/out/';
});
const updatedData = `${updatedLines.join('\n')}\n`;

fs.writeFile(eslintignorePath, updatedData, 'utf8', (err) => {
if (err) {
console.error('Error writing to .eslintignore file:', err);
return;
}
console.log('Non-existent files have been removed from .eslintignore.');
});
} else {
console.log('All files listed in .eslintignore exist.');
}
});

0 comments on commit 1739660

Please sign in to comment.