Skip to content

chore: comment conventions, session rename, dead-code cleanup#170

Merged
tkhquang merged 1 commit into
release/v4.0.0from
chore/conventions-and-deadcode-cleanup
Jul 3, 2026
Merged

chore: comment conventions, session rename, dead-code cleanup#170
tkhquang merged 1 commit into
release/v4.0.0from
chore/conventions-and-deadcode-cleanup

Conversation

@tkhquang

@tkhquang tkhquang commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Comment conventions: Ban decorative // --- separators across src/ and tests/. Bare rulers are dropped and labeled headers become a plain descriptive //; single-identifier labels that only restated the next declaration are removed. The rule is enforced by check_comment_style.py and documented in AGENTS.md.
  • Naming: Rename src/dmk.cpp to src/session.cpp so the translation-unit name matches its lifecycle content (Session, bootstrap, ModInfo).
  • Dead code: Remove the unreachable 32-bit MinGW arm in memory_guarded.cpp; the single x86-64 gate already makes it dead code, and the x64 fault-guard path is unchanged.

- Ban decorative `// ---` separators across src/ and tests/ (89 bare rulers
  removed, 159 labeled headers reduced to a plain //), and delete useless
  single-identifier labels that only restated the next declaration; enforce the
  rule via check_comment_style.py and document it in AGENTS.md.
- Rename src/dmk.cpp -> src/session.cpp so the TU name matches its lifecycle
  content (Session, bootstrap, ModInfo).
- Remove the unreachable 32-bit MinGW arm in memory_guarded.cpp; the single
  x86-64 gate already makes it dead code and the x64 VEH path is unchanged.
@tkhquang tkhquang self-assigned this Jul 3, 2026
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 200 files, which is 50 over the limit of 150.

To get a review, narrow the scope:
• coderabbit review --type committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Upgrade to a paid plan to raise the limit.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6d0045af-6a47-4dfb-8dff-beab15400c33

📥 Commits

Reviewing files that changed from the base of the PR and between b09e5b5 and 6370364.

📒 Files selected for processing (200)
  • .clang-tidy
  • .gitattributes
  • .github/workflows/arch-gate.yml
  • .github/workflows/pr-check.yml
  • .github/workflows/quality.yml
  • .github/workflows/release.yml
  • .markdownlintignore
  • .vscode/c_cpp_properties.json
  • AGENTS.md
  • CMakeLists.txt
  • README.md
  • cmake/DetourModKitConfig.cmake.in
  • docs/README.md
  • docs/analysis/avx512_verify_icount/README.md
  • docs/analysis/event_dispatcher_bench_v3.1.0/README.md
  • docs/analysis/memory_bench_v3.x/README.md
  • docs/analysis/memory_veh_bench_v3.x/README.md
  • docs/analysis/scanner_bench_v3.x/README.md
  • docs/guides/hooking/hook-type-coverage.md
  • docs/guides/hooking/vmt-hook-config.md
  • docs/guides/hot-reload/README.md
  • docs/guides/hot-reload/config-hot-reload.md
  • docs/guides/memory/asan-memory-scanner.md
  • docs/guides/memory/hot-path-memory.md
  • docs/guides/rtti/rtti-self-heal.md
  • docs/guides/rtti/rtti-walker.md
  • docs/guides/scanning/anchors.md
  • docs/guides/scanning/signature-health.md
  • docs/guides/scanning/signature-manifest.md
  • docs/migration/migrating-v3-to-v4.md
  • docs/misc/anchors.md
  • docs/misc/aob-signatures.md
  • docs/misc/hot-path-memory.md
  • docs/misc/vmt-hook-config.md
  • docs/tests/README.md
  • include/DetourModKit.hpp
  • include/DetourModKit/address.hpp
  • include/DetourModKit/anchor.hpp
  • include/DetourModKit/anchors.hpp
  • include/DetourModKit/async_logger.hpp
  • include/DetourModKit/async_logger_config.hpp
  • include/DetourModKit/bootstrap.hpp
  • include/DetourModKit/config.hpp
  • include/DetourModKit/config_watcher.hpp
  • include/DetourModKit/defines.hpp
  • include/DetourModKit/detail/drift_manifest.hpp
  • include/DetourModKit/detail/event_dispatcher.hpp
  • include/DetourModKit/detail/pattern_core.hpp
  • include/DetourModKit/detail/worker.hpp
  • include/DetourModKit/diagnostics.hpp
  • include/DetourModKit/diagnostics_dump.hpp
  • include/DetourModKit/error.hpp
  • include/DetourModKit/filesystem.hpp
  • include/DetourModKit/format.hpp
  • include/DetourModKit/hook.hpp
  • include/DetourModKit/hook_manager.hpp
  • include/DetourModKit/input.hpp
  • include/DetourModKit/input_codes.hpp
  • include/DetourModKit/logger.hpp
  • include/DetourModKit/manifest.hpp
  • include/DetourModKit/math.hpp
  • include/DetourModKit/memory.hpp
  • include/DetourModKit/profile.hpp
  • include/DetourModKit/profiler.hpp
  • include/DetourModKit/region.hpp
  • include/DetourModKit/rtti.hpp
  • include/DetourModKit/rtti_dissect.hpp
  • include/DetourModKit/scan.hpp
  • include/DetourModKit/scanner.hpp
  • include/DetourModKit/sighealth.hpp
  • scripts/check_arch_gate.sh
  • scripts/check_comment_style.py
  • scripts/check_header_hygiene.py
  • scripts/check_install_prefix.py
  • scripts/run_fault_tests.sh
  • src/anchor.cpp
  • src/anchors.cpp
  • src/async_logger.cpp
  • src/bootstrap.cpp
  • src/code_constant.cpp
  • src/config.cpp
  • src/config_watcher.cpp
  • src/diagnostics.cpp
  • src/diagnostics_dump.cpp
  • src/drift_manifest.cpp
  • src/event_dispatcher.cpp
  • src/filesystem.cpp
  • src/hook.cpp
  • src/hook_manager.cpp
  • src/input.cpp
  • src/input_codes.cpp
  • src/internal/async_logger_queue.hpp
  • src/internal/config_watcher.cpp
  • src/internal/config_watcher.hpp
  • src/internal/hook_backend.hpp
  • src/internal/hook_ledger.hpp
  • src/internal/input_hold_gate.hpp
  • src/internal/input_intercept.cpp
  • src/internal/input_intercept.hpp
  • src/internal/input_key_cache.hpp
  • src/internal/input_poller.cpp
  • src/internal/input_poller.hpp
  • src/internal/memory_fault.hpp
  • src/internal/memory_guarded.cpp
  • src/internal/memory_guarded.hpp
  • src/internal/scan_batch.cpp
  • src/internal/scan_batch.hpp
  • src/internal/scan_engine.cpp
  • src/internal/scan_engine.hpp
  • src/internal/scan_pages.cpp
  • src/internal/scan_pages.hpp
  • src/internal/scan_prologue_recovery.cpp
  • src/internal/scan_prologue_recovery.hpp
  • src/internal/scan_shared.hpp
  • src/internal/srw_shared_mutex.cpp
  • src/internal/srw_shared_mutex.hpp
  • src/internal/win_file_stream.hpp
  • src/internal/worker.cpp
  • src/logger.cpp
  • src/manifest.cpp
  • src/memory.cpp
  • src/memory_access.cpp
  • src/memory_cache.cpp
  • src/memory_internal.hpp
  • src/memory_module.cpp
  • src/memory_protect.cpp
  • src/profiler.cpp
  • src/region.cpp
  • src/rtti.cpp
  • src/rtti_dissect.cpp
  • src/rtti_internal.hpp
  • src/scan_candidates.cpp
  • src/scan_code_constant.cpp
  • src/scan_matching.cpp
  • src/scan_resolution.cpp
  • src/scan_rip_relative.cpp
  • src/scan_string_xref.cpp
  • src/scanner.cpp
  • src/scanner_cascade.cpp
  • src/scanner_internal.hpp
  • src/scanner_parallel.cpp
  • src/session.cpp
  • src/sighealth.cpp
  • src/string_xref.cpp
  • src/win_file_stream.cpp
  • src/x86_decode.hpp
  • tests/CMakeLists.txt
  • tests/bench_event_dispatcher.cpp
  • tests/bench_memory.cpp
  • tests/bench_scanner.cpp
  • tests/fault/test_fault_containment.cpp
  • tests/fixtures/fault_injection.hpp
  • tests/package_smoke/main.cpp
  • tests/test_alloc_probe.cpp
  • tests/test_alloc_probe.hpp
  • tests/test_anchor.cpp
  • tests/test_anchors.cpp
  • tests/test_async_logger.cpp
  • tests/test_bootstrap.cpp
  • tests/test_code_constant.cpp
  • tests/test_config.cpp
  • tests/test_config_watcher.cpp
  • tests/test_diagnostics.cpp
  • tests/test_diagnostics_dump.cpp
  • tests/test_drift_manifest.cpp
  • tests/test_event_dispatcher.cpp
  • tests/test_filesystem.cpp
  • tests/test_format.cpp
  • tests/test_foundation.cpp
  • tests/test_heal_scheduler.cpp
  • tests/test_hook.cpp
  • tests/test_hook_integration.cpp
  • tests/test_hook_manager.cpp
  • tests/test_input.cpp
  • tests/test_input_intercept.cpp
  • tests/test_logger.cpp
  • tests/test_manifest.cpp
  • tests/test_math.cpp
  • tests/test_memory.cpp
  • tests/test_memory_chain.cpp
  • tests/test_mid_hook_context.cpp
  • tests/test_pattern.cpp
  • tests/test_platform.cpp
  • tests/test_profile.cpp
  • tests/test_profiler.cpp
  • tests/test_rtti.cpp
  • tests/test_rtti_dissect.cpp
  • tests/test_rtti_reverse.cpp
  • tests/test_scan_resolve.cpp
  • tests/test_scanner.cpp
  • tests/test_scanner_parallel.cpp
  • tests/test_session.cpp
  • tests/test_shutdown.cpp
  • tests/test_sighealth.cpp
  • tests/test_srw_shared_mutex.cpp
  • tests/test_string.cpp
  • tests/test_string_xref.cpp
  • tests/test_version.cpp
  • tests/test_win_file_stream.cpp
  • tests/test_worker.cpp

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tkhquang tkhquang changed the base branch from main to release/v4.0.0 July 3, 2026 18:17
@tkhquang tkhquang merged commit 5703fa4 into release/v4.0.0 Jul 3, 2026
6 checks passed
@tkhquang tkhquang deleted the chore/conventions-and-deadcode-cleanup branch July 3, 2026 18:17
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