Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Contributing

Goldberry is Apache 2.0 with no contributor agreement, and every change passes the same gates whether it comes from a maintainer or from a stranger.

A change is a pull request against master on GitHub. This chapter says what the repository expects of one. The five chapters after it say how to build, where things live, what the tests check, how a release goes out, and how a decision is written down.

The licence

The code is under the Apache License 2.0. There is no CLA to sign. A pull request is a contribution under that licence, and LICENSE and NOTICE ship inside every jar under META-INF.

Third-party software is disclosed in THIRD-PARTY-NOTICES.md and licenses/, and the two are held together by a task:

./gradlew checkLicenses

A dependency named in one and not the other fails the build. The reasoning is in ADR-0015.

What a change passes

./gradlew check is the gate. CI runs the same thing on Linux, macOS and Windows, and a pull request is green only when all three are.

GateWhat it holdsFixed by
FormattingEvery Java file matches palantir-java-format./gradlew spotlessApply
Error Prone and NullAwaysrc/main compiles with no finding, and every package is @NullMarkedReading the finding
PMDThe hand-picked rules in config/pmd/ruleset.xmlReading the finding
SpotBugsReports only. build/reports/spotbugs/main.html per moduleNothing yet
Tests, twiceThe suite passes bound reflectively and again wovenThe test, or the code
GoldensEvery reference image still matches what the code draws./gradlew blessGoldens, then review the diff
Export listEvery symbol bound in Java is exported, and nothing exported is unboundEditing goldberry.symbols
package-infoEvery package has one, with a doc comment and @NullMarkedWriting it
JavadocA [link] in a published module resolvesFixing the link
MarkdownNo trailing whitespace, a final newline./gradlew formatMarkdown
LicencesTHIRD-PARTY-NOTICES.md and licenses/ agreeEditing both

Tests and gates says what each one runs and why. The record behind the format-and-analysis tier is ADR-0497, and the record behind the two test runs is ADR-0155.

Tip

Run ./gradlew spotlessApply check before pushing. The formatter is the one gate that fixes itself.

A widget arrives whole

A new widget is not done when it draws. docs/testing.md §5 says what it arrives with, and the rule is before review, not after:

  1. a row in the widget specification, in the core-widgets.md format;
  2. a row of design-system metrics;
  3. a page in the showcase gallery;
  4. semantics assertions, so the sweep finds a role and a name;
  5. golden images, in both themes and at both densities.

The gallery is the demo, the visual-regression corpus and the accessibility sweep at once, so a widget that is not in it is not tested. Writing a widget walks through the code. The sweeps that read the registry are in Tests and gates.

Decisions are recorded

A change that chooses between designs gets an architecture decision record beside the code, in the same pull request. The log is the last part of this book, and ADR-0001 says why it exists. Recording a decision says how to write one and what the build checks about it.

The chapters

Where to ask

Open an issue at https://github.com/DigitalSmile/goldberry/issues. A bug report is most useful with the platform, the display scale, and the start-up timeline the toolkit logs at TRACE. Logging and diagnostics says how to turn that on.

Status says what is built, and TODO says what is deferred and why. A question that one of those answers is answered there first.