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-#1196 activate clang-tidy check on posix wrapper #1538

Conversation

elfenpiff
Copy link
Contributor

@elfenpiff elfenpiff commented Jul 22, 2022

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
    • Commit messages have the issue ID (iox-#123 commit text)
    • Commit messages are signed (git commit -s)
    • Commit author matches Eclipse Contributor Agreement (and ECA is signed)
  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 are added to ./clang-tidy-diff-scans.txt
  11. Assign PR to reviewer

Notes for Reviewer

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
    • Each unit test case has a unique UUID
  • Public API changes are documented via doxygen
  • Copyright owner are updated in the changed files
  • All touched (C/C++) source code files 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

…ove test files to follow file naming guideline

Signed-off-by: Christian Eltzschig <[email protected]>
@elfenpiff elfenpiff self-assigned this Jul 22, 2022
@elfenpiff elfenpiff changed the title iox-#1196 Add posix to clang-tidy diff scan list and move test files … iox-#1196 activate clang-tidy check on posix wrapper Jul 22, 2022
@codecov
Copy link

codecov bot commented Jul 22, 2022

Codecov Report

Merging #1538 (28200ba) into master (c30d930) will increase coverage by 0.00%.
The diff coverage is 77.77%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1538   +/-   ##
=======================================
  Coverage   78.88%   78.88%           
=======================================
  Files         378      379    +1     
  Lines       14483    14489    +6     
  Branches     2028     2028           
=======================================
+ Hits        11425    11430    +5     
- Misses       2431     2432    +1     
  Partials      627      627           
Flag Coverage Δ
unittests 78.54% <77.77%> (+<0.01%) ⬆️
unittests_timing 14.90% <0.00%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
...fs/internal/posix_wrapper/shared_memory_object.hpp 87.50% <ø> (ø)
...eoryx_hoofs/source/posix_wrapper/message_queue.cpp 0.00% <ø> (ø)
...oofs/source/posix_wrapper/shared_memory_object.cpp 77.63% <50.00%> (-0.58%) ⬇️
iceoryx_hoofs/source/posix_wrapper/named_pipe.cpp 59.37% <100.00%> (+0.86%) ⬆️
iceoryx_hoofs/source/concurrent/loffli.cpp 85.71% <0.00%> (-2.86%) ⬇️
...nternal/relocatable_pointer/pointer_repository.inl 88.63% <0.00%> (ø)
...include/iceoryx_hoofs/internal/concurrent/sofi.hpp 100.00% <0.00%> (ø)
...include/iceoryx_hoofs/internal/concurrent/sofi.inl 85.00% <0.00%> (+0.78%) ⬆️

iceoryx_hoofs/source/posix_wrapper/message_queue.cpp Outdated Show resolved Hide resolved
iceoryx_hoofs/source/posix_wrapper/named_pipe.cpp Outdated Show resolved Hide resolved

if (name[0] == '/')
{
name.substr(1).and_then([&](auto& s) { channelName.append(cxx::TruncateToCapacity, s); });
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we at least drop a warning or information to the user that we remove the leading slash here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No not at all. In the end the ipc channel contract is to provide a valid file name (which does not allow slashes) in the IPC channel.
This still needs to be refactored somehow, since some IPC channels require slashes (message queue), some allow full paths (named pipe) and some only require a valid file name (unix domain socket).

This all has to be handled by an abstraction above those constructs which will be introduced in: #1451

Until then I would leave it as it is and then refactor it step by step especially since the NamedPipe is only used in Windows.

@mossmaurice mossmaurice added the clang-tidy Warning of a clang-tidy rule label Jul 25, 2022
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, left one question.

@elfenpiff elfenpiff merged commit bfa9770 into eclipse-iceoryx:master Jul 25, 2022
@elfenpiff elfenpiff deleted the iox-#1196-activate-clang-tidy-check-on-posix-wrappers branch July 25, 2022 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang-tidy Warning of a clang-tidy rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants