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

libexpr: apply static analysis "quick fix" to splitted files #9089

Closed
wants to merge 2 commits into from

Conversation

inclyc
Copy link
Member

@inclyc inclyc commented Oct 3, 2023

Motivation

This PR contains no functioanl change, there are bunch of suggesstions
by clang-tidy in the file and there are fixes available.

Including:

  • 0 -> nullptr
  • use auto for iterator types
  • sort #includes
  • closing namespace comment
  • use .empty() instead of comparing it with empty object
  • use auto if it the type is apparently specified (e.g. new Type)
  • add const specifier or & to improve readability

Context

This PR depends on #9059 , please do not review commits in that PR

depends on #9059

Priorities

Add 👍 to pull requests you find important.

@inclyc inclyc requested a review from edolstra as a code owner October 3, 2023 04:24
Copy link
Member

@thufschmitt thufschmitt left a comment

Choose a reason for hiding this comment

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

Barring acceptance of #9059 (which is already discussed by others, so I won't interfere), this looks fine (and useful) to me 👍

@Ericson2314
Copy link
Member

@inclyc see how I editted the description to do the "depends on" thing so that blocker shows up in CI.

This is an NFC PR that splits epilogue & prologue from parser.

As mentioned in NixOS#8812, we can add static checking tools & auto
formatting for these files, but if it is written .y directly, the clang
parser cannot understand the code is actually "C++".
This PR contains no functioanl change, there are bunch of suggesstions
by clang-tidy in the file and there are fixes available.

Including:

- 0 -> nullptr
- use `auto` for iterator types
- sort `#include`s
- closing namespace comment
- use `.empty()` instead of comparing it with empty object
- use `auto` if it the type is apparently specified (e.g. `new Type`)
- add const specifier or `&` to improve readability
Copy link

dpulls bot commented Dec 29, 2023

🎉 All dependencies have been resolved !

@inclyc inclyc closed this Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants