Skip to content

Commit

Permalink
Fixing output of strings with non printable characters
Browse files Browse the repository at this point in the history
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
  • Loading branch information
JBenda authored Dec 17, 2023
1 parent e6f951a commit e55613b
Show file tree
Hide file tree
Showing 16 changed files with 2,291 additions and 2,066 deletions.
99 changes: 99 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
---
AccessModifierOffset: -2
AlignAfterOpenBracket: BlockIndent
AlignArrayOfStructures: Right
# readd padOperation if bumped from clang 14
AlignConsecutiveAssignments: AcrossComments
AlignConsecutiveBitFields: AcrossComments
AlignConsecutiveDeclarations: AcrossComments
AlignConsecutiveMacros: AcrossComments
AlignEscapedNewlines: Left
AlignOperands: AlignAfterOperator
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Always
AllowShortCaseLabelsOnASingleLine: true
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: Inline
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BinPackParameters: true
BreakBeforeBraces: Linux
# BreakAfterAttributes: Always
BreakBeforeBinaryOperators: All
UseTab: ForIndentation
Standard: Latest
SpacesInSquareBrackets: false
SpacesInParentheses: false
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: 1
SpacesInContainerLiterals: false
SpacesInConditionalStatement: false
SpacesInCStyleCastParentheses: true
SpacesInAngles: Never
SpacesBeforeTrailingComments: 1
SpaceInEmptyParentheses: false
SpaceInEmptyBlock: false
SpaceBeforeSquareBrackets: false
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeInheritanceColon: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCaseColon: false
SpaceBeforeAssignmentOperators: true
SpaceAroundPointerQualifiers: Before
PointerAlignment: Left
SpaceAfterTemplateKeyword: false
SpaceAfterLogicalNot: true
SpaceAfterCStyleCast: true
SortUsingDeclarations: false
SortIncludes: Never
ShortNamespaceLines: 0
SeparateDefinitionBlocks: Always
# RequiresExpressionIndentation: OuterScope
# BreakBeforeConceptDeclarations: Always
# BreakBeforeInlineASMColon: Always
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma
BreakInheritanceList: BeforeComma
BreakStringLiterals: true
ColumnLimit: 100
CompactNamespaces: true
Cpp11BracedListStyle: true
EmptyLineBeforeAccessModifier: Always
FixNamespaceComments: true
IncludeBlocks: Preserve
IndentAccessModifiers: false
IndentCaseBlocks: false
IndentCaseLabels: true
IndentExternBlock: Indent
IndentGotoLabels: false
IndentPPDirectives: AfterHash
# IndentRequiresClause: true
IndentWidth: 2
TabWidth: 2
IndentWrappedFunctionNames: true
# InsertBraces: true
# InsertNewlineAtEOF: true
KeepEmptyLinesAtTheStartOfBlocks: true
LambdaBodyIndentation: Signature
Language: Cpp
# LineEnding: LF
MaxEmptyLinesToKeep: 2
NamespaceIndentation: Inner
QualifierAlignment: Left
ReferenceAlignment: Left
ReflowComments: true
RemoveBracesLLVM: false
# RemoveSemicolon: false
# RequiresClausePosition: OwnLine
UseCRLF: false
DeriveLineEnding: false
34 changes: 28 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
submodules: true

# Download inklecate
- uses: suisei-cn/actions-download-file@v1
- uses: suisei-cn/actions-download-file@v1.4.0
name: Download Inklecate
id: download_inklecate
with:
Expand All @@ -62,7 +62,7 @@ jobs:

# Setup CMake
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1.9
uses: jwlawson/actions-setup-cmake@v1.14.2
with:
cmake-version: '3.21.x'

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

clang-format:
name: "Check Formatting"
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'master' }}
steps:
- uses: actions/checkout@v3
- name: Fetch master branch
run: |
git fetch origin master --depth 1
- name: Check clang-format
run: |
diff=$(git clang-format-14 --style file -q --diff origin/master)
echo $diff
if [ "$diff" != "" ]; then
echo run git clang-format --style file master
echo or upstream/master depending on your setup
clang
fi
reporting:
name: "Pull Request Report"
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}
# if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'brwarner/inkcpp' }}
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'master' }}
runs-on: ubuntu-latest
needs: compilation
needs: [compilation, clang-format]
permissions:
pull-requests: write
steps:
# Download Ink Proof Results
- uses: actions/download-artifact@v2
Expand All @@ -200,7 +222,7 @@ jobs:
done
# Post Comment
- uses: marocchino/sticky-pull-request-comment@v2
- uses: marocchino/sticky-pull-request-comment@v2.8.0
with:
recreate: true
path: comment.txt
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# inkcpp
![build](https://github.com/brwarner/inkcpp/workflows/build/badge.svg "Build Status")
![build](https://github.com/JBenda/inkcpp/workflows/build/badge.svg "Build Status")

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

Ink Proofing Test Results: https://brwarner.github.io/inkcpp
Ink Proofing Test Results: https://jbenda.github.io/inkcpp

## Project Goals
* Fast, simple, clean syntax
Expand Down
Loading

0 comments on commit e55613b

Please sign in to comment.