Election-Tech-Initiative / electionguard-cpp

A C++ implementation of ElectionGuard specification focused on encryption components.
https://www.electionguard.vote/
MIT License
23 stars 26 forks source link

🧹 Resolve XML comment warnings for C# project #218

Closed keithrfung closed 2 years ago

keithrfung commented 2 years ago

Is there an existing issue for this?

Suggestion

During the compilation of the the C# project in bindings, there are errors related specifically to XML comments. These should be easily resolved with some /// summary tags. The descriptions can be pulled from the python repo or the underlying c code, whichever is easier.

These can be seen in this example run under windows-2019-gcc-9.2.0 or windows-2019-msvc-latest.

Examples

The following warnings:

warning CS1570: XML comment has badly formed XML -- 'End tag 'summary' does not match the start tag 'sumary'.'

warning CS1572: XML comment has a param tag for 'nonceSeed', but there is no parameter by that name

warning CS1573: Parameter 'verifyProofs' has no matching param tag in the XML comment...

warning CS1591: Missing XML comment for publicly visible type or member

Possible Implementation

Add XML comments for the c sharp members

https://docs.microsoft.com/en-us/dotnet/csharp/misc/cs1570 https://docs.microsoft.com/en-us/dotnet/csharp/misc/cs1572 https://docs.microsoft.com/en-us/dotnet/csharp/misc/cs1573 https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/cs1591

Anything else?

Replaces Issue #188

askalik commented 2 years ago

Can I take this one?

keithrfung commented 2 years ago

@askalik you got it!

AddressXception commented 2 years ago

the C++ api is pretty well documented. For instance the encryptBallot function. You'll notice in the netstandard c# implementation i've tried to just pull it over directly but some of the params and names are off, or the documentation is missing entirely for some public members, etc. Here's the c# Encrypt.Ballot as a reference too. In most cases you should be able to just use what is in c++ as an example but please reach out if you have any questions