Skip to content

Commit 56d1975

Browse files
authored
Merge pull request #2489 from github/redsun82/rust
Add basic Rust support for internal testing
2 parents 7cf65a5 + 6fc72c1 commit 56d1975

6 files changed

+10
-2
lines changed

lib/languages.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/languages.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/languages.test.js

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/languages.test.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/languages.test.ts

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ test("parseLanguage", async (t) => {
1818
t.deepEqual(parseLanguage("java"), Language.java);
1919
t.deepEqual(parseLanguage("javascript"), Language.javascript);
2020
t.deepEqual(parseLanguage("python"), Language.python);
21+
t.deepEqual(parseLanguage("rust"), Language.rust);
2122

2223
// Aliases
2324
t.deepEqual(parseLanguage("c"), Language.cpp);
@@ -46,6 +47,7 @@ test("isTracedLanguage", async (t) => {
4647
t.false(isTracedLanguage(Language.javascript));
4748
t.false(isTracedLanguage(Language.python));
4849
t.false(isTracedLanguage(Language.ruby));
50+
t.false(isTracedLanguage(Language.rust));
4951
});
5052

5153
test("isScannedLanguage", async (t) => {
@@ -58,4 +60,5 @@ test("isScannedLanguage", async (t) => {
5860
t.true(isScannedLanguage(Language.javascript));
5961
t.true(isScannedLanguage(Language.python));
6062
t.true(isScannedLanguage(Language.ruby));
63+
t.true(isScannedLanguage(Language.rust));
6164
});

src/languages.ts

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export enum Language {
77
javascript = "javascript",
88
python = "python",
99
ruby = "ruby",
10+
rust = "rust",
1011
swift = "swift",
1112
}
1213

0 commit comments

Comments
 (0)