Skip to content

Commit

Permalink
chore: introduce feature flag for OSS via LS
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterSchafer committed Oct 24, 2023
1 parent 5b915c2 commit 1e72383
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/snyk/common/experiment/services/experimentService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { User } from '../../user';
export enum ExperimentKey {
// to be populated with running experiment keys
TestExperiment = 'vscode-test-experiment',
OssViaLanguageServer = 'snyk-oss-via-ls-in-vs-code-integration',
}

export class ExperimentService {
Expand Down
7 changes: 6 additions & 1 deletion src/snyk/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import {
} from './common/constants/views';
import { ErrorHandler } from './common/error/errorHandler';
import { ErrorReporter } from './common/error/errorReporter';
import { ExperimentService } from './common/experiment/services/experimentService';
import { ExperimentKey, ExperimentService } from './common/experiment/services/experimentService';
import { LanguageServer } from './common/languageServer/languageServer';
import { StaticLsApi } from './common/languageServer/staticLsApi';
import { Logger } from './common/logger/logger';
Expand Down Expand Up @@ -363,6 +363,11 @@ class SnykExtension extends SnykLib implements IExtension {

this.analytics.load();
this.experimentService.load();
const ossViaLanguageServer = await this.experimentService.isUserPartOfExperiment(
ExperimentKey.OssViaLanguageServer,
true,
);
console.log(`Snyk "Open Source Security" via Language Server: ${ossViaLanguageServer}`);

this.logPluginIsInstalled();

Expand Down

0 comments on commit 1e72383

Please sign in to comment.