Fixed clang-format action to provide suggestions (#14957)
This commit is contained in:
parent
08b4c9cdd3
commit
1e71bdd1d4
14
.github/labeler.yml
vendored
14
.github/labeler.yml
vendored
@ -40,9 +40,10 @@
|
||||
'category: dependency_changes':
|
||||
- '**/requirement*.txt'
|
||||
- 'scripts/**/*'
|
||||
- 'thirdparty/**/*'
|
||||
- '.gitmodules'
|
||||
- '**/setup.py'
|
||||
- any: ['thirdparty/**/*',
|
||||
'!thirdparty/**/CMakeLists.txt']
|
||||
|
||||
'category: docs':
|
||||
- 'docs/**/*'
|
||||
@ -66,11 +67,10 @@
|
||||
- 'src/plugins/hetero/**/*'
|
||||
|
||||
'category: IE Tests':
|
||||
- 'thirdparty/gtest/**/*'
|
||||
- 'src/frontends/tests/frontend/shared/**/*'
|
||||
- any: ['src/tests/**/*',
|
||||
'thirdparty/gtest/**/*',
|
||||
'src/frontends/tests/frontend/shared/**/*']
|
||||
all: ['!src/tests/**/gpu/**/*',
|
||||
'!src/tests/**/cpu/**/*',
|
||||
'!src/tests/**/gpu/**/*',
|
||||
'!src/tests/**/myriad/**/*',
|
||||
'!src/tests/**/inference_engine/**/*']
|
||||
|
||||
@ -122,7 +122,9 @@
|
||||
- 'src/frontends/tensorflow/**/*'
|
||||
|
||||
'category: tools':
|
||||
- 'tools/**'
|
||||
- any: ['tools/**',
|
||||
'!tools/pot/**/*',
|
||||
'!tools/mo/**/*']
|
||||
|
||||
'category: transformations':
|
||||
- 'src/common/transformations/**/*'
|
||||
|
19
.github/workflows/code_style.yml
vendored
19
.github/workflows/code_style.yml
vendored
@ -1,10 +1,5 @@
|
||||
name: Code Style
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
- 'releases/**'
|
||||
on: [pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
@ -14,7 +9,7 @@ jobs:
|
||||
clang-format:
|
||||
runs-on: ubuntu-20.04
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
@ -38,12 +33,16 @@ jobs:
|
||||
- name: CMake configure
|
||||
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
|
||||
|
||||
- uses: stefanzweifel/git-auto-commit-action@v4
|
||||
- name: suggester / clang-format
|
||||
if: startsWith(github.event_name, 'pull_request')
|
||||
uses: reviewdog/action-suggester@v1
|
||||
with:
|
||||
commit_message: "[github actions] Apply clang-format code style fixes"
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
level: warning
|
||||
fail_on_error: true
|
||||
|
||||
ShellCheck:
|
||||
runs-on: ubuntu-22.04
|
||||
|
Loading…
Reference in New Issue
Block a user