# `nim-waku` refactor week: Track 1 checklist
This is a general "good practice" checklist that `nim-waku` modules should adhere to.
Most of these items are based on the [Nim style guide](https://status-im.github.io/nim-style-guide/), so refer to that document for a much more complete picture.
## General
- [ ] `logscope` defined for each module that uses chronicles logging
- [ ] No `result` returns
- [ ] No `discard` or `asyncCheck` dispatching of futures; use `asyncSpawn`
- [ ] No `discard` where error must be handled
- [ ] `new()` instead of `init()` for constructors of `ref object` types
## Error handling
- [ ] Top level `{.push raises: [Defect].}`
- [ ] Explicit `{.raises.}` for each applicable public (*) function
- [ ] `Opt` return type for each function where return may be empty/null
- [ ] `Result` return type for each function where multiple failure paths exists
- [ ] No reliance on empty initialisation to check for empty return
## Imports
- [ ] `export` all modules whose types are used in public functions/types
- [ ] use `std/` prefix for any `import` from stdlib
- [ ] use explicit `import` paths (e.g. `./` for modules in same path)
- [ ] judiciously, but enthusiastically, clean up unused/redundant`imports` (e.g. if underlying modules start using `export` there will be redundant imports)
- [ ] Avoid circular imports (split out types to separate module where necessary)