diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 28f48905c0..b103ae03a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,8 +2,8 @@ name: CI on: pull_request: - push: - branches: + push: + branches: - master workflow_dispatch: @@ -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 | @@ -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 @@ -77,5 +77,5 @@ jobs: fi done done - + exit "$fail" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7049795d30..d544a7491f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 diff --git a/STYLE-GUIDE.md b/STYLE-GUIDE.md index 9c4564c837..33420b4f4d 100644 --- a/STYLE-GUIDE.md +++ b/STYLE-GUIDE.md @@ -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. diff --git a/canonical-schema.json b/canonical-schema.json index d430d939a6..0702a62c8d 100644 --- a/canonical-schema.json +++ b/canonical-schema.json @@ -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 diff --git a/exercises/darts/description.md b/exercises/darts/description.md index d691e41cdb..f129ea318d 100644 --- a/exercises/darts/description.md +++ b/exercises/darts/description.md @@ -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. \ No newline at end of file +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. diff --git a/exercises/gigasecond/metadata.yml b/exercises/gigasecond/metadata.yml index 7be1db3161..8a78096965 100644 --- a/exercises/gigasecond/metadata.yml +++ b/exercises/gigasecond/metadata.yml @@ -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" diff --git a/exercises/resistor-color-duo/description.md b/exercises/resistor-color-duo/description.md index 886c41b0df..1099cbc99a 100644 --- a/exercises/resistor-color-duo/description.md +++ b/exercises/resistor-color-duo/description.md @@ -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: diff --git a/exercises/resistor-color/description.md b/exercises/resistor-color/description.md index c4bc231f7f..7778acd50f 100644 --- a/exercises/resistor-color/description.md +++ b/exercises/resistor-color/description.md @@ -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: diff --git a/exercises/rest-api/description.md b/exercises/rest-api/description.md index 6fb0033c4a..2b228a375d 100644 --- a/exercises/rest-api/description.md +++ b/exercises/rest-api/description.md @@ -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/) \ No newline at end of file + - [Reddit](https://www.reddit.com/dev/api/)