Skip to content

Align codebase with DUNE-DAQ C++ Style Guide#358

Open
Copilot wants to merge 6 commits intodevelopfrom
copilot/review-code-styleguide
Open

Align codebase with DUNE-DAQ C++ Style Guide#358
Copilot wants to merge 6 commits intodevelopfrom
copilot/review-code-styleguide

Conversation

Copy link

Copilot AI commented Jan 7, 2026

Description

Style compliance review identified violations of the DUNE-DAQ C++ Style Guide. Changes modernize code and fix naming conventions without altering functionality.

Changes Made

Enumerator naming (§2.7)

  • ValidationReport::Severity: converted to enum class with k prefix
    • FatalkFatal, ErrorkError, WarningkWarning, etc.
  • Anonymous enum in ConfigurationManager.cpp: TLVL_SESSIONkTlvlSession, etc. REVERTED - TLVL constants kept in original all-caps format per maintainer feedback

Type declarations (§7.7)

  • DAQModuleManager.hpp: replaced C-style typedef with using declaration

Documentation

  • Corrected typos in file headers: "implementataion" → "implementation", "convinience" → "convenience", "mdoule" → "module"

Example of enum changes:

// Before
enum Severity { Fatal, Error, Warning, Info, Ignored };
ValidationReport report(ValidationReport::Severity::Fatal, ...);

// After
enum class Severity { kFatal, kError, kWarning, kInfo, kIgnored };
ValidationReport report(ValidationReport::Severity::kFatal, ...);

Note: Changes to ConfigurationManager.cpp enum constants were reverted to maintain the original TLVL naming convention (TLVL_SESSION, TLVL_APP, etc.) while keeping the necessary compatibility update for ValidationReport::Severity enum values.

Type of change

  • Optimization (non-breaking change that improves code/performance)

Testing checklist

  • Unit tests pass (e.g. dbt-build --unittest)
  • Minimal system quicktest passes (pytest -s minimal_system_quick_test.py)
  • Full set of integration tests pass (daqsystemtest_integtest_bundle.sh)
  • Python tests pass if applicable (e.g. python -m pytest)
  • Pre-commit hooks run successfully if applicable (e.g. pre-commit run --all-files)

Automated code review and security scan completed with no issues found.

Further checks

Original prompt

Please review this code using the DUNE-DAQ/styleguide


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits January 7, 2026 17:46
- Changed ValidationReport::Severity enum to enum class with k prefix
- Updated all enumerators: Fatal -> kFatal, Error -> kError, etc.
- Fixed TLVL_ enum constants to use k prefix (kTlvlSession, etc.)
- Updated all usages throughout the codebase

Co-authored-by: eflumerf <61473357+eflumerf@users.noreply.github.com>
- Changed typedef to using declaration in DAQModuleManager.hpp
- Fixed typo: "implementataion" -> "implementation" in Application.cpp
- Fixed typo: "implementataion" -> "implementation" in DAQModuleManager.cpp
- Fixed typo: "convinience" -> "convenience" in ConfigurationManager.hpp
- Fixed typo: "mdoule" -> "module" in DAQModule.hpp

Co-authored-by: eflumerf <61473357+eflumerf@users.noreply.github.com>
Co-authored-by: eflumerf <61473357+eflumerf@users.noreply.github.com>
Copilot AI changed the title [WIP] Review code against DUNE-DAQ styleguide Align codebase with DUNE-DAQ C++ Style Guide Jan 7, 2026
Copilot AI requested a review from eflumerf January 7, 2026 17:53
@eflumerf
Copy link
Member

eflumerf commented Jan 8, 2026

@copilot revert the changes to ConfigurationManager.cpp

Keep original TLVL_SESSION, TLVL_APP, TLVL_MODULE, TLVL_QUEUE, TLVL_ACTION_PLAN naming.
Only maintain the necessary update to use ValidationReport::Severity::kFatal for compatibility.

Co-authored-by: eflumerf <61473357+eflumerf@users.noreply.github.com>
Copy link
Author

Copilot AI commented Jan 8, 2026

@copilot revert the changes to ConfigurationManager.cpp

Reverted the enum naming changes to ConfigurationManager.cpp. The TLVL constants now use their original all-caps naming (TLVL_SESSION, TLVL_APP, etc.). Only kept the necessary update to ValidationReport::Severity::kFatal for compatibility with the enum class change. (4ddeb76)

@eflumerf eflumerf marked this pull request as ready for review January 8, 2026 22:02
@eflumerf eflumerf requested a review from jcfreeman2 January 8, 2026 22:03
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.

2 participants