Skip to content

Commit 2457075

Browse files
Merge pull request openshift#248 from wking/drop-structure-check-references
CONTRIBUTING: Drop stale structure-check references
2 parents cf98250 + 0581e47 commit 2457075

File tree

3 files changed

+20
-9
lines changed

3 files changed

+20
-9
lines changed

CONTRIBUTING.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,18 @@ For contributors who want to work up pull requests, the workflow is roughly:
3838
3. Make sure your commit messages are in the proper format (see [below](#commit-message-format)).
3939
4. Push your changes to a topic branch in your fork of the repository.
4040
5. Make sure the tests pass, and add any new tests as appropriate.
41-
6. Please run this command before submitting your pull request:
41+
6. We run a number of linters and tests on each pull request.
42+
You may wish to run these locally before submitting your pull request:
4243
```sh
43-
make structure-check
44+
hack/go-fmt.sh .
45+
hack/go-lint.sh $(go list -f '{{ .ImportPath }}' ./...)
46+
hack/go-vet.sh ./...
47+
hack/shellcheck.sh
48+
hack/test-bazel-build-tarball.sh
49+
hack/tf-fmt.sh -list -check
50+
hack/tf-lint.sh
51+
hack/yaml-lint.sh
4452
```
45-
Note that a portion of the docs and examples are generated and that the generated files are to be committed by you. `make structure-check` checks that what is generated is what you must commit.
4653
7. Submit a pull request to the original repository.
4754
8. The [repo](OWNERS) [owners](OWNERS_ALIASES) will respond to your issue promptly, following [the ususal Prow workflow][prow-review].
4855

@@ -52,9 +59,7 @@ Thanks for your contributions!
5259

5360
The coding style suggested by the Golang community is used in installer. See the [style doc][golang-style] for details. Please follow them when working on your contributions.
5461

55-
Tectonic Installer includes syntax checks on the Terraform templates which will fail the PR checker for non-standard formatted code.
56-
57-
Use `make structure-check` to identify files that don't meet the canonical format and style. Then, use `terraform fmt` to align the template syntax, if necessary.
62+
Terraform has similar standards, and you can run `terraform fmt` to rewrite Terraform files to the canonical format.
5863

5964
## Commit Message Format
6065

hack/shellcheck.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ if [ "$IS_CONTAINER" != "" ]; then
44
find "${TOP_DIR}" \
55
-path "${TOP_DIR}/vendor" -prune \
66
-o -path "${TOP_DIR}/.build" -prune \
7+
-o -path "${TOP_DIR}/tests/smoke/vendor" -prune \
8+
-o -path "${TOP_DIR}/tests/smoke/.build" -prune \
79
-o -type f -name '*.sh' -exec shellcheck --format=gcc {} \+
810
else
911
podman run --rm \
1012
--env IS_CONTAINER=TRUE \
1113
--volume "${PWD}:/workdir:ro,z" \
1214
--entrypoint sh \
15+
--workdir /workdir \
1316
quay.io/coreos/shellcheck-alpine:v0.5.0 \
14-
/workdir/hack/shellcheck.sh /workdir
17+
/workdir/hack/shellcheck.sh "${@}"
1518
fi;

hack/tf-fmt.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22

33
# in prow, already in container, so no 'podman run'
44
if [ "$IS_CONTAINER" != "" ]; then
5+
if [ "${#N}" -gt 1 ]; then
6+
set -- -list -check -write=false
7+
fi
58
set -x
6-
/terraform fmt -list -check -write=false
9+
/terraform fmt "${@}"
710
else
811
podman run --rm \
912
--env IS_CONTAINER=TRUE \
10-
--volume "${PWD}:${PWD}:ro,z" \
13+
--volume "${PWD}:${PWD}:z" \
1114
--workdir "${PWD}" \
1215
quay.io/coreos/terraform-alpine:v0.11.7 \
1316
./hack/tf-fmt.sh

0 commit comments

Comments
 (0)