Update linting.yml #48
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Setup ROS | |
on: | |
push: | |
branches: | |
- lint | |
jobs: | |
test_setup_ros: | |
runs-on: ubuntu-latest | |
container: | |
image: ubuntu:noble | |
steps: | |
- name: Install Git | |
run: | | |
apt-get update | |
apt-get install -y git | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
path: '.' | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
- name: Run build and test script | |
run: .github/workflows/build-and-test.sh | |
- name: Setup ROS | |
uses: ros-tooling/[email protected] | |
- name: Checkout ament_lint | |
uses: actions/checkout@v4 | |
with: | |
repository: ament/ament_lint | |
ref: humble | |
path: 'ament_lint' | |
# Run linters inside the specified directory | |
- name: Run linters | |
working-directory: workspace_cpp/ros2_ws/src/node_test # Change to the target directory | |
run: | | |
# Run default linter | |
ament_lint --package-name ament_copyright ament_lint --workspace-directory ament_lint | |
# Run additional linter with arguments | |
ament_lint --linter lint_cmake --arguments '--filter=-linelength,+syntax' --package-name ament_cmake_cpplint --workspace-directory ament_lint | |
# Run linter with underscores in the name | |
ament_lint --linter lint_cmake --arguments '--filter=-linelength' --package-name ament_cmake_cpplint --workspace-directory ament_lint |