Skip to content

Conversation

PLeVasseur
Copy link
Collaborator

Closes #145

Copy link

netlify bot commented Jul 14, 2025

Deploy Preview for scrc-coding-guidelines failed.

Name Link
🔨 Latest commit d20616f
🔍 Latest deploy log https://app.netlify.com/projects/scrc-coding-guidelines/deploys/68e41bda896a740008558fce

@PLeVasseur PLeVasseur force-pushed the feature/coding-guidelines-goals branch from 99c4170 to 863169b Compare July 14, 2025 21:32
@felix91gr
Copy link
Collaborator

@PLeVasseur do you want me to take a look at this? :)

@PLeVasseur
Copy link
Collaborator Author

That'd be very kind of you ;D

Copy link
Collaborator

@felix91gr felix91gr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope you're ready for many comments <3

README.md Outdated

For a new coding guideline you'd like to contribute, start with opening a [coding guideline issue](https://github.com/rustfoundation/safety-critical-rust-coding-guidelines/issues/new?template=CODING-GUIDELINE.yml).

Once an issue has been well-developed enough it's then time to write up the guideline.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how I'd change this phrasing, but here's my observation: we now have an automatic PR builder after a Coding Guideline issue has been approved, right? Perhaps this description of the process could be changed, then, since it's now a different process than what is described in this line. Does that make sense?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, this should be updated to reflect current reality 👍

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@felix91gr -- can we call this one resolved as I took my attempt at this?

GOALS.md Outdated

A good first step is to open a new [coding guideline issue](https://github.com/rustfoundation/safety-critical-rust-coding-guidelines/issues/new?template=CODING-GUIDELINE.yml).

# Goals
Copy link
Collaborator

@felix91gr felix91gr Aug 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of the items in # Goals lack a verb to anchor them to the world. I think those are really important for goal-setting

  • To have coding guidelines that make a "best effort" attempt (...)
  • To have practical recommendations on how to (...)
  • (this one is ok)
  • (same)
  • To have (find or create) Clippy lints which will cover decidable guidelines.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very salient point
I'll visit this again

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried my hand at this; could you look again?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OH! Awesome! Yes, I shall :)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's now under Criteria, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, exactly

GOALS.md Outdated

## Goals obtained by discussion with Tooling Subcommittee

* Make a label for each which _in theory_ is decidable or not
Copy link
Collaborator

@felix91gr felix91gr Aug 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For each... guideline, right?

(I'd make it explicit: Make a label for each guideline)

Though if we're talking about guidelines, I'd perhaps phrase it a bit differently, because the sentence feels a bit weird right now:

Make a label for each guideline, which describes whether said guideline is decidable or not.

Plus a link to our definition of decidable, or the Wikipedia article on Decidability otherwise.

Decidability is always a theoretical thing. So I think it's fine to omit the in theory bit. As long as we give the reader a link to know the fine details of it, I think that's plenty good enough :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've revised the wording on this -- could you take a look?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a lot better now! I would still add a link to a definition of decidability tho, just so that people who need a refresher or haven't studied CS and read the text know where to go for more details :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, have done so now!

@felix91gr felix91gr added the documentation Improvements or additions to documentation label Aug 11, 2025
Copy link
Collaborator

@felix91gr felix91gr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestions are now in place ^^

PLeVasseur and others added 7 commits September 17, 2025 04:51
Co-authored-by: Félix Fischer <[email protected]>
Co-authored-by: Félix Fischer <[email protected]>
Co-authored-by: Félix Fischer <[email protected]>
Co-authored-by: Félix Fischer <[email protected]>
Co-authored-by: Félix Fischer <[email protected]>
@PLeVasseur PLeVasseur force-pushed the feature/coding-guidelines-goals branch from 59cb10c to 4f0f9fe Compare September 16, 2025 19:51
@PLeVasseur PLeVasseur force-pushed the feature/coding-guidelines-goals branch from 7f7e285 to 7c89bd9 Compare September 16, 2025 21:26
@PLeVasseur PLeVasseur force-pushed the feature/coding-guidelines-goals branch 2 times, most recently from 46d94f8 to 494cbda Compare September 16, 2025 22:54
@PLeVasseur PLeVasseur force-pushed the feature/coding-guidelines-goals branch from 494cbda to ff367d1 Compare September 16, 2025 22:56
@PLeVasseur PLeVasseur changed the title Add GOALS.md, freshen up to use arewesafetycriticalyet.org Add GOALS.md, revise contribution process, freshen up to use arewesafetycriticalyet.org Sep 16, 2025
GOALS.md Outdated

## Elevator pitch

We will make Rust coding guidelines are available within this repository, deployed to an accessible location on the internet which comply with relevant standards for various safety-critical industries such as: IEC 61508, ISO 26262, and DO 178.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something about this sentence is missing, I believe.

Was it intended to go like:

We will make sure Rust coding guidelines are available within this repository, (...)

or perhaps something along the lines of...

We will make Rust coding guidelines. Such guidelines are available within this repository, (...)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, one of those two, thanks for catching the phrasing

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, cleaned this up into three sentences instead so it's a bit easier to comprehend.

GOALS.md Outdated
* We aim to produce evidence-based guidelines, with statistics around human error when programming Rust, to support:
1. What guidelines are written, and
2. Why a specific suggestion was made
* We will produce the guidelines in an artifact that's easily machine readable and consistent format to make it easier to consume by tool vendors as a baseline (e.g. multiple JSON files, one per language piece, also potentially one large JSON concatenated together)
Copy link
Collaborator

@felix91gr felix91gr Sep 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean here by "as a baseline"? :o

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, okay. I guess the phrasing here may not be clear. The idea is that we will satisfy the Tooling Subcommittee's ask by providing these JSON files. If they need more they can come back and we can discuss.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll take another pass to clarify

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarified what exactly we're producing today

## Criteria

* We produce coding guidelines that make a "best effort" attempt at cataloging common pieces (e.g. functions, arithmetic, unsafe) of the Rust programming language and how they fit into a safety-critical project
* We will use [MISRA Compliance: 2020](https://misra.org.uk/app/uploads/2021/06/MISRA-Compliance-2020.pdf) for categorization
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which part of the MISRA Compliance: 2020 document are we using? (the pdf is 39 pages long)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scary voice: the whole thing!!

But seriously, @AlexCeleste may be better equipped to tell us if we need cite a page range or the entire document.

README.md Outdated
Comment on lines 110 to 112
## Contributing to the coding guidelines

See [CONTRIBUTING.md](CONTRIBUTING.md).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this entire section should go inside of CONTRIBUTING.md instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is getting long, isn't it? I could see the argument

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, extracted this out

@PLeVasseur PLeVasseur requested a review from felix91gr October 6, 2025 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Coding guidelines "north star" document addition to repo
2 participants