From 9d7c814ed56008f64f56ca2b609efc761bd241fb Mon Sep 17 00:00:00 2001 From: Spenser Black Date: Thu, 10 Aug 2023 11:15:59 -0400 Subject: [PATCH] docs: Document testing branches --- HACKING.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/HACKING.md b/HACKING.md index 0722d7e9..0986cd2d 100644 --- a/HACKING.md +++ b/HACKING.md @@ -9,7 +9,9 @@ This project uses [insta][insta] for snapshot testing. Review the instructions for using insta and installing the `cargo insta` executable. -## Language Support +## Development + +### Language Support While the library does support providing your own language definitions, the "out-of-the-box" language definitions are defined in @@ -19,7 +21,7 @@ to help identify languages, etc. Pretty much anything involving language detection or the returned language data comes from this file (but there are a few exceptions). -### The `languages.yaml` file +#### The `languages.yaml` file A language looks roughly like this: @@ -61,7 +63,7 @@ All entries in this file should be alphabetized. There is a by the CI. But surely you'll run it locally so that the CI passes the first time, right? ;) -### File Attributes +#### File Attributes This tool also tries to detect if a file is documentation, generated, or vendored. These can be a bit too complex to be managed with a data file, so you'll need to @@ -71,6 +73,12 @@ Check `documentation.rs`, `generated.rs`, and `vendored.rs` in [`gengo/src`][lib to update detection for these. For performance reasons, checks that *don't* require reading contents should always be done before checks that *do* read contents. +## Testing + +Because this project analyzes git revisions, some of the tests are run +commits in this project that are unreachable from `main`. Make sure to +fetch branches that are prefixed with `test/` from this repository. + [check-languages-script]: ./scripts/check-languages-file.rb [insta]: https://crates.io/crates/insta [languages-file]: ./gengo/languages.yaml