Skip to content

Commit

Permalink
Merge pull request #2 from aireilly/update-repo-setup
Browse files Browse the repository at this point in the history
fixup
  • Loading branch information
aireilly authored Jan 23, 2024
2 parents 58bdc33 + 5b56675 commit 2879592
Showing 1 changed file with 15 additions and 31 deletions.
46 changes: 15 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,46 @@
# Vale rules for Localization


## Vale ruleset for Localization

This repo contains Vale rules to check for correct AsciiDoc syntax in AsciiDoc module files. These syntax rules are derived from Red Hat's [Modular Docs Guidelines](https://redhat-documentation.github.io/modular-docs/) and [OpenShift Docs Guidelines](https://github.com/openshift/openshift-docs/blob/main/contributing_to_docs/doc_guidelines.adoc).
This repo contains Vale rules to check for correct Localization syntax in AsciiDoc files.

For Vale installation steps, see here: https://vale.sh/docs/vale-cli/installation/

**_NOTE:_** If you need Vale rules to lint grammar and accepted Red Hat terminology in AsciiDoc, see [Vale at Red Hat](https://github.com/redhat-documentation/vale-at-red-hat/).
**_NOTE:_** If you need Vale rules to lint grammar and accepted Red Hat terminology in Localization, see [Vale at Red Hat](https://github.com/redhat-documentation/vale-at-red-hat/).

## Testing the `AsciiDoc` rule set
To test the `AsciiDoc` rule set, add a `.vale.ini` configuration file in your modules directory.
## Testing the `Localization` rule set
To test the `Localization` rule set, add a `.vale.ini` configuration file in your modules directory.

1. Add a `.vale.ini` file to your **/modules** directory with the following content:
1. Add a `.vale.ini` file to your repo root directory with the following content:

```
StylesPath = ../.vale/styles
StylesPath = .vale/styles
MinAlertLevel = suggestion
Packages = https://github.com/rohennes/vale-asciidoc/releases/download/AsciiDoc/AsciiDoc.zip
Packages = https://github.com/reachlekha/vale-localization/releases/download/Localization/Localization.zip
[[!.]*.adoc]
BasedOnStyles = RedHat, AsciiDoc
BasedOnStyles = RedHat, Localization
```

**Note:** This is a separate `vale.ini` file that is designed for modules only - not assemblies. If you are using this with `openshift-docs` or any other repo, don't overwrite existing `vale.ini` files.
2. Run `vale sync`

2. Run `vale sync` in the modules directory.
## Verification

### Verification
To verify, run `vale ls-config` in your modules directory to check that the `Localization` package is installed.

To verify, run `vale ls-config` in your modules directory to check that the `AsciiDoc` package is installed.

_Example output_
_Example output_

```
{
"BlockIgnores": {},
"Checks": null,
"Formats": {},
"Asciidoctor": {},
"Localization": {},
...
"SBaseStyles": {
"[!.]*.adoc": [
"AsciiDoc"
"Localization"
]
...
}
```

## Optional: Exclude the Vale configuration file from Git

To exclude the `.vale.ini` configuration file from Git, add the file to the list of ignored files in a global `.gitignore` file in your home directory.

1. Add the following content to a `.gitignore` file in your home directory:

`modules/.vale.ini `

2. If you didn't have a .gitignore file previously in your home dir, you may need to make git aware of this global .gitignore file by running the following:

`git config --global core.excludesFile '~/.gitignore'`

0 comments on commit 2879592

Please sign in to comment.