Skip to content

Commit

Permalink
clangd and associated tools (#480)
Browse files Browse the repository at this point in the history
these can be used by the clangd extension!
  • Loading branch information
laurit17 authored Sep 19, 2023
1 parent 50a7acc commit f2b1892
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,7 @@ actions:
- remove-release-snapshots
- repo-tests
- tool-test-helper
tools:
enabled:
- clangd-indexing-tools@16.0.2
- clangd@16.0.2
19 changes: 19 additions & 0 deletions tools/clangd-indexing-tools/clangd_indexing_tools.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { makeToolTestConfig, toolTest } from "tests";
toolTest({
toolName: "clangd-indexing-tools",
toolVersion: "16.0.2",
testConfigs: [
makeToolTestConfig({
command: ["clangd-indexer", "--version"],
expectedOut: "LLVM version 16.0.2",
}),
makeToolTestConfig({
command: ["clangd-index-server", "--version"],
expectedOut: "LLVM version 16.0.2",
}),
makeToolTestConfig({
command: ["clangd-index-server-monitor", "--version"],
expectedOut: "LLVM version 16.0.2",
}),
],
});
26 changes: 26 additions & 0 deletions tools/clangd-indexing-tools/plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: 0.1
downloads:
- name: clangd-indexing-tools
downloads:
- os:
linux: linux
macos: mac
windows: windows
url: https://github.com/clangd/clangd/releases/download/${version}/clangd_indexing_tools-${os}-${version}.zip
strip_components: 1
tools:
definitions:
- name: clangd-indexing-tools
known_good_version: 16.0.2
download: clangd-indexing-tools
shims: [clangd-indexer, clangd-index-server, clangd-index-server-monitor]
environment:
- name: PATH
value: ${tool}/bin
health_checks:
- command: clangd-indexer --version
parse_regex: LLVM version ${semver}
- command: clangd-index-server --version
parse_regex: LLVM version ${semver}
- command: clangd-index-server-monitor --version
parse_regex: LLVM version ${semver}
11 changes: 11 additions & 0 deletions tools/clangd/clangd.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { makeToolTestConfig, toolTest } from "tests";
toolTest({
toolName: "clangd",
toolVersion: "16.0.2",
testConfigs: [
makeToolTestConfig({
command: ["clangd", "--version"],
expectedOut: "clangd version 16.0.2",
}),
],
});
22 changes: 22 additions & 0 deletions tools/clangd/plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: 0.1
downloads:
- name: clangd
downloads:
- os:
linux: linux
macos: mac
windows: windows
url: https://github.com/clangd/clangd/releases/download/${version}/clangd-${os}-${version}.zip
strip_components: 1
tools:
definitions:
- name: clangd
known_good_version: 16.0.2
download: clangd
shims: [clangd]
environment:
- name: PATH
value: ${tool}/bin
health_checks:
- command: clangd --version
parse_regex: clangd version ${semver}

0 comments on commit f2b1892

Please sign in to comment.