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

Modify rule S1854: Expand and adjust for LaYC #3150

Merged
merged 14 commits into from
Sep 28, 2023
Merged

Modify rule S1854: Expand and adjust for LaYC #3150

merged 14 commits into from
Sep 28, 2023

Conversation

pdschbrt
Copy link
Contributor

Review

A dedicated reviewer checked the rule description successfully for:

  • logical errors and incorrect information
  • information gaps and missing content
  • text style and tone
  • PR summary and labels follow the guidelines

@pdschbrt pdschbrt added cfamily C / C++ / Objective-C layc labels Sep 25, 2023
@pdschbrt pdschbrt requested a review from necto September 25, 2023 14:14
@pdschbrt
Copy link
Contributor Author

Hey @necto

I'm not yet happy with the updated rule description. I'm especially unhappy with What is the potential impact? section---any feedback is highly appreciated.

Cheers

Copy link
Contributor

@necto necto left a comment

Choose a reason for hiding this comment

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

I think it is important to mention the side effects of the RHS. (In the "Pitfalls" section?)
For example, here the fwrite call is probably made for its side effect:

size_t written = fwrite(str, sizeof(*str), strlen(str), fd);

I would also mention the (void) trick to ignore the [[nodiscard]] return values:

[[nodiscard]] int f();

void g() {
  (void)f();
}

rules/S1854/cfamily/rule.adoc Outdated Show resolved Hide resolved
rules/S1854/cfamily/rule.adoc Outdated Show resolved Hide resolved
rules/S1854/cfamily/rule.adoc Outdated Show resolved Hide resolved
rules/S1854/cfamily/rule.adoc Outdated Show resolved Hide resolved
@pdschbrt
Copy link
Contributor Author

I think it is important to mention the side effects of the RHS. (In the "Pitfalls" section?) For example, here the fwrite call is probably made for its side effect:

size_t written = fwrite(str, sizeof(*str), strlen(str), fd);

I would also mention the (void) trick to ignore the [[nodiscard]] return values:

[[nodiscard]] int f();

void g() {
  (void)f();
}

Sold! Thanks for the suggestions.

@pdschbrt pdschbrt requested a review from necto September 27, 2023 07:20
Copy link
Contributor

@necto necto left a comment

Choose a reason for hiding this comment

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

Looks pretty solid. Only minor nits left

rules/S1854/cfamily/rule.adoc Outdated Show resolved Hide resolved
rules/S1854/cfamily/rule.adoc Outdated Show resolved Hide resolved
rules/S1854/cfamily/rule.adoc Outdated Show resolved Hide resolved
rules/S1854/cfamily/rule.adoc Show resolved Hide resolved
rules/S1854/cfamily/rule.adoc Outdated Show resolved Hide resolved
rules/S1854/cfamily/rule.adoc Outdated Show resolved Hide resolved
rules/S1854/cfamily/rule.adoc Outdated Show resolved Hide resolved
rules/S1854/cfamily/rule.adoc Outdated Show resolved Hide resolved
pdschbrt and others added 7 commits September 28, 2023 09:25
Co-authored-by: Arseniy Zaostrovnykh <[email protected]>
Co-authored-by: Arseniy Zaostrovnykh <[email protected]>
Co-authored-by: Arseniy Zaostrovnykh <[email protected]>
Co-authored-by: Arseniy Zaostrovnykh <[email protected]>
Co-authored-by: Arseniy Zaostrovnykh <[email protected]>
Co-authored-by: Arseniy Zaostrovnykh <[email protected]>
@pdschbrt pdschbrt requested a review from necto September 28, 2023 07:40
Copy link
Contributor

@necto necto left a comment

Choose a reason for hiding this comment

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

LGTM! See the minor nits in line comments

rules/S1854/cfamily/rule.adoc Outdated Show resolved Hide resolved
rules/S1854/cfamily/rule.adoc Outdated Show resolved Hide resolved
rules/S1854/cfamily/rule.adoc Show resolved Hide resolved
rules/S1854/cfamily/rule.adoc Outdated Show resolved Hide resolved
rules/S1854/cfamily/rule.adoc Outdated Show resolved Hide resolved
@pdschbrt pdschbrt enabled auto-merge (squash) September 28, 2023 13:21
@sonarqube-next
Copy link

SonarQube Quality Gate for 'rspec-tools'

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@sonarqube-next
Copy link

SonarQube Quality Gate for 'rspec-frontend'

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@pdschbrt pdschbrt merged commit 66d4fe3 into master Sep 28, 2023
@pdschbrt pdschbrt deleted the ps/layc-S1854 branch September 28, 2023 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cfamily C / C++ / Objective-C layc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants