Skip to content

Commit e55613b

Browse files
authored
Fixing output of strings with non printable characters
closes #66 closes #63 + Disable shortcut in `jump` and add check for strings only containing spaces in output + Added tests from issues + version bump pipeline to avoid deprecation warning + add formatting + re introduced ink proof result label
1 parent e6f951a commit e55613b

16 files changed

+2291
-2066
lines changed

.clang-format

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
---
2+
AccessModifierOffset: -2
3+
AlignAfterOpenBracket: BlockIndent
4+
AlignArrayOfStructures: Right
5+
# readd padOperation if bumped from clang 14
6+
AlignConsecutiveAssignments: AcrossComments
7+
AlignConsecutiveBitFields: AcrossComments
8+
AlignConsecutiveDeclarations: AcrossComments
9+
AlignConsecutiveMacros: AcrossComments
10+
AlignEscapedNewlines: Left
11+
AlignOperands: AlignAfterOperator
12+
AlignTrailingComments: true
13+
AllowAllArgumentsOnNextLine: true
14+
AllowAllParametersOfDeclarationOnNextLine: true
15+
AllowShortBlocksOnASingleLine: Always
16+
AllowShortCaseLabelsOnASingleLine: true
17+
AllowShortEnumsOnASingleLine: false
18+
AllowShortFunctionsOnASingleLine: Inline
19+
AllowShortIfStatementsOnASingleLine: Never
20+
AllowShortLambdasOnASingleLine: Inline
21+
AllowShortLoopsOnASingleLine: false
22+
AlwaysBreakAfterReturnType: None
23+
AlwaysBreakBeforeMultilineStrings: true
24+
AlwaysBreakTemplateDeclarations: Yes
25+
BinPackArguments: true
26+
BinPackParameters: true
27+
BreakBeforeBraces: Linux
28+
# BreakAfterAttributes: Always
29+
BreakBeforeBinaryOperators: All
30+
UseTab: ForIndentation
31+
Standard: Latest
32+
SpacesInSquareBrackets: false
33+
SpacesInParentheses: false
34+
SpacesInLineCommentPrefix:
35+
Minimum: 1
36+
Maximum: 1
37+
SpacesInContainerLiterals: false
38+
SpacesInConditionalStatement: false
39+
SpacesInCStyleCastParentheses: true
40+
SpacesInAngles: Never
41+
SpacesBeforeTrailingComments: 1
42+
SpaceInEmptyParentheses: false
43+
SpaceInEmptyBlock: false
44+
SpaceBeforeSquareBrackets: false
45+
SpaceBeforeRangeBasedForLoopColon: true
46+
SpaceBeforeParens: ControlStatements
47+
SpaceBeforeInheritanceColon: true
48+
SpaceBeforeCtorInitializerColon: true
49+
SpaceBeforeCpp11BracedList: false
50+
SpaceBeforeCaseColon: false
51+
SpaceBeforeAssignmentOperators: true
52+
SpaceAroundPointerQualifiers: Before
53+
PointerAlignment: Left
54+
SpaceAfterTemplateKeyword: false
55+
SpaceAfterLogicalNot: true
56+
SpaceAfterCStyleCast: true
57+
SortUsingDeclarations: false
58+
SortIncludes: Never
59+
ShortNamespaceLines: 0
60+
SeparateDefinitionBlocks: Always
61+
# RequiresExpressionIndentation: OuterScope
62+
# BreakBeforeConceptDeclarations: Always
63+
# BreakBeforeInlineASMColon: Always
64+
BreakBeforeTernaryOperators: true
65+
BreakConstructorInitializers: BeforeComma
66+
BreakInheritanceList: BeforeComma
67+
BreakStringLiterals: true
68+
ColumnLimit: 100
69+
CompactNamespaces: true
70+
Cpp11BracedListStyle: true
71+
EmptyLineBeforeAccessModifier: Always
72+
FixNamespaceComments: true
73+
IncludeBlocks: Preserve
74+
IndentAccessModifiers: false
75+
IndentCaseBlocks: false
76+
IndentCaseLabels: true
77+
IndentExternBlock: Indent
78+
IndentGotoLabels: false
79+
IndentPPDirectives: AfterHash
80+
# IndentRequiresClause: true
81+
IndentWidth: 2
82+
TabWidth: 2
83+
IndentWrappedFunctionNames: true
84+
# InsertBraces: true
85+
# InsertNewlineAtEOF: true
86+
KeepEmptyLinesAtTheStartOfBlocks: true
87+
LambdaBodyIndentation: Signature
88+
Language: Cpp
89+
# LineEnding: LF
90+
MaxEmptyLinesToKeep: 2
91+
NamespaceIndentation: Inner
92+
QualifierAlignment: Left
93+
ReferenceAlignment: Left
94+
ReflowComments: true
95+
RemoveBracesLLVM: false
96+
# RemoveSemicolon: false
97+
# RequiresClausePosition: OwnLine
98+
UseCRLF: false
99+
DeriveLineEnding: false

