Skip to content

Commit 86714ff

Browse files
authored
Merge pull request #668 from wolf99/lint-markdown
Lint markdown
2 parents 25e9056 + 5b763c0 commit 86714ff

20 files changed

+189
-150
lines changed

.github/workflows/lint-docs.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: "Lint documentation"
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ main, linux ]
7+
pull_request:
8+
branches: [ main, linux ]
9+
10+
jobs:
11+
lint-markdown:
12+
name: Lint markdown files
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
16+
17+
- uses: DavidAnson/markdownlint-cli2-action@744f913a124058ee903768d3adb92a4847e5d132
18+
with:
19+
globs: "**/*.md"

.markdownlint.jsonc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// For information on writing markdownlint configuration see:
2+
// https://github.com/DavidAnson/markdownlint/blob/main/README.md#optionsconfig
3+
{
4+
"MD013": false, // Line length and line breaking convention not yet standardised across docs
5+
"MD024": false // The format for some files require repeated headings, e.g. "Example"
6+
}

CODE_OF_CONDUCT.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,12 @@ members of the project's leadership.
6767

6868
## Attribution
6969

70-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71-
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
70+
This Code of Conduct is adapted from the [Contributor Covenant][cc-homepage], version 1.4,
71+
available at [Contributor Covenant Code of Conduct][cc-coc].
7272

73-
[homepage]: https://www.contributor-covenant.org
73+
For answers to common questions about this code of conduct, see the
74+
[Contributor Covenant FAQ][cc-faq]
7475

75-
For answers to common questions about this code of conduct, see
76-
https://www.contributor-covenant.org/faq
76+
[cc-homepage]: https://www.contributor-covenant.org
77+
[cc-coc]: https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
78+
[cc-faq]: https://www.contributor-covenant.org/faq

CONTRIBUTING.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
## Contributing
1+
# Contributing
22

