Commit Graph

16 Commits

Author SHA1 Message Date
Fraser Waters d4c913aa34
Fix remaining lint issues ()
All paralleltest issues, also turns on the linter for these files now
they lint ok.
2023-12-02 17:16:09 +00:00
Justin Van Patten a6f4815267 Add aliases/go/retype_component_child test 2023-06-14 05:19:17 -07:00
Justin Van Patten 6e2eadfb61 Add aliases/go/rename_component_child test 2023-06-14 05:19:17 -07:00
Justin Van Patten 34f4464957 Add aliases/go/extract_component_child test 2023-06-14 05:19:17 -07:00
Justin Van Patten 1a27c09e71 Add aliases/go/adopt_component_child test 2023-06-14 05:19:17 -07:00
Abhinav Gupta 7aa5b77a0c
all: Reformat with gofumpt
Per team discussion, switching to gofumpt.

[gofumpt][1] is an alternative, stricter alternative to gofmt.
It addresses other stylistic concerns that gofmt doesn't yet cover.

  [1]: https://github.com/mvdan/gofumpt

See the full list of [Added rules][2], but it includes:

- Dropping empty lines around function bodies
- Dropping unnecessary variable grouping when there's only one variable
- Ensuring an empty line between multi-line functions
- simplification (`-s` in gofmt) is always enabled
- Ensuring multi-line function signatures end with
  `) {` on a separate line.

  [2]: https://github.com/mvdan/gofumpt#Added-rules

gofumpt is stricter, but there's no lock-in.
All gofumpt output is valid gofmt output,
so if we decide we don't like it, it's easy to switch back
without any code changes.

gofumpt support is built into the tooling we use for development
so this won't change development workflows.

- golangci-lint includes a gofumpt check (enabled in this PR)
- gopls, the LSP for Go, includes a gofumpt option
  (see [installation instrutions][3])

  [3]: https://github.com/mvdan/gofumpt#installation

This change was generated by running:

```bash
gofumpt -w $(rg --files -g '*.go' | rg -v testdata | rg -v compilation_error)
```

The following files were manually tweaked afterwards:

- pkg/cmd/pulumi/stack_change_secrets_provider.go:
  one of the lines overflowed and had comments in an inconvenient place
- pkg/cmd/pulumi/destroy.go:
  `var x T = y` where `T` wasn't necessary
- pkg/cmd/pulumi/policy_new.go:
  long line because of error message
- pkg/backend/snapshot_test.go:
  long line trying to assign three variables in the same assignment

I have included mention of gofumpt in the CONTRIBUTING.md.
2023-03-03 09:00:24 -08:00
Zaid Ajaj 1fe94e8e15 Test retype remote component and child using aliases 2023-02-04 19:53:43 +01:00
Robbie McKinstry a96a69db28
Rename "Smoke" test to "Acceptance" tests
After internal discussion, we determined "smoke" is a misleading
adjective for this category of tests. What we called "smoke tests"
are short integration tests for basic cross-platform functionality.
As a result, these are better named "acceptance" tests, since smoke
tests are intended to be a low water mark at the unit level to sniff
out bigger issues with the build as a whole.
2023-01-30 15:38:37 -05:00
Robbie McKinstry ff82b7e1b1
Rename !smoke to !xplatform-acceptance 2023-01-30 14:19:40 -05:00
Aaron Friel 6642fb5f1a Improve ProgramTest errors and path handling for Go programs 2022-12-13 06:53:09 -08:00
Aaron Friel 2af74b6469 ci: Use reduced smoke testing on Windows & macOS targets 2022-09-21 09:55:06 -07:00
Fraser Waters 84ef37a416
More alias tests ()
* Add more tests for aliases

* Mark the alias property as reserved
2022-06-29 19:50:26 +01:00
Aaron Friel ed2923653c ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00
Anton Tayanovskyy 30278f8e4c
Let alias tests compile under tags=all () 2021-07-12 14:38:51 -04:00
pulumi-bot 73a66f48ea [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
Lee Briggs 09c73c1c9b
add build tags to all integration tests ()
* add build tags to all integration tests

* fix go sdk imports

* make transformation Dirs global
2020-09-02 09:11:15 -07:00