terraform-aws-gitlab-runner icon indicating copy to clipboard operation
terraform-aws-gitlab-runner copied to clipboard

Fix formatting and docs during pre-commit?

Open kayman-mk opened this issue 3 years ago • 4 comments
trafficstars

I always struggle with

  • formatting the code prior to commit
  • updating the Terraform docs before commit

I saw that pre-commit is used to verify that everything is ok. What about changing the files during the pre-commit automatically thus making life easier for developers?

kayman-mk avatar Jan 05 '22 12:01 kayman-mk

Github action: Format Terraform code: https://faun.pub/format-your-terraform-code-with-github-actions-2ce3ccdd6fb6

kayman-mk avatar Jan 08 '22 15:01 kayman-mk

Seems that it was already in place. Guess I didn't use pre-commit on my developer machine due to missing Python, argh. But I added support to format all files recursively.

kayman-mk avatar Jan 09 '22 19:01 kayman-mk

Seems that the docs are created in the develop branch. Can we do it for the formating as well?

kayman-mk avatar Jun 21 '22 21:06 kayman-mk

@npalm Shall we update the Github workflow to format the code as well? Found an action to do that:

      - name: terraform fmt
        uses: dflook/terraform-fmt@v1
        with:
          path: my-terraform-config

We could remove the format step from the pre-commit then to become a little bit faster when coding.

kayman-mk avatar Jun 23 '22 09:06 kayman-mk

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days.

github-actions[bot] avatar Mar 17 '23 02:03 github-actions[bot]

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days.

github-actions[bot] avatar May 17 '23 02:05 github-actions[bot]

This issue was closed because it has been stalled for 15 days with no activity.

github-actions[bot] avatar Jun 01 '23 03:06 github-actions[bot]