Skip to content

CI: Add check for whitespace issues #1721

Open
@ee7

Description

@ee7

See e.g. #1720

Current behaviour

  1. Run configlet generate
  2. Commit the changes to the README.md files.
  3. Either:
    a. Trailing whitespace is introduced into track repos, or
    b. Maintainers who configure git to complain about whitespace issues see a commit failure and have to trim the whitespace themselves, or
    c. Maintainers who configure git to automatically strip trailing whitespace are okay (but in general this tends to produce noisy, non-atomic commits)

Also, when final newlines are missing, README.md files can lack a newline before a header. For example: the description.md for darts was missing a final newline, so configlet generate produced a README that contains:

The outer circle has a radius of 10 units (This is equivalent to the total radius for the entire target), the middle circle a radius of 5 units, and the inner circle a radius of 1. Of course, they are all centered to the same point (That is, the circles are [concentric](http://mathworld.wolfram.com/ConcentricCircles.html)) defined by the coordinates (0, 0).

Write a function that given a point in the target (defined by its `real` cartesian coordinates `x` and `y`), returns the correct amount earned by a dart landing in that point.
## Running the tests

Expected behaviour

  • Users should get consistent whitespace before a header.
  • Maintainers who configure git to complain about whitespace issues shouldn't see a commit failure and have to trim trailing whitespace themselves.

Possible solutions

  1. Add a CI check in this repo (this issue)
  2. Fix whitespace problems automatically in this repo
  3. Change configlet generate so that it fixes whitespace problems (probably a worse fix)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions