Skip to content

Merge pull request #31 from Ashes110/17-add-initialize-seversocket-class #4

Merge pull request #31 from Ashes110/17-add-initialize-seversocket-class

Merge pull request #31 from Ashes110/17-add-initialize-seversocket-class #4

# **************************************************************************** #
# #
# ::: :::::::: #
# clang-formatter.yml :+: :+: :+: #
# +:+ +:+ +:+ #
# By: taiphyyy <taiphyyy@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/09/02 15:36:37 by shtanemu #+# #+# #
# Updated: 2024/01/29 17:08:55 by taiphyyy ### ########.fr #
# #
# **************************************************************************** #
on:
push:
branches:
- 'master'
workflow_dispatch:
name: Clang-format Code Formatter
jobs:
lint:
name: clang-format Code Formatter
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: install tools
run: |
sudo apt update
sudo apt install clang-format
- name: Refactor codes
run: |
cd ./src
cpp_files=$(find . -type f -name '*.cpp')
for file in $cpp_files; do
echo "Running clang-format for $file..."
clang-format -i "$file"
done
cd ..
cd ./inc
hpp_files=$(find . -type f -name '*.hpp')
for file in $hpp_files; do
echo "Running clang-format for $file..."
clang-format -i "$file"
done
cd ..
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v5
with:
commit-message: Formatting by clang-format on Github actions
delete-branch: true
title: feature/formatting-by-clang-format-on-github-actions