Skip to content

Commit

Permalink
Install clang-format-12
Browse files Browse the repository at this point in the history
  • Loading branch information
antonwolfy committed Jun 21, 2023
1 parent 6c8c90f commit 9657a9c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ AccessModifierOffset: -4

AlignConsecutiveMacros: true
AlignConsecutiveAssignments: true
AlignConsecutiveBitFields: true
AlignEscapedNewlines: Right

AllowAllParametersOfDeclarationOnNextLine: false
Expand All @@ -26,6 +27,8 @@ BraceWrapping:
AfterExternBlock: true
BeforeCatch: false
BeforeElse: true
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.5.2
- uses: actions/setup-python@v4.6.1
with:
python-version: '3.10'
- uses: pre-commit/action@v3.0.0
- name: Set up clang-format
run: |
sudo apt-get install -y clang-format-12
sudo unlink /usr/bin/clang-format
sudo ln -s /usr/bin/clang-format-12 /usr/bin/clang-format
clang-format --version
- uses: actions/checkout@v3.5.2
- uses: actions/setup-python@v4.6.1
with:
python-version: '3.10'
- uses: pre-commit/action@v3.0.0
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ repos:
rev: v1.3.5
hooks:
- id: clang-format
args: ["-i"]
args: ["-i", "--version=12"]
4 changes: 2 additions & 2 deletions dpnp/backend/src/dpnp_fptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ struct func_type_map_factory_t : public Ps...
using Ps::get_pair...;

template <DPNPFuncType FuncType>
using find_type = typename decltype(
get_pair(std::integral_constant<DPNPFuncType, FuncType>{}))::type;
using find_type = typename decltype(get_pair(
std::integral_constant<DPNPFuncType, FuncType>{}))::type;
};

/**
Expand Down

0 comments on commit 9657a9c

Please sign in to comment.