Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
d2ac198
Update yscope-dev-utils
sitaowang1998 Jul 15, 2025
cc8a097
Use boost install task
sitaowang1998 Jul 15, 2025
7f68bdc
Update install task variable names
sitaowang1998 Jul 15, 2025
2394649
Set CMP0074 to NEW to find boost
sitaowang1998 Jul 15, 2025
6ff3e33
Add uv to install script
sitaowang1998 Jul 15, 2025
7ae8a78
Fix cpp-lint root paths
sitaowang1998 Jul 15, 2025
56502f9
Fix clang-tidy file pattern
sitaowang1998 Jul 15, 2025
6f6becf
Limit build parallelism
sitaowang1998 Jul 17, 2025
a74523d
Bug fix
sitaowang1998 Jul 17, 2025
2345d22
Merge branch 'dep-concurrency' into yscope-dev-utils
sitaowang1998 Jul 17, 2025
77ee494
Bug fix
sitaowang1998 Jul 17, 2025
38b86c8
Merge branch 'dep-concurrency' into yscope-dev-utils
sitaowang1998 Jul 17, 2025
3698339
Bug fix
sitaowang1998 Jul 17, 2025
369e9f1
Rename variables to mirror CLP core
sitaowang1998 Aug 4, 2025
90aa5a2
Rename variables to mirror clp core
sitaowang1998 Aug 4, 2025
1769c95
Merge branch 'dep-concurrency' of github.com:sitaowang1998/spider int…
sitaowang1998 Aug 4, 2025
edaa834
Merge branch 'dep-concurrency' into yscope-dev-utils
sitaowang1998 Aug 4, 2025
7faac8f
Revert "Merge branch 'dep-concurrency' of github.com:sitaowang1998/sp…
sitaowang1998 Aug 4, 2025
f494a90
Add comment for deps parallelism default value
sitaowang1998 Aug 4, 2025
eb01bb2
Merge branch 'dep-concurrency' into yscope-dev-utils
sitaowang1998 Aug 4, 2025
ff2fe1c
Update yscope-dev-utils
sitaowang1998 Aug 4, 2025
d476e42
Merge branch 'main' into yscope-dev-utils
sitaowang1998 Aug 4, 2025
850126d
Merge branch 'yscope-dev-utils' into python_lint
sitaowang1998 Aug 4, 2025
65841a0
Add latest python lint config files
sitaowang1998 Aug 4, 2025
8564fc2
Update ruff lint tasks
sitaowang1998 Aug 4, 2025
a6e7d29
Fix ruff lint
sitaowang1998 Aug 4, 2025
573b448
Fix ruff lint
sitaowang1998 Aug 4, 2025
6ad72c3
Bug fix
sitaowang1998 Aug 4, 2025
ba7c6e5
Fix ruff
sitaowang1998 Aug 4, 2025
209acb1
Fix ruff
sitaowang1998 Aug 4, 2025
406b514
Reformat files
sitaowang1998 Aug 4, 2025
66892f5
Remove .inc from cpp linting
sitaowang1998 Aug 4, 2025
80f0a10
Merge branch 'yscope-dev-utils' into python_lint
sitaowang1998 Aug 4, 2025
3186a42
Add mypy and merge lint and test requirements.txt
sitaowang1998 Aug 4, 2025
0925938
Fix mysql connection type
sitaowang1998 Aug 4, 2025
6936a9b
Fix socket name type
sitaowang1998 Aug 4, 2025
7407090
Fix return type from db cursor
sitaowang1998 Aug 4, 2025
6a95b24
Fix db cursor return type
sitaowang1998 Aug 4, 2025
f29dcba
Fix mypy import untyped
sitaowang1998 Aug 4, 2025
453f209
Fix mypy and Popen
sitaowang1998 Aug 5, 2025
d1011c7
Fix generator type hint
sitaowang1998 Aug 5, 2025
a7dc642
Fix mypy
sitaowang1998 Aug 5, 2025
a7d92c2
Fix ruff
sitaowang1998 Aug 5, 2025
1c6213b
Simply socket return types.
sitaowang1998 Aug 5, 2025
0f13d07
Merge branch 'main' into python_lint
sitaowang1998 Aug 5, 2025
14d6326
Merge branch 'python_lint' into mypy_lint
sitaowang1998 Aug 5, 2025
55a727a
Add tombi lint tasks
sitaowang1998 Aug 5, 2025
ef64454
Merge branch 'main' into mypy_lint
sitaowang1998 Aug 5, 2025
09ba8ad
Merge branch 'main' into tombi
sitaowang1998 Aug 5, 2025
56878b2
Merge branch 'main' into mypy_lint
sitaowang1998 Aug 5, 2025
bb428c9
Merge branch 'mypy_lint' into tombi
sitaowang1998 Aug 5, 2025
4b7eca2
Merge branch 'main' into tombi
sitaowang1998 Aug 5, 2025
0b62f73
Merge branch 'main' into tombi
sitaowang1998 Aug 6, 2025
b09515c
Increase min version of tombi
sitaowang1998 Aug 6, 2025
a0407a7
Merge branch 'main' into tombi
sitaowang1998 Aug 6, 2025
ce70660
Add strict setting
sitaowang1998 Aug 6, 2025
8508d3f
Split toml fix mode and sort lint tasks
sitaowang1998 Aug 6, 2025
e392dcc
Reorder requirements-dev in lexical order
sitaowang1998 Aug 6, 2025
d46da92
Add toml lint tasks in readme
sitaowang1998 Aug 6, 2025
66b9124
Rename tombi format flag in lint task
sitaowang1998 Aug 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,20 @@ The commands above run all linting checks, but for performance you may want to r
if you only changed C++ files, you don't need to run the YAML linting checks) using one of the tasks
in the table below.

