Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Upgrade Weave Net to latest version of build-tools, skipping bash scripts when lint-ing. #2749

Merged
merged 3 commits into from
Jan 26, 2017

Conversation

marccarre
Copy link
Contributor

Lint-ing all of Weave Net is currently not desirable because:

  • it would create conflicts on many branches,
  • it would pollute the git history,
  • etc.

and because lint currently lints all files except ./vendor, this breaks Weave Net's build.
As a result, Weave Net is not using the latest commit in build-tools's master branch, which is also source of problems:

This change:

  • brings Weave Net to the latest version of build-tools (which now supports .lintignore files),
  • adds such a .lintignore file to skip all bash scripts (in order to avoid breaking the build).

GLOBs in .lintignore can then, over time and as scripts are shfmt-ed, be relaxed and maybe even removed.

@marccarre marccarre force-pushed the shfmt-ignore branch 2 times, most recently from 7365aea to 5481bc7 Compare January 24, 2017 17:20
@marccarre marccarre self-assigned this Jan 24, 2017
@marccarre marccarre added this to the 1.9.0 milestone Jan 24, 2017
@marccarre marccarre force-pushed the shfmt-ignore branch 10 times, most recently from 52c79f0 to c38b463 Compare January 25, 2017 16:23
…ipts when lint-ing.

Lint-ing all of Weave Net is currently not desirable because:

* it would create conflicts on many branches,
* it would pollute the git history,
* etc.

and because `lint` currently lints all files except `./vendor`, this breaks Weave Net's build.
As a result, Weave Net is not using the latest commit in `build-tools`'s `master` branch, which is also source of problems:

* it limits standardisation of projects across Weaveworks,
* it limits the ability to use the latest features of `build-tools`,
* it complexifies merging changes in `build-tools` (e.g. #53 and #2694 for #2647),
* etc.

This change:

* brings Weave Net to the latest version of `build-tools` (which now supports `.lintignore` files),
* adds such a `.lintignore` file to skip all bash scripts (in order to avoid breaking the build).

`GLOB`s in `.lintignore` can then, over time and as scripts are `shfmt`-ed, be relaxed and maybe even removed.
Previous commit upgrades Weave Net to the latest version of `build-tools`.
However, `./tools/test`'s default behaviour has changed, so we need to explicitly pass new options/arguments, in order to keep it behaving like before fd56868.
Makes what the build does explicitly and helps for potential debugging.
Also reminds us that we are skipping these files, so that we ultimately shfmt them and stop lint-ignoring them.
@brb
Copy link
Contributor

brb commented Jan 26, 2017

LGTM.

@brb brb merged commit f5dfefe into master Jan 26, 2017
@marccarre marccarre deleted the shfmt-ignore branch January 26, 2017 10:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants