Skip to content

Commit 68b6873

Browse files
edoardopirovanoEdoardo Pirovano
authored andcommitted
Fix C# line counting and add test
1 parent d623a7a commit 68b6873

File tree

10 files changed

+86
-24
lines changed

10 files changed

+86
-24
lines changed

lib/count-loc.test.js

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/count-loc.test.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.package-lock.json

Lines changed: 4 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/github-linguist/dist/languages.js

Lines changed: 25 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/github-linguist/dist/languages.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/github-linguist/package.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/github-linguist/src/languages.ts

Lines changed: 25 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 8 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"fast-deep-equal": "^3.1.3",
3737
"file-url": "^3.0.0",
3838
"fs": "0.0.1-security",
39-
"github-linguist": "^2.4.2",
39+
"github-linguist": "^2.4.3",
4040
"glob": "^7.1.7",
4141
"js-yaml": "^3.13.1",
4242
"jsonschema": "1.2.6",

src/count-loc.test.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,20 @@ test("ensure lines of code works for cpp and js", async (t) => {
2424
});
2525
});
2626

27+
test("ensure lines of code works for csharp", async (t) => {
28+
const results = await countLoc(
29+
path.join(__dirname, "../tests/multi-language-repo"),
30+
[],
31+
[],
32+
[Language.csharp],
33+
getRunnerLogger(true)
34+
);
35+
36+
t.deepEqual(results, {
37+
csharp: 10,
38+
});
39+
});
40+
2741
test("ensure lines of code can handle undefined language", async (t) => {
2842
const results = await countLoc(
2943
path.join(__dirname, "../tests/multi-language-repo"),

0 commit comments

Comments
 (0)