Fixed clang-format action to provide suggestions (#14957)

This commit is contained in:
Ilya Lavrenov 2023-01-06 06:37:15 +04:00 committed by GitHub
parent 08b4c9cdd3
commit 1e71bdd1d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 16 deletions

14
.github/labeler.yml vendored
View File

@ -40,9 +40,10 @@
'category: dependency_changes': 'category: dependency_changes':
- '**/requirement*.txt' - '**/requirement*.txt'
- 'scripts/**/*' - 'scripts/**/*'
- 'thirdparty/**/*'
- '.gitmodules' - '.gitmodules'
- '**/setup.py' - '**/setup.py'
- any: ['thirdparty/**/*',
'!thirdparty/**/CMakeLists.txt']
'category: docs': 'category: docs':
- 'docs/**/*' - 'docs/**/*'
@ -66,11 +67,10 @@
- 'src/plugins/hetero/**/*' - 'src/plugins/hetero/**/*'
'category: IE Tests': 'category: IE Tests':
- 'thirdparty/gtest/**/*'
- 'src/frontends/tests/frontend/shared/**/*'
- any: ['src/tests/**/*', - any: ['src/tests/**/*',
'thirdparty/gtest/**/*', '!src/tests/**/gpu/**/*',
'src/frontends/tests/frontend/shared/**/*']
all: ['!src/tests/**/gpu/**/*',
'!src/tests/**/cpu/**/*',
'!src/tests/**/myriad/**/*', '!src/tests/**/myriad/**/*',
'!src/tests/**/inference_engine/**/*'] '!src/tests/**/inference_engine/**/*']
@ -122,7 +122,9 @@
- 'src/frontends/tensorflow/**/*' - 'src/frontends/tensorflow/**/*'
'category: tools': 'category: tools':
- 'tools/**' - any: ['tools/**',
'!tools/pot/**/*',
'!tools/mo/**/*']
'category: transformations': 'category: transformations':
- 'src/common/transformations/**/*' - 'src/common/transformations/**/*'

View File

@ -1,10 +1,5 @@
name: Code Style name: Code Style
on: on: [pull_request]
pull_request:
push:
branches:
- 'master'
- 'releases/**'
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.ref }}
@ -14,7 +9,7 @@ jobs:
clang-format: clang-format:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
permissions: permissions:
contents: write pull-requests: write
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
@ -38,12 +33,16 @@ jobs:
- name: CMake configure - name: CMake configure
run: cmake -DENABLE_PYTHON=ON -DENABLE_TESTS=ON -DENABLE_PROFILING_ITT=ON -DSELECTIVE_BUILD=COLLECT -B build run: cmake -DENABLE_PYTHON=ON -DENABLE_TESTS=ON -DENABLE_PROFILING_ITT=ON -DSELECTIVE_BUILD=COLLECT -B build
- name: Fix code style - name: Create code style diff
run: cmake --build build --target clang_format_fix_all -j8 run: cmake --build build --target clang_format_fix_all -j8
- uses: stefanzweifel/git-auto-commit-action@v4 - name: suggester / clang-format
if: startsWith(github.event_name, 'pull_request')
uses: reviewdog/action-suggester@v1
with: with:
commit_message: "[github actions] Apply clang-format code style fixes" github_token: ${{ secrets.GITHUB_TOKEN }}
level: warning
fail_on_error: true
ShellCheck: ShellCheck:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04