3-
[issue]: https://github.com/GitCredentialManager/git-credential-manager/issues
3+
[issue]: https://github.com/GitCredentialManager/git-credential-manager/issues
44
[fork]: https://github.com/GitCredentialManager/git-credential-manager/fork
55
[pr]: https://github.com/GitCredentialManager/git-credential-manager/compare
66
[code-of-conduct]: CODE_OF_CONDUCT.md
@@ -13,24 +13,24 @@ Please note that this project is released with a [Contributor Code of Conduct][c
1313

1414
## Start with an issue
1515

16-
0. Open an [issue][issue] to discuss the change you want to see.
16+
1. Open an [issue][issue] to discuss the change you want to see.
1717
This helps us coordinate and reduce duplication.
18-
0. Once we've had some discussion, you're ready to code!
18+
1. Once we've had some discussion, you're ready to code!
1919

2020
## Submitting a pull request
2121

22-
0. [Fork][fork] and clone the repository
23-
0. Configure and install the dependencies: `dotnet restore`
24-
0. Make sure the tests pass on your machine: `dotnet test`
25-
0. Create a new branch: `git switch -c my-branch-name`
26-
0. Make your change, add tests, and make sure the tests still pass
27-
0. For UI updates, test your changes by executing a `dotnet run` in applicable UI-related project directories:
22+
1. [Fork][fork] and clone the repository
23+
1. Configure and install the dependencies: `dotnet restore`
24+
1. Make sure the tests pass on your machine: `dotnet test`
25+
1. Create a new branch: `git switch -c my-branch-name`
26+
1. Make your change, add tests, and make sure the tests still pass
27+
1. For UI updates, test your changes by executing a `dotnet run` in applicable UI-related project directories:
2828
- `Atlassian.Bitbucket.UI.Avalonia`
2929
- `GitHub.UI.Avalonia`
3030
- `Atlassian.Bitbucket.UI.Windows`
3131
- `GitHub.UI.Windows`
32-
0. Push to your fork and [submit a pull request][pr]
33-
0. Pat your self on the back and wait for your pull request to be reviewed and merged.
32+
1. Push to your fork and [submit a pull request][pr]
33+
1. Pat your self on the back and wait for your pull request to be reviewed and merged.
3434

3535
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
3636

README.md

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Git Credential Manager is currently available for Windows, macOS, and Linux\*. G
2020

2121
Feature|Windows|macOS|Linux
2222
-|:-:|:-:|:-:
23-
Installer/uninstaller|✓|✓|✓
24-
Secure platform credential storage|&#10003;<br/>[(see more)](docs/credstores.md)|&#10003;<br/>[(see more)](docs/credstores.md)|&#10003;<br/>[(see more)](docs/credstores.md)
23+
Installer/uninstaller|&#10003;|&#10003;|&#10003;\*
24+
Secure platform credential storage|&#10003; [(see more)](docs/credstores.md)|&#10003; [(see more)](docs/credstores.md)|&#10003; [(see more)](docs/credstores.md)
2525
Multi-factor authentication support for Azure DevOps|&#10003;|&#10003;|&#10003;
2626
Two-factor authentication support for GitHub|&#10003;|&#10003;|&#10003;
2727
Two-factor authentication support for Bitbucket|&#10003;|&#10003;|&#10003;
@@ -39,6 +39,7 @@ Proxy support|&#10003;|&#10003;|&#10003;
3939
- Debian/Ubuntu/Linux Mint
4040
- Fedora/CentOS/RHEL
4141
- Alpine
42+
4243
## Download and Install
4344

4445
### macOS Homebrew
@@ -87,7 +88,9 @@ sudo /usr/local/share/gcm-core/uninstall.sh
8788
---
8889

8990
<!-- this explicit anchor should stay stable so that external docs can link here -->
91+
<!-- markdownlint-disable-next-line no-inline-html -->
9092
<a name="linux-install-instructions"></a>
93+
9194
### Linux
9295

9396
#### Experimental: install from source helper script
@@ -97,24 +100,24 @@ run the following:
97100

98101
1. To ensure `curl` is installed:
99102

100-
```shell
101-
curl --version
102-
```
103+
```shell
104+
curl --version
105+
```
103106

104-
If `curl` is not installed, please use your distribution's package manager
105-
to install it.
107+
If `curl` is not installed, please use your distribution's package manager
108+
to install it.
106109

107-
0. To download and run the script:
110+
1. To download and run the script:
108111

109-
```shell
110-
curl -LO https://raw.githubusercontent.com/GitCredentialManager/git-credential-manager/main/src/linux/Packaging.Linux/install-from-source.sh &&
111-
sh ./install-from-source.sh &&
112-
git-credential-manager-core configure
113-
```
112+
```shell
113+
curl -LO https://raw.githubusercontent.com/GitCredentialManager/git-credential-manager/main/src/linux/Packaging.Linux/install-from-source.sh &&
114+
sh ./install-from-source.sh &&
115+
git-credential-manager-core configure
116+
```
114117

115-
__Note:__ You will be prompted to enter your credentials so that the script
116-
can download GCM's dependencies using your distribution's package
117-
manager.
118+
**Note:** You will be prompted to enter your credentials so that the script
119+
can download GCM's dependencies using your distribution's package
120+
manager.
118121

119122
#### Ubuntu/Debian distributions
120123

@@ -124,7 +127,8 @@ Download the latest [.deb package](https://github.com/GitCredentialManager/git-c
124127
sudo dpkg -i <path-to-package>
125128
git-credential-manager-core configure
126129
```
127-
__Note:__ Although packages were previously offered on certain
130+
131+
**Note:** Although packages were previously offered on certain
128132
[Microsoft Ubuntu package feeds](https://packages.microsoft.com/repos/),
129133
GCM no longer publishes to these repositories. Please install the
130134
Debian package using the above instructions instead.
@@ -249,7 +253,7 @@ See detailed information [here](https://aka.ms/gcm/httpproxy).
249253

250254
## Contributing
251255

252-
This project welcomes contributions and suggestions.
256+
This project welcomes contributions and suggestions.
253257
See the [contributing guide](CONTRIBUTING.md) to get started.
254258

255259
This project follows [GitHub's Open Source Code of Conduct](CODE_OF_CONDUCT.md).

SECURITY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Security
2+
13
If you discover a security issue in this repo, please submit it through the [GitHub Security Bug Bounty](https://hackerone.com/github)
24

35
Thanks for helping make GitHub products safe for everyone.

docs/azrepos-users-and-tokens.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ credential. This may change in the future.
6464

6565
Normally you won't need to worry about managing which user accounts Git
6666
Credential Manager is using as this is configured automatically when you first
67-
authenticate for a particular Azure DevOps organziation.
67+
authenticate for a particular Azure DevOps organization.
6868

6969
In advanced scenarios (such as using multiple accounts) you can interact with
7070
and manage remembered user accounts using the 'azure-repos' provider command:
@@ -181,7 +181,7 @@ fabrikam:
181181
```
182182

183183
In the above example, the `~/myrepo` repository has a single Git remote named
184-
`origin` that points to the `contoso` Azure DevOps organziation. There is no
184+
`origin` that points to the `contoso` Azure DevOps organization. There is no
185185
user account specifically associated with the `origin` remote, so the global
186186
user account binding for `contoso` will be used (the global binding is
187187
inherited).

docs/bitbucket-development.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,20 @@ Assuming the user successfully logins into Bitbucket and authorizes the GCM this
6363

6464
The Access and Refresh Tokens will be stored against the username and the username/Access Token credentials returned to Git.
6565

66-
# On-Premise Bitbucket
66+
## On-Premise Bitbucket
6767

68-
On-premise Bitbucket, more correctly known as Bitbucket Server or Bitbucket DC, has a number of differences compared to the cloud instance of Bitbucket, https://bitbucket.org.
68+
On-premise Bitbucket, more correctly known as Bitbucket Server or Bitbucket DC, has a number of differences compared to the cloud instance of Bitbucket, [bitbucket.org](https://bitbucket.org).
6969

7070
As far as GCMC is concerned the main difference it doesn't support OAuth so only Basic Authentication is available.
7171

7272
It is possible to test with Bitbucket Server by running it locally using the following command from the Atlassian SDK:
7373

74-
❯ atlas-run-standalone --product bitbucket
74+
❯ atlas-run-standalone --product bitbucket
7575

76-
See https://developer.atlassian.com/server/framework/atlassian-sdk/atlas-run-standalone/.
76+
See the developer documentation for [atlas-run-standalone](https://developer.atlassian.com/server/framework/atlassian-sdk/atlas-run-standalone/).
7777

7878
This will download and run a standalone instance of Bitbucket Server which can be accessed using the credentials `admin`/`admin` at
7979

80-
https://localhost:7990/bitbucket
80+
https://localhost:7990/bitbucket
8181

82-
Instructions on how to download and install the Atlassian SDK can be found here: https://developer.atlassian.com/server/framework/atlassian-sdk/
82+
Atlassian has [documentation](https://developer.atlassian.com/server/framework/atlassian-sdk/) on how to download and install their SDK.

docs/configuration.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ The following table summarizes the change in behavior and the mapping of older v
3939
Value(s)|Old meaning|New meaning
4040
-|-|-
4141
`auto`|Prompt if required – use cached credentials if possible|_(unchanged)_
42-
`never`,<br/>`false`| Never prompt – fail if interaction is required|_(unchanged)_
43-
`always`,<br/>`force`,<br/>`true`|Always prompt – don't use cached credentials|Prompt if required (same as the old `auto` value)
42+
`never`, `false`| Never prompt – fail if interaction is required|_(unchanged)_
43+
`always`, `force`, `true`|Always prompt – don't use cached credentials|Prompt if required (same as the old `auto` value)
4444

4545
#### Example
4646

@@ -64,7 +64,7 @@ ID|Provider
6464
`azure-repos`|Azure Repos
6565
`github`|GitHub
6666
`bitbucket`|Bitbucket
67-
`gitlab`|GitLab<br/>_(supports OAuth in browser, personal access token and Basic Authentication)_
67+
`gitlab`|GitLab _(supports OAuth in browser, personal access token and Basic Authentication)_
6868
`generic`|Generic (any other provider not listed above)
6969

7070
Automatic provider selection is based on the remote URL.
@@ -92,11 +92,11 @@ Select the host provider to use when authenticating by which authority is suppor
9292
Authority|Provider(s)
9393
-|-
9494
`auto` _(default)_|_\[automatic\]_
95-
`msa`, `microsoft`, `microsoftaccount`,<br/>`aad`, `azure`, `azuredirectory`,</br>`live`, `liveconnect`, `liveid`|Azure Repos<br/>_(supports Microsoft Authentication)_
96-
`github`|GitHub<br/>_(supports GitHub Authentication)_
97-
`bitbucket`|Bitbucket.org<br/>_(supports Basic Authentication and OAuth)_<br/>Bitbucket Server<br/>_(supports Basic Authentication)_
98-
`gitlab`|GitLab<br/>_(supports OAuth in browser, personal access token and Basic Authentication)_
99-
`basic`, `integrated`, `windows`, `kerberos`, `ntlm`,<br/>`tfs`, `sso`|Generic<br/>_(supports Basic and Windows Integrated Authentication)_
95+
`msa`, `microsoft`, `microsoftaccount`, `aad`, `azure`, `azuredirectory`, `live`, `liveconnect`, `liveid`|Azure Repos _(supports Microsoft Authentication)_
96+
`github`|GitHub _(supports GitHub Authentication)_
97+
`bitbucket`|Bitbucket.org _(supports Basic Authentication and OAuth)_, Bitbucket Server _(supports Basic Authentication)_
98+
`gitlab`|GitLab _(supports OAuth in browser, personal access token and Basic Authentication)_
99+
`basic`, `integrated`, `windows`, `kerberos`, `ntlm`, `tfs`, `sso`|Generic _(supports Basic and Windows Integrated Authentication)_
100100

101101
#### Example
102102

@@ -196,7 +196,6 @@ git config --global credential.httpsProxy http://john.doe:password@proxy.contoso
196196
Override the available authentication modes presented during Bitbucket authentication.
197197
If this option is not set, then the available authentication modes will be automatically detected.
198198

199-
200199
**Note:** This setting only applies to Bitbucket.org, and not Server or DC instances.
201200

202201
**Note:** This setting supports multiple values separated by commas.
@@ -227,7 +226,6 @@ Enabling this option will improve performance when using Oauth2 and interacting
227226

228227
Enabling this option will decrease performance when using Basic Auth by requiring the user the re-enter credentials everytime.
229228

230-
231229
Value|Refresh Credentials Before Returning
232230
-|-
233231
`true`, `1`, `yes`, `on` |Always
@@ -295,7 +293,6 @@ git config --global credential.gitLabAuthModes "browser"
295293

296294
---
297295

298-
299296
### credential.namespace
300297

301298
Use a custom namespace prefix for credentials read and written in the OS credential store.
@@ -323,7 +320,7 @@ Default value on Windows is `wincredman`, on macOS is `keychain`, and is unset o
323320

324321
Value|Credential Store|Platforms
325322
-|-|-
326-
_(unset)_|Windows: `wincredman`<br/>macOS: `keychain`<br/>Linux: _(none)_|-
323+
_(unset)_|Windows: `wincredman`, macOS: `keychain`, Linux: _(none)_|-
327324
`wincredman`|Windows Credential Manager (not available over SSH).|Windows
328325
`dpapi`|DPAPI protected files. Customize the DPAPI store location with [credential.dpapiStorePath](#credentialdpapistorepath)|Windows
329326
`keychain`|macOS Keychain.|macOS
@@ -332,7 +329,7 @@ _(unset)_|Windows: `wincredman`<br/>macOS: `keychain`<br/>Linux: _(none)_|-
332329
`cache`|Git's built-in [credential cache](https://git-scm.com/docs/git-credential-cache).|Windows, macOS, Linux
333330
`plaintext`|Store credentials in plaintext files (**UNSECURE**). Customize the plaintext store location with [`credential.plaintextStorePath`](#credentialplaintextstorepath).|Windows, macOS, Linux
334331

335-
##### Example
332+
#### Example
336333

337334
```bash
338335
git config --global credential.credentialStore gpg
@@ -475,6 +472,7 @@ Credential: "git:https://github.com" (user = alice)
475472
https://github.com/contoso/widgets
476473
https://alice@github.com/contoso/widgets
477474
```
475+
478476
```text
479477
Credential: "git:https://bob@github.com" (user = bob)
480478
@@ -489,17 +487,20 @@ Credential: "git:https://github.com/foo/bar" (user = alice)
489487
490488
https://github.com/foo/bar
491489
```
490+
492491
```text
493492
Credential: "git:https://github.com/contoso/widgets" (user = alice)
494493
495494
https://github.com/contoso/widgets
496495
https://alice@github.com/contoso/widgets
497496
```
497+
498498
```text
499499
Credential: "git:https://bob@github.com/foo/bar" (user = bob)
500500
501501
https://bob@github.com/foo/bar
502502
```
503+
503504
```text
504505
Credential: "git:https://bob@github.com/example/myrepo" (user = bob)
505506

docs/development.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,34 +101,35 @@ $ GCM_TRACE=1 git-credential-manager-core version
101101
If you want code coverage metrics these can be generated either from the command line:
102102

103103
```shell
104-
$ dotnet test --collect:"XPlat Code Coverage" --settings=./.code-coverage/coverlet.settings.xml
104+
dotnet test --collect:"XPlat Code Coverage" --settings=./.code-coverage/coverlet.settings.xml
105105
```
106106

107107
Or via the VSCode Terminal/Run Task:
108108

109-
```
109+
```console
110110
test with coverage
111111
```
112112

113113
HTML reports can be generated using ReportGenerator, this should be installed during the build process, from the command line:
114114

115115
```shell
116-
$ dotnet ~/.nuget/packages/reportgenerator/*/*/net6.0/ReportGenerator.dll -reports:./**/TestResults/**/coverage.cobertura.xml -targetdir:./out/code-coverage
116+
dotnet ~/.nuget/packages/reportgenerator/*/*/net6.0/ReportGenerator.dll -reports:./**/TestResults/**/coverage.cobertura.xml -targetdir:./out/code-coverage
117117
```
118+
118119
or
119120

120121
```shell
121-
$ dotnet {$env:USERPROFILE}/.nuget/packages/reportgenerator/*/*/net6.0/ReportGenerator.dll -reports:./**/TestResults/**/coverage.cobertura.xml -targetdir:./out/code-coverage
122+
dotnet {$env:USERPROFILE}/.nuget/packages/reportgenerator/*/*/net6.0/ReportGenerator.dll -reports:./**/TestResults/**/coverage.cobertura.xml -targetdir:./out/code-coverage
122123
```
123124

124125
Or via VSCode Terminal/Run Task:
125126

126-
```
127+
```console
127128
report coverage - nix
128129
```
129130

130131
or
131132

132-
```
133+
```console
133134
report coverage - win
134-
```
135+
```

0 commit comments

Comments
 (0)