Skip to content

Commit

Permalink
docs: todo
Browse files Browse the repository at this point in the history
  • Loading branch information
rharkor committed May 27, 2024
1 parent 7cd42b3 commit 9500422
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ With this template, you get all the awesomeness you need:
- [Git flow](#git-flow)
- [Api development](#api-development)
- [Api errors](#api-errors)
- [Banned keywords](#banned-keywords)
- [❌ Common issues](#-common-issues)
- [Cannot commit](#cannot-commit)
- [S3 upload error cors](#s3-upload-error-cors)
Expand Down Expand Up @@ -517,6 +518,17 @@ For the interaction with the api you can use the `trpc` library. It's a library
All the possible errors are defined in `apps/app/src/langs/errors/<lang>.json`
### Banned keywords
In order to avoid using banned keywords in the codebase, we use the `banned-keywords.sh`. This script will check if there are any banned keywords in the codebase. By default all `TODO` and `FIXME` comments are banned.
Use this rules at your advantage !
For example if you are debugging a feature and you have commented some code you can use one of the following keywords to ensure this cannot be merged in the main branch.
```ts
// TODO: Debugging feature
```
## ❌ Common issues
### Cannot commit
Expand Down
4 changes: 2 additions & 2 deletions packages/scripts/banned-keywords.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
#* Search for banned keywords in the source code. And exit with an error if any

# List of keywords to check for
keywords=("TODO")
keywords=("TODO", "FIXME")

# Directory to search for source code
source_code_dir="../"

# Exclude node_modules and .next directories
exclude_dir="--exclude-dir=node_modules --exclude-dir=.next --exclude-dir=.git --exclude=banned-keywords.sh --exclude-dir=.terraform --exclude-dir=dist --exclude-dir=build"
exclude_dir="--exclude-dir=node_modules --exclude-dir=.next --exclude-dir=.git --exclude=banned-keywords.sh --exclude=README.md --exclude-dir=.terraform --exclude-dir=dist --exclude-dir=build"


echo Start searching..
Expand Down

0 comments on commit 9500422

Please sign in to comment.