.github/workflows/build.yml

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
submodules: true
4040

4141
# Download inklecate
42-
- uses: suisei-cn/actions-download-file@v1
42+
- uses: suisei-cn/actions-download-file@v1.4.0
4343
name: Download Inklecate
4444
id: download_inklecate
4545
with:
@@ -62,7 +62,7 @@ jobs:
6262

6363
# Setup CMake
6464
- name: Setup cmake
65-
uses: jwlawson/actions-setup-cmake@v1.9
65+
uses: jwlawson/actions-setup-cmake@v1.14.2
6666
with:
6767
cmake-version: '3.21.x'
6868

@@ -144,7 +144,7 @@ jobs:
144144
shell: bash
145145
working-directory: proofing/ink-proof
146146
run: |
147-
python3 proof.py --examples 'I...' inkcpp inklecate_v0.9.0 > run.out
147+
python3 proof.py --examples 'I...' inklecate_v1.1.1 inkcpp_runtime > run.out
148148
echo -e "| ${{ matrix.name }} | $(cat run.out) |" > ${{ matrix.artifact }}.txt
149149
150150
# Creates a "disabled" artifact if ink proofing is disabled
@@ -170,11 +170,33 @@ jobs:
170170
name: ${{ matrix.artifact }}-www
171171
path: proofing/ink-proof/out
172172

173+
clang-format:
174+
name: "Check Formatting"
175+
runs-on: ubuntu-latest
176+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'master' }}
177+
steps:
178+
- uses: actions/checkout@v3
179+
- name: Fetch master branch
180+
run: |
181+
git fetch origin master --depth 1
182+
- name: Check clang-format
183+
run: |
184+
diff=$(git clang-format-14 --style file -q --diff origin/master)
185+
echo $diff
186+
if [ "$diff" != "" ]; then
187+
echo run git clang-format --style file master
188+
echo or upstream/master depending on your setup
189+
clang
190+
fi
191+
173192
reporting:
174193
name: "Pull Request Report"
175-
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}
194+
# if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'brwarner/inkcpp' }}
195+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'master' }}
176196
runs-on: ubuntu-latest
177-
needs: compilation
197+
needs: [compilation, clang-format]
198+
permissions:
199+
pull-requests: write
178200
steps:
179201
# Download Ink Proof Results
180202
- uses: actions/download-artifact@v2
@@ -200,7 +222,7 @@ jobs:
200222
done
201223
202224
# Post Comment
203-
- uses: marocchino/sticky-pull-request-comment@v2
225+
- uses: marocchino/sticky-pull-request-comment@v2.8.0
204226
with:
205227
recreate: true
206228
path: comment.txt

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# inkcpp
2-
![build](https://github.com/brwarner/inkcpp/workflows/build/badge.svg "Build Status")
2+
![build](https://github.com/JBenda/inkcpp/workflows/build/badge.svg "Build Status")
33

44
Inkle Ink C++ Runtime with JSON -> Binary Compiler.
55

6-
Ink Proofing Test Results: https://brwarner.github.io/inkcpp
6+
Ink Proofing Test Results: https://jbenda.github.io/inkcpp
77

88
## Project Goals
99
* Fast, simple, clean syntax

0 commit comments

Comments
 (0)