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

Make Cppcheck happier revived #13566

Merged
merged 1 commit into from May 10, 2024
Merged

Conversation

haslinghuis
Copy link
Member

Copy link

Do you want to test this code? You can flash it directly from Betaflight Configurator:

  • Simply put #13566 (this pull request number) in the Select commit field of the Configurator firmware flasher tab (you need to Enable expert mode, Show release candidates and Development).

WARNING: It may be unstable. Use only for testing!

@haslinghuis
Copy link
Member Author

Notes:

@nerdCopter
Copy link
Member

I set 4.6 Milestone on this only because the prior PR had it. If this is incorrect, please change. This PR changes many files -- maybe proceed with caution.

src/main/cli/cli.c Outdated Show resolved Hide resolved
src/main/cli/cli.c Outdated Show resolved Hide resolved
src/main/drivers/inverter.c Outdated Show resolved Hide resolved
src/main/drivers/stm32/serial_uart_hal.c Outdated Show resolved Hide resolved
src/main/io/asyncfatfs/asyncfatfs.c Outdated Show resolved Hide resolved
src/main/pg/pg.c Outdated Show resolved Hide resolved
src/main/rx/jetiexbus.c Outdated Show resolved Hide resolved
src/main/pg/pg.c Outdated Show resolved Hide resolved
@nerdCopter
Copy link
Member

how to test? cppcheck ./src/? cpp version dependent?

src/main/build/build_config.h Outdated Show resolved Hide resolved
src/main/io/asyncfatfs/asyncfatfs.c Outdated Show resolved Hide resolved
src/main/io/ledstrip.c Outdated Show resolved Hide resolved
src/main/rx/expresslrs.c Outdated Show resolved Hide resolved
src/main/rx/jetiexbus.c Outdated Show resolved Hide resolved
@ledvinap
Copy link
Contributor

how to test? cppcheck ./src/? cpp version dependent?

You can check ublox, that is only noticeable change.

Rest is mostly const and decreasing variable scope, no build errors is enough

@haslinghuis
Copy link
Member Author

Can we get this merged please.

@KarateBrot
Copy link
Member

KarateBrot commented Apr 29, 2024

You don't need to close the original PR and make a new one, you can edit the original

@haslinghuis
Copy link
Member Author

@KarateBrot did not want to mangle the original PR without @daleckystepan approval to do so - so this PR is in his honor.

@nerdCopter
Copy link
Member

@haslinghuis
Copy link
Member Author

@blckmn please can we get this merged #11175 (comment)

@blckmn
Copy link
Member

blckmn commented May 10, 2024

@haslinghuis I can't see where you've co-authored this?

@haslinghuis
Copy link
Member Author

haslinghuis commented May 10, 2024

Trying but does not work

image

@haslinghuis
Copy link
Member Author

Any suggestion?

@blckmn
Copy link
Member

blckmn commented May 10, 2024

Any suggestion?

The easiest way was to pull the original commits from the original PR, and make your changes, raise a commit for those changes (to your local repo), and then raise a new PR. That way the original commits will be authored correctly.

i.e. Pulling the PR (using the /pull/XXX/head method), rebasing as required, and adding your new commits.

Here is githubs official position on inactive pull requests and editing locally: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

blckmn
blckmn previously requested changes May 10, 2024
Copy link
Member

@blckmn blckmn left a comment

Choose a reason for hiding this comment

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

Please add the co-authorship.

@blckmn
Copy link
Member

blckmn commented May 10, 2024

Any suggestion?

Probably the easiest way now is to reset the branch, back to where it forks for this branch (from master), and then create an entirely new commit, retaining any commit commits and adding the co-authorship in the process - then force pushing.

@haslinghuis
Copy link
Member Author

haslinghuis commented May 10, 2024

Did not cherry-pick but entirely did this manually - as there were too many conflicts - it was easier to go from scratch.

It took hours while testing and building to get it right anyhow.

EDIT: just amend with co-author did the trick

Co-authored-by: Štěpán Dalecký <daleckystepan@gmail.com>
@blckmn blckmn merged commit 5a28ce5 into betaflight:master May 10, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants