Skip to content

Commit 36d1e3f

Browse files
committed
[CI] Update clang-format version to 18
1 parent 51b00a6 commit 36d1e3f

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

.github/workflows/code_style.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ permissions: read-all
99

1010
jobs:
1111
clang-format:
12-
runs-on: ubuntu-22.04
12+
runs-on: ubuntu-24.04
1313
if: ${{ github.repository_owner == 'openvinotoolkit' }}
1414
permissions:
1515
pull-requests: write
@@ -19,10 +19,10 @@ jobs:
1919
with:
2020
submodules: 'true'
2121

22-
- name: Install clang-format-15
22+
- name: Install clang-format-18
2323
run: |
2424
sudo apt update
25-
sudo apt --assume-yes install clang-format-15
25+
sudo apt --assume-yes install clang-format-18
2626
2727
# Run cmake with extra options to cover as much source code as possible:
2828
# - -DENABLE_PROFILING_ITT=ON -DSELECTIVE_BUILD=COLLECT to enable codestyle check for ITT collector
@@ -46,7 +46,7 @@ jobs:
4646
"./temp/*"
4747
4848
clang-format-aarch64:
49-
runs-on: ubuntu-22.04
49+
runs-on: ubuntu-24.04
5050
if: ${{ github.repository_owner == 'openvinotoolkit' }}
5151
permissions:
5252
pull-requests: write
@@ -55,10 +55,10 @@ jobs:
5555
with:
5656
submodules: 'true'
5757

58-
- name: Install clang-format-15 and cross-compilation dependencies
58+
- name: Install clang-format-18 and cross-compilation dependencies
5959
run: |
6060
sudo apt update
61-
sudo apt --assume-yes install binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu g++-aarch64-linux-gnu scons clang-format-15
61+
sudo apt --assume-yes install binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu g++-aarch64-linux-gnu scons clang-format-18
6262
6363
# Run cmake with extra options to cover as much source code as possible:
6464
# - -DENABLE_PROFILING_ITT=ON -DSELECTIVE_BUILD=COLLECT to enable codestyle check for ITT collector
@@ -82,7 +82,7 @@ jobs:
8282
"./temp/*"
8383
8484
clang-format-riscv64:
85-
runs-on: ubuntu-22.04
85+
runs-on: ubuntu-24.04
8686
if: ${{ github.repository_owner == 'openvinotoolkit' }}
8787
permissions:
8888
pull-requests: write
@@ -91,10 +91,10 @@ jobs:
9191
with:
9292
submodules: 'true'
9393

94-
- name: Install clang-format-15 and cross-compilation dependencies
94+
- name: Install clang-format-18 and cross-compilation dependencies
9595
run: |
9696
sudo apt update
97-
sudo apt --assume-yes install gcc-riscv64-linux-gnu g++-riscv64-linux-gnu binutils-riscv64-linux-gnu clang-format-15
97+
sudo apt --assume-yes install gcc-riscv64-linux-gnu g++-riscv64-linux-gnu binutils-riscv64-linux-gnu clang-format-18
9898
9999
# Run cmake with extra options to cover as much source code as possible:
100100
# - -DENABLE_PROFILING_ITT=ON -DSELECTIVE_BUILD=COLLECT to enable codestyle check for ITT collector

cmake/developer_package/clang_format/clang_format.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44

55
if(ENABLE_CLANG_FORMAT)
6-
set(CLANG_FORMAT_REQUIRED_VERSION 15 CACHE STRING "Clang-format version to use")
6+
set(CLANG_FORMAT_REQUIRED_VERSION 18 CACHE STRING "Clang-format version to use")
77
set(CLANG_FORMAT_FILENAME clang-format-${CLANG_FORMAT_REQUIRED_VERSION} clang-format)
88
find_host_program(CLANG_FORMAT NAMES ${CLANG_FORMAT_FILENAME} PATHS ENV PATH)
99
if(CLANG_FORMAT)

docs/dev/coding_style.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
## Coding style
44

5-
The majority of OpenVINO components use `clang-format-9` for code style check.
5+
The majority of OpenVINO components use `clang-format-18` for code style check.
66

77
The code style is based on the Google Code style with some differences. All the differences are described in the configuration file:
88
https://github.com/openvinotoolkit/openvino/blob/69f709028a5f8da596d1d0df9a0101e517c35708/src/.clang-format#L1-L28
99

10-
To fix the code style on your local machine, you need to install the `clang-format-9` tool and make sure that the CMake option `ENABLE_CLANG_FORMAT` is enabled.
10+
To fix the code style on your local machine, you need to install the `clang-format-18` tool and make sure that the CMake option `ENABLE_CLANG_FORMAT` is enabled.
1111
If all dependencies are resolved, you can use the `clang_format_fix_all` target to fix all code style issues.
1212

1313
## Naming style

src/bindings/js/node/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ all checks have passed. CI checks are composed of both functional tests and code
4343

4444
Remember to follow [our codestyle](../docs/CODESTYLE.md).
4545
By following the provided guide and using an automotive code style checking tool, like
46-
**eslint** and **clang-format-9**, you will save some time and help with the code review of proposed changes.
46+
**eslint** and **clang-format-18**, you will save some time and help with the code review of proposed changes.
4747

4848

4949
## Description of the Pull Request

0 commit comments

Comments
 (0)