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

Refactor, add {file} template #221

Merged
merged 7 commits into from
May 14, 2021
Merged

Conversation

HO-COOH
Copy link
Contributor

@HO-COOH HO-COOH commented May 8, 2021

Fix/Feature/Other

Fix

Feature

Add {file} template, so it can be used in custom tag of both file comments and generic comments.

Other

  • Description
    I extracted some functionalities (mainly those protected implementation detail functions in CppDocGen.ts) to dedicated files to better reuse them, because they are not language dependent at the first place, as I am planning to add a backend that uses the language server.

I also tried to add documentation to those functions but they may not be accurate. Some function names are quite ambiguous to be honest.

HO-COOH and others added 4 commits May 1, 2021 06:24
* 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
Copy link
Contributor Author

HO-COOH commented May 8, 2021

The backend I am talking about mainly uses executeHoverProvider. The hover result still needs to be parsed but will be simplified by language server. For example, macros will be replaced, types will be deduced etc.

@HO-COOH
Copy link
Contributor Author

HO-COOH commented May 8, 2021

Don't know why the tests process get killed. It's passing all tests and works on my machine

@cschlosser
Copy link
Owner

Don't know why the tests process get killed. It's passing all tests and works on my machine

The CI uses VS Code 1.56.0 now. Are you using 1.55.X locally by any chance?

I also tried to add documentation to those functions but they may not be accurate. Some function names are quite ambiguous to be honest.

Thank you, yes I agree with you. But util isn't the most expressive name either 😉

Ad language server:
What LS do you want to support? Does the C++ VSCode LS support this now reasonably?

I will review your changes in the upcomming days.

@HO-COOH
Copy link
Contributor Author

HO-COOH commented May 9, 2021

What LS do you want to support? Does the C++ VSCode LS support this now reasonably?

No it hasn't changed much. You either run another language server along side what the user already uses, which would be stupid or use vscode built-in command to query the user's language server, like executeHoverProvider I talked about, and then parse the result.

@cschlosser
Copy link
Owner

The CI uses VS Code 1.56.0 now. Are you using 1.55.X locally by any chance?

Did you take a look at this?

@HO-COOH
Copy link
Contributor Author

HO-COOH commented May 12, 2021

I don't think that's the issue, and indeed I am using 1.56.
The CI is failing at network connection this time.

@codecov
Copy link

codecov bot commented May 12, 2021

Codecov Report

Merging #221 (a0b440d) into master (be07386) will decrease coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #221      +/-   ##
==========================================
- Coverage   93.42%   93.36%   -0.07%     
==========================================
  Files           5        5              
  Lines         852      814      -38     
  Branches      247      242       -5     
==========================================
- Hits          796      760      -36     
+ Misses         56       54       -2     
Impacted Files Coverage Δ
src/Lang/Cpp/CppDocGen.ts 99.60% <100.00%> (+0.63%) ⬆️

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 be07386...a0b440d. Read the comment docs.

Copy link
Owner

@cschlosser cschlosser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a test for your changes.
Will merge it afterwards. CI is fine now too.

@HO-COOH HO-COOH requested a review from cschlosser May 14, 2021 16:01
@cschlosser cschlosser merged commit af70cf9 into cschlosser:master May 14, 2021
HO-COOH added a commit to HO-COOH/doxdocgen that referenced this pull request May 15, 2021
* Refactor, add {file} template

* Add test for {file} expansion
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.

Option to template filename in file.customTag
2 participants