OPT add linting workflow

This commit is contained in:
Peter 2025-12-29 17:00:39 +01:00
parent 9db1c8d108
commit db0c1dcb52
2 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,25 @@
name: Lint and Format
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Check formatting with ruff
run: uvx ruff format --check src/
- name: Lint with ruff
run: uvx ruff check src/

View File

@ -19,3 +19,15 @@ dependencies = [
"opentelemetry-exporter-otlp>=1.27.0",
"opentelemetry-instrumentation-requests>=0.48b0",
]
[tool.ruff]
line-length = 100
target-version = "py314"
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "SIM"]
ignore = []
[tool.ruff.format]
quote-style = "double"
indent-style = "space"