exercism / exercism/problem-specifications

CI: Add check for whitespace issues

オープン
#1,721 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Ruby
スター
358
フォーク
563
平均マージ
18時間 41分
マージ済み PR(30日)
2

説明

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)

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。