Skip to content

Commit 60d8068

Browse files
improvements (#35) +semver: major
1 parent e5b6a0d commit 60d8068

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1282
-791
lines changed

.vscode/launch.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,18 @@
99
"type": "coreclr",
1010
"request": "launch",
1111
"preLaunchTask": "build",
12-
"program": "${workspaceFolder}/src/XMLDoc2Markdown/bin/Debug/net6.0/XMLDoc2Markdown.dll",
12+
"program": "${workspaceFolder}/out/XMLDoc2Markdown/xmldoc2md.dll",
1313
"args": [
14-
"${workspaceFolder}/sample/MyClassLib/bin/Debug/netstandard2.0/MyClassLib.dll",
14+
"${workspaceFolder}/out/sample/MyClassLib.dll",
15+
"--output",
1516
"${workspaceFolder}/docs/sample",
1617
"--examples-path",
1718
"${workspaceFolder}/sample/docs/examples",
18-
// "--github-pages",
1919
"--back-button"
2020
],
2121
"cwd": "${workspaceFolder}/src/XMLDoc2Markdown",
2222
"console": "internalConsole",
2323
"stopAtEntry": false
24-
},
25-
{
26-
"name": ".NET Core Attach",
27-
"type": "coreclr",
28-
"request": "attach",
29-
"processId": "${command:pickProcess}"
3024
}
3125
]
3226
}

.vscode/settings.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"yaml.format.singleQuote": true,
3-
"omnisharp.enableEditorConfigSupport": true,
4-
"omnisharp.enableRoslynAnalyzers": true
3+
"sonarlint.connectedMode.project": {
4+
"connectionId": "charlesdevandiere",
5+
"projectKey": "charlesdevandiere_xmldoc2md"
6+
}
57
}

.vscode/tasks.json

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,25 @@
44
{
55
"label": "build",
66
"command": "dotnet",
7+
"dependsOn": "build sample",
78
"type": "process",
89
"args": [
910
"build",
10-
"${workspaceFolder}",
11-
"/property:GenerateFullPaths=true",
12-
"/consoleloggerparameters:NoSummary"
13-
],
14-
"problemMatcher": "$msCompile"
15-
},
16-
{
17-
"label": "publish",
18-
"command": "dotnet",
19-
"type": "process",
20-
"args": [
21-
"publish",
2211
"${workspaceFolder}/src/XMLDoc2Markdown/XMLDoc2Markdown.csproj",
23-
"/property:GenerateFullPaths=true",
24-
"/consoleloggerparameters:NoSummary"
12+
"--output",
13+
"${workspaceFolder}/out/XMLDoc2Markdown"
2514
],
2615
"problemMatcher": "$msCompile"
2716
},
2817
{
29-
"label": "watch",
18+
"label": "build sample",
3019
"command": "dotnet",
3120
"type": "process",
3221
"args": [
33-
"watch",
34-
"run",
35-
"${workspaceFolder}/src/XMLDoc2Markdown/XMLDoc2Markdown.csproj",
36-
"/property:GenerateFullPaths=true",
37-
"/consoleloggerparameters:NoSummary"
22+
"build",
23+
"${workspaceFolder}/sample/MyClassLib/MyClassLib.csproj",
24+
"--output",
25+
"${workspaceFolder}/out/sample"
3826
],
3927
"problemMatcher": "$msCompile"
4028
}

README.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
Tool to generate markdown from C# XML documentation.
44

