Skip to content

Commit

Permalink
feat: support for clang-format-13 using ubuntu impish
Browse files Browse the repository at this point in the history
  • Loading branch information
mjip authored and jidicula committed Oct 2, 2021
1 parent 38d975f commit 7222108
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: yourusername/clang-format-action@your-branch-name # modify this to point to your fork and feature branch!
with:
check-path: ${{ matrix.path['check'] }}
clang-format-version: 11
clang-format-version: 13
exclude-regex: ${{ matrix.path['exclude'] }}
```
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:hirsute
FROM ubuntu:impish

COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ You can define your own formatting rules in a `.clang-format` file at your repos
* `clang-format-10` (n.b. use v3.4.0 of this action to access it)
* `clang-format-11`
* `clang-format-12`
* `clang-format-13`

## Do you find this useful?

You can sponsor me [here](https://github.com/sponsors/jidicula)!

## Inputs
* `clang-format-version` [optional]: The version of `clang-format` that you want to run on your codebase.
* Default: `11`
* Available versions: every version of `clang-format` available on [Ubuntu Hirsute](https://packages.ubuntu.com/search?keywords=clang-format&searchon=names&suite=hirsute&section=all).
* Default: `13`
* Available versions: every version of `clang-format` available on [Ubuntu Impish](https://packages.ubuntu.com/search?keywords=clang-format&searchon=names&suite=impish&section=all).
* `check-path` [optional]: The path to the directory in the repo that should be checked for C/C++ formatting.
* Default: `.`
* For cleaner output (i.e. with no double-slashed paths), the final directory in this path should have no trailing slash, e.g. `src` and not `src/`.
Expand Down Expand Up @@ -70,7 +71,7 @@ jobs:
- name: Run clang-format style check for C/C++ programs.
uses: jidicula/[email protected]
with:
clang-format-version: '11'
clang-format-version: '13'
check-path: 'src'
fallback-style: 'Mozilla' # optional
```
Expand All @@ -95,7 +96,7 @@ jobs:
- name: Run clang-format style check for C/C++ programs.
uses: jidicula/[email protected]
with:
clang-format-version: '11'
clang-format-version: '13'
check-path: ${{ matrix.path }}
fallback-style: 'Mozilla' # optional
```
Expand All @@ -122,7 +123,7 @@ jobs:
- name: Run clang-format style check for C/C++ programs.
uses: jidicula/[email protected]
with:
clang-format-version: '11'
clang-format-version: '13'
check-path: ${{ matrix.path['check'] }}
exclude-regex: ${{ matrix.path['exclude'] }}
fallback-style: 'Mozilla' # optional
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ inputs:
clang-format-version:
description: 'The version of clang-format that you want to use.'
required: false
default: '11'
default: '13'
check-path:
description: 'The path to the directory you want to check for correct C/C++ formatting. Default is the full repository.'
required: false
Expand Down

0 comments on commit 7222108

Please sign in to comment.