zeroshade commented on code in PR #28: URL: https://github.com/apache/iceberg-terraform/pull/28#discussion_r3003623035
########## tools/tools.go: ########## @@ -0,0 +1,28 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:build generate + +package tools + +import ( + _ "github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs" +) + +// Format Terraform code for use in documentation. +//go:generate terraform fmt -recursive ../examples/ + +// Generate documentation. +//go:generate go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs generate --provider-dir .. --provider-name iceberg --rendered-provider-name Iceberg Review Comment: Using the tool syntax would also simplify this to `go tool tfplugindocs ...` ########## tools/tools.go: ########## @@ -0,0 +1,28 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:build generate + +package tools + +import ( Review Comment: Use the `go tool` syntax that adds this to the go.mod as a tool directly. That way we don't need the extra `tools.go` file ########## Makefile: ########## @@ -13,9 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -.PHONY: test-integration test-integration-setup test-integration-exec test-integration-cleanup +.PHONY: test-integration test-integration-setup test-integration-exec test-integration-cleanup docs -test-integration: test-integration-setup test-integration-exec test-integration-cleanup ## Run integration tests +docs: ## Generate provider documentation + go generate -tags generate ./... Review Comment: We also don't want to require a build tag for go generate 😄 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
