Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style: Fix whitespace issues #1720

Merged
merged 3 commits into from
Oct 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: CI

on:
pull_request:
push:
branches:
push:
branches:
- master
workflow_dispatch:

Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:

- name: Verify that canonical-data.json files adhere to canonical-schema.json
run: yarn test

- name: Verify that all UUIDs are indeed unique
run: |
duplicate_uuids=$(cat exercises/*/canonical-data.json |
Expand All @@ -65,10 +65,10 @@ jobs:
for f in exercises/*/canonical-data.json; do
# Search for reimplemented test cases
reimplements=$(jq -r '.. |."reimplements"? | select(. != null)' "$f")

# Abort early if the exercise doesn't have reimplemented test cases
[[ -e $reimplements ]] && continue

uuids=$(jq -r '.. |."uuid"? | select(. != null)' "$f")
for reimplemented_uuid in $reimplements; do
if [[ $uuids != *"$reimplemented_uuid"* ]]; then
Expand All @@ -77,5 +77,5 @@ jobs:
fi
done
done

exit "$fail"
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ Each track should have the following structure:
│   └── TESTS.md
└── exercises
└── hello-world
└── .meta
└── .meta
│ └── tests.toml (only if the exercise is based on canonical data)
├── hello-world_example.file
├── hello-world.file
Expand Down
2 changes: 1 addition & 1 deletion STYLE-GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ Examples:

## Use consistency within an exercise.

There are some terms that have multiple valid spellings (e.g. "lower case" vs "lowercase").
There are some terms that have multiple valid spellings (e.g. "lower case" vs "lowercase").
Where a consistent style has not been agreed within this document, these must be consistent within an exercise.
4 changes: 2 additions & 2 deletions canonical-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@
},

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

"scenarios":
{ "description": "An array of scenarios that can be used to include/exclude test cases"
{ "description": "An array of scenarios that can be used to include/exclude test cases"
, "type" : "array"
, "items" : { "$ref": "#/definitions/scenario" }
, "minItems" : 0
Expand Down
2 changes: 1 addition & 1 deletion exercises/darts/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ In our particular instance of the game, the target rewards with 4 different amou

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.
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.
8 changes: 4 additions & 4 deletions exercises/gigasecond/metadata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
blurb: "Given a moment, determine the moment that would be after a gigasecond has passed."
source: "Chapter 9 in Chris Pine's online Learn to Program tutorial."
source_url: "http://pine.fm/LearnToProgram/?Chapter=09"
---
blurb: "Given a moment, determine the moment that would be after a gigasecond has passed."
source: "Chapter 9 in Chris Pine's online Learn to Program tutorial."
source_url: "http://pine.fm/LearnToProgram/?Chapter=09"
8 changes: 4 additions & 4 deletions exercises/resistor-color-duo/description.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
If you want to build something using a Raspberry Pi, you'll probably use _resistors_.
If you want to build something using a Raspberry Pi, you'll probably use _resistors_.
For this exercise, you need to know two things about them:

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

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

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

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

The band colors are encoded as follows:
Expand Down
6 changes: 3 additions & 3 deletions exercises/resistor-color/description.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
If you want to build something using a Raspberry Pi, you'll probably use _resistors_.
If you want to build something using a Raspberry Pi, you'll probably use _resistors_.
For this exercise, you need to know two things about them:

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

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

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

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

These colors are encoded as follows:

Expand Down
2 changes: 1 addition & 1 deletion exercises/rest-api/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ Your task is to implement a simple [RESTful API](https://en.wikipedia.org/wiki/R
- https://restfulapi.net/
- Example RESTful APIs
- [GitHub](https://developer.github.com/v3/)
- [Reddit](https://www.reddit.com/dev/api/)
- [Reddit](https://www.reddit.com/dev/api/)