Skip to content

Commit bf32d8e

Browse files
committed
Add ruff to project and CI
1 parent 13c13e6 commit bf32d8e

2 files changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/ruff.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Ruff Gate
2+
on:
3+
merge_group:
4+
branches: [ 'master' ]
5+
push:
6+
branches: [ '*', '!stabilization*', '!stable*', '!master' ]
7+
pull_request:
8+
branches: [ 'master', 'stabilization*', 'oscal-update-*' ]
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.number || github.run_id }}
12+
cancel-in-progress: true
13+
jobs:
14+
ruff:
15+
name: Run ruff
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
20+
- name: Install ruff
21+
run: python3 -m pip install ruff
22+
- name: Run ruff check
23+
run: ruff check

ruff.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
line-length = 99
2+
indent-width = 4
3+
target-version = "py39"
4+
5+
[lint]
6+
select = [
7+
"F", # Pyflakes
8+
"E", # pycodestyle
9+
"W", # pycodestyle
10+
]
11+
12+
ignore = [
13+
"F401", # unused-import
14+
"E402", # module-import-not-at-top-of-file
15+
"E501", # line-too-long
16+
]

0 commit comments

Comments
 (0)