mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-12 17:17:44 -04:00
RFC: Try out running pre-made pre-commit hooks via github actions
This commit is contained in:
parent
de19eeb7d3
commit
0f165d5d28
4 changed files with 37 additions and 4 deletions
2
.github/scripts/kernel_checker.py
vendored
2
.github/scripts/kernel_checker.py
vendored
|
@ -12,6 +12,7 @@ KERNEL_IGNORED_FILES = [
|
|||
|
||||
KERNEL_IGNORED_EXTENSIONS = [
|
||||
'.yml',
|
||||
'.yaml',
|
||||
'.css',
|
||||
'.idx',
|
||||
'.md',
|
||||
|
@ -92,4 +93,3 @@ def main():
|
|||
|
||||
if __name__ == '__main__':
|
||||
exit(main())
|
||||
|
||||
|
|
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
|
@ -1,7 +1,5 @@
|
|||
name: CI Checks
|
||||
on:
|
||||
push:
|
||||
branches: ["**"]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
@ -44,4 +42,3 @@ jobs:
|
|||
- name: URL Checker
|
||||
run: |
|
||||
bash kernel/.github/actions/url_verifier.sh kernel
|
||||
|
||||
|
|
18
.github/workflows/pre-commit.yml
vendored
Normal file
18
.github/workflows/pre-commit.yml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
name: Linters
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
pre-commit:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
- id: file_changes
|
||||
uses: trilom/file-changes-action@v1.2.4
|
||||
with:
|
||||
output: ' '
|
||||
- uses: pre-commit/action@v2.0.0
|
||||
with:
|
||||
extra_args: --files ${{ steps.file_changes.outputs.files}}
|
18
.pre-commit-config.yaml
Normal file
18
.pre-commit-config.yaml
Normal file
|
@ -0,0 +1,18 @@
|
|||
# See https://pre-commit.com for more information
|
||||
# See https://pre-commit.com/hooks.html for more hooks
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v3.4.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: end-of-file-fixer
|
||||
- id: check-yaml
|
||||
- id: check-added-large-files
|
||||
- id: mixed-line-ending
|
||||
args : [--fix=auto]
|
||||
- id: check-case-conflict
|
||||
- id: check-executables-have-shebangs
|
||||
- id: check-json
|
||||
- id: check-merge-conflict
|
||||
- id: check-symlinks
|
||||
- id: check-ast
|
Loading…
Add table
Add a link
Reference in a new issue