Skip to content

Latest commit

 

History

History
52 lines (42 loc) · 1.51 KB

README.md

File metadata and controls

52 lines (42 loc) · 1.51 KB

ROS C++ Style Guide Github Action

Github Action applying the ROS Style Guide to C++ code.

This Action will format the code to match the ROS C++ Style Guide using clang-format-3.8 with the configuration from davetcoleman/roscpp_code_format.

It is recommended to add this to formatter.yml that runs on pull_request so it only formats when the code is stablizing and ready to merge into master.

Usage

name: Code Formatter
on:
  pull_request:
jobs:
  clang-format:
      runs-on: ubuntu-latest
      steps:
      - uses: actions/checkout@v2
      - uses: AutoModality/action-ros-clang-format@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Optional

From action.yml

inputs:
  author-name:
    description: 'The name that will appear in commits when changes needs to be committed'
    required: false
    default: Format Bot
  author-email:
    description: 'The email address that will appear in commits when changes needs to be committed'
    required: false
    default: [email protected]
  commit-message:
    description: 'The commit message used when changes needs to be committed'
    required: false
    default: 'style: Applied ROS C++ Style Guide'

Override Format

Simply check in your .clang-format file in the root of your project and it will overwrite the default style provided. (Not yet verified)