Skip to content

Commit

Permalink
Add a step encouraging use of a linter so code conforms to Google's s…
Browse files Browse the repository at this point in the history
…tyle guide.

PiperOrigin-RevId: 513525887
Change-Id: I1432b469eca2a268d62d803929fb5bd612ef1718
  • Loading branch information
jhtschultz authored and lanctot committed Mar 7, 2023
1 parent 56e53a3 commit beecc4c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/developer_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,15 @@ ideal to first be aware of the general API (see `spiel.h`).
`NewGameState` to reflect your new game’s logic. Most API functions should
be clear from the game you copied from. If not, each API function that is
overridden will be fully documented in superclasses in `spiel.h`.
8. Once done, rebuild and rerun the tests to ensure everything passes
8. Run your code through a linter so it conforms to Google's
[style guides](https://google.github.io/styleguide/). For C++ use
[cpplint](https://github.com/google/styleguide/tree/gh-pages/cpplint), for
Python either
[pylint](https://google.github.io/styleguide/pyguide.html#21-lint)
or [YAPF](https://github.com/google/yapf/).
9. Once done, rebuild and rerun the tests to ensure everything passes
(including your new game’s test!).
9. Add a playthrough file to catch regressions:
10. Add a playthrough file to catch regressions:
* Run `./open_spiel/scripts/generate_new_playthrough.sh new_game` to
generate a random game, to be used by integration tests to prevent any
regression. `open_spiel/integration_tests/playthrough_test.py` will
Expand Down

0 comments on commit beecc4c

Please sign in to comment.