Skip to content

Latest commit

 

History

History
28 lines (17 loc) · 1.41 KB

File metadata and controls

28 lines (17 loc) · 1.41 KB

Scala style guide (Scalaguide)

GeoBrix follows the Scala style guide for all Scala code. This document states our adoption and how we enforce it.

Adopted style guide

We use the official Scala Style Guide as the primary reference:

It covers indentation, naming, types, control structures, method invocation, Scaladoc, and related conventions. We treat it as the baseline; project-specific rules are documented below and in our linter config.

Enforcement: Scalastyle

Style is enforced automatically with Scalastyle:

  • Config: scalastyle-config.xml at the project root
  • CI: The main build runs Scalastyle; it can fail the build on violations (e.g. for PRs targeting main).
  • Local: Run gbx:lint:scalastyle (or bash scripts/commands/gbx-lint-scalastyle.sh) to check before pushing.

The Scalastyle rules align with the official style guide (naming, formatting, braces, public method types, etc.) and a few extra rules (e.g. no println in committed code without an explicit opt-out). See scalastyle-config.xml for the full list.

References