From b312ee95cb643c24ed9687d545325b4cb83be8cc Mon Sep 17 00:00:00 2001 From: Dave Brophy Date: Sun, 29 May 2022 18:51:28 -0300 Subject: [PATCH] Tweaked contributing section and moved to separate readme --- README.md | 85 +++---------------------------------------------- README.md.tpl | 85 +++---------------------------------------------- contributing.md | 78 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 86 insertions(+), 162 deletions(-) create mode 100644 contributing.md diff --git a/README.md b/README.md index b03e5a2..bb8c7f4 100644 --- a/README.md +++ b/README.md @@ -697,87 +697,10 @@ This package is well tested and used in many projects. The API should be conside Feel free to create an [issue](https://github.com/dave/dst/issues) or chat in the [#dst](https://gophers.slack.com/messages/CCVL24MTQ) Gophers Slack channel. +## Contributing -## Building/Developing/Contributing +For further developing or contributing to `dst`, check out [these notes](https://github.com/dave/dst/blob/master/contributing.md). -The `dst` package relies heavily on code generation. So heavily, in fact, that *this* `README.md` is -itself generated by a preprocessor! Here are a few tips/tricks to get started developing `dst`. +## Special thanks -### Adding Features, Fixing Bugs - -Generally speaking, code handling node annotation is generated from the files in the `gendst` directory. -In order to add/change decorations, edit the `gendst/data.go` file. Once you have made your edits, you can -regenerate the library's source code based on those changes by - -1. `go run github.com/dave/dst/gendst`: This command will build and run a program generated from the -source code in the `gendst` folder that regenerates all the dst source fiels to reflect the changes -that you just made in the `gendst/data.go` file. - -Whenever you make a change to the `gendst/data.go` file, you must perform the aforementioned step. - -If you add a Node to the `gendst/data.go` file, you will need to make corresponding additions to non-generated -files as well. Those files include, but are not limited to,: - -- `dst.go` -- `walk.go` -- `dstutil/rewrite.go` - -Depending on the changes that you have made to the description of the decorated Nodes, you may have to change some, none, -or all of those files listed above (or even others that are not listed!). - -### Adding/Running Tests - -Test files are also generated. Any changes to the decorations of Nodes (or the addition of new Nodes) should be accompanied -by tests. The easiest way to generate tests is to make additions to the `gendst/positions.go` file. - -The format of the file is ... - -``` -// -// -// +//