Skip to content

Commit

Permalink
Code cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
MorganCaron committed Feb 17, 2024
1 parent 33924b8 commit 80e2386
Show file tree
Hide file tree
Showing 142 changed files with 4,916 additions and 4,585 deletions.
133 changes: 133 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
---
# Langage
Language: Cpp
Standard: Latest

# Formattage general du fichier
LineEnding: LF
InsertNewlineAtEOF: true

# Indentations
UseTab: Always
IndentWidth: 4
TabWidth: 4
NamespaceIndentation: All
IndentAccessModifiers: false
AccessModifierOffset: -4
IndentCaseBlocks: false
IndentCaseLabels: false
IndentPPDirectives: AfterHash
IndentRequiresClause: false
LambdaBodyIndentation: OuterScope # Signature

# Espaces
MaxEmptyLinesToKeep: 1
SpaceAfterTemplateKeyword: false
BitFieldColonSpacing: After
PointerAlignment: Left
ReferenceAlignment: Left
RequiresExpressionIndentation: OuterScope
Cpp11BracedListStyle: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: false
SpaceBeforeInheritanceColon: false
SpaceBeforeParens: Custom
SpaceBeforeParensOptions:
AfterControlStatements: true
AfterForeachMacros: false
AfterFunctionDeclarationName: false
AfterFunctionDefinitionName: false
AfterIfMacros: false
AfterOverloadedOperator: false
AfterPlacementOperator: true
AfterRequiresInClause: true
AfterRequiresInExpression: true
BeforeNonEmptyParentheses: false
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: false
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInSquareBrackets: false
SpacesInParens: Custom
SpacesInParensOptions:
InConditionalStatements: false
InCStyleCasts: false
InEmptyParentheses: false
Other: false

# Retours à la ligne
ColumnLimit: 0
BreakBeforeBraces: Custom
BraceWrapping:
BeforeLambdaBody: false
AfterCaseLabel: true
AfterClass: true
AfterEnum: true
AfterStruct: true
AfterControlStatement: Always
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BeforeElse: true
BeforeCatch: true
BeforeWhile: true
IndentBraces: false
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Always
AllowShortCaseLabelsOnASingleLine: true
AllowShortCompoundRequirementOnASingleLine: true
AllowShortEnumsOnASingleLine: true
AllowShortLambdasOnASingleLine: All
AlwaysBreakAfterReturnType: None
AlwaysBreakTemplateDeclarations: Yes
BinPackParameters: false
BinPackArguments: false
BreakAfterAttributes: Never
BreakBeforeTernaryOperators: false
BreakInheritanceList: AfterColon
BreakConstructorInitializers: AfterColon

# Alignements
AlignAfterOpenBracket: DontAlign # BlockIndent
AlignConsecutiveBitFields:
Enabled: false
AlignConsecutiveDeclarations:
Enabled: false
AlignConsecutiveMacros:
Enabled: false
AlignConsecutiveShortCaseStatements:
Enabled: false
AlignEscapedNewlines: DontAlign
AlignOperands: DontAlign
AlignTrailingComments:
Kind: Never

# Accolades
RemoveBracesLLVM: true

# Order
SortIncludes: CaseInsensitive
SortUsingDeclarations: LexicographicNumeric
QualifierAlignment: Custom
QualifierOrder: ['static', 'inline', 'volatile', 'constexpr', 'const', 'type']

# Commentaires
FixNamespaceComments: false

# Literals
BreakStringLiterals: false
IntegerLiteralSeparator:
Binary: 4
Decimal: -1
Hex: 2
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.mpp linguist-language=C++
*.script linguist-language=Script
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Artifacts
/build
/subprojects/*/
/.xmake
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
# Script
<p align="center"><img src="res/logo.ico" alt="Logo Script"/></p>
<p align="center"><img src="resources/logo.ico" alt="Logo Script" width="200" height="200"/></p>

## *Script is an object-oriented interpreted programming language.*
## *Script is a multi-paradigm compiled programming language*

![Github Stars](https://img.shields.io/github/stars/MorganCaron/Script?style=for-the-badge)
![Github Forks](https://img.shields.io/github/forks/MorganCaron/Script?style=for-the-badge)
[![Discord](https://img.shields.io/discord/268838260153909249?label=Chat&logo=Discord&style=for-the-badge)](https://discord.gg/mxZvun4)

### Project Health
[![Codacy](https://img.shields.io/codacy/grade/92c8d9643d234818ae50601f88b131f8?logo=Codacy&style=for-the-badge)](https://www.codacy.com/manual/MorganCaron/Script)
[![Github Actions](https://img.shields.io/github/workflow/status/MorganCaron/Script/C++%20Test?logo=Github&style=for-the-badge)](https://github.com/MorganCaron/Script/actions?query=workflow%3A%22C%2B%2B+Test%22)
[![CI Windows](https://img.shields.io/github/workflow/status/MorganCaron/Script/CI%20C++:%20Windows?label=Windows&logo=windows&logoColor=white&style=for-the-badge)](https://github.com/MorganCaron/Script/actions/workflows/ci-cpp-windows.yml)
[![CI Windows MSYS2](https://img.shields.io/github/workflow/status/MorganCaron/Script/CI%20C++:%20Windows%20MSYS2?label=Windows%20MSYS2&logo=windows&logoColor=white&style=for-the-badge)](https://github.com/MorganCaron/Script/actions/workflows/ci-cpp-windows-msys2.yml)
[![CI Linux](https://img.shields.io/github/workflow/status/MorganCaron/Script/CI%20C++:%20Linux?label=Linux&logo=linux&logoColor=white&style=for-the-badge)](https://github.com/MorganCaron/Script/actions/workflows/ci-cpp-linux.yml)
[![CI MacOS](https://img.shields.io/github/workflow/status/MorganCaron/Script/CI%20C++:%20MacOS?label=MacOS&logo=macos&logoColor=white&style=for-the-badge)](https://github.com/MorganCaron/Script/actions/workflows/ci-cpp-macos.yml)

---

## Getting Started

[![Downloads](https://img.shields.io/github/downloads/MorganCaron/Script/total?style=for-the-badge)](https://github.com/MorganCaron/Script/releases)
[![Install](https://img.shields.io/badge/-Install-blue?style=for-the-badge)](INSTALL.md)
[![Contribute](https://img.shields.io/badge/-Contribute-blue?style=for-the-badge)](CONTRIBUTING.md)

### Build command
```console
meson build -Ddefault_library=static
ninja -C build
xmake f --toolchain=llvm --runtimes="c++_shared" [--local_CppUtils=y] [--enable_tests=y] --yes
xmake [b|build] [-vD]
```

### Test command
### Run tests
```console
ninja -C build test
xmake [r|run]
```

---
Expand Down
95 changes: 0 additions & 95 deletions UnitTests/include/UnitTests/Function.hpp

This file was deleted.

64 changes: 0 additions & 64 deletions UnitTests/include/UnitTests/Namespace.hpp

This file was deleted.

0 comments on commit 80e2386

Please sign in to comment.