55
[![Build Status](https://dev.azure.com/charlesdevandiere/charlesdevandiere/_apis/build/status/charlesdevandiere.xmldoc2md?branchName=master)](https://dev.azure.com/charlesdevandiere/charlesdevandiere/_build/latest?definitionId=2&branchName=master)
6-
76
[![Nuget](https://img.shields.io/nuget/v/XMLDoc2Markdown.svg?color=blue&logo=nuget)](https://www.nuget.org/packages/XMLDoc2Markdown)
7+
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=charlesdevandiere_xmldoc2md&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=charlesdevandiere_xmldoc2md)
88

99
## How to use
1010

@@ -17,19 +17,30 @@ dotnet tool install -g XMLDoc2Markdown
1717
### Generate documentation
1818

1919
```shell
20-
xmldoc2md <DLL_SOURCE_PATH> <OUTPUT_DIRECTORY>
20+
dotnet xmldoc2md <src> [options]
2121
```
2222

23-
#### Example
24-
25-
```shell
26-
xmldoc2md Sample.dll docs
27-
```
23+
| Argument | Description |
24+
|---|---|
25+
| `<src>` | DLL source path |
26+
27+
| Option | Description |
28+
|---|---|
29+
| `-o, --output <output>` | Output directory |
30+
| `--index-page-name <index-page-name>` | Name of the index page [default: index] |
31+
| `--examples-path <examples-path>` | Path to the code examples to insert in the documentation |
32+
| `--github-pages` | Remove '.md' extension from links for GitHub Pages |
33+
| `--gitlab-wiki` | Remove '.md' extension and './' prefix from links for gitlab wikis |
34+
| `--back-button` | Add a back button on each page |
35+
| `--member-accessibility-level <internal\|private\|protected\|public>` | Minimum accessibility level of members to be documented. [default: protected] |
36+
| `--structure <flat\|tree>` | Documentation structure. [default: flat] |
37+
| `--version` | Show version information |
38+
| `-?, -h, --help` | Show help and usage information |
2839

29-
### Display command line help
40+
#### Example
3041

3142
```shell
32-
xmldoc2md -h
43+
dotnet xmldoc2md Sample.dll --output docs --github-pages --back-button
3344
```
3445

3546
See complete documentation [here](https://charlesdevandiere.github.io/xmldoc2md/).

XMLDoc2Markdown.sln

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 16
4-
VisualStudioVersion = 16.0.31205.134
5-
MinimumVisualStudioVersion = 15.0.26124.0
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.31903.59
5+
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XMLDoc2Markdown", "src\XMLDoc2Markdown\XMLDoc2Markdown.csproj", "{DFCBB3CC-9CD3-4243-9D36-979B3DDF5CBC}"
77
EndProject
88
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{86F413BA-3624-44AD-B2D9-3E83E5F89274}"

azure-pipelines.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@ name: $(GitVersion.FullSemVer)
22
pool:
33
vmImage: 'ubuntu-latest'
44

5-
variables:
6-
buildConfiguration: Release
7-
85
trigger:
9-
batch: true
106
branches:
117
include:
128
- master
@@ -21,7 +17,7 @@ steps:
2117
inputs:
2218
versionSpec: '5.x'
2319

24-
- script: dotnet pack ./src/XMLDoc2Markdown/XMLDoc2Markdown.csproj -c $(buildConfiguration) -o $(Build.ArtifactStagingDirectory)/out -p:Version=$(GitVersion.SemVer)
20+
- script: dotnet pack ./src/XMLDoc2Markdown/XMLDoc2Markdown.csproj -o $(Build.ArtifactStagingDirectory)/out -p:Version=$(GitVersion.SemVer)
2521
displayName: 'dotnet pack'
2622

2723
- publish: $(Build.ArtifactStagingDirectory)/out

docs/README.md

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,30 @@ dotnet tool install -g XMLDoc2Markdown
1515
### Generate documentation
1616

1717
```shell
18-
xmldoc2md <DLL_SOURCE_PATH> <OUTPUT_DIRECTORY>
18+
dotnet xmldoc2md <src> [options]
1919
```
2020

21+
| Argument | Description |
22+
|---|---|
23+
| `<src>` | DLL source path |
24+
25+
| Option | Description |
26+
|---|---|
27+
| `-o, --output <output>` | Output directory |
28+
| `--index-page-name <index-page-name>` | Name of the index page [default: index] |
29+
| `--examples-path <examples-path>` | Path to the code examples to insert in the documentation |
30+
| `--github-pages` | Remove '.md' extension from links for GitHub Pages |
31+
| `--gitlab-wiki` | Remove '.md' extension and './' prefix from links for gitlab wikis |
32+
| `--back-button` | Add a back button on each page |
33+
| `--member-accessibility-level <internal\|private\|protected\|public>` | Minimum accessibility level of members to be documented. [default: protected] |
34+
| `--structure <flat\|tree>` | Documentation structure. [default: flat] |
35+
| `--version` | Show version information |
36+
| `-?, -h, --help` | Show help and usage information |
37+
2138
#### Example
2239

2340
```shell
24-
xmldoc2md Sample.dll docs
41+
dotnet xmldoc2md Sample.dll --output docs --github-pages --back-button
2542
```
2643

2744
### Insert code example
@@ -81,26 +98,3 @@ Lorem ipsum...
8198
new MyClass();
8299
```
83100
~~~
84-
85-
### Display command line help
86-
87-
```shell
88-
xmldoc2md -h
89-
```
90-
91-
```text
92-
Usage: xmldoc2md [arguments] [options]
93-
94-
Arguments:
95-
src DLL source path
96-
out Output directory
97-
98-
Options:
99-
-v|--version Show version information
100-
-?|-h|--help Show help information
101-
--index-page-name Name of the index page (default: "index")
102-
--examples-path Path to the code examples to insert in the documentation
103-
--github-pages Remove '.md' extension from links for GitHub Pages
104-
--gitlab-wiki Remove '.md' extension and './' prefix from links for gitlab wikis
105-
--back-button Add a back button on each page
106-
```

docs/sample/index.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# MyClassLib
22

3+
## No namespace
4+
5+
[Program](./program)
6+
37
## MyClassLib
48

59
[IMyInterface](./myclasslib.imyinterface)
@@ -10,8 +14,12 @@
1014

1115
[MyEnum](./myclasslib.myenum)
1216

17+
[MyFlag](./myclasslib.myflag)
18+
1319
[MyObsoleteClass](./myclasslib.myobsoleteclass)
1420

21+
[MyStaticClass](./myclasslib.mystaticclass)
22+
1523
## MyClassLib.SubNamespace
1624

1725
[GenericClass&lt;T&gt;](./myclasslib.subnamespace.genericclass-1)

docs/sample/myclasslib.myabstractclass.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ public abstract int MyProperty { get; set; }
2929
[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)<br>
3030
The property value.
3131

32+
## Constructors
33+
34+
### **MyAbstractClass()**
35+
36+
```csharp
37+
protected MyAbstractClass()
38+
```
39+
3240
## Methods
3341

3442
### **Do()**

0 commit comments

Comments
 (0)