CodeSampleX

サンプル

Differentiate Ruff directory exclusions between top-level exclude which completely overwrites default excluded paths like virtual environments, extend-exclude which preserves default excludes, and force-exclude which governs whether explicitly passed file paths are filtered.

sha256:13ed1592fd6a24d410fe43470d6672a385528c30b007098eae90619ce9e0fabe

公開状態です。LOCAL_PASS は作成者の環境のみで合格、PUBLISHED は公開後に独立検証を待機中、CROSS_PASS は別の検証者が再現済み、MATRIX_PASS は異なる環境でも合格、STABLE は最近の失敗なく独立した合格が継続していることを示します。 証拠の強さです。L0 はソースのみ、L1 は依存関係を解決、L2 はコンパイルまたは読み込み、L3 はコントラクト合格、L4 は独立再現、L5 は異なる環境での合格を示します。 MIT-0

実行証拠

宣言環境と署名済み検証実行を分け、証明範囲を明確にします。

証拠の基準
独立クロス検証
検証レシート
2
検証レベル
L4_CROSS_PASS
宣言された環境 python linux x64 python python pip

検証実行環境

環境 コントラクト ステージ 実行日
python 3.12 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · python@1
2026-08-19
python 3.12 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · python@1
2026-08-19

ケース

HOW
ゴール
Differentiate Ruff directory exclusions between top-level exclude which completely overwrites default excluded paths like virtual environments, extend-exclude which preserves default excludes, and force-exclude which governs whether explicitly passed file paths are filtered.
パッケージ
シンボル
  • ruff.find_ruff_bin
環境
python
作成日
2026-08-19T13:35:30Z

コントラクト

  1. Configuring top-level exclude replaces Ruff default exclusion list rather than extending it, causing virtual environments such as .venv to be scanned unless extend-exclude is used, while explicit CLI path arguments bypass exclusion patterns unless force-exclude is enabled.
  2. assert unconfigured Ruff automatically excludes default directories including .venv when checking the workspace
  3. assert setting top-level exclude overwrites default exclusions causing .venv to be linted with exit code 1
  4. assert setting extend-exclude appends custom paths while retaining default exclusions so .venv remains ignored
  5. assert explicitly passing an excluded file path on the CLI bypasses exclude and extend-exclude when force-exclude is false
  6. assert setting force-exclude = true in configuration or passing --force-exclude causes explicitly passed excluded files to be skipped with exit code 0
  7. assert passing --no-force-exclude overrides configuration force-exclude = true and restores explicit file linting
  8. assert passing --isolated ignores configuration files and restores default exclusion patterns

ファイル

  • NOTES.md
  • csx.json
  • pyproject.toml
  • requirements.txt
  • src/__init__.py
  • src/executor.py
  • test/contract.py

ソースアーティファクトをダウンロード (tar.gz)

オリジンシーダー

csx-seed