diff --git a/.dx/BUILD.bazel b/.dx/BUILD.bazel index 44c017745e..fd055545c8 100644 --- a/.dx/BUILD.bazel +++ b/.dx/BUILD.bazel @@ -62,17 +62,6 @@ typos_config( dx_generated_policy( name = "policy", - bases = { - "detekt": "@rules_dx//core/quality/tiers/detekt:standard", - "errcheck": "@rules_dx//core/quality/tiers/errcheck:standard", - "govet": "@rules_dx//core/quality/tiers/govet:standard", - "pmd": "@rules_dx//core/quality/tiers/pmd:standard", - "ruff": "@rules_dx//core/quality/tiers/ruff:standard", - "spotbugs": "@rules_dx//core/quality/tiers/spotbugs:standard", - "staticcheck": "@rules_dx//core/quality/tiers/staticcheck:standard", - "ty": "@rules_dx//core/quality/tiers/ty:standard", - "yamllint": "@rules_dx//core/quality/tiers/yamllint:standard", - }, configs = [ ":biome", ":buildifier", @@ -177,7 +166,6 @@ dx_generated_policy( "staticcheck", "typos", ], - "tier": "standard", "typecheck": ["gotype"], }, "go_module": { @@ -232,7 +220,6 @@ dx_generated_policy( "spotbugs", "typos", ], - "tier": "standard", "typecheck": ["javac"], }, "javascript": { @@ -272,7 +259,6 @@ dx_generated_policy( "detekt", "typos", ], - "tier": "standard", "typecheck": ["kotlinc"], }, "markdown": { @@ -330,7 +316,6 @@ dx_generated_policy( "ruff", "typos", ], - "tier": "standard", "typecheck": ["ty"], }, "rust": { @@ -431,7 +416,6 @@ dx_generated_policy( ], "format": ["yamlfmt"], "lint": ["yamllint"], - "tier": "standard", }, "zig": { "disabled": [ @@ -445,5 +429,4 @@ dx_generated_policy( ], }, }, - tier = "strict", ) diff --git a/.dx/bazelrc b/.dx/bazelrc index a1359b24b2..1b0dfd8713 100644 --- a/.dx/bazelrc +++ b/.dx/bazelrc @@ -226,9 +226,8 @@ common:ci --disk_cache= # Under --config=ci, drop repository contents cache entries unused for 60 days. common:ci --repo_contents_cache_gc_max_age=60d -# Compiler warnings fail the build under the strict profile. +# Compiler warnings fail the build. common --@rules_dx//config:warnings_as_errors=true -common --@rules_dx//config:config_tier=strict # The workspace policy dx generates from dx.toml. common --@rules_dx//config:workspace=//.dx:policy @@ -298,7 +297,7 @@ common --@rules_dx//config:tool_weeder=@rules_dx//config:off_tool common --@rules_dx//config:tool_xml_check=@rules_dx//config:off_tool common --@rules_dx//config:tool_zanuda=@rules_dx//config:off_tool -# The clippy tier. +# The clippy config. common --@rules_dx//config:clippy_flag=-Wclippy::all common --@rules_dx//config:clippy_flag=-Wclippy::pedantic common --@rules_dx//config:clippy_flag=-Wclippy::nursery diff --git a/.dx/config/ruff/base.toml b/.dx/config/ruff/base.toml index d1fe54a75f..b8680fd9fd 100644 --- a/.dx/config/ruff/base.toml +++ b/.dx/config/ruff/base.toml @@ -1,108 +1,25 @@ [lint] -select = [ - "S", - "PLE", - "PLW0120", - "PLW0127", - "PLW0128", - "PLW0129", - "PLW0131", - "PLW0133", - "PLW0177", - "PLW0245", - "PLW0406", - "PLW0602", - "PLW0642", - "PLW0711", - "PLW1501", - "PLW1507", - "PLW1508", - "PLW1509", - "PLW1510", - "PLW1641", - "PLW2101", - "PT010", - "PT011", - "PT015", - "PT017", - "PT025", - "PT026", - "PT030", - # syntax errors - "E902", - # pyflakes - "F401", - "F402", - "F403", - "F404", - "F405", - "F406", - "F407", - "F501", - "F502", - "F503", - "F504", - "F505", - "F506", - "F507", - "F508", - "F509", - "F521", - "F522", - "F523", - "F524", - "F525", - "F601", - "F602", - "F621", - "F622", - "F631", - "F632", - "F633", - "F634", - "F701", - "F702", - "F704", - "F706", - "F707", - "F722", - "F811", - "F821", - "F822", - "F823", - "F841", - "F842", - "F901", - # bugbear - "B002", - "B003", - "B004", - "B005", - "B006", - "B008", - "B012", - "B014", - "B015", - "B016", - "B017", - "B018", - "B019", - "B020", - "B021", - "B022", - "B023", - "B025", - "B026", - "B029", - "B030", - "B031", - "B032", - "B033", - "B034", - "B035", - "B039", - # deprecated APIs - "UP005", +select = ["ALL"] +ignore = [ + "COM812", + "COM819", + "CPY001", + "D203", + "D213", + "D206", + "D300", + "INP001", + "Q000", + "Q001", + "Q002", + "Q003", + "Q004", + "S603", + "W191", ] -ignore = ["S101", "S603"] preview = false + +[lint.per-file-ignores] +"*_test.py" = ["S101", "ARG"] +"test_*.py" = ["S101", "ARG"] +"*.ipynb" = ["T201"] diff --git a/.dx/config/yamllint/base.yaml b/.dx/config/yamllint/base.yaml index 403fecdb11..08b0799d52 100644 --- a/.dx/config/yamllint/base.yaml +++ b/.dx/config/yamllint/base.yaml @@ -1,6 +1,28 @@ rules: - anchors: enable - key-duplicates: enable + anchors: + forbid-duplicated-anchors: true + forbid-undeclared-aliases: true + forbid-unused-anchors: true + comments: + require-starting-space: true + comments-indentation: enable + document-start: enable + empty-values: enable + float-values: + forbid-inf: true + forbid-nan: true + forbid-scientific-notation: true + require-numeral-before-decimal: true + key-duplicates: + forbid-duplicated-merge-keys: true + key-ordering: enable + new-line-at-end-of-file: enable + octal-values: + forbid-explicit-octal: true + forbid-implicit-octal: true + quoted-strings: + required: only-when-needed + trailing-spaces: enable truthy: allowed-values: ['true', 'false'] - check-keys: false + check-keys: true diff --git a/AGENTS.md b/AGENTS.md index a5f9591ba9..25f91f12b7 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -39,5 +39,5 @@ This repository uses Bazel. - One file: `tools/dx test `. - One test: `tools/dx test