Skip to content

Commit 75e7837

Browse files
committed
chore: Coderabbit nitpicks
1 parent 5aed527 commit 75e7837

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,10 @@ For users who prefer not to install tools locally, Docker-based versions are ava
355355
| `terraform_trivy_docker` | `terraform_trivy` | Security analysis with Trivy using Docker |
356356
| `infracost_breakdown_docker` | `infracost_breakdown` | Infrastructure cost analysis using Docker |
357357

358+
> **Note:**
359+
> By default, `terraform_docs_docker` is configured with `pass_filenames: false` and an explicit `.` target. This documents only the root module, which is the most common use case. If you want to generate documentation for multiple modules in a monorepo, you can customize the `args` in your own `.pre-commit-config.yaml` (for example, add `--recursive` to the arguments).
360+
361+
358362
**Benefits of Docker hooks:**
359363

360364
* No need to install individual tools on your local machine
@@ -364,10 +368,10 @@ For users who prefer not to install tools locally, Docker-based versions are ava
364368

365369
**Requirements and limitations:**
366370

367-
* Docker must be installed and accessible
368-
* For pre-commit.ci users: At this time, skip these hooks because pre-commit.ci agents do not have Docker available.
369-
* _Note: pre-commit has a Docker setup for hooks, so Docker support may be added in the future._
370-
* **You can still use Docker-based hooks in CI/CD pipelines** (such as GitHub Actions, GitLab CI, etc.) by running `pre-commit run --all-files` (or `pre-commit run -a`) on a self-hosted or GitHub-hosted runner where Docker is available. This allows you to enforce the same checks in CI as locally, even if pre-commit.ci does not support Docker yet.
371+
* Docker must be installed and accessible.
372+
* For pre-commit.ci: its agents do not have Docker; skip these hooks for now.
373+
* Note: pre-commit supports Docker hooks, so pre-commit.ci may add Docker support in the future.
374+
* You can still use Docker-based hooks in CI/CD (e.g., GitHub Actions, GitLab CI) by running `pre-commit run --all-files` (or `pre-commit run -a`) on runners where Docker is available. This enforces the same checks in CI as locally, even if pre-commit.ci doesn’t support Docker yet.
371375

372376
**Skipping Docker hooks on pre-commit.ci:**
373377

@@ -1272,7 +1276,7 @@ The [recommended command](#4-run) to run the Docker container is:
12721276

12731277
```bash
12741278
TAG=latest
1275-
docker run -e "USERID=$(id -u):$(id -g)" -v "$(pwd):/lint" -w "/lint" ghcr.io/antonbabenko/pre-commit-terraform:latest run -a
1279+
docker run -e "USERID=$(id -u):$(id -g)" -v "$(pwd):/lint" -w "/lint" ghcr.io/antonbabenko/pre-commit-terraform:$TAG run -a
12761280
```
12771281

12781282
which uses your current session's user ID and group ID to set the variable in the run command. Without this setting, you may find files and directories owned by `root` in your local repository.

0 commit comments

Comments
 (0)