@gspothq/cli 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -11
- package/configurations/database/postgres/manifest.toml +51 -57
- package/configurations/database/postgres/rules/POSTGRES.md +14 -13
- package/configurations/framework/astro/manifest.toml +33 -35
- package/configurations/framework/astro/rules/ASTRO.md +2 -2
- package/configurations/framework/expo/manifest.toml +19 -19
- package/configurations/framework/express/manifest.toml +10 -4
- package/configurations/framework/express/rules/EXPRESS.md +9 -7
- package/configurations/framework/fastapi/manifest.toml +9 -3
- package/configurations/framework/fastapi/rules/FASTAPI.md +19 -18
- package/configurations/framework/nestjs/manifest.toml +12 -12
- package/configurations/framework/nestjs/rules/NESTJS.md +9 -9
- package/configurations/framework/nextjs/manifest.toml +39 -79
- package/configurations/framework/nextjs/rules/NEXTJS.md +9 -7
- package/configurations/framework/nextjs/tool-files/semgrep/nextjs.yml +35 -0
- package/configurations/framework/react/manifest.toml +33 -43
- package/configurations/framework/react/rules/REACT.md +14 -20
- package/configurations/framework/react-dom/manifest.toml +6 -6
- package/configurations/framework/react-native/manifest.toml +11 -11
- package/configurations/framework/react-native/rules/REACT-NATIVE.md +3 -5
- package/configurations/framework/site/manifest.toml +57 -110
- package/configurations/framework/site/rules/SITE.md +1 -1
- package/configurations/framework/svelte/manifest.toml +29 -31
- package/configurations/framework/svelte/rules/SVELTE.md +6 -6
- package/configurations/framework/vue/manifest.toml +37 -37
- package/configurations/framework/vue/rules/VUE.md +6 -6
- package/configurations/general/commits/manifest.toml +20 -84
- package/configurations/general/commits/rules/GIT.md +24 -13
- package/configurations/general/coverage/manifest.toml +1 -1
- package/configurations/general/dependencies/manifest.toml +47 -107
- package/configurations/general/dependencies/rules/DEPENDENCIES.md +13 -7
- package/configurations/general/docs/manifest.toml +28 -43
- package/configurations/general/docs/rules/DOCS.md +16 -9
- package/configurations/general/duplication/manifest.toml +12 -14
- package/configurations/general/engineering/manifest.toml +6 -2
- package/configurations/general/engineering/rules/agent/PLANNING.md +9 -6
- package/configurations/general/engineering/rules/agent/SUPPRESSIONS.md +20 -11
- package/configurations/general/engineering/rules/agent/TASKS.md +6 -2
- package/configurations/general/engineering/rules/agent/WORKING.md +34 -29
- package/configurations/general/engineering/rules/code/ACCESSIBILITY.md +9 -7
- package/configurations/general/engineering/rules/code/CLI.md +12 -9
- package/configurations/general/engineering/rules/code/COMMENTS.md +11 -1
- package/configurations/general/engineering/rules/code/CONFIGURATION.md +2 -0
- package/configurations/general/engineering/rules/code/ERRORS.md +5 -3
- package/configurations/general/engineering/rules/code/HTTP.md +9 -10
- package/configurations/general/engineering/rules/code/LOGGING.md +10 -9
- package/configurations/general/engineering/rules/code/TESTING.md +18 -11
- package/configurations/general/files/manifest.toml +45 -73
- package/configurations/general/files/rules/YAML.md +20 -10
- package/configurations/general/format/manifest.toml +53 -106
- package/configurations/general/gspot/manifest.toml +19 -39
- package/configurations/general/gspot/rules/GENERATED.md +14 -4
- package/configurations/general/licenses/manifest.toml +12 -14
- package/configurations/general/naming/defaults.json +14 -13
- package/configurations/general/naming/manifest.toml +17 -17
- package/configurations/general/naming/rules/NAMING.md +87 -67
- package/configurations/general/prose/manifest.toml +166 -25
- package/configurations/general/prose/rules/WRITING.md +6 -2
- package/configurations/general/repository/manifest.toml +12 -12
- package/configurations/general/secrets/manifest.toml +52 -73
- package/configurations/general/secrets/rules/SECRETS.md +3 -1
- package/configurations/general/security/manifest.toml +29 -52
- package/configurations/general/security/rules/SECURITY.md +8 -6
- package/configurations/general/spelling/manifest.toml +15 -25
- package/configurations/general/structure/manifest.toml +31 -31
- package/configurations/infrastructure/ansible/manifest.toml +15 -15
- package/configurations/infrastructure/docker/manifest.toml +55 -67
- package/configurations/infrastructure/docker/rules/DOCKER.md +15 -13
- package/configurations/infrastructure/github-actions/manifest.toml +21 -41
- package/configurations/infrastructure/github-actions/rules/GITHUB-ACTIONS.md +16 -12
- package/configurations/infrastructure/github-actions/tool-files/zizmor.yml +5 -0
- package/configurations/infrastructure/nginx/manifest.toml +20 -20
- package/configurations/infrastructure/nginx/rules/NGINX.md +5 -4
- package/configurations/infrastructure/openapi/manifest.toml +20 -20
- package/configurations/infrastructure/openapi/rules/OPENAPI.md +3 -1
- package/configurations/infrastructure/xcode/manifest.toml +55 -75
- package/configurations/infrastructure/xcode/rules/XCODE.md +5 -3
- package/configurations/language/bash/manifest.toml +89 -170
- package/configurations/language/bash/rules/BASH.md +79 -17
- package/configurations/language/bash/rules/LANGUAGE.md +30 -26
- package/configurations/language/bash/rules/OPERATIONS.md +10 -8
- package/configurations/language/bash/rules/SAFETY.md +39 -35
- package/configurations/language/css/manifest.toml +22 -61
- package/configurations/language/css/rules/CSS.md +21 -2
- package/configurations/language/css/rules/TAILWIND.md +7 -5
- package/configurations/language/html/manifest.toml +16 -35
- package/configurations/language/html/rules/HTML.md +23 -5
- package/configurations/language/javascript/eslint-runtime-names.json +66 -61
- package/configurations/language/javascript/eslint-runtime.mjs +118 -0
- package/configurations/language/javascript/manifest.toml +135 -207
- package/configurations/language/javascript/rules/BUN.md +2 -2
- package/configurations/language/javascript/rules/COMPONENTS.md +4 -4
- package/configurations/language/javascript/rules/DENO.md +1 -1
- package/configurations/language/javascript/rules/JAVASCRIPT.md +30 -17
- package/configurations/language/javascript/rules/NODE.md +2 -2
- package/configurations/language/javascript/rules/PLAYWRIGHT.md +10 -9
- package/configurations/language/markdown/manifest.toml +20 -51
- package/configurations/language/python/manifest.toml +231 -342
- package/configurations/language/python/rules/DESIGN.md +40 -33
- package/configurations/language/python/rules/FLOW.md +8 -6
- package/configurations/language/python/rules/PACKAGING.md +14 -7
- package/configurations/language/python/rules/PYTHON.md +83 -33
- package/configurations/language/python/rules/TYPING.md +25 -23
- package/configurations/language/sql/manifest.toml +19 -37
- package/configurations/language/sql/rules/SQL.md +90 -2
- package/configurations/language/swift/manifest.toml +67 -78
- package/configurations/language/swift/rules/SWIFT.md +138 -40
- package/configurations/language/swift/rules/SWIFTUI.md +11 -9
- package/configurations/language/swift/rules/UIKIT.md +21 -19
- package/configurations/language/typescript/manifest.toml +34 -34
- package/configurations/language/typescript/rules/TYPESCRIPT.md +62 -10
- package/configurations/library/drizzle/manifest.toml +25 -38
- package/configurations/library/drizzle/rules/DRIZZLE.md +4 -2
- package/configurations/library/react-hook-form/manifest.toml +4 -4
- package/configurations/library/react-hook-form/rules/REACT-HOOK-FORM.md +15 -13
- package/configurations/library/tanstack-query/manifest.toml +6 -6
- package/configurations/library/tanstack-query/rules/TANSTACK-QUERY.md +5 -3
- package/configurations/library/testing-library/manifest.toml +6 -6
- package/configurations/library/translations/manifest.toml +22 -22
- package/configurations/library/translations/rules/NEXT-INTL.md +6 -8
- package/configurations/library/translations/rules/TRANSLATIONS.md +22 -23
- package/configurations/library/trpc/manifest.toml +3 -3
- package/configurations/library/trpc/rules/TRPC.md +8 -6
- package/configurations/library/zod/manifest.toml +6 -6
- package/configurations/library/zod/rules/ZOD.md +4 -2
- package/configurations/library/zustand/manifest.toml +4 -4
- package/configurations/library/zustand/rules/ZUSTAND.md +16 -14
- package/configurations/platform/cloudflare/manifest.toml +28 -47
- package/configurations/platform/cloudflare/rules/CLOUDFLARE.md +11 -6
- package/configurations/platform/supabase/manifest.toml +48 -61
- package/configurations/platform/supabase/rules/SUPABASE.md +27 -28
- package/configurations/testing/jest/manifest.toml +21 -22
- package/configurations/testing/pytest/manifest.toml +28 -28
- package/configurations/testing/swift-tests/manifest.toml +18 -29
- package/configurations/testing/swift-tests/rules/SWIFT-TESTS.md +7 -5
- package/configurations/testing/vitest/manifest.toml +32 -32
- package/configurations/testing/vitest/rules/VITEST.md +3 -1
- package/dist/gspot.js +22297 -24707
- package/dist/{linkinator-program.js → linkinator-process.js} +5 -7
- package/dist/{purgecss-program.js → purgecss-process.js} +12 -12
- package/package.json +7 -9
- package/configurations/infrastructure/github-actions/zizmor.yml +0 -3
- package/configurations/language/bash/rules/NAMING.md +0 -62
- package/configurations/language/css/rules/NAMING.md +0 -17
- package/configurations/language/html/rules/NAMING.md +0 -16
- package/configurations/language/javascript/rules/NAMING.md +0 -31
- package/configurations/language/markdown/markdownlint-cli2.mjs +0 -19
- package/configurations/language/python/rules/NAMING.md +0 -53
- package/configurations/language/sql/rules/NAMING.md +0 -90
- package/configurations/language/swift/rules/NAMING.md +0 -88
- package/configurations/language/typescript/rules/NAMING.md +0 -73
- package/configurations/library/swift-snapshot-testing/manifest.toml +0 -32
- package/dist/THIRD-PARTY-NOTICES.md +0 -25
- package/dist/eslint-rule-levels.json +0 -10
- package/dist/tool-versions.json +0 -3
- package/gspot.schema.json +0 -45991
- /package/{dist/LICENSE.md → LICENSE.md} +0 -0
- /package/configurations/framework/express/{semgrep → tool-files/semgrep}/express.yml +0 -0
- /package/configurations/framework/fastapi/{semgrep → tool-files/semgrep}/fastapi.yml +0 -0
- /package/configurations/general/dependencies/{syncpack.json → tool-files/syncpack.json} +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/LICENSES.md +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/ampm.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/conscious-language.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/contractions.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/currency.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/dashes.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/date-ordinals.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/dates.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/file-paths.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/future.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/hedging.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/history.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/idioms.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/interface-verbs.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/jargon.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/leading-conjunctions.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/link-text.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/locations.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/marketing.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/merge-conflict-markers.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/militaristic-language.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/modals.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/numbered-units.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/obvious-fields.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/ordinal-adverbs.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/percentage-numbers.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/placeholders.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/product-centric-writing.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/punctuated-headings.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/self-reference.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/session-identifiers.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/since.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/straight-quotes.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/suspended-hyphens.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/symbols.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/time-ranges.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/url-prepositions.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/version-range.yml +0 -0
- /package/configurations/general/secrets/{gitleaks.toml → tool-files/gitleaks.toml} +0 -0
- /package/configurations/infrastructure/docker/{trivyignore → tool-files/trivyignore} +0 -0
- /package/configurations/language/bash/{semgrep → tool-files/semgrep}/bash.yml +0 -0
- /package/configurations/language/javascript/{semgrep → tool-files/semgrep}/javascript.yml +0 -0
- /package/configurations/language/swift/{semgrep → tool-files/semgrep}/swift.yml +0 -0
- /package/configurations/platform/cloudflare/{semgrep → tool-files/semgrep}/cloudflare.yml +0 -0
- /package/configurations/platform/supabase/{semgrep → tool-files/semgrep}/supabase.yml +0 -0
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
allowed_words = ["Python", "Ruff"]
|
|
2
|
-
|
|
3
2
|
ignored_folders = [".venv", "venv"]
|
|
4
3
|
|
|
5
4
|
[configuration]
|
|
6
|
-
title = "Python"
|
|
7
|
-
suggests = []
|
|
8
5
|
description = "Python sources: Ruff for lint and layout, basedpyright for types, import contracts, docstrings that match signatures, unused dependencies, and dead code."
|
|
6
|
+
suggests = []
|
|
7
|
+
title = "Python"
|
|
9
8
|
|
|
10
9
|
[detect]
|
|
11
10
|
extensions = [".py"]
|
|
@@ -16,313 +15,138 @@ shebangs = ["python", "python3"]
|
|
|
16
15
|
extensions = [".py", ".pyi"]
|
|
17
16
|
filenames = ["pyproject.toml", "setup.cfg", ".importlinter"]
|
|
18
17
|
|
|
18
|
+
[[naming.override]]
|
|
19
|
+
allowed_names = ["__init__", "__main__"]
|
|
20
|
+
categories = ["files"]
|
|
21
|
+
languages = ["python"]
|
|
22
|
+
paths = ["**/__init__.py", "**/__main__.py"]
|
|
23
|
+
reason = "Python names these files."
|
|
24
|
+
|
|
25
|
+
[[naming.override]]
|
|
26
|
+
allowed_names = ["setUp", "setUpClass", "tearDown", "tearDownClass"]
|
|
27
|
+
categories = ["methods"]
|
|
28
|
+
languages = ["python"]
|
|
29
|
+
paths = ["**"]
|
|
30
|
+
reason = "unittest discovers its lifecycle methods by these names."
|
|
31
|
+
|
|
32
|
+
[[naming.override]]
|
|
33
|
+
allowed_names = [
|
|
34
|
+
"__init__",
|
|
35
|
+
"__main__",
|
|
36
|
+
"__all__",
|
|
37
|
+
"__name__",
|
|
38
|
+
"__file__",
|
|
39
|
+
"__dict__",
|
|
40
|
+
"__slots__",
|
|
41
|
+
"__repr__",
|
|
42
|
+
"__str__",
|
|
43
|
+
"__eq__",
|
|
44
|
+
"__hash__",
|
|
45
|
+
"__len__",
|
|
46
|
+
"__iter__",
|
|
47
|
+
"__next__",
|
|
48
|
+
"__enter__",
|
|
49
|
+
"__exit__",
|
|
50
|
+
"__call__",
|
|
51
|
+
"__getitem__",
|
|
52
|
+
"__setitem__",
|
|
53
|
+
"__delitem__",
|
|
54
|
+
"__contains__",
|
|
55
|
+
"__lt__",
|
|
56
|
+
"__le__",
|
|
57
|
+
"__gt__",
|
|
58
|
+
"__ge__",
|
|
59
|
+
"__ne__",
|
|
60
|
+
"__bool__",
|
|
61
|
+
"__post_init__",
|
|
62
|
+
"__class_getitem__",
|
|
63
|
+
"__aenter__",
|
|
64
|
+
"__aexit__",
|
|
65
|
+
"__await__",
|
|
66
|
+
"__aiter__",
|
|
67
|
+
"__anext__",
|
|
68
|
+
"__new__",
|
|
69
|
+
"__spec__",
|
|
70
|
+
"__package__",
|
|
71
|
+
"__loader__",
|
|
72
|
+
"__cached__",
|
|
73
|
+
"__doc__",
|
|
74
|
+
"__annotations__",
|
|
75
|
+
"__path__",
|
|
76
|
+
"__class__",
|
|
77
|
+
"__classcell__",
|
|
78
|
+
"__qualname__",
|
|
79
|
+
"__builtins__",
|
|
80
|
+
]
|
|
81
|
+
categories = ["functions", "methods", "variables", "constants", "attributes"]
|
|
82
|
+
languages = ["python"]
|
|
83
|
+
paths = ["**"]
|
|
84
|
+
reason = "Python defines these special methods and attributes."
|
|
85
|
+
|
|
86
|
+
[[naming.override]]
|
|
87
|
+
categories = ["functions", "variables", "constants", "methods", "attributes"]
|
|
88
|
+
ignored_prefix = "^_+"
|
|
89
|
+
languages = ["python"]
|
|
90
|
+
paths = ["**"]
|
|
91
|
+
reason = "A leading underscore marks a private Python declaration."
|
|
92
|
+
|
|
19
93
|
[[tool]]
|
|
94
|
+
mise = "uv"
|
|
20
95
|
name = "uv"
|
|
21
96
|
version = "0.12.22"
|
|
22
|
-
mise = "uv"
|
|
23
97
|
|
|
24
98
|
[[tool]]
|
|
99
|
+
brew = "ruff"
|
|
100
|
+
min_version = "0.9.0"
|
|
101
|
+
mise = "ruff"
|
|
25
102
|
name = "ruff"
|
|
103
|
+
pypi = "ruff"
|
|
104
|
+
replace = ["ruff.toml", ".ruff.toml"]
|
|
26
105
|
rule_url = "https://docs.astral.sh/ruff/rules/{rule}/"
|
|
27
106
|
suppression = { inline_marker = "#\\s*[nN][oO][qQ][aA](?=\\s|:|$)", marker = "#\\s*(?:(?:ruff|flake8):\\s*)?[nN][oO][qQ][aA](?=\\s|:|$)", reason = "#\\s*(?:(?:ruff|flake8):\\s*)?[nN][oO][qQ][aA](?=\\s|:|$)[^#]*# ?(?<reason>\\S.*)" }
|
|
28
107
|
version = "0.16.8"
|
|
29
|
-
min_version = "0.9.0"
|
|
30
|
-
mise = "ruff"
|
|
31
|
-
pypi = "ruff"
|
|
32
|
-
brew = "ruff"
|
|
33
|
-
[[tool.replace]]
|
|
34
|
-
file = "ruff.toml"
|
|
35
|
-
shared = false
|
|
36
|
-
|
|
37
|
-
[[tool.replace]]
|
|
38
|
-
file = ".ruff.toml"
|
|
39
|
-
shared = false
|
|
40
108
|
|
|
41
|
-
[[tool.
|
|
109
|
+
[[tool.replace_key]]
|
|
42
110
|
file = "pyproject.toml"
|
|
43
111
|
table = "tool.ruff"
|
|
44
|
-
shared = true
|
|
45
112
|
|
|
46
113
|
[[tool]]
|
|
114
|
+
min_version = "1.20.0"
|
|
47
115
|
name = "basedpyright"
|
|
116
|
+
npm = "basedpyright"
|
|
117
|
+
replace = ["pyrightconfig.json"]
|
|
48
118
|
suppression = { marker = "\\b(?:type|pyright): ?ignore\\b", reason = "#[^#]*# ?(?<reason>\\S.*)" }
|
|
49
119
|
version = "1.40.1"
|
|
50
|
-
min_version = "1.20.0"
|
|
51
|
-
npm = "basedpyright"
|
|
52
|
-
[[tool.replace]]
|
|
53
|
-
file = "pyrightconfig.json"
|
|
54
|
-
shared = false
|
|
55
120
|
|
|
56
|
-
[[tool.
|
|
121
|
+
[[tool.replace_key]]
|
|
57
122
|
file = "pyproject.toml"
|
|
58
123
|
table = "tool.basedpyright"
|
|
59
|
-
shared = true
|
|
60
124
|
|
|
61
|
-
[[tool.
|
|
125
|
+
[[tool.replace_key]]
|
|
62
126
|
file = "pyproject.toml"
|
|
63
127
|
table = "tool.pyright"
|
|
64
|
-
shared = true
|
|
65
128
|
|
|
66
129
|
[[tool]]
|
|
67
|
-
name = "lint-imports"
|
|
68
|
-
version = "2.15"
|
|
69
130
|
mise = "pipx:import-linter"
|
|
131
|
+
name = "lint-imports"
|
|
70
132
|
pypi = "import-linter"
|
|
133
|
+
version = "2.15"
|
|
71
134
|
version_pattern = "v?(\\d+\\.\\d+(?:\\.\\d+)?)"
|
|
72
135
|
|
|
73
136
|
[[tool]]
|
|
74
|
-
name = "pydoclint"
|
|
75
|
-
version = "0.9.1"
|
|
76
137
|
mise = "pipx:pydoclint"
|
|
138
|
+
name = "pydoclint"
|
|
77
139
|
pypi = "pydoclint"
|
|
140
|
+
version = "0.9.1"
|
|
78
141
|
|
|
79
142
|
[[tool]]
|
|
80
|
-
name = "deptry"
|
|
81
|
-
version = "0.25.1"
|
|
82
143
|
min_version = "0.20.0"
|
|
83
144
|
mise = "pipx:deptry"
|
|
84
|
-
pypi = "deptry"
|
|
85
|
-
|
|
86
|
-
[[tool]]
|
|
87
|
-
name = "validate-pyproject"
|
|
88
|
-
version = "0.26"
|
|
89
|
-
mise = "pipx:validate-pyproject"
|
|
90
|
-
pypi = "validate-pyproject"
|
|
91
|
-
version_pattern = "(\\d+\\.\\d+(?:\\.\\d+)?)"
|
|
92
|
-
|
|
93
|
-
[[tool_file]]
|
|
94
|
-
target = ".gspot/config/ruff.toml"
|
|
95
|
-
tool = "ruff"
|
|
96
|
-
pointer = { path = "ruff.toml", body = 'extend = "{target}"' }
|
|
97
|
-
per_scope = true
|
|
98
|
-
rule_keys = ["lint.select", "lint.ignore", "lint.per-file-ignores"]
|
|
99
|
-
|
|
100
|
-
[[tool_file]]
|
|
101
|
-
target = ".gspot/config/basedpyrightconfig.json"
|
|
102
|
-
tool = "basedpyright"
|
|
103
|
-
pointer = { path = "pyrightconfig.json", body = "{\n \"extends\": \"{target}\"\n}" }
|
|
104
|
-
per_scope = true
|
|
105
|
-
|
|
106
|
-
[[check]]
|
|
107
|
-
name = "ruff"
|
|
108
|
-
example = "The expression `eval(user_input)` reports S307 when that rule is selected. Replace dynamic evaluation with parsing and explicit operations appropriate to the input contract."
|
|
109
|
-
level = "recommended"
|
|
110
|
-
stage = "commit"
|
|
111
|
-
command = ["ruff", "check", "--no-cache", "--output-format", "json", "{files}"]
|
|
112
|
-
exit_codes = [1]
|
|
113
|
-
fix = ["ruff", "check", "--no-cache", "--fix", "--quiet", "{files}"]
|
|
114
|
-
files = { extensions = [".py", ".pyi"] }
|
|
115
|
-
output = { format = "json", fields = { file = "filename", line = "location.row", column = "location.column", rule = "code", message = "message" } }
|
|
116
|
-
summary = "Lints every Python file with the Ruff rules for the level, security rules included."
|
|
117
|
-
why = "Ruff holds the rules of a dozen older tools in one pass fast enough to run at every commit."
|
|
118
|
-
help = "Run gspot check --fix for the rules that fix themselves. Turn one rule off with gspot ignore python/ruff --rule `<code>` --reason \"`<why>`\", and add --paths to limit it."
|
|
119
|
-
|
|
120
|
-
[[check]]
|
|
121
|
-
name = "ruff-format"
|
|
122
|
-
example = "The Python assignment `value=1` differs from Ruff formatting. Format the file so the assignment becomes `value = 1`, then rerun."
|
|
123
|
-
level = "recommended"
|
|
124
|
-
stage = "commit"
|
|
125
|
-
command = [
|
|
126
|
-
"ruff",
|
|
127
|
-
"format",
|
|
128
|
-
"--no-cache",
|
|
129
|
-
"--check",
|
|
130
|
-
"--output-format",
|
|
131
|
-
"concise",
|
|
132
|
-
"{files}",
|
|
133
|
-
]
|
|
134
|
-
exit_codes = [1]
|
|
135
|
-
fix = ["ruff", "format", "--no-cache", "--quiet", "{files}"]
|
|
136
|
-
files = { extensions = [".py", ".pyi"] }
|
|
137
|
-
output = { format = "regex", pattern = "^(?<file>[^:]+):(?<line>\\d+):(?<column>\\d+): unformatted: ", message = "This file is not formatted the way Ruff formats it." }
|
|
138
|
-
summary = "Checks the layout of every Python file against the Ruff formatter."
|
|
139
|
-
why = "One layout everywhere keeps a diff about the change."
|
|
140
|
-
help = "Run gspot check --fix."
|
|
141
|
-
|
|
142
|
-
[[check]]
|
|
143
|
-
name = "basedpyright"
|
|
144
|
-
example = "The annotated assignment `count: int = \"one\"` reports an incompatible value type. Use `count: int = 1` when the value is a number, or correct the annotation if the contract requires text."
|
|
145
|
-
level = "recommended"
|
|
146
|
-
stage = "push"
|
|
147
|
-
runs = "scope"
|
|
148
|
-
cwd = "scope"
|
|
149
|
-
command = ["basedpyright", "--outputjson"]
|
|
150
|
-
exit_codes = [1]
|
|
151
|
-
files = { extensions = [".py", ".pyi"] }
|
|
152
|
-
output = { format = "json", items = "generalDiagnostics", line_base = 0, fields = { file = "file", line = "range.start.line", column = "range.start.character", rule = "rule", message = "message" } }
|
|
153
|
-
summary = "Type checks the project. At level `all`, it also requires annotations."
|
|
154
|
-
why = "A type error found here is a crash that never reaches a user."
|
|
155
|
-
help = "Fix the type, or narrow it where the value arrives. Accept a file that needs another dependency set with gspot ignore python/basedpyright --paths `<path>` --reason \"`<why>`\"."
|
|
156
|
-
|
|
157
|
-
[[check]]
|
|
158
|
-
name = "import-linter"
|
|
159
|
-
example = "A module importing from a layer forbidden by the configured import contract reports that dependency. Move the shared behavior to an allowed owner and update the import, then rerun against the same contract."
|
|
160
|
-
level = "recommended"
|
|
161
|
-
stage = "commit"
|
|
162
|
-
runs = "scope"
|
|
163
|
-
cwd = "scope"
|
|
164
|
-
tool = ["uv", "lint-imports"]
|
|
165
|
-
env = { PYTHONDONTWRITEBYTECODE = "1" }
|
|
166
|
-
files = { extensions = [
|
|
167
|
-
".py",
|
|
168
|
-
], filenames = [
|
|
169
|
-
"pyproject.toml",
|
|
170
|
-
"setup.cfg",
|
|
171
|
-
".importlinter",
|
|
172
|
-
] }
|
|
173
|
-
summary = "Runs project import contracts from setup.cfg, .importlinter, or pyproject.toml."
|
|
174
|
-
why = "A layer that imports the layer above it turns an architecture into a diagram nobody follows."
|
|
175
|
-
help = "Move the import to the side the contract allows, or change the contract."
|
|
176
|
-
|
|
177
|
-
[[check]]
|
|
178
|
-
name = "pydoclint"
|
|
179
|
-
example = "A function docstring describing parameter `name` when its signature accepts `path` reports a signature mismatch. Document `path` and its actual meaning, removing the obsolete parameter entry."
|
|
180
|
-
level = "recommended"
|
|
181
|
-
stage = "commit"
|
|
182
|
-
cwd = "scope"
|
|
183
|
-
tool = "pydoclint"
|
|
184
|
-
files = { extensions = [".py"] }
|
|
185
|
-
output = { format = "grouped", file_pattern = "^(?<file>\\S.*\\.py)$", pattern = "^\\s+(?<line>\\d+): (?<rule>DOC\\d+): (?<message>.*)$" }
|
|
186
|
-
summary = "Checks that every docstring names the arguments, the return, and the exceptions its function really has."
|
|
187
|
-
why = "A docstring that disagrees with the signature is worse than none, because people trust it."
|
|
188
|
-
help = "Bring the docstring in line with the signature."
|
|
189
|
-
|
|
190
|
-
[[check]]
|
|
191
145
|
name = "deptry"
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
stage = "push"
|
|
195
|
-
runs = "scope"
|
|
196
|
-
cwd = "scope"
|
|
197
|
-
tool = ["uv", "deptry"]
|
|
198
|
-
env = { PYTHONDONTWRITEBYTECODE = "1" }
|
|
199
|
-
files = { extensions = [".py"], filenames = ["pyproject.toml"] }
|
|
200
|
-
output = { format = "regex", pattern = "^(?<file>[^:]+):(?<line>\\d+):(?<column>\\d+): (?<rule>DEP\\d+) (?<message>.*)$" }
|
|
201
|
-
summary = "Compares the imports of the project with the dependencies it declares: missing, unused, and transitive ones."
|
|
202
|
-
why = "An import that works through somebody else's dependency breaks the day they drop it."
|
|
203
|
-
help = "Declare the dependency, or remove the one nothing imports. Turn one rule off with gspot ignore python/deptry --rule `<code>` --reason \"`<why>`\"."
|
|
204
|
-
|
|
205
|
-
[[check]]
|
|
206
|
-
name = "pyproject"
|
|
207
|
-
example = "The project metadata `version = 7` in `pyproject.toml` reports an invalid version value. Use a valid version string, such as `version = \"1.0.0\"`, and rerun before updating the lockfile."
|
|
208
|
-
level = "recommended"
|
|
209
|
-
stage = "commit"
|
|
210
|
-
command = ["validate-pyproject", "{file}"]
|
|
211
|
-
exit_codes = [1]
|
|
212
|
-
files = { filenames = ["pyproject.toml"] }
|
|
213
|
-
tool = "validate-pyproject"
|
|
214
|
-
output = { format = "regex", pattern = "^\\[ERROR\\] (?<message>.*)$" }
|
|
215
|
-
summary = "Validates every pyproject.toml against the packaging schemas."
|
|
216
|
-
why = "A key the build backend does not know is ignored without a word."
|
|
217
|
-
help = "Correct the key the message names."
|
|
218
|
-
|
|
219
|
-
[[check]]
|
|
220
|
-
name = "pip-installs"
|
|
221
|
-
example = "A `requirements.txt` written by hand beside a locked Python project creates a second dependency owner. Export that file from the lockfile, declare it generated, and use the locked installation command."
|
|
222
|
-
level = "all"
|
|
223
|
-
stage = "commit"
|
|
224
|
-
runs = "scope"
|
|
225
|
-
files = { filenames = [
|
|
226
|
-
"uv.lock",
|
|
227
|
-
"poetry.lock",
|
|
228
|
-
"pdm.lock",
|
|
229
|
-
], kinds = [
|
|
230
|
-
"source",
|
|
231
|
-
"generated",
|
|
232
|
-
] }
|
|
233
|
-
summary = "Checks that pyproject.toml lists every dependency: no hand-kept requirements file and no pip install. To accept one file, ignore its finding with gspot ignore."
|
|
234
|
-
why = "Two owners of the dependency list drift apart, and the image installs what the lockfile never saw."
|
|
235
|
-
help = "Export the requirements file from the lockfile and declare it generated, and replace pip install with the locked install. Accept a reviewed path with gspot ignore python/pip-installs --paths `<glob>` --reason \"`<why>`\"."
|
|
236
|
-
|
|
237
|
-
[[check]]
|
|
238
|
-
name = "function-size"
|
|
239
|
-
example = "A Python function exceeding the configured code-line ceiling reports a length finding. Extract a distinct operation with its own responsibility and verify the remaining function and extracted operation."
|
|
240
|
-
level = "all"
|
|
241
|
-
stage = "commit"
|
|
242
|
-
runs = "scope"
|
|
243
|
-
files = { extensions = [".py"] }
|
|
244
|
-
summary = "Checks that no Python function has more code lines than the ceiling."
|
|
245
|
-
why = "A function that fills a screen does several things, and a reader has to hold all of them."
|
|
246
|
-
help = "Move one job of the function into a function of its own."
|
|
247
|
-
|
|
248
|
-
[[check]]
|
|
249
|
-
name = "placeholder-docstrings"
|
|
250
|
-
example = "A function whose docstring merely repeats its name reports a placeholder description. Replace the docstring with the behavior, inputs, and consequential effects that the name does not explain."
|
|
251
|
-
level = "all"
|
|
252
|
-
stage = "commit"
|
|
253
|
-
runs = "scope"
|
|
254
|
-
files = { extensions = [".py"] }
|
|
255
|
-
summary = "Finds docstrings that hold a placeholder word, or the name of the function again."
|
|
256
|
-
why = "A docstring that says nothing passes the docstring rule and wastes the line."
|
|
257
|
-
help = "Say what the function does that its name does not, or for whom it exists."
|
|
258
|
-
|
|
259
|
-
[[check]]
|
|
260
|
-
name = "private-prefix"
|
|
261
|
-
example = "A file-local function with no leading underscore and no public export reports a naming finding. Add the underscore and update its local callers, or declare the actual public contract in the export list."
|
|
262
|
-
level = "all"
|
|
263
|
-
stage = "commit"
|
|
264
|
-
runs = "scope"
|
|
265
|
-
files = { extensions = [".py"] }
|
|
266
|
-
summary = "In a module with an export list, checks that every other definition starts with an underscore, and that the list holds no such name."
|
|
267
|
-
why = "A name that is public by accident gets imported, and then it cannot change."
|
|
268
|
-
help = "Add the underscore, or list the name in the export list."
|
|
269
|
-
|
|
270
|
-
[[check]]
|
|
271
|
-
name = "exports-at-bottom"
|
|
272
|
-
example = "A module with `__all__` before later declarations reports an export-list position finding. Move the export list after those declarations."
|
|
273
|
-
level = "all"
|
|
274
|
-
stage = "commit"
|
|
275
|
-
runs = "scope"
|
|
276
|
-
files = { extensions = [".py"] }
|
|
277
|
-
summary = "Checks that the export list is the last statement of its module."
|
|
278
|
-
why = "A reader looks for the public surface in one place."
|
|
279
|
-
help = "Move the export list to the end of the module."
|
|
280
|
-
|
|
281
|
-
[[check]]
|
|
282
|
-
name = "module-getattr"
|
|
283
|
-
example = "A package exposing names through module-level `__getattr__` reports lazy exports. Import the intended public names explicitly and list them in `__all__`."
|
|
284
|
-
level = "all"
|
|
285
|
-
stage = "commit"
|
|
286
|
-
runs = "scope"
|
|
287
|
-
files = { extensions = [".py"] }
|
|
288
|
-
summary = "Finds a module-level `__getattr__`."
|
|
289
|
-
why = "A name that appears only at run time hides from the type checker, the editor, and the reader."
|
|
290
|
-
help = "Import the names and list them."
|
|
291
|
-
|
|
292
|
-
[[check]]
|
|
293
|
-
name = "package-exports"
|
|
294
|
-
example = "A package export list larger than its configured limit reports the export count. Split unrelated public responsibilities into separate packages or remove unnecessary exports and update consumers."
|
|
295
|
-
level = "all"
|
|
296
|
-
stage = "commit"
|
|
297
|
-
runs = "scope"
|
|
298
|
-
files = { extensions = [".py"] }
|
|
299
|
-
summary = "Checks that a package exports no more names than the ceiling."
|
|
300
|
-
why = "A package that exports everything has no surface, so every change to it is a breaking one."
|
|
301
|
-
help = "Split the package, or export fewer names."
|
|
302
|
-
|
|
303
|
-
[[check]]
|
|
304
|
-
name = "export-order"
|
|
305
|
-
example = "An `__all__` list whose names are not ordered shortest first reports the sorted order. Reorder the list."
|
|
306
|
-
level = "all"
|
|
307
|
-
stage = "commit"
|
|
308
|
-
runs = "scope"
|
|
309
|
-
files = { extensions = [".py"] }
|
|
310
|
-
summary = "Checks that the names in the export list go shortest first, alphabetically among names of one length."
|
|
311
|
-
why = "Ruff RUF022 sorts alphabetically; gspot turns it off and sorts shortest first, then alphabetically among names of one length."
|
|
312
|
-
help = "Reorder the names shortest first."
|
|
313
|
-
|
|
314
|
-
[[check]]
|
|
315
|
-
name = "singletons"
|
|
316
|
-
example = "A module-level service instance created during import reports a singleton finding when settings do not allow it. Construct it in the application entry point and pass the instance to consumers."
|
|
317
|
-
level = "all"
|
|
318
|
-
stage = "commit"
|
|
319
|
-
runs = "scope"
|
|
320
|
-
files = { extensions = [".py"] }
|
|
321
|
-
summary = "Finds objects built at import time and kept in a module variable."
|
|
322
|
-
why = "Every importer shares the one instance, and no test gets a fresh one."
|
|
323
|
-
help = "Build the object where the program starts, and pass it in. Accept a reviewed composition file with gspot ignore python/singletons --paths `<glob>` --reason \"`<why>`\"."
|
|
146
|
+
pypi = "deptry"
|
|
147
|
+
version = "0.25.1"
|
|
324
148
|
|
|
325
|
-
[
|
|
149
|
+
[ruff]
|
|
326
150
|
recommended = [
|
|
327
151
|
"A",
|
|
328
152
|
"ARG",
|
|
@@ -545,77 +369,142 @@ all = [
|
|
|
545
369
|
"TRY",
|
|
546
370
|
]
|
|
547
371
|
|
|
548
|
-
[[
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
languages = ["python"]
|
|
372
|
+
[[tool_file]]
|
|
373
|
+
per_scope = true
|
|
374
|
+
pointer = { path = "ruff.toml", body = 'extend = "{target}"' }
|
|
375
|
+
target = ".gspot/config/ruff.toml"
|
|
376
|
+
tool = "ruff"
|
|
554
377
|
|
|
555
|
-
[[
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
reason = "unittest discovers its lifecycle methods by these names."
|
|
378
|
+
[[tool_file]]
|
|
379
|
+
per_scope = true
|
|
380
|
+
pointer = { path = "pyrightconfig.json", body = "{\n \"extends\": \"{target}\"\n}" }
|
|
381
|
+
target = ".gspot/config/basedpyrightconfig.json"
|
|
382
|
+
tool = "basedpyright"
|
|
561
383
|
|
|
562
|
-
[[
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
"
|
|
579
|
-
"
|
|
580
|
-
"
|
|
581
|
-
"
|
|
582
|
-
"
|
|
583
|
-
"
|
|
584
|
-
"
|
|
585
|
-
"__setitem__",
|
|
586
|
-
"__delitem__",
|
|
587
|
-
"__contains__",
|
|
588
|
-
"__lt__",
|
|
589
|
-
"__le__",
|
|
590
|
-
"__gt__",
|
|
591
|
-
"__ge__",
|
|
592
|
-
"__ne__",
|
|
593
|
-
"__bool__",
|
|
594
|
-
"__post_init__",
|
|
595
|
-
"__class_getitem__",
|
|
596
|
-
"__aenter__",
|
|
597
|
-
"__aexit__",
|
|
598
|
-
"__await__",
|
|
599
|
-
"__aiter__",
|
|
600
|
-
"__anext__",
|
|
601
|
-
"__new__",
|
|
602
|
-
"__spec__",
|
|
603
|
-
"__package__",
|
|
604
|
-
"__loader__",
|
|
605
|
-
"__cached__",
|
|
606
|
-
"__doc__",
|
|
607
|
-
"__annotations__",
|
|
608
|
-
"__path__",
|
|
609
|
-
"__class__",
|
|
610
|
-
"__classcell__",
|
|
611
|
-
"__qualname__",
|
|
612
|
-
"__builtins__",
|
|
384
|
+
[[check]]
|
|
385
|
+
command = ["ruff", "check", "--no-cache", "--output-format", "json", "{files}"]
|
|
386
|
+
example = "`eval(user_input)` reports S307. Parse the input instead, and allow only known operations."
|
|
387
|
+
exit_codes = [1]
|
|
388
|
+
files = { extensions = [".py", ".pyi"] }
|
|
389
|
+
fix = ["ruff", "check", "--no-cache", "--fix", "--quiet", "{files}"]
|
|
390
|
+
help = "Run `gspot check --fix` for the rules that fix themselves. Turn one rule off with `gspot ignore python/ruff --rule <code> --reason \"<why>\"`, and add `--paths` to limit it."
|
|
391
|
+
level = "recommended"
|
|
392
|
+
name = "ruff"
|
|
393
|
+
output = { format = "json", fields = { file = "filename", line = "location.row", column = "location.column", rule = "code", message = "message" } }
|
|
394
|
+
stage = "commit"
|
|
395
|
+
summary = "Lints every Python file with the Ruff rules for the level, security rules included."
|
|
396
|
+
why = "Ruff runs the rules of a dozen older tools fast enough for every commit."
|
|
397
|
+
|
|
398
|
+
[[check]]
|
|
399
|
+
command = [
|
|
400
|
+
"ruff",
|
|
401
|
+
"format",
|
|
402
|
+
"--no-cache",
|
|
403
|
+
"--check",
|
|
404
|
+
"--output-format",
|
|
405
|
+
"concise",
|
|
406
|
+
"{files}",
|
|
613
407
|
]
|
|
614
|
-
|
|
408
|
+
example = "`value=1` differs from the Ruff output. Run `gspot check --fix` to get `value = 1`."
|
|
409
|
+
exit_codes = [1]
|
|
410
|
+
files = { extensions = [".py", ".pyi"] }
|
|
411
|
+
fix = ["ruff", "format", "--no-cache", "--quiet", "{files}"]
|
|
412
|
+
help = "Run `gspot check --fix`."
|
|
413
|
+
level = "recommended"
|
|
414
|
+
name = "ruff-format"
|
|
415
|
+
output = { format = "regex", pattern = "^(?<file>[^:]+):(?<line>\\d+):(?<column>\\d+): unformatted: ", message = "This file is not formatted the way Ruff formats it." }
|
|
416
|
+
stage = "commit"
|
|
417
|
+
summary = "Checks the layout of every Python file against the Ruff formatter."
|
|
418
|
+
why = "One layout everywhere keeps a diff about the change."
|
|
615
419
|
|
|
616
|
-
[[
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
420
|
+
[[check]]
|
|
421
|
+
command = ["basedpyright", "--outputjson"]
|
|
422
|
+
cwd = "scope"
|
|
423
|
+
example = "`count: int = \"one\"` reports an incompatible type. Assign a number, such as `count: int = 1`, or change the annotation to `str`."
|
|
424
|
+
exit_codes = [1]
|
|
425
|
+
files = { extensions = [".py", ".pyi"] }
|
|
426
|
+
help = "Fix the type, or narrow it where the value arrives. Accept a file that needs another dependency set with `gspot ignore python/basedpyright --paths <path> --reason \"<why>\"`."
|
|
427
|
+
level = "recommended"
|
|
428
|
+
name = "basedpyright"
|
|
429
|
+
output = { format = "json", items = "generalDiagnostics", line_base = 0, fields = { file = "file", line = "range.start.line", column = "range.start.character", rule = "rule", message = "message" } }
|
|
430
|
+
runs = "scope"
|
|
431
|
+
stage = "push"
|
|
432
|
+
summary = "Type checks the project. At level `all`, it also requires annotations."
|
|
433
|
+
why = "Each type error found here becomes a crash that never reaches a user."
|
|
434
|
+
|
|
435
|
+
[[check]]
|
|
436
|
+
cwd = "scope"
|
|
437
|
+
env = { PYTHONDONTWRITEBYTECODE = "1" }
|
|
438
|
+
example = "A module that imports from a forbidden layer reports a broken contract. Move the shared code to an allowed layer, and update the import."
|
|
439
|
+
files = { extensions = [
|
|
440
|
+
".py",
|
|
441
|
+
], filenames = [
|
|
442
|
+
"pyproject.toml",
|
|
443
|
+
"setup.cfg",
|
|
444
|
+
".importlinter",
|
|
445
|
+
] }
|
|
446
|
+
help = "Move the import to the side the contract allows, or change the contract."
|
|
447
|
+
level = "recommended"
|
|
448
|
+
name = "import-linter"
|
|
449
|
+
runs = "scope"
|
|
450
|
+
stage = "commit"
|
|
451
|
+
summary = "Runs project import contracts from setup.cfg, .importlinter, or pyproject.toml."
|
|
452
|
+
tool = ["uv", "lint-imports"]
|
|
453
|
+
why = "A layer that imports the layer above it turns an architecture into a diagram nobody follows."
|
|
454
|
+
|
|
455
|
+
[[check]]
|
|
456
|
+
cwd = "scope"
|
|
457
|
+
example = "A docstring that documents `name` for a function that takes `path` reports a mismatch. Document `path` instead."
|
|
458
|
+
files = { extensions = [".py"] }
|
|
459
|
+
help = "Bring the docstring in line with the signature."
|
|
460
|
+
level = "recommended"
|
|
461
|
+
name = "pydoclint"
|
|
462
|
+
output = { format = "grouped", file_pattern = "^(?<file>\\S.*\\.py)$", pattern = "^\\s+(?<line>\\d+): (?<rule>DOC\\d+): (?<message>.*)$" }
|
|
463
|
+
stage = "commit"
|
|
464
|
+
summary = "Checks that each docstring names the arguments, return value, and exceptions of its function."
|
|
465
|
+
tool = "pydoclint"
|
|
466
|
+
why = "A docstring that contradicts the signature misleads more than none, because people trust it."
|
|
467
|
+
|
|
468
|
+
[[check]]
|
|
469
|
+
cwd = "scope"
|
|
470
|
+
env = { PYTHONDONTWRITEBYTECODE = "1" }
|
|
471
|
+
example = "An import of a third-party package missing from the project dependencies reports a finding. Declare the package and update the lockfile, or remove the import."
|
|
472
|
+
files = { extensions = [".py"], filenames = ["pyproject.toml"] }
|
|
473
|
+
help = "Declare the dependency, or remove the one nothing imports. Turn one rule off with `gspot ignore python/deptry --rule <code> --reason \"<why>\"`."
|
|
474
|
+
level = "recommended"
|
|
475
|
+
name = "deptry"
|
|
476
|
+
output = { format = "regex", pattern = "^(?<file>[^:]+):(?<line>\\d+):(?<column>\\d+): (?<rule>DEP\\d+) (?<message>.*)$" }
|
|
477
|
+
runs = "scope"
|
|
478
|
+
stage = "push"
|
|
479
|
+
summary = "Compares the imports of the project with the dependencies it declares: missing, unused, and transitive ones."
|
|
480
|
+
tool = ["uv", "deptry"]
|
|
481
|
+
why = "An import that works through somebody else's dependency breaks the day they drop it."
|
|
482
|
+
|
|
483
|
+
[[check]]
|
|
484
|
+
example = "A `requirements.txt` kept by hand beside a locked project reports a second dependency list. Export it from the lockfile, declare it generated, and install from the lock."
|
|
485
|
+
files = { filenames = [
|
|
486
|
+
"uv.lock",
|
|
487
|
+
"poetry.lock",
|
|
488
|
+
"pdm.lock",
|
|
489
|
+
], kinds = [
|
|
490
|
+
"source",
|
|
491
|
+
"generated",
|
|
492
|
+
] }
|
|
493
|
+
help = "Export the requirements file from the lockfile, declare it generated, and replace `pip install` with the locked command. Accept a reviewed path with `gspot ignore python/pip-installs --paths <glob> --reason \"<why>\"`."
|
|
494
|
+
level = "all"
|
|
495
|
+
name = "pip-installs"
|
|
496
|
+
runs = "scope"
|
|
497
|
+
stage = "commit"
|
|
498
|
+
summary = "Checks that pyproject.toml lists every dependency, with no hand-kept requirements file and no `pip install`."
|
|
499
|
+
why = "Two dependency lists drift apart, and the image installs packages the lockfile never pinned."
|
|
500
|
+
|
|
501
|
+
[[check]]
|
|
502
|
+
example = "A docstring that only repeats the function name reports a placeholder. Describe the behavior, inputs, and effects that the name leaves out."
|
|
503
|
+
files = { extensions = [".py"] }
|
|
504
|
+
help = "Say what the function does that its name does not, or for whom it exists."
|
|
505
|
+
level = "all"
|
|
506
|
+
name = "placeholder-docstrings"
|
|
507
|
+
runs = "scope"
|
|
508
|
+
stage = "commit"
|
|
509
|
+
summary = "Finds docstrings that hold a placeholder word, or the name of the function again."
|
|
510
|
+
why = "A docstring that says nothing satisfies the lint rule and wastes the line."
|