Skip to content

fix: fmt should check for unstaged files #5362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/coder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,9 @@ jobs:
export PATH=${PATH}:$(go env GOPATH)/bin
make --output-sync -j -B fmt

- name: Check for unstaged files
run: ./scripts/check_unstaged.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thinks this is good, should we also consider doing a CI conditional for terraform fmt -check like we do for prettier and shfmt?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I noticed your comment after merging. I can iterate on this if you like, but I assume that check_unstaged.sh as an ultimate check should work here well.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries, I'll leave it up to you. Ultimately this check is great to have as a catch-all, the other is just a minor improvement which doesn't bring much benefit.


test-go:
name: "test/go"
runs-on: ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'coder' && 'ubuntu-latest-16-cores' || matrix.os == 'windows-2022' && github.repository_owner == 'coder' && 'windows-latest-8-cores'|| matrix.os }}
Expand Down
6 changes: 3 additions & 3 deletions dogfood/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ terraform {
}

variable "datocms_api_token" {
type = string
type = string
description = "An API token from DATOCMS for usage with building our website."
default = ""
default = ""
}

# Admin parameters
Expand Down Expand Up @@ -124,7 +124,7 @@ resource "docker_container" "workspace" {
# CPU limits are unnecessary since Docker will load balance automatically
memory = 32768
runtime = "sysbox-runc"
env = [
env = [
"CODER_AGENT_TOKEN=${coder_agent.dev.token}",
"DATOCMS_API_TOKEN=${var.datocms_api_token}",
]
Expand Down