Skip to content

refactor(clippy): apply semicolon_if_nothing_returned clippy lint #851

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

Merged

Conversation

nejcgalof
Copy link
Contributor

@nejcgalof nejcgalof commented Sep 15, 2024

Description

Apply semicolon_if_nothing_returned clippy lint from the pedantic group.

Motivation and Context

Some of the checks from pedantic group are very useful to apply into the project. I will select the useful ones, and apply each to own MR, for maintainer to easy see the changes and easier decided which he want to apply and which not.
I think it's useful to apply them every once in a while, but not to use them by default.

I use the refactor(clippy) format for my commits, which is omitted from the changelog report.

I also apply those changes to get more familiar with the project and later I will take some of the open issues.

How Has This Been Tested?

I ran the specific lint checks and solved the problem until the linter no longer told me any issue.
Command:

cargo clippy --all-targets -- -D warnings -W clippy::semicolon_if_nothing_returned

The cargo build and test passed successfully. Standard usage of linter and formatter also passed.

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (no code change)
  • Refactor (refactoring production code)
  • Other

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
  • I have formatted the code with rustfmt.
  • I checked the lints with clippy.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@nejcgalof nejcgalof requested a review from orhun as a code owner September 15, 2024 09:31
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 37.50000% with 5 lines in your changes missing coverage. Please review.

Project coverage is 39.94%. Comparing base (a82dac3) to head (0c9d470).

Files with missing lines Patch % Lines
git-cliff/src/lib.rs 0.00% 4 Missing ⚠️
git-cliff-core/src/commit.rs 50.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #851   +/-   ##
=======================================
  Coverage   39.94%   39.94%           
=======================================
  Files          20       20           
  Lines        1660     1660           
=======================================
  Hits          663      663           
  Misses        997      997           
Flag Coverage Δ
unit-tests 39.94% <37.50%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@orhun
Copy link
Owner

orhun commented Sep 15, 2024

@nejcgalof would you be also interested in submitting a PR for enabling the pedantic clippy checks in CI? I'm guessing it should be either a warn annotation in lib.rs or some command line argument addition to cargo clippy command.

@orhun orhun merged commit fe37d14 into orhun:main Sep 15, 2024
60 checks passed
@nejcgalof
Copy link
Contributor Author

@orhun Of course. I will do it :)

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