-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lint schemes when PRs are created (#15)
- Loading branch information
1 parent
ef9a4c3
commit bc4189b
Showing
19 changed files
with
99 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
blank_issues_enabled: true | ||
contact_links: | ||
- system: "base16" | ||
name: Learn more about the various specs and larger ecosystem | ||
name: Learn more about the various specs and larger ecosystem | ||
url: https://github.com/base16-project/home | ||
about: Sometimes the answers are right there, just waiting to be discovered. | ||
- system: "base16" | ||
name: Discuss within the broader project | ||
name: Discuss within the broader project | ||
about: Your issue is broadly applicable to most Base16 schemes (or the whole ecosystem). | ||
url: https://github.com/base16-project/home/issues/new |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Test | ||
on: | ||
pull_request: | ||
branches: | ||
- "spec-**" | ||
push: | ||
branches: | ||
- "spec-**" | ||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install deps | ||
run: sudo apt install yamllint | ||
|
||
- name: Lint schemes | ||
run: yamllint ${{ github.workspace }} && ${{ github.workspace }}/scripts/lint "${{ github.workspace }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
|
||
extends: default | ||
|
||
rules: | ||
document-start: disable | ||
comments: disable | ||
line-length: | ||
max: 120 | ||
level: error | ||
allow-non-breakable-inline-mappings: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,4 +19,3 @@ palette: | |
base0D: "5CCFE6" | ||
base0E: "D4BFFF" | ||
base0F: "F29E74" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,3 @@ palette: | |
base0D: "BD0152" | ||
base0E: "82034C" | ||
base0F: "470546" | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,4 +19,3 @@ palette: | |
base0D: "1e8bac" # blue | ||
base0E: "be4264" # purple | ||
base0F: "c85e0d" # brown | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,5 +19,3 @@ palette: | |
base0D: "2de0a7" # functions | ||
base0E: "7aa5ff" # keywords | ||
base0F: "ff79c6" # deprecations | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,5 +19,3 @@ palette: | |
base0D: "c9fff7" # Celeste | ||
base0E: "dcc3f9" # Anemone | ||
base0F: "f6dddd" # Lycoris | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env sh | ||
|
||
workspace="$1" | ||
supported_schemes_systems="base16 base24" | ||
|
||
if [ -z $workspace ]; then | ||
echo "Missing 'workspace' argument" | ||
fi | ||
|
||
for scheme_system in $supported_schemes_systems; do | ||
for scheme_path in "$workspace/$scheme_system"/*; do | ||
scheme_filename=$(basename -- "$scheme_path") | ||
|
||
case "$scheme_filename" in | ||
*.yaml) | ||
if ! $(grep -q "author" "$scheme_path" \ | ||
&& grep -q "name" "$scheme_path" \ | ||
&& grep -q "palette" "$scheme_path" \ | ||
&& grep -q "system" "$scheme_path" \ | ||
&& grep -q "variant" "$scheme_path"); then | ||
|
||
echo "Error: Missing one of the required yaml properties (author|name|palette|system|variant) in $scheme_path" | ||
exit 1 | ||
fi | ||
;; | ||
esac | ||
done | ||
done |