Skip to content

Commit 0508c9f

Browse files
committed
✨ Initial public commit
0 parents  commit 0508c9f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+8350
-0
lines changed

.clang-format

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
BasedOnStyle: LLVM
2+
BreakBeforeBraces: Attach
3+
4+
ColumnLimit: 120 # Match GitHub UI
5+
6+
UseTab: Always
7+
TabWidth: 4
8+
IndentWidth: 4
9+
AccessModifierOffset: -4
10+
ContinuationIndentWidth: 4
11+
NamespaceIndentation: All
12+
IndentCaseLabels: false
13+
14+
PointerAlignment: Left
15+
AlwaysBreakTemplateDeclarations: Yes
16+
SpaceAfterTemplateKeyword: false
17+
AllowShortCaseLabelsOnASingleLine: true
18+
AllowShortIfStatementsOnASingleLine: WithoutElse
19+
AllowShortBlocksOnASingleLine: Always
20+
21+
FixNamespaceComments: true
22+
ReflowComments: false

.github/actions/badge/action.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Regular badging sequence
2+
description: Publishes a badge based on the job status
3+
inputs:
4+
category:
5+
description: The subfolder where to group the badges
6+
required: true
7+
badges:
8+
description: A json object of label => status for all badges
9+
required: true
10+
github_token:
11+
description: The token to use to publish the changes
12+
required: false
13+
default: ${{ github.token }}
14+
runs:
15+
using: composite
16+
steps:
17+
- run: |
18+
node ./.github/actions/badge/write-json-object.js ${{ inputs.category }} '${{ inputs.badges }}'
19+
shell: bash
20+
- uses: peaceiris/actions-gh-pages@v3
21+
with:
22+
github_token: ${{ inputs.github_token }}
23+
publish_branch: badges
24+
publish_dir: ./badges
25+
keep_files: true
26+
user_name: "github-actions[bot]"
27+
user_email: "github-actions[bot]@users.noreply.github.com"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const fs = require('fs');
2+
const category = process.argv[2];
3+
const status = JSON.parse(process.argv[3]);
4+
5+
if (!fs.existsSync("./badges")) fs.mkdirSync("./badges");
6+
if (!fs.existsSync("./badges/" + category)) fs.mkdirSync("./badges/" + category);
7+
for (let e in status) {
8+
const path = "./badges/" + category + "/" + e;
9+
if (!fs.existsSync(path)) fs.mkdirSync(path);
10+
const ok = status[e] == "success";
11+
fs.writeFileSync(path + "/shields.json", JSON.stringify({
12+
"schemaVersion": 1,
13+
"label": e,
14+
"message": ok ? "Passing" : "Failing",
15+
"color": ok ? "brightgreen" : "red"
16+
}));
17+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Process Linting Results
2+
description: Add a comment to a pull request with when `git diff` present and save the changes as an artifact so they can be applied manually
3+
inputs:
4+
linter_name:
5+
description: The name of the tool to credit in the comment
6+
required: true
7+
runs:
8+
using: "composite"
9+
steps:
10+
- run: git add --update
11+
shell: bash
12+
- id: stage
13+
#continue-on-error: true
14+
uses: Thalhammer/patch-generator-action@v2
15+
16+
# Unfortunately the previous action reports a failure so nothing else can run
17+
# partially a limitation on composite actions since `continue-on-error` is not
18+
# yet supported
19+
- if: steps.stage.outputs.result == 'dirty'
20+
uses: actions-ecosystem/action-create-comment@v1
21+
with:
22+
github_token: ${{ github.token }}
23+
body: |
24+
Hello, @${{ github.actor }}! `${{ inputs.linter_name }}` had some concerns :scream:
25+
- run: exit $(git status -uno -s | wc -l)
26+
shell: bash

.github/logo.svg

Lines changed: 80 additions & 0 deletions
Loading
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
if [[ -f "$1" && -s "$1" ]]; then
3+
if [[ -n "$(tail -c 1 "$1")" ]]; then
4+
echo "Fixed missing newline in file $1"
5+
sed -i -e '$a\' $1
6+
fi
7+
fi

0 commit comments

Comments
 (0)