Skip to content

Commit f9888b8

Browse files
author
Keisuke KATO
authored
Merge pull request #23 from k--kato/#22
fixed Parameters not correctly identified when documenting constructo…
2 parents 3ee496e + e92a283 commit f9888b8

File tree

5 files changed

+27
-22
lines changed

5 files changed

+27
-22
lines changed

CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# Change Log
22

3+
## 0.0.10 (December 29, 2016)
4+
5+
* bug fix - Parameters not correctly identified when documenting constructor which chains to a base class constructor. See [#22](https://github.com/k--kato/vscode-docomment/issues/22).
6+
37
## 0.0.9 (December 11, 2016)
48

5-
* bug fix - Expansion is triggering in a lot of cases when it shouldn't . See [#16](https://github.com/k--kato/vscode-docomment/issues/16).
9+
* bug fix - Expansion is triggering in a lot of cases when it shouldn't. See [#16](https://github.com/k--kato/vscode-docomment/issues/16).
610

711
## 0.0.8 (December 2, 2016)
812

package.json

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "docomment",
3-
"version": "0.0.9",
3+
"version": "0.0.10",
44
"publisher": "k--kato",
55
"engines": {
6-
"vscode": "^1.7.0"
6+
"vscode": "^1.8.0"
77
},
88
"displayName": "C# XML Documentation Comments",
99
"description": "Generate C# XML documentation comments for ///",
@@ -45,19 +45,18 @@
4545
"dependencies": {
4646
},
4747
"devDependencies": {
48-
"typescript": "^2.0.10",
48+
"typescript": "^2.1.4",
4949
"vscode": "^1.0.3",
50-
"tslint": "^4.0.2",
50+
"tslint": "^4.2.0",
5151
"istanbul": "^0.4.5",
5252
"coveralls": "^2.11.15",
5353
"mocha": "^3.2.0",
5454
"mocha-lcov-reporter": "^1.2.0",
55-
"@types/node": "^6.0.40",
56-
"@types/mocha": "^2.2.33"
55+
"@types/node": "^6.0.54",
56+
"@types/mocha": "^2.2.35"
5757
},
5858
"extensionDependencies": [
5959
],
60-
"isAMD": false,
6160
"scripts": {
6261
"vscode:prepublish": "tsc -p ./",
6362
"compile": "tsc -watch -p ./",

src/SyntacticAnalysis/SyntacticAnalysisCSharp.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export class SyntacticAnalysisCSharp {
9090

9191
public static GetMethodParamNameList(code: string): Array<string> {
9292
if (code === null) return null;
93-
const params: RegExpMatchArray = code.match(/[\w\S]\s+[\w\S]+\s*\((.*)\)/);
93+
const params: RegExpMatchArray = code.match(/[\w\S]\s+[\w\S]+\s*\(([^)]*)\)/);
9494

9595
const isMatched = (params === null || params.length !== 2);
9696
if (isMatched) return null;

test/TestData/X.cs

+4-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ public X(int i){} // "M:N.X.#ctor(System.Int32)"
1616
public event D d; // "E:N.X.d"
1717
public int this[string s]{get{return 1;}} // "P:N.X.Item(System.String)"
1818
public class Nested{} // "T:N.X.Nested"
19-
public delegate void D(int i); // "T:N.X.D"
19+
public delegate void D(int i); // "T:N.X.D"
2020
public static explicit operator int(X x){return 1;} // "M:N.X.op_Explicit(N.X)~System.Int32"
21-
public DbSet<Director> Directors { get; set; }
21+
public DbSet<Director> Directors { get; set; }
2222
public List<int> bb<int>(string s, ref List<int> y, void * z){return 1;} // "M:N.X.bb(System.String,System.Int32@,=System.Void*)"
2323
int bb(string s, ref int y, void * z){return 1;} // "M:N.X.bb(System.String,System.Int32@,=System.Void*)"
2424
int Generate(int level);
@@ -29,5 +29,7 @@ public class Nested{} // "T:N.X.Nested"
2929
public async Task<string> GetInfoForTime(string location, double time)
3030
public Collection<T> Filter(Func<T, bool> query) { }
3131
public Collection<T> Filter(Func<T, bool> queryFirst, Func<T, U, V> querySecond) { }
32+
public Test(string options) : base(options)
33+
public Testing2(string String1, string String2, string String3) : base()
3234
}
3335
}

test/TestData/project.json

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
{
22
"version": "1.0.0-*",
33
"buildOptions": {
4-
"emitEntryPoint": false
4+
"debugType": "portable",
5+
"emitEntryPoint": true
56
},
67
"dependencies": {
7-
"Microsoft.NETCore.App": {
8-
"type": "platform",
9-
"version": "1.0.0-rc2-*"
10-
}
8+
"Microsoft.Extensions.PlatformAbstractions": "1.1.0"
119
},
1210
"frameworks": {
13-
"netcoreapp1.0": {
14-
"imports": [
15-
"dnxcore50",
16-
"portable-net45+win8"
17-
]
11+
"netcoreapp1.1": {
12+
"dependencies": {
13+
"Microsoft.NETCore.App": {
14+
"type": "platform",
15+
"version": "1.1.0"
16+
}
17+
}
1818
}
1919
}
20-
}
20+
}

0 commit comments

Comments
 (0)