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

iox-1930 remove backticks and add commit hook and ci check #1931

Conversation

elBoberido
Copy link
Member

@elBoberido elBoberido commented Feb 28, 2023

Pre-Review Checklist for the PR Author

  1. Code follows the coding style of CONTRIBUTING.md
  2. Tests follow the best practice for testing
  3. Changelog updated in the unreleased section including API breaking changes
  4. Branch follows the naming format (iox-123-this-is-a-branch)
  5. Commits messages are according to this guideline
  6. Update the PR title
    • Follow the same conventions as for commit messages
    • Link to the relevant issue
  7. Relevant issues are linked
  8. Add sensible notes for the reviewer
  9. All checks have passed (except task-list-completed)
  10. All touched (C/C++) source code files from iceoryx_hoofs are added to ./clang-tidy-diff-scans.txt
  11. Assign PR to reviewer

Notes for Reviewer

This PR removes all remaining backticks from the codebase and adds a commit hook and CI check to prevent a reintroduction.

Checklist for the PR Reviewer

  • Commits are properly organized and messages are according to the guideline
  • Code according to our coding style and naming conventions
  • Unit tests have been written for new behavior
  • Public API changes are documented via doxygen
  • Copyright owner are updated in the changed files
  • All touched (C/C++) source code files from iceoryx_hoofs have been added to ./clang-tidy-diff-scans.txt
  • PR title describes the changes

Post-review Checklist for the PR Author

  1. All open points are addressed and tracked via issues

References

@elBoberido elBoberido added tooling All iceoryx related tooling (scripts etc.) technical debt unclean code and design flaws labels Feb 28, 2023
@elBoberido elBoberido self-assigned this Feb 28, 2023
Copy link
Contributor

@mossmaurice mossmaurice left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for contributing this 🎉

tools/scripts/check_invalid_characters.sh Outdated Show resolved Hide resolved
elfenpiff
elfenpiff previously approved these changes Feb 28, 2023
grep -rn --include=\*.{h,hpp,inl,c,cpp} "\`" iceoryx_*
}

BACKTICK_SEARCH_STRING="\`"
Copy link
Contributor

Choose a reason for hiding this comment

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

The script is named check_invaldi_characters could you please rename this variable into INVALID_CHARACTERS.
Another thing would be when INVALID_CHARACTERS becomes an array which would make more sense in the context of this script.

This should be easy, just use space as separator and then iterate of it.

(All of this is purely optional).

Copy link
Member Author

Choose a reason for hiding this comment

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

@elfenpiff the idea was to just copy&paste that part of the code and add a new invalid character. I was not sure if is is an error if the same variable is defined twice.

If you can confirm that it is not an issue I will change it. But I would not make an array out of it right now since one cannot have a custom error message per character. The complex part is already in a function.

You can of course adjust the script as you like in a follow up PR. This is just an initial minimal viable solution

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is something for FutureBob or FutureElfe

@elBoberido elBoberido force-pushed the iox-1930-remove-backticks-and-add-commit-hook-and-ci-check branch from 02f8032 to 7c43100 Compare February 28, 2023 17:56
@codecov
Copy link

codecov bot commented Feb 28, 2023

Codecov Report

Merging #1931 (7c43100) into master (b958089) will increase coverage by 0.00%.
The diff coverage is 50.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1931   +/-   ##
=======================================
  Coverage   75.44%   75.44%           
=======================================
  Files         384      384           
  Lines       15205    15205           
  Branches     2148     2148           
=======================================
+ Hits        11471    11472    +1     
  Misses       3062     3062           
+ Partials      672      671    -1     
Flag Coverage Δ
unittests 75.10% <50.00%> (+<0.01%) ⬆️
unittests_timing 15.47% <0.00%> (-0.02%) ⬇️

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

Impacted Files Coverage Δ
...include/iceoryx_posh/capro/service_description.hpp 100.00% <ø> (ø)
...lude/iceoryx_posh/internal/capro/capro_message.hpp 100.00% <ø> (ø)
...ude/iceoryx_posh/internal/mepoo/memory_manager.hpp 100.00% <ø> (ø)
...lude/iceoryx_posh/internal/popo/base_publisher.hpp 100.00% <ø> (ø)
...h/internal/popo/building_blocks/chunk_receiver.hpp 100.00% <ø> (ø)
...osh/internal/popo/building_blocks/chunk_sender.hpp 100.00% <ø> (ø)
...include/iceoryx_posh/internal/popo/client_impl.inl 100.00% <ø> (ø)
...oryx_posh/internal/popo/ports/client_port_user.hpp 100.00% <ø> (ø)
...oryx_posh/internal/popo/ports/server_port_user.hpp 100.00% <ø> (ø)
...lude/iceoryx_posh/internal/popo/publisher_impl.hpp 100.00% <ø> (ø)
... and 8 more

@mossmaurice mossmaurice removed the request for review from dkroenke February 28, 2023 19:05
@elBoberido elBoberido merged commit 619514f into eclipse-iceoryx:master Feb 28, 2023
@elBoberido elBoberido deleted the iox-1930-remove-backticks-and-add-commit-hook-and-ci-check branch February 28, 2023 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical debt unclean code and design flaws tooling All iceoryx related tooling (scripts etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove backticks from code and add commit hook and CI check
3 participants