Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
17e7f30
chore: update .gitignore to include additional directories and file t…
bialger Sep 5, 2025
ac63f0c
chore: update CI workflow to use 'ovum' targets
bialger Sep 5, 2025
4bbd4e4
docs: add build instructions, code of conduct, and coding guidelines
bialger Sep 6, 2025
88ff9fa
chore: add .clang-format and .clang-tidy configuration files
bialger Sep 6, 2025
62c0cae
chore: rename project to 'ovum' and update related configurations
bialger Sep 6, 2025
7fdd857
docs: enhance README.md with detailed language features and nullabili…
bialger Sep 7, 2025
26f3965
docs: add CODEBASE_STRUCTURE.md and CONTRIBUTING.md for project guide…
bialger Sep 7, 2025
ba0366d
refactor: modularize CMake configuration by separating compiler optio…
bialger Sep 7, 2025
bb80c35
docs: update CODEBASE_STRUCTURE.md to clarify directory purposes and …
bialger Sep 7, 2025
38d3b59
refactor: reorganize test structure and implement ProjectIntegrationT…
bialger Sep 7, 2025
7e802dc
docs: enhance README.md with comprehensive design philosophy and cont…
bialger Sep 7, 2025
d395159
docs: update README.md to include nullable type support for primitive…
bialger Sep 8, 2025
24957a2
docs: update README.md to reflect changes in variable declaration key…
bialger Sep 8, 2025
6125d43
docs: expand project documentation with build instructions and refere…
bialger Sep 8, 2025
3b69955
docs: update README.md and reference documents for section renumberin…
bialger Sep 8, 2025
c0f780f
docs: revise README.md and code examples for clarity and consistency
bialger Sep 8, 2025
0411684
docs: expand built-in types documentation with detailed reference for…
bialger Sep 8, 2025
8817c3b
docs: update primitive types and syntax documentation for clarity
bialger Sep 8, 2025
711a7ee
docs: update CODE_OF_CONDUCT.md, CODEBASE_STRUCTURE.md, CODING_GUIDEL…
bialger Sep 9, 2025
9f679ce
docs: update code examples and reference documentation for clarity an…
bialger Sep 9, 2025
ab13611
fix: update contact email in CODE_OF_CONDUCT.md for reporting incidents
bialger Sep 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
Language: Cpp
BasedOnStyle: Google
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignOperands: true
AlignTrailingComments: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
AfterObjCDeclaration: false
IndentBraces: false
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: AfterColon
BreakConstructorInitializersBeforeComma: false
ColumnLimit: 120
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ContinuationIndentWidth: 4
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^<.*'
Priority: 1
- Regex: '^".*'
Priority: 2
- Regex: '.*'
Priority: 3
IncludeIsMainRegex: ([-_](test|unittest))?$'([-_](test|unittest))?$'
IndentCaseBlocks: false
IndentCaseLabels: true
IndentGotoLabels: true
IndentPPDirectives: None
IndentWidth: 2
IndentWrappedFunctionNames: false
InsertNewlineAtEOF: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
PointerAlignment: Left
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInConditionalStatement: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
TabWidth: 4
UseTab: Never
...
20 changes: 20 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Checks: '-*,
modernize-*,
performance-*,
cppcoreguidelines-*,
bugprone-*,
-modernize-use-trailing-return-type,
-performance-no-int-to-ptr,
-cppcoreguidelines-avoid-const-or-ref-data-members,
-cppcoreguidelines-pro-type-reinterpret-cast,
-cppcoreguidelines-pro-type-union-access,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-bugprone-exception-escape,
-bugprone-easily-swappable-parameters'

WarningsAsErrors: ''
HeaderFilterRegex: ''
FormatStyle: none
CheckOptions:
- key: modernize-use-using.IgnoreMacros
value: 'true'
24 changes: 12 additions & 12 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@ jobs:
- name: Build main target
shell: bash
run: |
cmake --build cmake-build-release --target cpp_tests || echo Built with errors
cmake --build cmake-build-release || echo Built with errors

- name: Build tests target
shell: bash
run: |
cmake --build cmake-build-debug --target cpp_tests_tests || echo Built with errors
cmake --build cmake-build-debug --target ovum_tests || echo Built with errors

- name: Run program
working-directory: .\cmake-build-release
run: |
.\cpp_tests.exe --help
.\ovum.exe --help

