Skip to content

Merge pull request #14 from IOES-Lab/dvl #93

Merge pull request #14 from IOES-Lab/dvl

Merge pull request #14 from IOES-Lab/dvl #93

Workflow file for this run

---
name: Code Formatting Lint
# yamllint disable-line rule:truthy
on:
push:
tags: ["*"]
branches:
- ros2
pull_request:
types: [opened, reopened]
jobs:
# ament_lint:
# runs-on: ubuntu-latest
# container:
# image: rostooling/setup-ros-docker:ubuntu-noble-ros-jazzy-desktop-latest
# options: -u root
# strategy:
# fail-fast: false
# matrix:
# linter: [flake8, mypy, pep8, xmllint]
# steps:
# - uses: actions/checkout@v2
# - uses: ros-tooling/action-ros-lint@master
# with:
# linter: ${{ matrix.linter }}
# package-name: .
run-linters:
name: Run Linters for Code Format Check
runs-on: ubuntu-24.04
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v1
with:
python-version: 3.12
- name: Install Python dependencies
run: pip install black flake8 cmakelang
- name: Install ClangFormat
run: sudo apt-get install -y clang-format
- name: Run Linters for python and C++
uses: wearerequired/lint-action@v2
with:
black: true
black_args: --line-length 100
flake8: true
flake8_args: --max-line-length=100
clang_format: true
- name: Install XML Linting tools
run: sudo apt-get install -y libxml2-utils
- name: Run XML Linter for URDF, SDF, Xacro, XML files
run: |
find . \( -iname '*.urdf' -o -iname '*.sdf' -o -iname '*.xacro' \
-o -iname '*.xml' -o -iname '*.launch' -o -iname '*.world' \) -print0 | xargs -0 xmllint --noout
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
- name: Run Yamllint on YAML and .launch files
run: |
find . \( -iname '*.yml' -o -iname '*.yaml' \) -print0 | xargs -0 yamllint -d "{
extends: default,
rules: {
line-length: {max: 120},
new-line-at-end-of-file: disable
}
}"
- name: Lint CMake files
run: find . \( -iname 'CMakeLists.txt' -o -iname '*.cmake' \) -print0 | xargs -0 cmake-lint