| Task | Description |
|-------------------------|----------------------------------------------------------|
| `lint:cmake-check` | Runs the CMake linters. |
| `lint:cmake-fix` | Runs the CMake linters and fixes any violations. |
| `lint:cpp-check` | Runs the C++ linters (formatters and static analyzers). |
| `lint:cpp-fix` | Runs the C++ linters and fixes some violations. |
| `lint:cpp-format-check` | Runs the C++ formatters. |
| `lint:cpp-format-fix` | Runs the C++ formatters and fixes some violations. |
| `lint:cpp-static-check` | Runs the C++ static analyzers. |
| `lint:cpp-static-fix` | Runs the C++ static analyzers and fixes some violations. |
| `lint:yml-check` | Runs the YAML linters. |
| `lint:yml-fix` | Runs the YAML linters and fixes some violations. |
| Task | Description |
|-------------------------|----------------------------------------------------------------|
| `lint:cmake-check` | Runs the CMake linters. |
| `lint:cmake-fix` | Runs the CMake linters and fixes any violations. |
| `lint:cpp-check` | Runs the C++ linters (formatters and static analyzers). |
| `lint:cpp-fix` | Runs the C++ linters and fixes some violations. |
| `lint:cpp-format-check` | Runs the C++ formatters. |
| `lint:cpp-format-fix` | Runs the C++ formatters and fixes some violations. |
| `lint:cpp-static-check` | Runs the C++ static analyzers. |
| `lint:cpp-static-fix` | Runs the C++ static analyzers and fixes some violations. |
| `lint:toml-check` | Runs the TOML linters and formatter. |
| `lint:toml-fix` | Runs the TOML linters and formatter and fixes some violations. |
| `lint:yml-check` | Runs the YAML linters. |
| `lint:yml-fix` | Runs the YAML linters and fixes some violations. |

[spider-docs]: https://docs.yscope.com/spider/main/
[Task]: https://taskfile.dev
32 changes: 32 additions & 0 deletions lint-tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ tasks:
- task: "cmake-check"
- task: "cpp-check"
- task: "py-check"
- task: "toml-check"
- task: "yml-check"

fix:
cmds:
- task: "cmake-fix"
- task: "cpp-fix"
- task: "toml-fix"
- task: "yml-fix"

cmake-check:
Expand Down Expand Up @@ -154,6 +156,36 @@ tasks:
taskfile.yaml \
test-tasks.yaml

toml-check:
cmds:
- task: "toml-lint"
- task: "toml-format"
vars:
FLAGS: "--check"

toml-fix:
cmds:
- task: "toml-lint"
- task: "toml-format"

toml-lint:
internal: true
deps: ["venv"]
cmds:
- |-
. "{{.G_LINT_VENV_DIR}}/bin/activate"
tombi lint "{{.ROOT_DIR}}"

