Skip to content

[WS AI] Open source coding rules for C++ and Rust #695

Closed

Description

@qor-lb

See AI27 discussed in https://github.com/orgs/eclipse-score/discussions/375

Owner: @elfenpiff / @elBoberido

Propose coding rules (for both C++ and Rust) that are applied and traceable in the open source.

Activity

  1. self-assigned this
    on Mar 14, 2025
  2. elfenpiff commented on Mar 17, 2025

    @elfenpiff

    Since we will need to maintain C++ and Rust code side by side for the foreseeable future of the project, I propose adopting a C++ style guide that aligns as closely as possible with the default Rust style guide.

    Additionally, I suggest strictly adhering to the Rust coding guidelines without deviation, as they are well-established and widely accepted.

    Keeping the style guides closely aligned minimizes cognitive load for developers, allowing them to focus on algorithmic challenges—an essential factor, especially for mission-critical code.

    I propose the following tools with an initial rule set as a starting point.

    • clang-tidy, rule set
    • clang-format, rule set
    • cargo clippy - with default rule set
    • cargo miri - with default rule set
    • thread sanitizer
    • undefined behavior sanitizer
    • address sanitizer

    Additionally, the codebase shall not allow any compiler warnings, except for [-Wdeprecated]. This specific warning ensures that developers are informed about deprecated code sections that are available only at a lower criticality level. It enables a smooth transition toward higher criticality by guiding developers to swap to certified implementations when necessary.

  3. AlexanderLanin commented on May 15, 2025

    @AlexanderLanin
    Member

    coding rules is process AFAIK

  4. elfenpiff commented on May 16, 2025

    @elfenpiff

    @AlexanderLanin what do you mean with

    coding rules is process AFAIK

    Could you please elaborate it a bit more.

  5. AlexanderLanin commented on May 19, 2025

    @AlexanderLanin
    Member

    I meant we don't have a clear alignment on who will work on coding rules, but it probably involves the process team.

  6. FScholPer commented on May 21, 2025

    @FScholPer
    Contributor

    TL-> No clear epic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions