Skip to content

feat: add clang-tidy#79

Merged
raphasampaio merged 22 commits intomasterfrom
rs/phase9
Feb 11, 2026
Merged

feat: add clang-tidy#79
raphasampaio merged 22 commits intomasterfrom
rs/phase9

Conversation

@raphasampaio
Copy link
Member

No description provided.

raphasampaio and others added 7 commits February 10, 2026 18:40
…te read/update paths

- Add require_column() validation helper on Database::Impl
- Add is_safe_identifier() character validation for 4 PRAGMA queries in schema.cpp
- Add require_column calls to all 6 scalar read methods
- Add require_column calls to all 6 vector read methods
- Add require_column calls to all 6 set read methods
- Add require_column calls to all 6 vector update methods
- Add require_column calls to all 6 set update methods

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ites

- Add column validation to update_time_series_files for caller-provided column names
- Confirm database_create.cpp validated by TypeValidator
- Confirm database_relations.cpp validated by FK lookup
- Confirm database_delete.cpp validated by require_collection

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add ReadScalarIntegersInvalidColumnThrows test with error message verification
- Add ReadVectorIntegersInvalidColumnThrows test with error message verification
- Add UpdateVectorIntegersInvalidColumnThrows test with error message verification

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create .clang-tidy with bugprone-*, modernize-*, performance-*, readability-identifier-naming checks
- Disable noisy checks: easily-swappable-parameters, trailing-return-type, avoid-c-arrays, narrowing-conversions, use-nodiscard
- Configure naming rules for CamelCase classes/structs/enums and lower_case functions/variables
- Add CMake tidy target that reuses shared ALL_SOURCE_FILES glob
- Fix glob to use src/c/*.cpp instead of src/c/*.c (no .c files exist)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…erification

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 79.56204% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.06%. Comparing base (3887f78) to head (8bbe41c).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/database_read.cpp 66.66% 6 Missing ⚠️
src/schema.cpp 70.00% 6 Missing ⚠️
src/database_update.cpp 60.00% 4 Missing ⚠️
src/database_create.cpp 0.00% 3 Missing ⚠️
src/database_time_series.cpp 76.92% 3 Missing ⚠️
src/database_describe.cpp 0.00% 2 Missing ⚠️
src/database_metadata.cpp 0.00% 2 Missing ⚠️
src/database_impl.h 87.50% 1 Missing ⚠️
src/lua_runner.cpp 92.30% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #79      +/-   ##
==========================================
- Coverage   86.13%   86.06%   -0.07%     
==========================================
  Files          92       92              
  Lines       10264    10344      +80     
  Branches      537      549      +12     
==========================================
+ Hits         8841     8903      +62     
- Misses       1398     1416      +18     
  Partials       25       25              
Flag Coverage Δ
cpp 89.01% <79.56%> (-0.12%) ⬇️
dart 77.00% <ø> (ø)
julia 71.39% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/database.cpp 89.95% <100.00%> (-0.42%) ⬇️
src/database_relations.cpp 100.00% <100.00%> (ø)
src/element.cpp 100.00% <ø> (ø)
src/migration.cpp 93.10% <100.00%> (ø)
src/migrations.cpp 97.22% <100.00%> (+0.07%) ⬆️
src/result.cpp 100.00% <100.00%> (ø)
src/schema_validator.cpp 88.39% <100.00%> (+0.53%) ⬆️
tests/test_database_read.cpp 100.00% <100.00%> (ø)
tests/test_database_update.cpp 100.00% <100.00%> (ø)
tests/test_schema_validator.cpp 98.24% <100.00%> (+0.03%) ⬆️
... and 9 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

raphasampaio and others added 15 commits February 10, 2026 22:37
- Use starts_with/ends_with (C++20) instead of substr/compare for prefix/suffix checks
- Use emplace_back instead of push_back for variant types
- Use auto with static_cast to avoid type duplication
- Use designated initializers for aggregate types (TableMatch)
- Remove redundant member initializers and return statements
- Pass by value and use std::move for Migration constructor
- Take sol::table by const ref in static helper functions
- Add NOLINT for SQLite SQLITE_TRANSIENT macro (int-to-ptr cast)
- Add NOLINT for intentional bugprone-branch-clone in value_to_string
- Add NOLINT for unchecked-optional-access where check is done earlier in control flow
- Add NOLINTBEGIN/NOLINTEND for sol2 lambda bindings (pass-by-value required by sol2)
- Disable noisy checks globally: inefficient-string-concatenation, use-ranges, use-designated-initializers, enum-size
- Add reserve() for vectors populated in loops
- Use std::ranges::all_of for is_safe_identifier

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Transformation rules: C++ to C API, Julia, Dart, Lua naming patterns
- Representative cross-layer examples table covering 14 operation categories
- Binding-only convenience methods: DateTime wrappers, composite readers, multi-column group readers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- SUMMARY.md with test results: 1213 tests across 4 suites all passing
- STATE.md updated to 100% complete (15/15 plans, all 10 phases)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Archive milestone artifacts, evolve PROJECT.md, reorganize ROADMAP.md.
- milestones/v1.0-ROADMAP.md: full phase details archived
- milestones/v1.0-REQUIREMENTS.md: all 25 requirements marked complete
- REQUIREMENTS.md deleted (fresh for next milestone)
- PROJECT.md evolved with validated requirements and key decision outcomes
- ROADMAP.md collapsed to milestone summary

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@raphasampaio raphasampaio merged commit e1c9003 into master Feb 11, 2026
11 of 12 checks passed
@raphasampaio raphasampaio deleted the rs/phase9 branch February 11, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant