Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
BasedOnStyle: WebKit
IndentWidth: 4
ColumnLimit: 80
AllowShortFunctionsOnASingleLine: None
BreakBeforeBraces: Allman
PointerAlignment: Left
21 changes: 21 additions & 0 deletions .github/workflows/build-and-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build and Lint

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang-format cmake make gcc

- name: Check format
run: |
find . -type f \( -name "*.c" -o -name "*.h" \) \
! -path "*/build/*" \
! -path "*/.git/*" \
| xargs clang-format --style=file --dry-run -Werror
12 changes: 12 additions & 0 deletions 1.Introduction-to-C-and-problem-analysis/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
cmake_minimum_required(VERSION 3.10)

project(Lists)

set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)

add_executable(Task_1
src/Task_1/main.c
)

target_compile_options(Task_1 PRIVATE -Wall -Wextra)
Loading
Loading