Skip to content

Commit

Permalink
Merge pull request #23 from k--kato/#22
Browse files Browse the repository at this point in the history
fixed Parameters not correctly identified when documenting constructo…
  • Loading branch information
Keisuke KATO authored Dec 29, 2016
2 parents 3ee496e + e92a283 commit f9888b8
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 22 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Change Log

## 0.0.10 (December 29, 2016)

* 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).

## 0.0.9 (December 11, 2016)

* 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).
* 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).

## 0.0.8 (December 2, 2016)

Expand Down
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "docomment",
"version": "0.0.9",
"version": "0.0.10",
"publisher": "k--kato",
"engines": {
"vscode": "^1.7.0"
"vscode": "^1.8.0"
},
"displayName": "C# XML Documentation Comments",
"description": "Generate C# XML documentation comments for ///",
Expand Down Expand Up @@ -45,19 +45,18 @@
"dependencies": {
},
"devDependencies": {
"typescript": "^2.0.10",
"typescript": "^2.1.4",
"vscode": "^1.0.3",
"tslint": "^4.0.2",
"tslint": "^4.2.0",
"istanbul": "^0.4.5",
"coveralls": "^2.11.15",
"mocha": "^3.2.0",
"mocha-lcov-reporter": "^1.2.0",
"@types/node": "^6.0.40",
"@types/mocha": "^2.2.33"
"@types/node": "^6.0.54",
"@types/mocha": "^2.2.35"
},
"extensionDependencies": [
],
"isAMD": false,
"scripts": {
"vscode:prepublish": "tsc -p ./",
"compile": "tsc -watch -p ./",
Expand Down
2 changes: 1 addition & 1 deletion src/SyntacticAnalysis/SyntacticAnalysisCSharp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class SyntacticAnalysisCSharp {

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

const isMatched = (params === null || params.length !== 2);
if (isMatched) return null;
Expand Down
6 changes: 4 additions & 2 deletions test/TestData/X.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ public X(int i){} // "M:N.X.#ctor(System.Int32)"
public event D d; // "E:N.X.d"
public int this[string s]{get{return 1;}} // "P:N.X.Item(System.String)"
public class Nested{} // "T:N.X.Nested"
public delegate void D(int i); // "T:N.X.D"
public delegate void D(int i); // "T:N.X.D"
public static explicit operator int(X x){return 1;} // "M:N.X.op_Explicit(N.X)~System.Int32"
public DbSet<Director> Directors { get; set; }
public DbSet<Director> Directors { get; set; }
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*)"
int bb(string s, ref int y, void * z){return 1;} // "M:N.X.bb(System.String,System.Int32@,=System.Void*)"
int Generate(int level);
Expand All @@ -29,5 +29,7 @@ public class Nested{} // "T:N.X.Nested"
public async Task<string> GetInfoForTime(string location, double time)
public Collection<T> Filter(Func<T, bool> query) { }
public Collection<T> Filter(Func<T, bool> queryFirst, Func<T, U, V> querySecond) { }
public Test(string options) : base(options)
public Testing2(string String1, string String2, string String3) : base()
}
}
22 changes: 11 additions & 11 deletions test/TestData/project.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"version": "1.0.0-*",
"buildOptions": {
"emitEntryPoint": false
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0-rc2-*"
}
"Microsoft.Extensions.PlatformAbstractions": "1.1.0"
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"dnxcore50",
"portable-net45+win8"
]
"netcoreapp1.1": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.1.0"
}
}
}
}
}
}

0 comments on commit f9888b8

Please sign in to comment.