- name: Run tests
working-directory: .\cmake-build-debug
run: |
echo "Currently unable to run tests on Windows Latest MinGW. See https://gitmemories.com/cristianadam/HelloWorld/issues/12 and https://github.com/microsoft/vscode-cmake-tools/issues/2451"
% .\cpp_tests_tests.exe
% .\ovum_tests.exe

build-matrix:
name: Tests and application run on ${{ matrix.config.name }}
Expand Down Expand Up @@ -72,33 +72,33 @@ jobs:
- name: Build main target
shell: bash
run: |
cmake --build cmake-build-release --target cpp_tests || echo "Built with errors"
cmake --build cmake-build-release --target ovum || echo "Built with errors"

- name: Build tests target
shell: bash
run: |
cmake --build cmake-build-debug --target cpp_tests_tests || echo "Built with errors"
cmake --build cmake-build-debug --target ovum_tests || echo "Built with errors"

- name: Run program
shell: bash
working-directory: ./cmake-build-release
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
./cpp_tests.exe --help
./ovum.exe --help
else
cd bin
./cpp_tests --help
./ovum --help
fi

- name: Run tests
shell: bash
working-directory: ./cmake-build-debug
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
./cpp_tests_tests.exe
./ovum_tests.exe
else
cd tests
./cpp_tests_tests
./ovum_tests
fi

memory-leaks:
Expand All @@ -117,9 +117,9 @@ jobs:

- name: Build tests target
run: |
cmake --build cmake-build --target cpp_tests_tests
cmake --build cmake-build --target ovum_tests

- name: Run valgrind
working-directory: ./cmake-build/tests
run: |
valgrind --leak-check=full --track-origins=yes --error-exitcode=1 ./cpp_tests_tests
valgrind --leak-check=full --track-origins=yes --error-exitcode=1 ./ovum_tests
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# CMake
**cmake-build*/
build/

# All idea files
**.idea*/
Expand All @@ -10,6 +11,15 @@
# IntelliJ
**out/

# Visual Studio Code
**.vscode/
**.history/

# Clangd
compile_commands.json
compile_flags.txt
.clangd

# mpeltonen/sbt-idea plugin
**.idea_modules/

Expand All @@ -22,6 +32,18 @@ crashlytics.properties
crashlytics-build.properties
fabric.properties

# Notepad++ temporary file
*.bak

# API keys
*.apikey

# Cache directories
**cache*/

# Program settings files
**.config*/compiler/*

# Prerequisites
*.d

Expand Down
28 changes: 6 additions & 22 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,30 +1,14 @@
cmake_minimum_required(VERSION 3.12)

project(
cpp_tests # Rename the project here and in ci_tests.yml
VERSION 0.1
DESCRIPTION "C++ Project with Google tests"
LANGUAGES CXX
ovum
VERSION 0.1
DESCRIPTION "Ovum programming language toolset"
LANGUAGES CXX
)

set(CMAKE_CXX_STANDARD 20)

if (WIN32) # Install dlls in the same directory as the executable on Windows
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR})
endif ()

if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(CMAKE_CXX_FLAGS_DEBUG "/MDd")
set(CMAKE_CXX_FLAGS_RELEASE "/O2")
else ()
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
endif ()
include(cmake/SetCompilerOptions.cmake)
include(cmake/IncludeExternalLibraries.cmake)

add_subdirectory(lib)
add_subdirectory(bin)
Expand Down
32 changes: 32 additions & 0 deletions CODEBASE_STRUCTURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Base Repository Structure

## Directory Purposes

### Root Directory
- **Project documentation** — README, build instructions, developer guides
- **Build configuration** — `CMakeLists.txt`, auxiliary CMake scripts
- **Tooling settings** — configurations for formatting, linters, Git
- **Automation scripts** — dependency installation, environment setup

### `bin/`
- **Executables** — application entry point
- **CLI interface** — command line for user interaction

### `docs/`
- **Project documentation** — README, build instructions, developer guides

### `lib/`
- **Core library** — the project's core functionality
- **UI module** — user interface and CLI utilities
- **Shared components** — reusable code parts. Add new modules only under this directory.

### `tests/`
- **Unit tests** — testing individual components
- **Integration tests** — testing interactions between modules
- **Helper functions** — utilities for testing
- **Test data** — examples and fixtures for tests

### `.github/workflows/`
- **CI/CD configuration** — automated build and testing
- **Code quality checks** — static analysis, formatting
- **Deployment** — automated release publishing
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [bigulov.sasha@gmail.com](mailto:bigulov.sasha@gmail.com). All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
Loading
Loading