Skip to content

Commit 381c30e

Browse files
authored
Style: Fix whitespace issues (#1720)
* Style: Remove trailing whitespace With this commit, people who run `configlet generate` and commit the generated READMEs as-is will no longer introduce trailing whitespace into their track repos. * Style: Add missing final newlines
1 parent a683c8c commit 381c30e

File tree

9 files changed

+23
-23
lines changed

9 files changed

+23
-23
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: CI
22

33
on:
44
pull_request:
5-
push:
6-
branches:
5+
push:
6+
branches:
77
- master
88
workflow_dispatch:
99

@@ -46,7 +46,7 @@ jobs:
4646

4747
- name: Verify that canonical-data.json files adhere to canonical-schema.json
4848
run: yarn test
49-
49+
5050
- name: Verify that all UUIDs are indeed unique
5151
run: |
5252
duplicate_uuids=$(cat exercises/*/canonical-data.json |
@@ -65,10 +65,10 @@ jobs:
6565
for f in exercises/*/canonical-data.json; do
6666
# Search for reimplemented test cases
6767
reimplements=$(jq -r '.. |."reimplements"? | select(. != null)' "$f")
68-
68+
6969
# Abort early if the exercise doesn't have reimplemented test cases
7070
[[ -e $reimplements ]] && continue
71-
71+
7272
uuids=$(jq -r '.. |."uuid"? | select(. != null)' "$f")
7373
for reimplemented_uuid in $reimplements; do
7474
if [[ $uuids != *"$reimplemented_uuid"* ]]; then
@@ -77,5 +77,5 @@ jobs:
7777
fi
7878
done
7979
done
80-
80+
8181
exit "$fail"

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ Each track should have the following structure:
254254
│   └── TESTS.md
255255
└── exercises
256256
└── hello-world
257-
└── .meta
257+
└── .meta
258258
│ └── tests.toml (only if the exercise is based on canonical data)
259259
├── hello-world_example.file
260260
├── hello-world.file

STYLE-GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,5 @@ Examples:
7171

7272
## Use consistency within an exercise.
7373

74-
There are some terms that have multiple valid spellings (e.g. "lower case" vs "lowercase").
74+
There are some terms that have multiple valid spellings (e.g. "lower case" vs "lowercase").
7575
Where a consistent style has not been agreed within this document, these must be consistent within an exercise.

canonical-schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,13 @@
115115
},
116116

117117
"scenario":
118-
{ "description": "An identifier for a specific scenario (kebab-case)"
118+
{ "description": "An identifier for a specific scenario (kebab-case)"
119119
, "type": "string"
120120
, "enum": ["big-integer", "floating-point", "library-test", "unicode"]
121121
},
122122

123123
"scenarios":
124-
{ "description": "An array of scenarios that can be used to include/exclude test cases"
124+
{ "description": "An array of scenarios that can be used to include/exclude test cases"
125125
, "type" : "array"
126126
, "items" : { "$ref": "#/definitions/scenario" }
127127
, "minItems" : 0

exercises/darts/description.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ In our particular instance of the game, the target rewards with 4 different amou
1212

1313
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).
1414

15-
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.
15+
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.

exercises/gigasecond/metadata.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
---
2-
blurb: "Given a moment, determine the moment that would be after a gigasecond has passed."
3-
source: "Chapter 9 in Chris Pine's online Learn to Program tutorial."
4-
source_url: "http://pine.fm/LearnToProgram/?Chapter=09"
1+
---
2+
blurb: "Given a moment, determine the moment that would be after a gigasecond has passed."
3+
source: "Chapter 9 in Chris Pine's online Learn to Program tutorial."
4+
source_url: "http://pine.fm/LearnToProgram/?Chapter=09"

exercises/resistor-color-duo/description.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
If you want to build something using a Raspberry Pi, you'll probably use _resistors_.
1+
If you want to build something using a Raspberry Pi, you'll probably use _resistors_.
22
For this exercise, you need to know two things about them:
33

44
* Each resistor has a resistance value.
55
* Resistors are small - so small in fact that if you printed the resistance value on them, it would be hard to read.
66

7-
To get around this problem, manufacturers print color-coded bands onto the resistors to denote their resistance values.
7+
To get around this problem, manufacturers print color-coded bands onto the resistors to denote their resistance values.
88
Each band has a position and a numeric value.
99

10-
The first 2 bands of a resistor have a simple encoding scheme: each color maps to a single number.
10+
The first 2 bands of a resistor have a simple encoding scheme: each color maps to a single number.
1111
For example, if they printed a brown band (value 1) followed by a green band (value 5), it would translate to the number 15.
1212

13-
In this exercise you are going to create a helpful program so that you don't have to remember the values of the bands.
13+
In this exercise you are going to create a helpful program so that you don't have to remember the values of the bands.
1414
The program will take color names as input and output a two digit number, even if the input is more than two colors!
1515

1616
The band colors are encoded as follows:

exercises/resistor-color/description.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
If you want to build something using a Raspberry Pi, you'll probably use _resistors_.
1+
If you want to build something using a Raspberry Pi, you'll probably use _resistors_.
22
For this exercise, you need to know two things about them:
33

44
* Each resistor has a resistance value.
55
* Resistors are small - so small in fact that if you printed the resistance value on them, it would be hard to read.
66

7-
To get around this problem, manufacturers print color-coded bands onto the resistors to denote their resistance values.
7+
To get around this problem, manufacturers print color-coded bands onto the resistors to denote their resistance values.
88
Each band has a position and a numeric value.
99

1010
The first 2 bands of a resistor have a simple encoding scheme: each color maps to a single number.
1111

12-
In this exercise you are going to create a helpful program so that you don't have to remember the values of the bands.
12+
In this exercise you are going to create a helpful program so that you don't have to remember the values of the bands.
1313

1414
These colors are encoded as follows:
1515

exercises/rest-api/description.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ Your task is to implement a simple [RESTful API](https://en.wikipedia.org/wiki/R
3535
- https://restfulapi.net/
3636
- Example RESTful APIs
3737
- [GitHub](https://developer.github.com/v3/)
38-
- [Reddit](https://www.reddit.com/dev/api/)
38+
- [Reddit](https://www.reddit.com/dev/api/)

0 commit comments

Comments
 (0)