Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Remove unusable commands for search and search+replace from the list
of commands. Use the sidebar.
- Avoid extension activation error due to a failure of `osemgrep-pro --version`.

## v1.9.0 - 2024-08-28
Expand Down
12 changes: 0 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,6 @@
"title": "Semgrep: Show named Generic AST",
"when": "semgrep.cli.minor >= 36 || config.semgrep.ignoreCliVersion"
},
{
"command": "semgrep.search",
"title": "Semgrep: Search by pattern",
"icon": "$(search-view-icon)",
"when": "semgrep.cli.minor >= 70 || config.semgrep.ignoreCliVersion"
},
{
"command": "semgrep.search.clear",
"title": "Semgrep Search: Clear",
Expand All @@ -86,12 +80,6 @@
"icon": "$(search-remove)",
"when": "semgrep.cli.minor >= 70 || config.semgrep.ignoreCliVersion"
},
{
"command": "semgrep.search.replace",
"title": "Semgrep Search: Semantic Replace",
"icon": "$(replace)",
"when": "semgrep.cli.minor >= 70 || config.semgrep.ignoreCliVersion"
},
{
"command": "semgrep.restartLanguageServer",
"title": "Semgrep: Restart Language Server"
Expand Down
2 changes: 2 additions & 0 deletions src/lsp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
type Executable,
LanguageClient,
type LanguageClientOptions,
MessageType,

Check warning on line 10 in src/lsp.ts

View workflow job for this annotation

GitHub Actions / vsce-test (macos-latest)

'MessageType' is defined but never used. Allowed unused vars must match /^_/u

Check warning on line 10 in src/lsp.ts

View workflow job for this annotation

GitHub Actions / vsce-test (ubuntu-latest)

'MessageType' is defined but never used. Allowed unused vars must match /^_/u
type NotificationHandler,

Check warning on line 11 in src/lsp.ts

View workflow job for this annotation

GitHub Actions / vsce-test (macos-latest)

'NotificationHandler' is defined but never used. Allowed unused vars must match /^_/u

Check warning on line 11 in src/lsp.ts

View workflow job for this annotation

GitHub Actions / vsce-test (ubuntu-latest)

'NotificationHandler' is defined but never used. Allowed unused vars must match /^_/u
type ServerOptions,
ShowMessageNotification,

Check warning on line 13 in src/lsp.ts

View workflow job for this annotation

GitHub Actions / vsce-test (macos-latest)

'ShowMessageNotification' is defined but never used. Allowed unused vars must match /^_/u

Check warning on line 13 in src/lsp.ts

View workflow job for this annotation

GitHub Actions / vsce-test (ubuntu-latest)

'ShowMessageNotification' is defined but never used. Allowed unused vars must match /^_/u
ShowMessageParams,

Check warning on line 14 in src/lsp.ts

View workflow job for this annotation

GitHub Actions / vsce-test (macos-latest)

'ShowMessageParams' is defined but never used. Allowed unused vars must match /^_/u

Check warning on line 14 in src/lsp.ts

View workflow job for this annotation

GitHub Actions / vsce-test (ubuntu-latest)

'ShowMessageParams' is defined but never used. Allowed unused vars must match /^_/u
TransportKind,
} from "vscode-languageclient/node";
import type { NotificationHandler0 } from "vscode-languageserver";
Expand Down Expand Up @@ -60,7 +60,7 @@
if (!env.config.cfg.get("ignoreCliVersion") && serverPath) {
// 'osemgrep --version' fails; not sure how intentional that is.
const version = await execShell(serverPath, ["show", "version"]);
const semVersion = new semver.SemVer(version);

Check warning on line 63 in src/lsp.ts

View workflow job for this annotation

GitHub Actions / vsce-test (macos-latest)

'semVersion' is assigned a value but never used. Allowed unused vars must match /^_/u

Check warning on line 63 in src/lsp.ts

View workflow job for this annotation

GitHub Actions / vsce-test (ubuntu-latest)

'semVersion' is assigned a value but never used. Allowed unused vars must match /^_/u
env.semgrepVersion = version;
await env.reloadConfig();
}
Expand Down Expand Up @@ -223,8 +223,10 @@

let serverOptions;
// if we're not using JS, we can use the native binary
env.logger.log("obtain LSP server options (native)");
serverOptions = await serverOptionsCli(env);
if (!serverOptions || env.config.get("useJS")) {
env.logger.log("obtain LSP server options (JS)");
serverOptions = serverOptionsJs(env);
}

Expand Down
Loading