Skip to content

Commit f28ac8a

Browse files
authored
Merge pull request #38 from lucocozz/develop
Last change before 0.1.0 release
2 parents f69239e + bb9cdd0 commit f28ac8a

Some content is hidden

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

69 files changed

+845
-295
lines changed

.clang-tidy

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,25 @@ Checks: '
99
readability-*,
1010
-readability-magic-numbers,
1111
-readability-identifier-length,
12+
-readability-braces-around-statements,
1213
-readability-function-cognitive-complexity,
1314
-readability-avoid-nested-conditional-operator,
1415
-readability-non-const-parameter,
1516
-readability-implicit-bool-conversion,
1617
-readability-const-return-type,
1718
-readability-identifier-naming,
19+
-readability-suspicious-call-argument,
1820
-misc-const-correctness,
1921
-performance-unnecessary-value-param,
2022
-modernize-use-cxx-headers,
2123
-cert-err33-c,
24+
-cert-dcl37-c,
25+
-cert-dcl51-cpp,
2226
-clang-analyzer-unix.MallocSizeof,
2327
-bugprone-easily-swappable-parameters,
2428
-bugprone-narrowing-conversions,
2529
-bugprone-multi-level-implicit-pointer-conversion,
30+
-bugprone-reserved-identifier,
2631
-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,
2732
-clang-analyzer-security.insecureAPI.strcpy,
2833
-clang-analyzer-optin.performance.Padding,

