-
Notifications
You must be signed in to change notification settings - Fork 20
[auto-pr] #156: [Coding Guideline]: Subset Guideline for CERT C, INT34-C: Do not shift an expression by a negative number of bits or by greater than or equal to the number of bits that exist in the operand #180
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
base: main
Are you sure you want to change the base?
Conversation
❌ Deploy Preview for scrc-coding-guidelines failed.
|
|
@felix91gr -- could you add the new tags you're using in another PR? Note that this fails: |
|
@PLeVasseur ohh! I see. The Form for creating a New Guideline Issue didn't mention that new tags needed to be added before using them. That's a bit of Contributor Experience we could improve in the Form
I'll be adding the new tags right away :) |
92b2434 to
00fb52c
Compare
00fb52c to
f5efaf5
Compare
|
GEH. The FLS spec file got us again! Hahahah. Okay, brb, will open a PR to update it. |
f5efaf5 to
015fd0d
Compare
|
@x0rw I'll need your help again QwQ It seems like the table in the original issue (same for #181's original issue) isn't being picked up quite how sphinx would want it. Do you know what I should do? The table looks like this: | **Compilation Mode** | **`0 <= M < N`** | **`M < 0`** | **`N <= M`** |
|:--------------------:|:----------------:|:---------------------:|:-------------------:|
| Debug | Shifts normally | Panics | Panics |
| Release | Shifts normally | Shifts by `M mod N` | Shifts by `M mod N` | |
015fd0d to
767d325
Compare
|
I've fixed the table manually. There's a typo that CI complains about; #206 fixes it |
5424a73 to
bc2f62c
Compare
Co-authored-by: felix91gr <[email protected]> Note: tables were written by hand due to limitations in our automation
bc2f62c to
9d35d71
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to see this working with the manual table.
Content-wise this is good.
There's a couple of formatting snags I pointed out.
|
|
||
| .. code-block:: rust | ||
| fn bad_shl(bits: u32, shift: i32) -> u32 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there may be some missing braces here depending on what was intended.
One possibility: you could back the indentation up to the same level as this line for line 576 if the intent was to have the upper bit be stand-alone from the bottom part. That'd then mean the lower part should also be outdented to the same level of indentation.
| The last 2 observations show how this addresses **Reason 2**. | ||
|
|
||
| .. code-block:: rust |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above applies down here too.
Note: this must be addressed at the automation level, since said code blocks were generated from a GH issue
|
Opened #212 to track to resolution so that we can get this build to pass. |

This PR was automatically generated from issue #156.
Authored by: @felix91gr
Closes #156.