Skip to content

Commit c96208a

Browse files
committed
add support for VSCode Workspace, #940
1 parent f928ca4 commit c96208a

File tree

4 files changed

+53
-0
lines changed

4 files changed

+53
-0
lines changed

Unix/t/00_C.t

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1489,6 +1489,12 @@ my @Tests = (
14891489
'args' => '../tests/inputs/ItemView.vue',
14901490
},
14911491

1492+
{
1493+
'name' => 'VSCode Workspace',
1494+
'ref' => '../tests/outputs/cloc-dev.code-workspace.yaml',
1495+
'args' => '../tests/inputs/cloc-dev.code-workspace',
1496+
},
1497+
14921498
{
14931499
'name' => 'Vuejs Component 2',
14941500
'ref' => '../tests/outputs/issue_876.vue.yaml',

cloc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8905,6 +8905,7 @@ sub set_constants { # {{{1
89058905
'cob' => 'COBOL' ,
89068906
'COB' => 'COBOL' ,
89078907
'cocoa5' => 'CoCoA 5' ,
8908+
'code-workspace' => 'VSCode Workspace' ,
89088909
'c5' => 'CoCoA 5' ,
89098910
'cpkg5' => 'CoCoA 5' ,
89108911
'cocoa5server'=> 'CoCoA 5' ,
@@ -11522,6 +11523,11 @@ sub set_constants { # {{{1
1152211523
[ 'remove_html_comments', ],
1152311524
[ 'call_regexp_common' , 'HTML' ],
1152411525
],
11526+
'VSCode Workspace' => [
11527+
[ 'rm_comments_in_strings', '"', '/*', '*/' ],
11528+
[ 'rm_comments_in_strings', '"', '//', '' ],
11529+
[ 'call_regexp_common' , 'C++' ],
11530+
],
1152511531
'Vuejs Component' => [
1152611532
[ 'remove_html_comments', ],
1152711533
# [ 'call_regexp_common' , 'HTML' ], # problematic, ref #876
@@ -12232,6 +12238,7 @@ sub set_constants { # {{{1
1223212238
'Visual Fox Pro' => 4.00, # Visual Fox Pro is not available in the language gearing ratios listed at Mayes Consulting web site
1223312239
'Visualforce Component' => 1.9 ,
1223412240
'Visualforce Page' => 1.9 ,
12241+
'VSCode Workspace' => 2.50,
1223512242
'Vuejs Component' => 2.00,
1223612243
'Vyper' => 4.20,
1223712244
'Web Services Description' => 1.00,
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
// this is a comment
3+
"folders": [
4+
{
5+
"path": "."
6+
},
7+
{
8+
"path": "tests"
9+
},
10+
{
11+
"path": "Unix"
12+
}
13+
/*
14+
more
15+
comments
16+
*/
17+
],
18+
"settings": {}
19+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
# github.com/AlDanial/cloc
3+
header :
4+
cloc_url : github.com/AlDanial/cloc
5+
cloc_version : 2.07
6+
elapsed_seconds : 0.00441718101501465
7+
n_files : 1
8+
n_lines : 19
9+
files_per_second : 226.388729961678
10+
lines_per_second : 4301.38586927187
11+
report_file : ../outputs/cloc-dev.code-workspace.yaml
12+
'VSCode Workspace' :
13+
nFiles: 1
14+
blank: 0
15+
comment: 5
16+
code: 14
17+
SUM:
18+
blank: 0
19+
comment: 5
20+
code: 14
21+
nFiles: 1

0 commit comments

Comments
 (0)