toml-format:
internal: true
deps: ["venv"]
vars:
FLAGS: "{{.FLAGS | default \"\"}}"
cmds:
- |-
. "{{.G_LINT_VENV_DIR}}/bin/activate"
tombi format {{.FLAGS}} "{{.ROOT_DIR}}"

cmake:
internal: true
requires:
Expand Down
5 changes: 3 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
clang-format>=20.1.0
# Lock to v19.x until we can upgrade our code to fix new v20 issues.
clang-tidy~=19.1
ruff>=0.4.4
mypy>=1.12.0
gersemi>=0.16.2
mypy>=1.12.0
ruff>=0.4.4
tombi>=0.4.35
yamllint>=1.35.1

# Test dependencies
Expand Down
40 changes: 20 additions & 20 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,31 @@ line-length = 100
select = ["ALL"]
extend-select = ["PT"]
ignore = [
"COM812", # Redundant and conflicts with ruff format
"D203", # No blank line before docstrings (D211)
"D205", # Breaks if summary is larger than one line due to wrapping or if no summary exists
"D212", # Enforce docstring summary line on the next line after quotes (D213)
"D400", # First line of docstrings may not end in period
"D401", # Docstrings should be written in present tense (not imperative)
"D415", # First line of docstrings may not end in a period, question mark, or exclamation point
"FA102", # Allow use of PEP 604 union in type annotations
"FBT", # Allow bool positional parameters since other value positions are allowed
"FIX002", # Allow todo statements
"PERF401", # Allow for loops when creating lists
"PERF403", # Allow for loops when creating dicts
"S311", # Allow usage of `random` package
"SIM102", # Allow collapsible if statements for readability
"TD002", # Author unnecessary for todo statement
"TD003", # Issue link unnecessary for todo statement
"UP015", # Explicit open modes are helpful
"COM812", # Redundant and conflicts with ruff format
"D203", # No blank line before docstrings (D211)
"D205", # Breaks if summary is larger than one line due to wrapping or if no summary exists
"D212", # Enforce docstring summary line on the next line after quotes (D213)
"D400", # First line of docstrings may not end in period
"D401", # Docstrings should be written in present tense (not imperative)
"D415", # First line of docstrings may not end in a period, question mark, or exclamation point
"FA102", # Allow use of PEP 604 union in type annotations
"FBT", # Allow bool positional parameters since other value positions are allowed
"FIX002", # Allow todo statements
"PERF401", # Allow for loops when creating lists
"PERF403", # Allow for loops when creating dicts
"S311", # Allow usage of `random` package
"SIM102", # Allow collapsible if statements for readability
"TD002", # Author unnecessary for todo statement
"TD003", # Issue link unnecessary for todo statement
"UP015", # Explicit open modes are helpful
]
isort.order-by-type = false

[lint.per-file-ignores]
"tests/integration/test_*.py" = [
"S101", # Allow use of `assert` (security warning)
"S603", # Allow use of `subprocess.Popen` (security warning)
"T201", # Allow use of `print` (testing)
"S101", # Allow use of `assert` (security warning)
"S603", # Allow use of `subprocess.Popen` (security warning)
"T201", # Allow use of `print` (testing)
]

[format]
Expand Down
2 changes: 0 additions & 2 deletions tests/integration/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import socket

AddrType = tuple[str, int]


def _get_free_tcp_port() -> int:
""":return: A free TCP port number."""
Expand Down
35 changes: 35 additions & 0 deletions tombi.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
toml-version = "v1.0.0"

[files]
include = ["**/*.toml"]
exclude = ["tools/yscope-dev-utils/**", "build/**"]

[format]

[lint]
[lint.rules]
dotted-keys-out-of-order = "warn"
key-empty = "warn"
tables-out-of-order = "warn"

[schema]
enabled = true
strict = true
catalog = {
paths = [
"tombi://json.schemastore.org/api/json/catalog.json",
"https://json.schemastore.org/api/json/catalog.json",
],
}

[[schemas]]
path = "tombi://json.schemastore.org/tombi.json"
include = ["tombi.toml"]

[[schemas]]
path = "https://json.schemastore.org/pyproject.json"
include = ["pyproject.toml"]

[[schemas]]
path = "https://json.schemastore.org/ruff.json"
include = ["ruff.toml"]