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

Create STYLE_GUIDE.md #122

Merged
merged 4 commits into from
Dec 7, 2019
Merged

Create STYLE_GUIDE.md #122

merged 4 commits into from
Dec 7, 2019

Conversation

JafarAbdi
Copy link
Contributor

Description

Please explain the changes you made, including a reference to the related issue if applicable

Checklist

  • Required by CI: Code is auto formatted using clang-format
  • Extended the tutorials / documentation, if necessary reference
  • Include a screenshot if changing a GUI
  • Document API changes relevant to the user in the moveit/MIGRATION.md notes
  • Created tests, which fail without this PR reference
  • Decide if this should be cherry-picked to other current ROS branches
  • While waiting for someone to review your request, please consider reviewing another open pull request to support the maintainers

Copy link
Member

@henningkayser henningkayser left a comment

Choose a reason for hiding this comment

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

@JafarAbdi Could you add that LOGGER should be inside the namespace by default? Also, we need to specify how loggers can be used in header files (there are some cases).

@JafarAbdi
Copy link
Contributor Author

@JafarAbdi Could you add that LOGGER should be inside the namespace by default? Also, we need to specify how loggers can be used in header files (there are some cases).

@henningkayser Adding loggers to header files could violate the one definition rule (for example two header files with the same namespace adding the logger to both headers will cause an error), do you mind sharing some cases so I could document them .?

@rhaschke
Copy link
Contributor

Adding loggers to header files could violate the one definition rule

For this reason, I suggest using a static const class variable named LOGGER, which then could be used/referenced from the header as well.

@JafarAbdi
Copy link
Contributor Author

JafarAbdi commented Nov 22, 2019

@henningkayser Some libraries just contain one source file, the current style will duplicate the name .? for example lma_kinematics_plugin

Should the logger name be moveit_lma_kinematics_plugin.lma_kinematics_plugin .? shouldn't lma_kinematics_plugin be sufficient .?

doc/STYLE_GUIDE.md Outdated Show resolved Hide resolved
doc/STYLE_GUIDE.md Outdated Show resolved Hide resolved
doc/STYLE_GUIDE.md Outdated Show resolved Hide resolved
@henningkayser henningkayser merged commit f10e0ce into moveit:master Dec 7, 2019
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.

None yet

4 participants