Skip to content

Commit

Permalink
Remove linting support
Browse files Browse the repository at this point in the history
  • Loading branch information
karthiknadig committed Oct 19, 2023
1 parent 8becc76 commit 563e661
Show file tree
Hide file tree
Showing 53 changed files with 5 additions and 6,035 deletions.
12 changes: 0 additions & 12 deletions src/client/common/installer/productPath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { inject, injectable } from 'inversify';
import * as path from 'path';
import { Uri } from 'vscode';
import { IServiceContainer } from '../../ioc/types';
import { ILinterManager } from '../../linters/types';
import { ITestingService } from '../../testing/types';
import { IConfigurationService, IInstaller, Product } from '../types';
import { IProductPathService } from './types';
Expand Down Expand Up @@ -36,17 +35,6 @@ export abstract class BaseProductPathsService implements IProductPathService {
}
}

@injectable()
export class LinterProductPathService extends BaseProductPathsService {
constructor(@inject(IServiceContainer) serviceContainer: IServiceContainer) {
super(serviceContainer);
}
public getExecutableNameFromSettings(product: Product, resource?: Uri): string {
const linterManager = this.serviceContainer.get<ILinterManager>(ILinterManager);
return linterManager.getLinterInfo(product).pathName(resource);
}
}

@injectable()
export class TestFrameworkProductPathService extends BaseProductPathsService {
constructor(@inject(IServiceContainer) serviceContainer: IServiceContainer) {
Expand Down
8 changes: 0 additions & 8 deletions src/client/common/installer/productService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@ export class ProductService implements IProductService {
private ProductTypes = new Map<Product, ProductType>();

constructor() {
this.ProductTypes.set(Product.bandit, ProductType.Linter);
this.ProductTypes.set(Product.flake8, ProductType.Linter);
this.ProductTypes.set(Product.mypy, ProductType.Linter);
this.ProductTypes.set(Product.pycodestyle, ProductType.Linter);
this.ProductTypes.set(Product.prospector, ProductType.Linter);
this.ProductTypes.set(Product.pydocstyle, ProductType.Linter);
this.ProductTypes.set(Product.pylama, ProductType.Linter);
this.ProductTypes.set(Product.pylint, ProductType.Linter);
this.ProductTypes.set(Product.pytest, ProductType.TestFramework);
this.ProductTypes.set(Product.unittest, ProductType.TestFramework);
this.ProductTypes.set(Product.tensorboard, ProductType.DataScience);
Expand Down
7 changes: 1 addition & 6 deletions src/client/common/installer/serviceRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ import { CondaInstaller } from './condaInstaller';
import { PipEnvInstaller } from './pipEnvInstaller';
import { PipInstaller } from './pipInstaller';
import { PoetryInstaller } from './poetryInstaller';
import {
DataScienceProductPathService,
LinterProductPathService,
TestFrameworkProductPathService,
} from './productPath';
import { DataScienceProductPathService, TestFrameworkProductPathService } from './productPath';
import { ProductService } from './productService';
import { IInstallationChannelManager, IModuleInstaller, IProductPathService, IProductService } from './types';

Expand All @@ -24,7 +20,6 @@ export function registerTypes(serviceManager: IServiceManager) {
serviceManager.addSingleton<IModuleInstaller>(IModuleInstaller, PoetryInstaller);
serviceManager.addSingleton<IInstallationChannelManager>(IInstallationChannelManager, InstallationChannelManager);
serviceManager.addSingleton<IProductService>(IProductService, ProductService);
serviceManager.addSingleton<IProductPathService>(IProductPathService, LinterProductPathService, ProductType.Linter);
serviceManager.addSingleton<IProductPathService>(
IProductPathService,
TestFrameworkProductPathService,
Expand Down
2 changes: 0 additions & 2 deletions src/client/common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ export enum ProductInstallStatus {
}

export enum ProductType {
Linter = 'Linter',
TestFramework = 'TestFramework',
RefactoringLibrary = 'RefactoringLibrary',
DataScience = 'DataScience',
Python = 'Python',
}
Expand Down
2 changes: 0 additions & 2 deletions src/client/extensionActivation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import { registerTypes as debugConfigurationRegisterTypes } from './debugger/ext
import { IDebugConfigurationService, IDynamicDebugConfigurationService } from './debugger/extension/types';
import { IInterpreterService } from './interpreter/contracts';
import { getLanguageConfiguration } from './language/languageConfiguration';
import { registerTypes as lintersRegisterTypes } from './linters/serviceRegistry';
import { ReplProvider } from './providers/replProvider';
import { registerTypes as providersRegisterTypes } from './providers/serviceRegistry';
import { TerminalProvider } from './providers/terminalProvider';
Expand Down Expand Up @@ -122,7 +121,6 @@ async function activateLegacy(ext: ExtensionState): Promise<ActivationResult> {
serviceManager.addSingletonInstance<boolean>(UseProposedApi, enableProposedApi);
// Feature specific registrations.
unitTestsRegisterTypes(serviceManager);
lintersRegisterTypes(serviceManager);
installerRegisterTypes(serviceManager);
commonRegisterTerminalTypes(serviceManager);
debugConfigurationRegisterTypes(serviceManager);
Expand Down
36 changes: 0 additions & 36 deletions src/client/linters/bandit.ts

This file was deleted.

229 changes: 0 additions & 229 deletions src/client/linters/baseLinter.ts

This file was deleted.

19 changes: 0 additions & 19 deletions src/client/linters/constants.ts

This file was deleted.

Loading

0 comments on commit 563e661

Please sign in to comment.