GithubHelp home page GithubHelp logo

p1va / dotnet-document Goto Github PK

View Code? Open in Web Editor NEW
97.0 97.0 20.0 303 KB

A tool for auto-generating XML documentation for your C# code

License: MIT License

C# 99.85% Shell 0.15%
csharp documentation documentation-generator dotnet-core dotnet-tool

dotnet-document's People

Contributors

p1va avatar pknobloch avatar selectorsvt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dotnet-document's Issues

Add `<typeparam>` tag support

We have enabled type_parameters in config, but it does not work. I mean type_parameters for classes. Does it work if I add this config parameter here? If it will, I would like to know what config parameters are available at all. I think all parameters should be listed in the default config.

Bad summary of class

Hi, thanks for this project.

This is my case :

input :

#region Licensing

// Copyright (c) XXX
// All rights reserved.

#endregion

#region Usings

using System.Diagnostics;

#endregion

namespace X.XX.Web.Api.Bases;

public static class DotEnv
{
    public static void Load(string filePath, string? prefix)
    {
        if (!File.Exists(filePath)) return;

        foreach (string line in File.ReadAllLines(filePath))
        {
            string[] parts = line.Split(
                '=',
                StringSplitOptions.RemoveEmptyEntries);

            if (parts.Length != 2) continue;

            Trace.WriteLine($"DotEnv {parts[0]} = {parts[1]}");

            Environment.SetEnvironmentVariable($"{prefix}{parts[0]}", parts[1]);
        }
    }
}

output :

#region Licensing

// Copyright (c) XXX
// All rights reserved.

#endregion

#region Usings

using System.Diagnostics;

#endregion

namespace X.XX.Web.Api.Bases;

/// <summary>

/// The dot env class

/// </summary>

public static class DotEnv
{
    /// <summary>
    /// Loads the file path
    /// </summary>
    /// <param name="filePath">The file path</param>
    /// <param name="prefix">The prefix</param>
    public static void Load(string filePath, string? prefix)
    {
        if (!File.Exists(filePath)) return;

        foreach (string line in File.ReadAllLines(filePath))
        {
            string[] parts = line.Split(
                '=',
                StringSplitOptions.RemoveEmptyEntries);

            if (parts.Length != 2) continue;

            Trace.WriteLine($"DotEnv {parts[0]} = {parts[1]}");

            Environment.SetEnvironmentVariable($"{prefix}{parts[0]}", parts[1]);
        }
    }
}

problem :

We can see the summary of the class has new lines, and breaks C# Xml doc, at least on vs22.


/// <summary>

/// The dot env class

/// </summary>

Is this the way to configure field doc template?

While applying documents I can see logline:
...: Field declaration '_myField' has no document and documentation is being generated.
but in the config which I got from dotnet document config > my-config.yaml I couldn't find anything to make the tool skip field documentation as it is required in my project.

configure my config file so only classes and functions are commented

Thank you for this cool tool!
Quick question:
I copied the default config file and modified it to disable commenting enum members.

enum_member:
  summary:
    template: The {name} {enum}
    new_line: true
  enabled: false
  required: false

using dotnet document config shows that the change has taken effect since the lines enabled and required are no longer printed:

enum_member:
  summary:
    template: The {name} {enum}
    new_line: true
default_member:

However, when I run dotnet document apply, my enum members are still being commented. I also tried this with the default_members properties etc. with the same result.
How do I have to configure my config file so only classes and functions are commented and the rest (e.g. enum members) are left alone?

Support dotnet 6

PS D:\DataWenfeng\XXXX> dotnet tool install --global dotnet-document --version 0.1.4-alpha
You can invoke the tool using the following command: dotnet-document
Tool 'dotnet-document' (version '0.1.4-alpha') was successfully installed.

PS D:\DataWenfeng\XXXX> dotnet document apply
You must install or update .NET to run this application.

App: C:\Users\wenfeng\.dotnet\tools\dotnet-document.exe
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '5.0.0' (x64)
.NET location: C:\Program Files\dotnet\

The following frameworks were found:
  6.0.6 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  6.0.7 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=5.0.0&arch=x64&rid=win10-x64

[Bug] Multiline Problem with seealso and base classes

Description

When the signature of a class has multiline base classes the Documentation does not generate comment slashes.

Expected Behaviour

The new lines should start with comment slashes (///) or the \n should be removed

Actual Behaviour

New lines do not start as a comment an break during build

Example (fictional but should work)

public class foo : bar<
    a,
    b
>
{
    ...
}

Add configuration event handlers methods

Problem

dotnet-document does not have configuration for event handlers

Method:

private void OnCancelKeyPress(object sender, ConsoleCancelEventArgs e)

Summary written by dotnet-document for this method:

/// <summary>
/// Ons the cancel key press using the specified sender.
/// </summary>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.