this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: update CRUSH.md for C++ implementation

- Update commands for nix and clang builds
- Change language from Bash to C++17
- Update code style and naming conventions
- Add build system information
- Update best practices for C++

💙 Generated with Crush
Co-Authored-By: 💙 Crush <crush@charm.land>

+26 -16
+26 -16
CRUSH.md
··· 1 1 # CRUSH Development Guidelines 2 2 3 3 ## Commands 4 - - **Run parser**: `./transaction-parser.sh <logfile>` 5 - - **Test parser**: `./transaction-parser.sh -s <logfile>` (summary mode) 6 - - **Help**: `./transaction-parser.sh --help` 4 + - **Build with nix**: `nix build` 5 + - **Run parser**: `./result/bin/transaction-parser <logfile>` 6 + - **Test parser**: `./result/bin/transaction-parser -s <logfile>` (summary mode) 7 + - **Help**: `./result/bin/transaction-parser --help` 8 + - **Build with clang**: `clang++ -std=c++17 -O3 -o transaction-parser src/transaction-parser.cpp` 7 9 8 10 ## Code Style 9 - - **Language**: Bash scripting 10 - - **Shebang**: Use `#!/usr/bin/env nix-shell` with dependencies 11 + - **Language**: C++17 11 12 - **Formatting**: 12 13 - 4-space indentation 13 - - Functions use snake_case 14 - - Variables use UPPER_CASE 14 + - Functions use camelCase 15 + - Classes use PascalCase 16 + - Variables use camelCase 15 17 - **Structure**: 16 18 - Clear function separation 17 19 - Help documentation included 18 - - Error handling with exit codes 19 - - **Dependencies**: gnugrep, gnused, coreutils (via nix-shell) 20 + - Error handling with return codes 21 + - **Dependencies**: Standard C++ libraries only 22 + 23 + ## Build System 24 + - **Nix Flake**: For reproducible builds and development environment 25 + - **CMake**: For cross-platform build configuration 26 + - **Compiler**: Clang++ with C++17 standard 20 27 21 28 ## Best Practices 22 29 - Always validate input files exist 23 - - Use proper error messages and exit codes 30 + - Use proper error messages and return codes 24 31 - Include comprehensive help documentation 25 - - Follow tab-separated output format for structured data 26 - - Handle edge cases in XML parsing 32 + - Follow pipe-separated output format for structured data 33 + - Handle edge cases in XML parsing with regex 34 + - Use STL containers and algorithms for performance 27 35 28 36 ## Naming Conventions 29 - - Variables: UPPER_CASE 30 - - Functions: snake_case 31 - - Files: kebab-case.sh 37 + - Variables: camelCase 38 + - Functions: camelCase 39 + - Classes: PascalCase 40 + - Files: kebab-case.cpp 32 41 33 42 ## Error Handling 34 43 - Check file existence before processing 35 44 - Validate arguments 36 - - Exit with appropriate codes (0 for success, 1 for error) 45 + - Return appropriate codes (0 for success, 1 for error) 46 + - Use try/catch blocks for exception handling