diff --git a/README.md b/README.md index 18277a8..0deefac 100644 --- a/README.md +++ b/README.md @@ -9,16 +9,25 @@ folders for each year in the `./src` folder (for example `./src/Y21`, `./src/Y23 ## 🛠 Setup and running - Run `composer install` to install the dependencies. - Run `./aoc day {day} {year?}` to run the solution for a specific day. If year is not given, use the current year (for example `./aoc day 1` to run the code for day 1 2023) +- Run `./aoc test {day} {year?}` to run the solution against the specified results. - Run `./aoc puzzle {day} {year?}` to get the description of the puzzle for the specific day. -- Run `composer test` to automatically validate the solutions. + +> **Tips:** +> - You can add `--one` or `--two` (or `-1` and `-2`) to the day to run the solution for part 1 or part 2. +> - You can add `--skip-example` (or `-s`) to skip the example data. + +## 🧪 Testing and quality control +- Run `./vendor/bin/pest` to automatically validate the solutions. +- Run `./vendor/bin/phpstan analyse` to run static analysis on the code. +- Run `./vendor/bin/php-cs-fixer fix` to run (and fix) code style checks. ## 🧩 Add a new puzzle/solution - Create a directory in `./data/Y??/day?` with the correct name. - Create `example.txt` with the example values from the puzzle. + - If there are different examples for part 1 and part 2, create `example-part1.txt` and `example-part2.txt`. - Create `data.txt` with your personal input. - - Create `puzzle.md` with the puzzle description. You can use [this plugin](https://github.com/kfarnung/aoc-to-markdown) to easily convert the puzzle to markdown. + - (optional) Create `puzzle.md` with the puzzle description. You can use [this plugin](https://github.com/kfarnung/aoc-to-markdown) to easily convert the puzzle to markdown. - Create a new class in the `src/Y??/Day??.php` directory and make sure it has the structure defined below. -- Run `composer test` to run all the tests.
Solution structure