Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Code linter #1145

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Ruff

on:
pull_request:
branches:
- master

jobs:
ruff:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Ruff lint
uses: chartboost/ruff-action@v1
with:
args: check .
28 changes: 28 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Folders to exclude from linting
exclude = [
".github",
"certs",
"scripts",
"env",
"venv",
"__pycache__"
]

indent-width = 4

[lint]
ignore = [
"E402", # Import not at top of file
"F403", # unable to detect undefined names
"F405" # may be undefined, or defined from star imports
]

[format]
# Indent with tabs
indent-style = "tab"

# Use double quotes for strings
quote-style = "double"

# Automatically detect the appropriate line ending
line-ending = "auto"