exercism / exercism/problem-specifications
CI: Add check for whitespace issues
- Vorherrschende Sprache
- Ruby
- Sterne
- 358
- Forks
- 563
- Ø Merge
- 18 Std. 41 Min.
- Gemergte PRs (30 T.)
- 2
Beschreibung
See e.g. https://github.com/exercism/problem-specifications/pull/1720
### Current behaviour
1. Run `configlet generate`
1. Commit the changes to the `README.md` files.
1. 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](https://raw.githubusercontent.com/exercism/nim/608756909a47bc16e6519f6d5c2d07b03aa8de9b/exercises/darts/README.md) 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)
1. Fix whitespace problems automatically in this repo
1. Change `configlet generate` so that it fixes whitespace problems (probably a worse fix)
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.