forked from flipperdevices/flipperzero-firmware
-
-
Notifications
You must be signed in to change notification settings - Fork 545
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from ElectronicCats/pre-commit
Pre commit
- Loading branch information
Showing
5 changed files
with
1,149 additions
and
1,033 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
# options: https://clang.llvm.org/docs/ClangFormatStyleOptions.html | ||
BasedOnStyle: chromium | ||
IndentWidth: 2 | ||
# Must be 80 characters or less! | ||
# ColumnLimit: 80 | ||
# does (int) x instead of (int)x | ||
SpaceAfterCStyleCast: true | ||
# spaces, not tabs! | ||
UseTab: Never | ||
# | ||
AlignTrailingComments: true | ||
# #define SHORT_NAME 42 | ||
# #define LONGER_NAME 0x007f # does nice spacing for macros | ||
AlignConsecutiveMacros: Consecutive | ||
IndentPPDirectives: BeforeHash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# SPDX-FileCopyrightText: Copyright (c) 2024 Electronic Cats | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
name: pre-commit | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Set up repository | ||
uses: actions/checkout@v4 | ||
- name: Set up python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
- name: Run pre-commit | ||
uses: pre-commit/action@v3.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.0.1 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: check-yaml | ||
- id: no-commit-to-branch # This hook prevents direct commits to main branch | ||
- id: end-of-file-fixer | ||
- repo: https://github.com/pre-commit/mirrors-clang-format | ||
rev: v18.1.2 # Use the sha / tag you want to point at | ||
hooks: | ||
- id: clang-format | ||
types_or: [c++, c] | ||
args: ['--style=file'] | ||
- repo: https://github.com/compilerla/conventional-pre-commit | ||
rev: v3.2.0 | ||
hooks: | ||
- id: conventional-pre-commit | ||
stages: [commit-msg] | ||
args: [] |
Oops, something went wrong.