.github/workflows/lint.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Lint and Format
2+
3+
on:
4+
push:
5+
branches: [ develop ]
6+
pull_request:
7+
branches: [ develop ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
lint:
12+
runs-on: ubuntu-latest
13+
name: Code Quality Check
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: Install dependencies
19+
run: |
20+
sudo apt-get update
21+
sudo apt-get install -y meson ninja-build pkg-config clang clang-tidy clang-format just
22+
23+
- name: Configure project
24+
run: meson setup .build
25+
26+
- name: Check code formatting
27+
run: |
28+
just format
29+
if [ -n "$(git diff --name-only)" ]; then
30+
echo "Code is not properly formatted. Please run 'just format' locally."
31+
git diff
32+
exit 1
33+
fi
34+
35+
- name: Run static analysis
36+
run: just lint

CHANGELOG.md

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
## [0.1.0] - 2025-07-02
11+
12+
### Added
13+
- **Core Features**
14+
- Modern C library for command-line argument parsing
15+
- Declarative API for defining command-line options
16+
- Type-safe option handling (string, int, float, bool, flag)
17+
- Comprehensive validation system with built-in validators
18+
- Multi-value support for arrays and key-value maps
19+
- Nested subcommand support with inheritance
20+
- Environment variable integration
21+
- Smart help generation with automatic formatting
22+
- Version display functionality
23+
24+
- **Option Types**
25+
- String options with length and regex validation
26+
- Integer options with range validation
27+
- Float options with range validation
28+
- Boolean options with choice validation
29+
- Flag options for simple toggles
30+
- Array options for multiple values
31+
- Map options for key-value pairs
32+
33+
- **Validation System**
34+
- Range validators for numeric types
35+
- Length validators for strings
36+
- Regex validators for pattern matching
37+
- Choice validators for predefined values
38+
- Count validators for array/map sizes
39+
- Custom validator support
40+
41+
- **Advanced Features**
42+
- Subcommand system with nesting support
43+
- Environment variable binding
44+
- Custom handlers and validators
45+
- Automatic help and usage generation
46+
- Smart hints for invalid inputs
47+
- Cross-platform support (Linux, macOS, Windows)
48+
49+
- **Build System & Packaging**
50+
- Modern Meson build system
51+
- Multi-architecture support (x86, x64)
52+
- Package manager integration (Conan, vcpkg, xmake, WrapDB)
53+
- pkg-config support
54+
- Both static and shared library builds
55+
56+
- **Documentation & Examples**
57+
- Comprehensive documentation website at argus-lib.com
58+
- 11 example programs covering all features
59+
- API reference documentation
60+
- Getting started guides and tutorials
61+
62+
- **Quality Assurance**
63+
- 21 comprehensive test suites using Criterion framework
64+
- GitHub Actions CI/CD for multiple platforms
65+
- Code formatting with clang-format
66+
- Static analysis with clang-tidy
67+
- Automated release workflow
68+
69+
- **Developer Experience**
70+
- Justfile for convenient build automation
71+
- Professional code quality tooling
72+
- Consistent coding standards
73+
- MIT license with proper headers
74+
75+
### Technical Highlights
76+
- **Memory Management**: Safe memory handling with proper cleanup
77+
- **Error Handling**: Comprehensive error reporting and validation
78+
- **Performance**: Optimized parsing with minimal overhead
79+
- **Portability**: Cross-platform compatibility layer
80+
- **Extensibility**: Plugin system for custom handlers and validators
81+
82+
### Dependencies
83+
- **Required**: C11 compiler
84+
- **Optional**: PCRE2 library (for regex support, can be disabled)
85+
86+
### Platform Support
87+
- Linux (tested on Ubuntu with GCC, Clang)
88+
- macOS (tested with Apple Clang)
89+
- Windows (tested with MSVC, MinGW)
90+
- Both x86 and x64 architectures
91+
92+
### Breaking Changes
93+
- This is the initial release, no breaking changes apply
94+
95+
### Security
96+
- All user inputs are validated and sanitized
97+
- No known security vulnerabilities
98+
- Proper bounds checking and memory safety
99+
- Security policy established for vulnerability reporting
100+
101+
---
102+
103+
## Release Notes
104+
105+
### v0.1.0 - Initial Public Release
106+
107+
This marks the first stable release of Argus, a modern C library for command-line argument parsing. After extensive development and testing, we're excited to offer developers a declarative, type-safe alternative to traditional argument parsing libraries.
108+
109+
**Key Benefits:**
110+
- 🎯 **Type Safety**: Strong typing with automatic validation
111+
- 🚀 **Performance**: Fast parsing with minimal memory footprint
112+
- 🛠️ **Developer Experience**: Intuitive API that reduces boilerplate
113+
- 📚 **Comprehensive**: Supports all common CLI patterns and more
114+
- 🔧 **Extensible**: Custom handlers and validators for specific needs
115+
116+
The library is production-ready and includes comprehensive documentation, examples, and automated testing across multiple platforms.
117+
118+
[0.1.0]: https://github.com/lucocozz/argus/releases/tag/v0.1.0
119+
[Unreleased]: https://github.com/lucocozz/argus/compare/v0.1.0...HEAD

SECURITY.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,28 @@
22

33
## Supported Versions
44

5-
Use this section to tell people about which versions of your project are
6-
currently being supported with security updates.
7-
85
| Version | Supported |
96
| ------- | ------------------ |
10-
| 5.1.x | :white_check_mark: |
11-
| 5.0.x | :x: |
12-
| 4.0.x | :white_check_mark: |
13-
| < 4.0 | :x: |
7+
| 0.1.x | :white_check_mark: |
148

159
## Reporting a Vulnerability
1610

17-
Use this section to tell people how to report a vulnerability.
11+
If you find a security issue in Argus, please email me privately at:
12+
13+
14+
Please include:
15+
- Description of the vulnerability
16+
- Steps to reproduce
17+
- Potential impact
18+
19+
## What to Expect
20+
21+
- I'll acknowledge your report when I can (usually within a few days)
22+
- I'll investigate and fix critical issues as soon as possible
23+
- I'll credit you in the fix unless you prefer to stay anonymous
24+
25+
## Notes
26+
27+
This is a personal project maintained in my free time. While I take security seriously, response times may vary based on my availability.
1828

19-
Tell them where to go, how often they can expect to get an update on a
20-
reported vulnerability, what to expect if the vulnerability is accepted or
21-
declined, etc.
29+
For non-security bugs, please use GitHub issues instead.

includes/argus.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
/**
2-
* argus.h - Main entry point for the Argus library
1+
/*
2+
* MIT License
33
*
4-
* This header includes all the public APIs needed by library users.
5-
* Users should only need to include this file to use the library.
4+
* Copyright (c) 2025 lucocozz
65
*
7-
* MIT License - Copyright (c) 2024 lucocozz
6+
* This file is part of Argus.
7+
* See LICENSE file in the project root for full license information.
88
*/
99

1010
#ifndef ARGUS_H

includes/argus/api.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
/**
2-
* argus/api.h - Public API functions
1+
/*
2+
* MIT License
33
*
4-
* This header defines all the public functions that users can call
5-
* to initialize, parse arguments, and access results.
4+
* Copyright (c) 2025 lucocozz
65
*
7-
* MIT License - Copyright (c) 2024 lucocozz
6+
* This file is part of Argus.
7+
* See LICENSE file in the project root for full license information.
88
*/
99

1010
#ifndef ARGUS_API_H

includes/argus/callbacks.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
/**
2-
* argus/callbacks.h - Public callbacks
1+
/*
2+
* MIT License
33
*
4-
* This header defines custom callback types that can be implemented
5-
* by users to extend the library's functionality.
4+
* Copyright (c) 2025 lucocozz
65
*
7-
* MIT License - Copyright (c) 2024 lucocozz
6+
* This file is part of Argus.
7+
* See LICENSE file in the project root for full license information.
88
*/
99

1010
#ifndef ARGUS_CALLBACKS_H

includes/argus/errors.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
/**
2-
* argus/errors.h - Error handling
1+
/*
2+
* MIT License
33
*
4-
* This header defines error codes and error handling functions
5-
* that are part of the public API.
4+
* Copyright (c) 2025 lucocozz
65
*
7-
* MIT License - Copyright (c) 2024 lucocozz
6+
* This file is part of Argus.
7+
* See LICENSE file in the project root for full license information.
88
*/
99

1010
#ifndef ARGUS_ERRORS_H

includes/argus/internal/callbacks/handlers.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
/**
2-
* argus/internal/callbacks/handlers.h - Internal handlers implementation
1+
/*
2+
* MIT License
33
*
4-
* INTERNAL HEADER - NOT PART OF THE PUBLIC API
5-
* This header defines standard handler callbacks for different option types.
4+
* Copyright (c) 2025 lucocozz
65
*
7-
* MIT License - Copyright (c) 2024 lucocozz
6+
* This file is part of Argus.
7+
* See LICENSE file in the project root for full license information.
88
*/
99

1010
#ifndef ARGUS_INTERNAL_CALLBACKS_HANDLERS_H

includes/argus/internal/callbacks/validators.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
/**
2-
* argus/internal/callbacks/validators.h - Internal validators implementation
1+
/*
2+
* MIT License
33
*
4-
* INTERNAL HEADER - NOT PART OF THE PUBLIC API
5-
* This header defines standard validator callbacks for different validation types.
4+
* Copyright (c) 2025 lucocozz
65
*
7-
* MIT License - Copyright (c) 2024 lucocozz
6+
* This file is part of Argus.
7+
* See LICENSE file in the project root for full license information.
88
*/
99

1010
#ifndef ARGUS_INTERNAL_CALLBACKS_VALIDATORS_H

0 commit comments

Comments
 (0)