Skip to content

Add GOALS.md, freshen up to use arewesafetycriticalyet.org #149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

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 59cb10c
🔍 Latest deploy log https://app.netlify.com/projects/scrc-coding-guidelines/deploys/689bf46f228717000896ca2c

@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


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 👍


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


## 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 :)

* Include for each a minimum of one compliant and non-compliant example of code to illustrate point
* Consider only the language reference / spec, not the tooling availability when writing the coding guidelines
* Evidence-based with statistics around human error when programming Rust to support both 1. what guidelines are written and 2. why a suggestion was made
* 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 Aug 11, 2025

Choose a reason for hiding this comment

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

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)

Oh wow, that's a big requirement. Did they offer examples on this? I don't think there's any representation generic enough to describe an arbitrary guideline in a machine-readable format.

Aside: if it exists, let me know. Such a representation could be used to automatically construct lints.

Therefore, I must be misinterpreting this requirement.

Do you think we could ask around in the Tooling Subcommittee Zulip thread?

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, this is a good question.

My current understanding after bringing this to the Tooling Subcommittee was that the following would suffice:

  • needs.json which bundles together all of the guidelines directives we have so could be consumed by a tool
  • guidelines-ids.json which stamps each guideline directive with a hash of the contents so that a tool vendor could be aware of when a guideline has changed and thus intentionally break their build

But yeah we can definitely shop it around again to make sure this fits their needs.

@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 5 commits August 12, 2025 22:10
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]>
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