terraform-plugin-docs
terraform-plugin-docs copied to clipboard
feat: improve error experience, linting, and more
Hello! This PR has quite a few error related improvements, as well as fixes recommended from golangci-lint. If you'd like me to move the lint related fixes into another PR, I can do that as well.
List of changes:
- Wrapped quite a few errors, which helps track down the specific logic that had an issue, if a user receives an error.
- Configure
tfexecto redirectstderrreturned from the terraform CLI, back to the user. This will give context to errors like "configuration is invalid" where you can't tell what the error is.- This will very likely help users in these issues (it helped me when I received the same error):
- https://github.com/hashicorp/terraform-plugin-docs/issues/169
- https://github.com/hashicorp/terraform-plugin-docs/issues/167
- https://github.com/hashicorp/terraform-plugin-docs/issues/136
- This will very likely help users in these issues (it helped me when I received the same error):
- Migrated away from
io/ioutilas it has been deprecated since Go 1.16. - Fixed a few cases where errors were being masked and not properly handled.
- Added a golangci-lint configuration file (
.golang-ci.yml), which will help with https://github.com/hashicorp/terraform-plugin-docs/issues/144. - Simplified and cleaned up quite a few things based off recommendations from golangci-lint.
If there are any adjustments you'd like me to make, I'd be happy to!
Any updates?