Skip to content

Commit

Permalink
Add necessary changes to make format and lint workflows passing (Stog…
Browse files Browse the repository at this point in the history
  • Loading branch information
mamueluth authored Mar 1, 2022
1 parent 71c80dc commit eec2532
Show file tree
Hide file tree
Showing 12 changed files with 103 additions and 331 deletions.
54 changes: 0 additions & 54 deletions .github/workflows/ci-build-foxy.yml

This file was deleted.

54 changes: 0 additions & 54 deletions .github/workflows/ci-build.yml

This file was deleted.

17 changes: 10 additions & 7 deletions .github/workflows/ci-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,24 @@
# that: https://github.com/pre-commit/action

name: Format

on:
workflow_dispatch:
pull_request:
push:
branches:
- rolling

jobs:
pre-commit:
name: Format
name: Run pre-commit
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.9.7'
cache: 'pip'
- name: Install clang-format-10
run: sudo apt-get install clang-format-10
- uses: pre-commit/[email protected]
run: sudo apt-get install clang-format-11
- uses: pre-commit/[email protected]
with:
extra_args: --all-files --hook-stage manual
22 changes: 14 additions & 8 deletions .github/workflows/ci-lint.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
name: Lint
on:
workflow_dispatch:
pull_request:

jobs:
ament_lint:
name: ament_${{ matrix.linter }}
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Old setup
# linter: [copyright, cppcheck, cpplint, flake8, pep257, uncrustify, xmllint]
linter: [copyright]
linter: [cppcheck, lint_cmake]
arguments: [""]
include:
- linter: copyright
arguments: "--exclude CONTRIBUTING.md conf.py test_robot_description.launch.py view_robot.launch.py controller.cpp controller.hpp test_controller.cpp test_controller.hpp test_load_controller.cpp robot_hardware_interface.cpp robot_hardware_interface.hpp test_robot_hardware_interface.cpp visibility_control.h robot_ros2_control.launch.py test_forward_position_controller.launch.py test_joint_trajectory_controller.launch.py"
- linter: cpplint
arguments: "--exclude ./templates/ros2_control/controller/controller.cpp ./templates/ros2_control/controller/controller.hpp ./templates/ros2_control/controller/test_controller.cpp ./templates/ros2_control/controller/test_controller.hpp ./templates/ros2_control/controller/test_load_controller.cpp ./templates/ros2_control/controller/test_load_controller.hpp ./templates/ros2_control/hardware/robot_hardware_interface.cpp ./templates/ros2_control/hardware/robot_hardware_interface.hpp ./templates/ros2_control/hardware/visibility_control.cpp ./templates/ros2_control/hardware/test_robot_hardware_interface.cpp ./templates/ros2_control/hardware/visibility_control.h"
steps:
- uses: actions/checkout@v1
- uses: ros-tooling/setup-ros@v0.1
- uses: ros-tooling/action-ros-lint@v0.1
- uses: actions/checkout@v2
- uses: ros-tooling/setup-ros@master
- uses: ros-tooling/action-ros-lint@master
with:
distribution: foxy
distribution: galactic
linter: ${{ matrix.linter }}
arguments: ${{ matrix.arguments }}
package-name:
ros_team_workspace
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ repos:
rev: 4.0.1
hooks:
- id: flake8
args: ["--ignore=E501"]
args: ["--ignore=E501, W503"]

# CPP hooks
- repo: local
Expand Down Expand Up @@ -127,6 +127,7 @@ repos:
stages: [commit]
entry: ament_copyright
language: system
exclude: ^(templates/)

# Docs - RestructuredText hooks
- repo: https://github.com/PyCQA/doc8
Expand Down
3 changes: 1 addition & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import os
import sys
import time
import sphinx_rtd_theme

from docutils.parsers.rst import Directive

Expand Down Expand Up @@ -244,6 +243,7 @@
"REPOS_FILE_BRANCH": repos_file_branch,
}


# Add any paths that contain custom themes here, relative to this directory.
class RedirectFrom(Directive):

Expand Down Expand Up @@ -328,7 +328,6 @@ def run(self):
def make_router(origin, destination):
def _missing_reference(app, env, node, contnode):
from docutils import nodes
from docutils.utils import relative_path
from sphinx.util import docname_join

doctarget = docname_join(node["refdoc"], node["reftarget"])
Expand Down
4 changes: 2 additions & 2 deletions docs/use-cases/ros_packages/create_package.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This use-case describes how to create a new package using scripts from the ROS T
General Script for Creating Packages
=====================================

`create-new-package` script is used, accepting the package name and description as parameters.
``create-new-package`` script is used, accepting the package name and description as parameters.
The script **has to be executed** from the *source* folder of your workspace.

.. code-block:: bash
Expand Down Expand Up @@ -37,5 +37,5 @@ The script supports the following options and opportunities for data entry:


After a package is created, you can choose to configure or update the repository.
When a new package or metapackage is created, the `setup-repository.bash` script is called.
When a new package or metapackage is created, the ``setup-repository.bash`` script is called.
Check :ref:`here <uc-configure-repo>` for its documentation.
142 changes: 0 additions & 142 deletions templates/package/.pre-commit-config_sourcing_ros.yaml

This file was deleted.

Loading

0 comments on commit eec2532

Please sign in to comment.