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

Added a script to complete xml documentation with <summary> tags #534

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

exyi
Copy link
Member

@exyi exyi commented Jan 23, 2018

It will allow us to write comments without the <summary> tags - the script completes them when the package is published.

I simply don't like the verbosity of XML comments with the summary tags, it feels much nicer to write comments without the mess around. And it's not required by

To be honest, I don't like that at all. I don't want to mess the codebase with VisualStudio hacks. The summary element is simply totally ugly and it's not required:

  • By specification - the specification actually does not force any rules here, the comment just has to be valid XML. There are just recommended tags that have defined meaning.
  • By all sane tools I know - Omnisharp and JetBrains Rider work.
    image
    image

Unfortunatelly VisualStudio is not one of the sane tools, so I have written this script to mitigate the issues.

I have not removed any <summary> tags in the PR, but I'm totally going to do that when it's merged into master (just want to avoid a ton merge conflicts)

cc @adamjez @djanosik @tomasherceg What do you think?

It allows us to write comments without the <summary> section, as the script completes them to fulfill VisualStudio.
@quigamdev
Copy link
Contributor

I'm not familiar with hacking Visual Studio IDE. We know how tricky things can be.
But I have to say I like this change. The summary tag is surplus.

@quigamdev quigamdev requested review from adamjez and djanosik May 5, 2018 18:25
@djanosik
Copy link
Contributor

djanosik commented May 5, 2018

There is no hacking of VS IDE involved. We will simply not see contents of "summary" comments without <summary> tags in VS IDE while working on DotVVM. But all tags are automagically added during build on CI. So consumers of NuGet packages won't be affected in any way.

However. I am not sure whether to accept this PR. Most of us work in VS and it's sometimes very helpful to see summaries of our own methods.

@exyi Have you filed an issue anywhere? Will VS ever support comments without <summary> tags?

@exyi
Copy link
Member Author

exyi commented May 6, 2018

The problem is that the C# spec does not specify any specific format of the comments, it should be just valid XML. Then there are few "recommended" tags to support. I don't think VS is going to support that anytime soon, the same way it does not support <inheritdoc/> and the same way notepad does not support C# intellisense...

The removal of documentation comments may only cause little problems when working directly with dotvvm source code, as far as I know we don't do that on any our project. And if you are working on dotvvm itself, you will need to go to definition anyway, the comments on the more internal parts are not very complete :P

Long long time ago I filed an issue to roslyn repo https://github.com/dotnet/roslyn/issues/16470 when I did not know this is not a C# problem but a Visual Studio problem. Noone even noted that this is just VS glitch :(

@exyi exyi changed the base branch from master to main November 4, 2020 20:47
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.

None yet

3 participants