Skip to content

Commit

Permalink
Update documentation contributing guidelines (#1565)
Browse files Browse the repository at this point in the history
* Update documentation contributing guidelines

* intentional error

* Revert "intentional error"

This reverts commit f77d246.
  • Loading branch information
joelim-work authored Jan 1, 2024
1 parent f8399eb commit c88b8ea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Cross-compile on all supported platforms
run: gen/xbuild.sh

generate:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -59,8 +59,8 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.19"
go-version: "1.18"

- name: Test `go fmt && go generate` on Go 1.19 creates no diffs
run: go fmt && go generate && git diff --exit-code
- name: Test `go fmt` creates no diffs
run: go fmt && git diff --exit-code

10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Global variable names are prefixed with `g` as in `gFooBar`.
Exceptions are variables holding values of environmental variables which are prefixed with `env` as in `envFooBar` and regular expressions which are prefixed with `re` as in `reFooBar` when they are global.
- Type and function names are small case as in `fooBar` since we don't use exporting.
- For file name variables, `name`, `fname`, or `filename` should refer to the base name of the file as in `baz.txt`, and `path`, `fpath`, or `filepath` should refer to the full path of the file as in `/foo/bar/baz.txt`.
- Run `go fmt && go generate` using Go 1.19+. On earlier versions of Go, `go generate` creates needless whitespace differences.
- Run `go fmt` to ensure that files are formatted correctly.

Use the surrounding code as reference when in doubt as usual.

Expand All @@ -28,8 +28,8 @@ Adding a new option usually requires the following steps:
- Add option evaluation logic to `setExpr.eval` in `eval.go`
- Implement the option somewhere in the code
- Add option name to `gOptWords` in `complete.go` for tab completion
- Add option name and its default value to `Quick Reference` and `Options` sections in `doc.go`
- Run `go generate` to update the documentation
- Add option name and its default value to `Quick Reference` and `Options` sections in `doc.md`
- Run `gen/doc-with-docker.sh` to update the documentation
- Commit your changes and send a pull request

## Adding a new builtin command
Expand All @@ -40,8 +40,8 @@ Adding a new command usually requires the following steps:
- Add command evaluation logic to `callExpr.eval` in `eval.go`
- Implement the command somewhere in the code
- Add command name to `gCmdWords` in `complete.go` for tab completion
- Add command name to `Quick Reference` and `Commands` sections in `doc.go`
- Run `go generate` to update the documentation
- Add command name to `Quick Reference` and `Commands` sections in `doc.md`
- Run `gen/doc-with-docker.sh` to update the documentation
- Commit your changes and send a pull request

## Platform specific code
Expand Down

0 comments on commit c88b8ea

Please sign in to comment.