Skip to content
This repository was archived by the owner on Oct 9, 2018. It is now read-only.
This repository was archived by the owner on Oct 9, 2018. It is now read-only.

Structure rust-guidelines to make code easily accessible #26

Open
@olsonjeffery

Description

@olsonjeffery

This probably dovetails with #17; I'm specifically interested in having all of the code in rust-guidelines be easy reachable/buildable/etc, in order easily integrate with downstream analysis tools (specifically rustfmt).

In my case, I've been working on pcwalton/rustfmt a bit lately and I feel like it's finally nearing a place where it can focus on chasing down comforming to rust-guidelines (at least the style portion).

I'd like to be able to take rust-guidelines as a dependency from rustfmt, build rustfmt, and then parse every code snippet in the style section and fail if any of rustfmt's output differs from the input as it exists in the style snippets. Right now this would involve a manual process of running through every .md file in the style directory to pull out the rust snippets, which I'd rather avoid if at all possible. Does why this is not really desirable make sense and give an idea of how we could arrange the code/docs in rust-guidelines to make it more amenable to integrating with other tools/processes?

Anyways, I see #17 is already there, but there's not much in the way of commentary around that. So I'd like to start that conversation about how we can approach this. In any case, having every code snippet pass muster with rustc is a desirable goal of rust-guidelines, and pursuing this goal would also serve the purposes I have w/ rustfmt.

Please do let me know if there's anything I can contribute towards this goal. I could also open a topic on the discussions board/listserv.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions