Skip to content
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

repr(align(...)) added or removed on struct, enum, or union #74

Open
Tracked by #5
obi1kenobi opened this issue Aug 16, 2022 · 2 comments
Open
Tracked by #5

repr(align(...)) added or removed on struct, enum, or union #74

obi1kenobi opened this issue Aug 16, 2022 · 2 comments
Labels
A-lint Area: new or existing lint C-enhancement Category: raise the bar on expectations E-help-wanted Call for participation: Help is requested to fix this issue. E-mentor Call for participation: Mentorship is available for this issue.

Comments

@obi1kenobi
Copy link
Owner

obi1kenobi commented Aug 16, 2022

@obi1kenobi obi1kenobi changed the title with added to struct or enum repr(align(...)) added to struct or enum Aug 16, 2022
@obi1kenobi obi1kenobi added A-lint Area: new or existing lint E-help-wanted Call for participation: Help is requested to fix this issue. E-mentor Call for participation: Mentorship is available for this issue. C-enhancement Category: raise the bar on expectations labels Aug 16, 2022
@max-heller
Copy link

I'm interested in working on this!

@obi1kenobi
Copy link
Owner Author

Awesome! Here are the most-related lints we have right now:

I put a little syntax explainer in this sibling issue, it covers most of the concepts this lint will need as well so please check it out:
#73 (comment)

Let's focus on writing the query we'll need first, and then we can pretty straightforwardly add the test cases, error messages, etc.

In addition to the information in the link above:

  • We'll need a regex filter operator instead of the contains / not_contains filter operators in the repr(C) lints I linked above.
  • We'll need to say "none of the current attributes match this regex" instead of "the list doesn't contain this element." This will require the @fold @transform(...) @filter(...) construct ("no such neighbors exist" construct) as in the link above.
  • For that construct, we'll need to refer to the attributes as neighboring vertices (attribute edge) of the item, rather than just a list of strings that's a property of the item (attrs property). Check out the schema: https://github.com/obi1kenobi/cargo-semver-check/blob/main/src/rustdoc_schema.graphql

It's totally fine if the new lint runs into bug #104 as well, that's on me for not representing attributes better in the schema. Whenever we fix #104, we can do a pass through all the affected lints as well, and in the meantime we'll just bear with the extra false-negatives. In this project, false negatives are unfortunate, but false positives are deal-breakers.

Ping me with any questions! Happy to hop on a video call if that would make it easier to get started, and I'm also in the rust-lang zulip if you'd prefer more interactive text chat.

I'm also working with a few friends on a WASM-powered web editor for Trustfall queries with all the modern conveniences (autocomplete, syntax highlighting, etc.), stay tuned! 🤞

@obi1kenobi obi1kenobi changed the title repr(align(...)) added to struct or enum repr(align(...)) added, removed, or changed on struct, enum, or union Jan 13, 2024
@obi1kenobi obi1kenobi changed the title repr(align(...)) added, removed, or changed on struct, enum, or union repr(align(...)) added or removed on struct, enum, or union Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: new or existing lint C-enhancement Category: raise the bar on expectations E-help-wanted Call for participation: Help is requested to fix this issue. E-mentor Call for participation: Mentorship is available for this issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants