Skip to content

Commit

Permalink
Add missing license headers and activate ament_copyright (#165)
Browse files Browse the repository at this point in the history
* Add missing license headers

Signed-off-by: Christoph Hellmann Santos <[email protected]>

* Add fix ament_lint_cmake

Signed-off-by: Christoph Hellmann Santos <[email protected]>

---------

Signed-off-by: Christoph Hellmann Santos <[email protected]>
  • Loading branch information
hellantos authored and ipa-vsp committed Jul 14, 2023
1 parent ef394e2 commit 543cc2a
Show file tree
Hide file tree
Showing 45 changed files with 585 additions and 89 deletions.
61 changes: 11 additions & 50 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,6 @@ repos:
- id: black
args: ["--line-length=99"]

# PEP 257
# - repo: https://github.com/FalconSocial/pre-commit-mirrors-pep257
# rev: v0.3.3
# hooks:
# - id: pep257
# args: ["--ignore=D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404"]

# - repo: https://github.com/pycqa/flake8
# rev: 5.0.4
# hooks:
# - id: flake8
# args: ["--ignore=E501"]

# CPP hooks
- repo: local
hooks:
Expand All @@ -68,36 +55,8 @@ repos:
language: system
files: \.(c|cc|cxx|cpp|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|js|m|proto|vert)$
args: ['-fallback-style=none', '-i']
# The same options as in ament_cppcheck are used, but its not working...
#- repo: https://github.com/pocc/pre-commit-hooks
#rev: v1.1.1
#hooks:
#- id: cppcheck
#args: ['--error-exitcode=1', '-f', '--inline-suppr', '-q', '-rp', '--suppress=internalAstError', '--suppress=unknownMacro', '--verbose']

# - repo: local
# hooks:
# - id: ament_cppcheck
# name: ament_cppcheck
# description: Static code analysis of C/C++ files.
# stages: [commit]
# entry: ament_cppcheck
# language: system
# files: \.(h\+\+|h|hh|hxx|hpp|cuh|c|cc|cpp|cu|c\+\+|cxx|tpp|txx)$

# # Maybe use https://github.com/cpplint/cpplint instead
# - repo: local
# hooks:
# - id: ament_cpplint
# name: ament_cpplint
# description: Static code analysis of C/C++ files.
# stages: [commit]
# entry: ament_cpplint
# language: system
# files: \.(h\+\+|h|hh|hxx|hpp|cuh|c|cc|cpp|cu|c\+\+|cxx|tpp|txx)$
# args: ["--linelength=100", "--filter=-whitespace/newline"]

# # Cmake hooks
# Cmake hooks
# - repo: local
# hooks:
# - id: ament_lint_cmake
Expand All @@ -107,16 +66,18 @@ repos:
# entry: ament_lint_cmake
# language: system
# files: CMakeLists\.txt$
# exclude: lely_core_libraries\/CMakeLists\.txt$

# # Copyright
# - repo: local
# hooks:
# - id: ament_copyright
# name: ament_copyright
# description: Check if copyright notice is available in all files.
# stages: [commit]
# entry: ament_copyright
# language: system
- repo: local
hooks:
- id: ament_copyright
name: ament_copyright
description: Check if copyright notice is available in all files.
stages: [commit]
entry: ament_copyright
args: ["--add-missing", "ROS-Industrial", "apache2"]
language: system

# Docs - RestructuredText hooks
- repo: https://github.com/PyCQA/doc8
Expand Down
14 changes: 14 additions & 0 deletions canopen/sphinx/conf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2023 ROS-Industrial
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
Expand Down
4 changes: 2 additions & 2 deletions canopen_402_driver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ ament_target_dependencies(

add_library(lifecycle_cia402_driver
src/lifecycle_cia402_driver.cpp
)
)
target_compile_features(lifecycle_cia402_driver PUBLIC c_std_99 cxx_std_17) # Require C99 and C++17
target_compile_options(lifecycle_cia402_driver PUBLIC -Wl,--no-undefined)
target_include_directories(lifecycle_cia402_driver PUBLIC
Expand All @@ -94,7 +94,7 @@ set(node_plugins "${node_plugins}ros2_canopen::LifecycleCia402Driver;$<TARGET_FI

add_library(cia402_driver
src/cia402_driver.cpp
)
)
target_compile_features(cia402_driver PUBLIC c_std_99 cxx_std_17) # Require C99 and C++17
target_compile_options(cia402_driver PUBLIC -Wl,--no-undefined)
target_include_directories(cia402_driver PUBLIC
Expand Down
16 changes: 16 additions & 0 deletions canopen_402_driver/include/canopen_402_driver/base.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
// Copyright 2023 Christoph Hellmann Santos
// Copyright 2014-2022 Authors of ros_canopen
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//
#ifndef CANOPEN_402_BASE_H
#define CANOPEN_402_BASE_H
#include <string>
Expand Down
16 changes: 16 additions & 0 deletions canopen_402_driver/include/canopen_402_driver/cia402_driver.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
// Copyright 2023 Christoph Hellmann Santos
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

#ifndef CANOPEN_402_DRIVER__402_DRIVER_HPP_
#define CANOPEN_402_DRIVER__402_DRIVER_HPP_
#include "canopen_402_driver/node_interfaces/node_canopen_402_driver.hpp"
Expand Down
17 changes: 17 additions & 0 deletions canopen_402_driver/include/canopen_402_driver/command.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
// Copyright 2023 Christoph Hellmann Santos
// Copyright 2014-2022 Authors of ros_canopen
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

#ifndef CANOPEN_402_DRIVER_COMMAND_HPP
#define CANOPEN_402_DRIVER_COMMAND_HPP

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
// Copyright 2023 Christoph Hellmann Santos
// Copyright 2014-2022 Authors of ros_canopen
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

#ifndef DEFAULT_HOMING_MODE_HPP
#define DEFAULT_HOMING_MODE_HPP
#include <mutex>
Expand Down
17 changes: 17 additions & 0 deletions canopen_402_driver/include/canopen_402_driver/homing_mode.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
// Copyright 2023 Christoph Hellmann Santos
// Copyright 2014-2022 Authors of ros_canopen
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

#ifndef HOMING_MODE_HPP
#define HOMING_MODE_HPP
#include "base.hpp"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
// Copyright 2023 Christoph Hellmann Santos
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

#ifndef CANOPEN_402_DRIVER__CANOPEN_LIFECYCLE_402_DRIVER_HPP_
#define CANOPEN_402_DRIVER__CANOPEN_LIFECYCLE_402_DRIVER_HPP_

Expand Down
17 changes: 17 additions & 0 deletions canopen_402_driver/include/canopen_402_driver/mode.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
// Copyright 2023 Christoph Hellmann Santos
// Copyright 2014-2022 Authors of ros_canopen
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

#ifndef CANOPEN_402_DRIVER_MODE_HPP
#define CANOPEN_402_DRIVER_MODE_HPP

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
// Copyright 2023 Christoph Hellmann Santos
// Copyright 2014-2022 Authors of ros_canopen
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

#ifndef MODE_FORWARD_HELPER_HPP
#define MODE_FORWARD_HELPER_HPP

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
// Copyright 2023 Christoph Hellmann Santos
// Copyright 2014-2022 Authors of ros_canopen
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

#ifndef MODE_TARGET_HELPER_HPP
#define MODE_TARGET_HELPER_HPP

Expand Down
17 changes: 17 additions & 0 deletions canopen_402_driver/include/canopen_402_driver/motor.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
// Copyright 2023 Christoph Hellmann Santos
// Copyright 2014-2022 Authors of ros_canopen
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

#ifndef MOTOR_HPP
#define MOTOR_HPP

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
// Copyright 2023 Christoph Hellmann Santos
// Vishnuprasad Prachandabhanu
// Lovro Ivanov
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

#ifndef NODE_CANOPEN_402_DRIVER
#define NODE_CANOPEN_402_DRIVER

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
// Copyright 2023 Christoph Hellmann Santos
// Vishnuprasad Prachandabhanu
// Lovro Ivanov
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

#ifndef NODE_CANOPEN_402_DRIVER_IMPL_HPP_
#define NODE_CANOPEN_402_DRIVER_IMPL_HPP_

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
// Copyright 2023 Christoph Hellmann Santos
// Copyright 2014-2022 Authors of ros_canopen
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

#ifndef PROFILED_POSITION_MODE_HPP
#define PROFILED_POSITION_MODE_HPP

Expand Down
Loading

0 comments on commit 543cc2a

Please sign in to comment.