-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
77 additions
and
7 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 |
---|---|---|
@@ -1,8 +1,2 @@ | ||
[flake8] | ||
max-line-length = 120 | ||
exclude = | ||
.git, | ||
__pycache__, | ||
.venv, | ||
# Ignore generated *_pb2.py files | ||
gen_proto, *_pb2* | ||
max_line_length = 120 |
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,34 @@ | ||
name: spdx | ||
|
||
on: | ||
pull_request | ||
|
||
concurrency: | ||
group: ${{ github.ref }}-${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
check-spdx-headers: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
# required to grab the history of the PR | ||
fetch-depth: 0 | ||
submodules: 'true' | ||
|
||
- name: Get changed files | ||
run: | | ||
echo "files=$(git diff --name-only ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} | tr '\n' ',')" >> $GITHUB_ENV | ||
- name: Set license | ||
run: | | ||
echo "licenses=Apache-2.0" >> $GITHUB_ENV | ||
- uses: eclipse-kuksa/kuksa-actions/spdx@2 | ||
with: | ||
files: "${{ env.files }}" | ||
licenses: "${{ env.licenses }}" |
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,24 @@ | ||
name: pre-commit | ||
|
||
on: [pull_request] | ||
|
||
concurrency: | ||
group: ${{ github.ref }}-${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
# required to grab the history of the PR | ||
fetch-depth: 0 | ||
submodules: 'true' | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
- uses: pre-commit/action@v3.0.1 | ||
with: | ||
extra_args: --color=always --from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }} | ||
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,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: v4.5.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
exclude_types: ["dbc"] | ||
- id: end-of-file-fixer | ||
exclude_types: ["dbc", "json"] | ||
exclude: \.token$ | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
|
||
- repo: https://github.com/pycqa/flake8 | ||
rev: '7.0.0' | ||
hooks: | ||
- id: flake8 |