Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unexpected return tag on non-functions #214

Merged
merged 2 commits into from
Apr 30, 2021

Conversation

HO-COOH
Copy link
Contributor

@HO-COOH HO-COOH commented Apr 24, 2021

Fix/Feature/Other

Fix

A dirty fix to #210

  • Description of the fix

Check the special return cases regardless of the setting for including return types. If it is false and all the case index is -1, then the param array shall be empty, so it mapped to nothing. Otherwise set param to [""]. So it could be mapped to return, without the types included.

  • Added unit test

I added this test to config.Test.ts.

NOTE:
All your test() calls seems to have wrong order, should be test(actual, expected), but you have test(expected, actual).
I was so confused at first.

@codecov
Copy link

codecov bot commented Apr 24, 2021

Codecov Report

❗ No coverage uploaded for pull request base (master@dbcf5dc). Click here to learn what that means.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #214   +/-   ##
=========================================
  Coverage          ?   32.03%           
=========================================
  Files             ?       14           
  Lines             ?     1027           
  Branches          ?      188           
=========================================
  Hits              ?      329           
  Misses            ?      696           
  Partials          ?        2           
Impacted Files Coverage Δ
src/Lang/Cpp/CppDocGen.ts 22.81% <50.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dbcf5dc...2a69505. Read the comment docs.

@cschlosser
Copy link
Owner

Thank you for your contribution.
Could you please remove the package-lock.json.
Some tools get confused when there is a yarn lock file as well.

Regarding the order of arguments for assertions: This is probably due to the diff being backwards otherwise iirc.
I can take another look at it to see if this is something that has sneaked in.

@HO-COOH
Copy link
Contributor Author

HO-COOH commented Apr 27, 2021

@cschlosser see this update

For the wrong test I talked about, this is what I see
image

@HO-COOH HO-COOH requested a review from cschlosser April 28, 2021 02:26
@cschlosser
Copy link
Owner

You're totally right.
I don't know why but this seems to have changed.

@cschlosser cschlosser merged commit 9f4f9cd into cschlosser:master Apr 30, 2021
@cschlosser cschlosser mentioned this pull request Apr 30, 2021
1 task
@HO-COOH HO-COOH deleted the bugfix branch April 30, 2021 11:27
HO-COOH added a commit to HO-COOH/doxdocgen that referenced this pull request Apr 30, 2021
* Fix unexpected return tag on non-functions (cschlosser#214)

* Prepare release 1.2.1 (cschlosser#215)

* Use Github actions instead of travis and appveyor (cschlosser#216)

* Switch to GH workflow

* Use tslint action

* Add build matrix

* Run test stage

* Disable ubuntu test run due to bug in vscode

* Publish coverage on macOS

* Remove istanbul

* codecov action

* Move nyc config to nycrc

* Add CD workflow

* Remove old publishing script

Co-authored-by: Christoph Schlosser <2466365+cschlosser@users.noreply.github.com>
HO-COOH added a commit to HO-COOH/doxdocgen that referenced this pull request May 18, 2021
* Fix unexpected return tag on non-functions (cschlosser#214)

* Prepare release 1.2.1 (cschlosser#215)

* Use Github actions instead of travis and appveyor (cschlosser#216)

* Switch to GH workflow

* Use tslint action

* Add build matrix

* Run test stage

* Disable ubuntu test run due to bug in vscode

* Publish coverage on macOS

* Remove istanbul

* codecov action

* Move nyc config to nycrc

* Add CD workflow

* Remove old publishing script

Co-authored-by: Christoph Schlosser <2466365+cschlosser@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants