1
0
mirror of https://github.com/danog/liquid.git synced 2024-11-30 05:48:56 +01:00
liquid/CONTRIBUTING.md
Oliver Steele c67d027af2 README
2017-07-07 09:35:47 -04:00

1.7 KiB

Contributing

Here's some ways to help:

  • Select an item from one of the project boards. Convert it to an Issue and assign it to yourself, so we know you're working on it.
  • Search the sources for FIXME and TODO comments.
  • Improve the code coverage. Once it reaches 90%, we can submit a PR to Awesome Go!

Review the pull request template before you get too far along on coding.

A note on lint: nolint: gocyclo has been used to disable cyclomatic complexity checks on generated functions, hand-written parsers, and some of the generic interpreter functions. IMO this check isn't appropriate for those classes of functions. This isn't a license to disable cyclomatic complexity checks or lint in general.

Cookbook

Set up your machine

Fork and clone the repo.

Install go. On macOS running Homebrew, brew install go is easier than the linked instructions.

Install package dependencies and development tools:

  • make install-dev-tools
  • go get -t ./...

Test and Lint

go test ./...
make lint

Preview the Documentation

godoc -http=:6060
open http://localhost:6060/pkg/github.com/osteele/liquid/

Work on the Expression Parser and Lexer

To work on the lexer, install Ragel. On macOS: brew install ragel.

Do this after editing scanner.rl or expressions.y:

go generate ./...

Test just the scanner:

cd expression
ragel -Z scanner.rl && go test