Merge pull request #6826 from issyl0/vale
Add Vale linting for our docs
This commit is contained in:
commit
f384ec50fc
6
.github/workflows/tests.yml
vendored
6
.github/workflows/tests.yml
vendored
@ -130,6 +130,12 @@ jobs:
|
|||||||
export PATH="/home/linuxbrew/.linuxbrew/bin:/usr/local/bin:/usr/bin:/bin"
|
export PATH="/home/linuxbrew/.linuxbrew/bin:/usr/local/bin:/usr/bin:/bin"
|
||||||
brew readall --aliases
|
brew readall --aliases
|
||||||
|
|
||||||
|
- name: Run vale for docs linting
|
||||||
|
run: |
|
||||||
|
export PATH="/home/linuxbrew/.linuxbrew/bin:/usr/local/bin:/usr/bin:/bin"
|
||||||
|
brew install vale
|
||||||
|
vale $(brew --repo)/docs/
|
||||||
|
|
||||||
- name: Build Docker image
|
- name: Build Docker image
|
||||||
run: |
|
run: |
|
||||||
docker pull homebrew/brew
|
docker pull homebrew/brew
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -154,6 +154,7 @@
|
|||||||
!/.editorconfig
|
!/.editorconfig
|
||||||
!/.gitignore
|
!/.gitignore
|
||||||
!/.yardopts
|
!/.yardopts
|
||||||
|
!/.vale.ini
|
||||||
!/CHANGELOG.md
|
!/CHANGELOG.md
|
||||||
!/CONTRIBUTING.md
|
!/CONTRIBUTING.md
|
||||||
!/Dockerfile
|
!/Dockerfile
|
||||||
|
4
.vale.ini
Normal file
4
.vale.ini
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
StylesPath = ./docs/vale-styles
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
BasedOnStyles = Homebrew
|
@ -9,7 +9,7 @@
|
|||||||
#
|
#
|
||||||
# When done, regenerate the man page and its HTML version by running `brew man`.
|
# When done, regenerate the man page and its HTML version by running `brew man`.
|
||||||
%>
|
%>
|
||||||
brew(1) -- The missing package manager for macOS
|
brew(1) -- The Missing Package Manager for macOS
|
||||||
================================================
|
================================================
|
||||||
|
|
||||||
## SYNOPSIS
|
## SYNOPSIS
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Bottles (binary packages)
|
# Bottles (Binary Packages)
|
||||||
|
|
||||||
Bottles are produced by installing a formula with `brew install --build-bottle <formula>` and then bottling it with `brew bottle <formula>`. This outputs the bottle DSL which should be inserted into the formula file.
|
Bottles are produced by installing a formula with `brew install --build-bottle <formula>` and then bottling it with `brew bottle <formula>`. This outputs the bottle DSL which should be inserted into the formula file.
|
||||||
|
|
||||||
|
@ -204,9 +204,9 @@ our analytics identified it was not widely used.
|
|||||||
|
|
||||||
## Homebrew is a poor name, it's too generic, why was it chosen?
|
## Homebrew is a poor name, it's too generic, why was it chosen?
|
||||||
@mxcl was too concerned with the beer theme and didn’t consider that the
|
@mxcl was too concerned with the beer theme and didn’t consider that the
|
||||||
project may actually prove popular. By the time he realised it was, it was too
|
project may actually prove popular. By the time Max realised that it
|
||||||
late. However, today, the first Google hit for “homebrew” is not beer
|
was popular, it was too late. However, today, the first Google hit for
|
||||||
related ;‑)
|
“homebrew” is not beer related ;‑)
|
||||||
|
|
||||||
## What does "keg-only" mean?
|
## What does "keg-only" mean?
|
||||||
It means the formula is installed only into the Cellar; it is not linked
|
It means the formula is installed only into the Cellar; it is not linked
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Homebrew linuxbrew-core Maintainer Guide
|
# Homebrew/linuxbrew-core Maintainer Guide
|
||||||
|
|
||||||
## Merging formulae updates from Homebrew/homebrew-core
|
## Merging formulae updates from Homebrew/homebrew-core
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ export HOMEBREW_NO_AUTO_UPDATE=1
|
|||||||
Once we've done that, we need to get access to the `merge-homebrew`
|
Once we've done that, we need to get access to the `merge-homebrew`
|
||||||
command that will be used for the merge. To do that we have to tap the
|
command that will be used for the merge. To do that we have to tap the
|
||||||
[`Homebrew/linux-dev`](https://github.com/Homebrew/homebrew-linux-dev)
|
[`Homebrew/linux-dev`](https://github.com/Homebrew/homebrew-linux-dev)
|
||||||
repo:
|
repository:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
brew tap homebrew/linux-dev
|
brew tap homebrew/linux-dev
|
||||||
@ -235,7 +235,7 @@ against the formulae:
|
|||||||
And it skips formulae if any of the following are true:
|
And it skips formulae if any of the following are true:
|
||||||
- it doesn't need a bottle
|
- it doesn't need a bottle
|
||||||
- it already has a bottle
|
- it already has a bottle
|
||||||
- the formula's tap is Homebrew/homebrew-core (the upstream macOS repo)
|
- the formula's tap is Homebrew/homebrew-core (the upstream macOS repository)
|
||||||
- there is already an open PR for the formula's bottle
|
- there is already an open PR for the formula's bottle
|
||||||
- the current branch is not master
|
- the current branch is not master
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# How To Open a Homebrew Pull Request (and get it merged)
|
# How To Open a Homebrew Pull Request
|
||||||
|
|
||||||
The following commands are used by Homebrew contributors to set up a fork of Homebrew's Git repository on GitHub, create a new branch and create a GitHub pull request ("PR") of the changes in that branch.
|
The following commands are used by Homebrew contributors to set up a fork of Homebrew's Git repository on GitHub, create a new branch and create a GitHub pull request ("PR") of the changes in that branch.
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# How to build software outside Homebrew with Homebrew `keg_only` dependencies
|
# How to Build Software Outside Homebrew with Homebrew `keg_only` Dependencies
|
||||||
|
|
||||||
## What does "keg-only" mean?
|
## What does "keg-only" mean?
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
brew(1) -- The missing package manager for macOS
|
brew(1) -- The Missing Package Manager for macOS
|
||||||
================================================
|
================================================
|
||||||
|
|
||||||
## SYNOPSIS
|
## SYNOPSIS
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
<!-- vale off -->
|
||||||
|
<!-- Disable vale linting for the whole of the style guide, because it contains deliberately bad examples. -->
|
||||||
# Prose Style Guidelines
|
# Prose Style Guidelines
|
||||||
|
|
||||||
This is a set of style and usage guidelines for Homebrew's prose documentation aimed at users, contributors, and maintainers (as opposed to executable computer code). It applies to documents like those in `docs` in the `Homebrew/brew` repository, announcement emails, and other communications with the Homebrew community.
|
This is a set of style and usage guidelines for Homebrew's prose documentation aimed at users, contributors, and maintainers (as opposed to executable computer code). It applies to documents like those in `docs` in the `Homebrew/brew` repository, announcement emails, and other communications with the Homebrew community.
|
||||||
@ -39,7 +41,7 @@ We prefer:
|
|||||||
|
|
||||||
### Structure and markup
|
### Structure and markup
|
||||||
|
|
||||||
* Sentence case in section headings, not Title Case
|
* Title Case in `h1` headings; sentence case in all other headings
|
||||||
* Periods at the ends of list items where most items in that list are complete sentences
|
* Periods at the ends of list items where most items in that list are complete sentences
|
||||||
* More generally, parallel list item structure
|
* More generally, parallel list item structure
|
||||||
* Capitalise all list items if you want, even if they're not complete sentences; just be consistent within each list, and preferably, throughout the whole page
|
* Capitalise all list items if you want, even if they're not complete sentences; just be consistent within each list, and preferably, throughout the whole page
|
||||||
@ -86,3 +88,5 @@ Refer to these guidelines to make decisions about style and usage in your own wr
|
|||||||
PRs that fix style and usage throughout a document or multiple documents are okay and encouraged. PRs for just one or two style changes are a bit much.
|
PRs that fix style and usage throughout a document or multiple documents are okay and encouraged. PRs for just one or two style changes are a bit much.
|
||||||
|
|
||||||
Giving style and usage feedback on a PR or commit that involves documents is okay and encouraged. But keep in mind that these are just guidelines, and for any change, the author may have made a deliberate choice to break these rules in the interest of understandability or aesthetics.
|
Giving style and usage feedback on a PR or commit that involves documents is okay and encouraged. But keep in mind that these are just guidelines, and for any change, the author may have made a deliberate choice to break these rules in the interest of understandability or aesthetics.
|
||||||
|
|
||||||
|
<!-- vale on -->
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Taps (third-party repositories)
|
# Taps (Third-Party Repositories)
|
||||||
|
|
||||||
`brew tap` adds more repositories to the list of formulae that `brew` tracks, updates,
|
`brew tap` adds more repositories to the list of formulae that `brew` tracks, updates,
|
||||||
and installs from. By default, `tap` assumes that the repositories come from GitHub,
|
and installs from. By default, `tap` assumes that the repositories come from GitHub,
|
||||||
@ -16,12 +16,15 @@ mistydemeo/tigerbrew
|
|||||||
dunn/emacs
|
dunn/emacs
|
||||||
```
|
```
|
||||||
|
|
||||||
|
<!-- vale Homebrew.Terms = OFF -->
|
||||||
|
<!-- The `terms` lint suggests changing "repo" to "repository". But we need the abbreviation in the tap syntax and URL example. -->
|
||||||
* `brew tap <user/repo>` makes a shallow clone of the repository at
|
* `brew tap <user/repo>` makes a shallow clone of the repository at
|
||||||
https://github.com/user/repo. After that, `brew` will be able to work on
|
https://github.com/user/repo. After that, `brew` will be able to work on
|
||||||
those formulae as if they were in Homebrew's canonical repository. You can
|
those formulae as if they were in Homebrew's canonical repository. You can
|
||||||
install and uninstall them with `brew [un]install`, and the formulae are
|
install and uninstall them with `brew [un]install`, and the formulae are
|
||||||
automatically updated when you run `brew update`. (See below for details
|
automatically updated when you run `brew update`. (See below for details
|
||||||
about how `brew tap` handles the names of repositories.)
|
about how `brew tap` handles the names of repositories.)
|
||||||
|
<!-- vale Homebrew.Terms = ON -->
|
||||||
|
|
||||||
* `brew tap <user/repo> <URL>` makes a shallow clone of the repository at URL.
|
* `brew tap <user/repo> <URL>` makes a shallow clone of the repository at URL.
|
||||||
Unlike the one-argument version, URL is not assumed to be GitHub, and it
|
Unlike the one-argument version, URL is not assumed to be GitHub, and it
|
||||||
|
@ -7,6 +7,7 @@ exclude:
|
|||||||
- bin
|
- bin
|
||||||
- CNAME
|
- CNAME
|
||||||
- Gemfile*
|
- Gemfile*
|
||||||
|
- vale-styles
|
||||||
- vendor
|
- vendor
|
||||||
|
|
||||||
plugins:
|
plugins:
|
||||||
|
12
docs/vale-styles/Homebrew/Abbreviations.yml
Normal file
12
docs/vale-styles/Homebrew/Abbreviations.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
extends: substitution
|
||||||
|
message: Use '%s'
|
||||||
|
ignorecase: false
|
||||||
|
link: 'https://github.com/Homebrew/brew/blob/master/docs/Prose-Style-Guidelines.md#style-and-usage'
|
||||||
|
level: error
|
||||||
|
nonword: true
|
||||||
|
swap:
|
||||||
|
'\beg\b': e.g.
|
||||||
|
'\bie\b': i.e.
|
||||||
|
'e\.g\.,': e.g.
|
||||||
|
'i\.e\.,': i.e.
|
8
docs/vale-styles/Homebrew/OxfordComma.yml
Normal file
8
docs/vale-styles/Homebrew/OxfordComma.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
extends: existence
|
||||||
|
message: 'No Oxford commas!'
|
||||||
|
link: 'https://github.com/Homebrew/brew/blob/master/docs/Prose-Style-Guidelines.md#typographical-conventions'
|
||||||
|
scope: sentence
|
||||||
|
level: warning
|
||||||
|
tokens:
|
||||||
|
- '(?:[^,]+,){1,}\s\w+,\sand'
|
15
docs/vale-styles/Homebrew/Pronouns.yml
Normal file
15
docs/vale-styles/Homebrew/Pronouns.yml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
extends: existence
|
||||||
|
message: Avoid gender-specific language when not necessary.
|
||||||
|
link: 'https://github.com/Homebrew/brew/blob/master/docs/Prose-Style-Guidelines.md#personal-pronouns'
|
||||||
|
level: warning
|
||||||
|
ignorecase: true
|
||||||
|
tokens:
|
||||||
|
- him
|
||||||
|
- her
|
||||||
|
- she
|
||||||
|
- he
|
||||||
|
- his
|
||||||
|
- hers
|
||||||
|
- himself
|
||||||
|
- herself
|
1
docs/vale-styles/Homebrew/README.md
Normal file
1
docs/vale-styles/Homebrew/README.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
Based on Homebrew's [Prose Style Guidelines](http://docs.brew.sh/Prose-Style-Guidelines.html).
|
9
docs/vale-styles/Homebrew/Spacing.yml
Normal file
9
docs/vale-styles/Homebrew/Spacing.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
extends: existence
|
||||||
|
message: "'%s' should have one space."
|
||||||
|
link: 'https://github.com/Homebrew/brew/blob/master/docs/Prose-Style-Guidelines.md#typographical-conventions'
|
||||||
|
level: error
|
||||||
|
nonword: true
|
||||||
|
tokens:
|
||||||
|
- '[a-z][.?!][A-Z]'
|
||||||
|
- '[.?!] {2,}[A-Z]'
|
10
docs/vale-styles/Homebrew/Terms.yml
Normal file
10
docs/vale-styles/Homebrew/Terms.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
extends: substitution
|
||||||
|
message: Use '%s' instead of '%s'.
|
||||||
|
link: 'https://github.com/Homebrew/brew/blob/master/docs/Prose-Style-Guidelines.md#terminology-words-and-word-styling'
|
||||||
|
level: error
|
||||||
|
scope: $paragraph
|
||||||
|
swap:
|
||||||
|
Pull Request: pull request
|
||||||
|
repo: repository
|
||||||
|
Rubocop: RuboCop
|
10
docs/vale-styles/Homebrew/Titles.yml
Normal file
10
docs/vale-styles/Homebrew/Titles.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
extends: capitalization
|
||||||
|
message: "'%s' should be in title case"
|
||||||
|
level: warning
|
||||||
|
scope: heading.h1
|
||||||
|
match: $title
|
||||||
|
style: AP
|
||||||
|
exceptions:
|
||||||
|
- brew(1)
|
||||||
|
- Homebrew/homebrew-core
|
||||||
|
- Homebrew/linuxbrew-core
|
12
docs/vale-styles/Homebrew/Trademarks.yml
Normal file
12
docs/vale-styles/Homebrew/Trademarks.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
extends: existence
|
||||||
|
message: 'No "TM", ™, SM, ©, ®, or other explicit indicators of rights ownership or trademarks'
|
||||||
|
link: 'https://github.com/Homebrew/brew/blob/master/docs/Prose-Style-Guidelines.md#typographical-conventions'
|
||||||
|
level: error
|
||||||
|
nonword: true
|
||||||
|
tokens:
|
||||||
|
- \bTM\b
|
||||||
|
- ™
|
||||||
|
- \bSM\b
|
||||||
|
- ©
|
||||||
|
- ®
|
@ -4,7 +4,7 @@
|
|||||||
.TH "BREW" "1" "December 2019" "Homebrew" "brew"
|
.TH "BREW" "1" "December 2019" "Homebrew" "brew"
|
||||||
.
|
.
|
||||||
.SH "NAME"
|
.SH "NAME"
|
||||||
\fBbrew\fR \- The missing package manager for macOS
|
\fBbrew\fR \- The Missing Package Manager for macOS
|
||||||
.
|
.
|
||||||
.SH "SYNOPSIS"
|
.SH "SYNOPSIS"
|
||||||
\fBbrew\fR \fB\-\-version\fR
|
\fBbrew\fR \fB\-\-version\fR
|
||||||
|
Loading…
x
Reference in New Issue
Block a user