envoy.code.check 0.5.14__tar.gz → 0.6.1__tar.gz
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.
- envoy_code_check-0.6.1/PKG-INFO +113 -0
- {envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/envoy/code/check/__init__.py +0 -2
- {envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/envoy/code/check/abstract/base.py +4 -4
- {envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/envoy/code/check/abstract/changelog.py +74 -3
- {envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/envoy/code/check/abstract/checker.py +11 -10
- {envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/envoy/code/check/abstract/extensions.py +9 -8
- {envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/envoy/code/check/abstract/glint.py +2 -3
- {envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/envoy/code/check/abstract/gofmt.py +6 -8
- {envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/envoy/code/check/abstract/rst.py +5 -6
- {envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/envoy/code/check/abstract/runtime_guards.py +2 -3
- {envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/envoy/code/check/abstract/shellcheck.py +5 -4
- {envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/envoy/code/check/abstract/yamllint.py +1 -2
- {envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/envoy/code/check/abstract/yapf.py +1 -1
- {envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/envoy/code/check/checker.py +11 -11
- {envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/envoy/code/check/interface.py +19 -1
- envoy_code_check-0.6.1/envoy.code.check.egg-info/PKG-INFO +113 -0
- envoy_code_check-0.6.1/envoy.code.check.egg-info/requires.txt +35 -0
- envoy_code_check-0.6.1/setup.py +134 -0
- envoy.code.check-0.5.14/PKG-INFO +0 -17
- envoy.code.check-0.5.14/envoy.code.check.egg-info/PKG-INFO +0 -17
- envoy.code.check-0.5.14/envoy.code.check.egg-info/requires.txt +0 -9
- envoy.code.check-0.5.14/setup.py +0 -51
- {envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/MANIFEST.in +0 -0
- {envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/backend_shim.py +0 -0
- {envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/envoy/code/check/abstract/__init__.py +0 -0
- {envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/envoy/code/check/abstract/flake8.py +0 -0
- {envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/envoy/code/check/cmd.py +0 -0
- {envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/envoy/code/check/exceptions.py +0 -0
- {envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/envoy/code/check/py.typed +0 -0
- {envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/envoy/code/check/typing.py +0 -0
- {envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/envoy.code.check.egg-info/SOURCES.txt +0 -0
- {envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/envoy.code.check.egg-info/dependency_links.txt +0 -0
- {envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/envoy.code.check.egg-info/entry_points.txt +0 -0
- {envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/envoy.code.check.egg-info/namespace_packages.txt +0 -0
- {envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/envoy.code.check.egg-info/top_level.txt +0 -0
- {envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/setup.cfg +0 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: envoy.code.check
|
|
3
|
+
Version: 0.6.1
|
|
4
|
+
Summary: Code checker used in Envoy proxy's CI
|
|
5
|
+
Home-page: https://github.com/envoyproxy/toolshed/tree/main/py/envoy.code.check
|
|
6
|
+
Author: Ryan Northey
|
|
7
|
+
Author-email: ryan@synca.io
|
|
8
|
+
Maintainer: Ryan Northey
|
|
9
|
+
Maintainer-email: ryan@synca.io
|
|
10
|
+
License: Apache Software License 2.0
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
21
|
+
Classifier: Topic :: Software Development
|
|
22
|
+
Classifier: Typing :: Typed
|
|
23
|
+
Requires-Python: >=3.12
|
|
24
|
+
Requires-Dist: abstracts==0.2.0
|
|
25
|
+
Requires-Dist: abstracts>=0.2.0
|
|
26
|
+
Requires-Dist: aio-core==0.11.0
|
|
27
|
+
Requires-Dist: aio-run-checker==0.6.0
|
|
28
|
+
Requires-Dist: aio.core>=0.11.0
|
|
29
|
+
Requires-Dist: aio.run.checker>=0.6.0
|
|
30
|
+
Requires-Dist: envoy.base.utils==0.6.1
|
|
31
|
+
Requires-Dist: envoy.base.utils>=0.6.0
|
|
32
|
+
Requires-Dist: flake8==7.3.0
|
|
33
|
+
Requires-Dist: flake8>=6.1.0
|
|
34
|
+
Requires-Dist: packaging==26.2
|
|
35
|
+
Requires-Dist: packaging>=23.0
|
|
36
|
+
Requires-Dist: pep8-naming>=0.13.3
|
|
37
|
+
Requires-Dist: types-pyyaml==6.0.12.20260508
|
|
38
|
+
Requires-Dist: yamllint==1.38.0
|
|
39
|
+
Requires-Dist: yamllint>=1.32.0
|
|
40
|
+
Requires-Dist: yapf==0.43.0
|
|
41
|
+
Requires-Dist: yapf>=0.40.2
|
|
42
|
+
Provides-Extra: test
|
|
43
|
+
Requires-Dist: pytest>=7.4.0; extra == "test"
|
|
44
|
+
Requires-Dist: pytest-asyncio>=0.23.3; extra == "test"
|
|
45
|
+
Requires-Dist: pytest-coverage; extra == "test"
|
|
46
|
+
Requires-Dist: pytest-iters>=0.1.0; extra == "test"
|
|
47
|
+
Requires-Dist: pytest-patches>=0.1.0; extra == "test"
|
|
48
|
+
Provides-Extra: lint
|
|
49
|
+
Requires-Dist: flake8>=6.1.0; extra == "lint"
|
|
50
|
+
Provides-Extra: types
|
|
51
|
+
Requires-Dist: mypy>=1.6.0; extra == "types"
|
|
52
|
+
Requires-Dist: mypy-abstracts>=0.1.0; extra == "types"
|
|
53
|
+
Provides-Extra: publish
|
|
54
|
+
Requires-Dist: wheel>=0.41.0; extra == "publish"
|
|
55
|
+
Dynamic: author
|
|
56
|
+
Dynamic: author-email
|
|
57
|
+
Dynamic: classifier
|
|
58
|
+
Dynamic: description
|
|
59
|
+
Dynamic: home-page
|
|
60
|
+
Dynamic: license
|
|
61
|
+
Dynamic: maintainer
|
|
62
|
+
Dynamic: maintainer-email
|
|
63
|
+
Dynamic: provides-extra
|
|
64
|
+
Dynamic: requires-dist
|
|
65
|
+
Dynamic: requires-python
|
|
66
|
+
Dynamic: summary
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
envoy.code.check
|
|
70
|
+
================
|
|
71
|
+
|
|
72
|
+
Code checker used in Envoy proxy's CI.
|
|
73
|
+
|
|
74
|
+
This package provides an async checker that runs source-code checks against an
|
|
75
|
+
Envoy (or Envoy-like) checkout. Registered checks include:
|
|
76
|
+
|
|
77
|
+
- ``python_flake8`` and ``python_yapf`` for Python style
|
|
78
|
+
- ``yamllint`` for YAML files
|
|
79
|
+
- ``shellcheck`` for shell scripts
|
|
80
|
+
- ``glint`` for file hygiene checks
|
|
81
|
+
- ``gofmt`` for Go formatting
|
|
82
|
+
- ``runtime_guards`` consistency checks
|
|
83
|
+
- extension metadata, registration, owner, and fuzz-coverage checks
|
|
84
|
+
- changelog validation, including RST sanity checks
|
|
85
|
+
|
|
86
|
+
Usage
|
|
87
|
+
-----
|
|
88
|
+
|
|
89
|
+
Installed as a console script:
|
|
90
|
+
|
|
91
|
+
.. code-block:: console
|
|
92
|
+
|
|
93
|
+
$ envoy.code.check --help
|
|
94
|
+
|
|
95
|
+
Run a subset of checks against a checkout:
|
|
96
|
+
|
|
97
|
+
.. code-block:: console
|
|
98
|
+
|
|
99
|
+
$ envoy.code.check --check python_flake8 python_yapf --path /path/to/envoy
|
|
100
|
+
|
|
101
|
+
Run only against files changed since a given ref:
|
|
102
|
+
|
|
103
|
+
.. code-block:: console
|
|
104
|
+
|
|
105
|
+
$ envoy.code.check --since main --path /path/to/envoy
|
|
106
|
+
|
|
107
|
+
See ``envoy.code.check --help`` for the full set of options.
|
|
108
|
+
|
|
109
|
+
Links
|
|
110
|
+
-----
|
|
111
|
+
|
|
112
|
+
- Source: https://github.com/envoyproxy/toolshed/tree/main/py/envoy.code.check
|
|
113
|
+
- Issues: https://github.com/envoyproxy/toolshed/issues
|
|
@@ -31,8 +31,8 @@ class ACodeCheck(event.AExecutive, metaclass=abstracts.Abstraction):
|
|
|
31
31
|
self._binaries = binaries
|
|
32
32
|
|
|
33
33
|
@property
|
|
34
|
-
def binaries(self):
|
|
35
|
-
return self._binaries
|
|
34
|
+
def binaries(self) -> dict[str, str]:
|
|
35
|
+
return self._binaries or {}
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
@abstracts.implementer(interface.IFileCodeCheck)
|
|
@@ -58,12 +58,12 @@ class AFileCodeCheck(ACodeCheck, metaclass=abstracts.Abstraction):
|
|
|
58
58
|
@async_property
|
|
59
59
|
@abstracts.interfacemethod
|
|
60
60
|
async def problem_files(self) -> dict[str, list[str]]:
|
|
61
|
-
"""Discovered files with
|
|
61
|
+
"""Discovered files with errors."""
|
|
62
62
|
raise NotImplementedError
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
@abstracts.implementer(interface.IProjectCodeCheck)
|
|
66
|
-
class AProjectCodeCheck(ACodeCheck,
|
|
66
|
+
class AProjectCodeCheck(ACodeCheck, metaclass=abstracts.Abstraction):
|
|
67
67
|
|
|
68
68
|
def __init__(
|
|
69
69
|
self,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
|
|
2
2
|
import itertools
|
|
3
|
+
import pathlib
|
|
3
4
|
from datetime import datetime
|
|
4
5
|
from functools import cached_property
|
|
5
|
-
from
|
|
6
|
+
from collections.abc import Iterator
|
|
6
7
|
|
|
7
8
|
from packaging import version as _version
|
|
8
9
|
|
|
@@ -11,6 +12,10 @@ import abstracts
|
|
|
11
12
|
from aio.core.functional import async_property
|
|
12
13
|
|
|
13
14
|
from envoy.base import utils
|
|
15
|
+
from envoy.base.utils.abstract.project.changelog import (
|
|
16
|
+
CHANGELOG_ENTRY_GLOB,
|
|
17
|
+
ENTRY_SEPARATOR,
|
|
18
|
+
)
|
|
14
19
|
from envoy.code.check import abstract, interface
|
|
15
20
|
|
|
16
21
|
|
|
@@ -95,6 +100,50 @@ class AChangelogChangesChecker(metaclass=abstracts.Abstraction):
|
|
|
95
100
|
f"{version}/changes: Invalid `changes` section "
|
|
96
101
|
"(this is no longer used)")
|
|
97
102
|
|
|
103
|
+
def check_entry_filename(
|
|
104
|
+
self,
|
|
105
|
+
path: pathlib.Path) -> str | None:
|
|
106
|
+
section = path.parent.name
|
|
107
|
+
if section not in self.sections:
|
|
108
|
+
return (
|
|
109
|
+
f"{path}: Invalid section `{section}`. "
|
|
110
|
+
f"Valid sections: {sorted(self.sections)}")
|
|
111
|
+
if path.suffix != ".rst":
|
|
112
|
+
return (
|
|
113
|
+
f"{path}: Invalid file extension `{path.suffix}` "
|
|
114
|
+
"(expected `.rst`)")
|
|
115
|
+
if path.stem.count(ENTRY_SEPARATOR) != 1:
|
|
116
|
+
return (
|
|
117
|
+
f"{path}: Filename stem must contain exactly one "
|
|
118
|
+
f"`{ENTRY_SEPARATOR}` separator "
|
|
119
|
+
f"(expected `<area>{ENTRY_SEPARATOR}<slug>`)")
|
|
120
|
+
area, slug = path.stem.split(ENTRY_SEPARATOR, 1)
|
|
121
|
+
if not area:
|
|
122
|
+
return f"{path}: Area part of filename is empty"
|
|
123
|
+
if not slug:
|
|
124
|
+
return f"{path}: Slug part of filename is empty"
|
|
125
|
+
return None
|
|
126
|
+
|
|
127
|
+
def check_entry_content(
|
|
128
|
+
self,
|
|
129
|
+
path: pathlib.Path) -> str | None:
|
|
130
|
+
content = path.read_text()
|
|
131
|
+
if not content.strip():
|
|
132
|
+
return (
|
|
133
|
+
f"{path}: Entry file is empty or contains only whitespace")
|
|
134
|
+
return None
|
|
135
|
+
|
|
136
|
+
def check_entry_files(
|
|
137
|
+
self,
|
|
138
|
+
paths: list[pathlib.Path]) -> tuple[str, ...]:
|
|
139
|
+
errors = []
|
|
140
|
+
for path in paths:
|
|
141
|
+
if err := self.check_entry_filename(path):
|
|
142
|
+
errors.append(err)
|
|
143
|
+
if err := self.check_entry_content(path):
|
|
144
|
+
errors.append(err)
|
|
145
|
+
return tuple(errors)
|
|
146
|
+
|
|
98
147
|
|
|
99
148
|
@abstracts.implementer(interface.IChangelogStatus)
|
|
100
149
|
class AChangelogStatus(metaclass=abstracts.Abstraction):
|
|
@@ -136,15 +185,26 @@ class AChangelogStatus(metaclass=abstracts.Abstraction):
|
|
|
136
185
|
and self.project.changelogs.changelog_path(
|
|
137
186
|
self.version).exists())
|
|
138
187
|
|
|
188
|
+
@property
|
|
189
|
+
def entry_dir(self) -> pathlib.Path | None:
|
|
190
|
+
if not self.is_current:
|
|
191
|
+
return None
|
|
192
|
+
return (
|
|
193
|
+
self.project.changelogs
|
|
194
|
+
.changelog_path(self.version)
|
|
195
|
+
.with_suffix(""))
|
|
196
|
+
|
|
139
197
|
@async_property(cache=True)
|
|
140
198
|
async def errors(self) -> tuple[str, ...]:
|
|
199
|
+
entry_errors = await self.check_entry_files()
|
|
141
200
|
try:
|
|
142
201
|
return (
|
|
143
202
|
*self.check_version(),
|
|
144
203
|
*await self.check_date(),
|
|
145
|
-
*await self.check_sections()
|
|
204
|
+
*await self.check_sections(),
|
|
205
|
+
*entry_errors)
|
|
146
206
|
except utils.exceptions.ChangelogParseError as e:
|
|
147
|
-
return (f"{self.version}: {e}"
|
|
207
|
+
return (*entry_errors, f"{self.version}: {e}")
|
|
148
208
|
|
|
149
209
|
@async_property
|
|
150
210
|
async def invalid_date(self) -> str | None:
|
|
@@ -215,6 +275,17 @@ class AChangelogStatus(metaclass=abstracts.Abstraction):
|
|
|
215
275
|
self.version,
|
|
216
276
|
await self.sections)
|
|
217
277
|
|
|
278
|
+
async def check_entry_files(self) -> tuple[str, ...]:
|
|
279
|
+
entry_dir = self.entry_dir
|
|
280
|
+
if entry_dir is None or not entry_dir.exists():
|
|
281
|
+
return ()
|
|
282
|
+
paths = sorted(entry_dir.glob(CHANGELOG_ENTRY_GLOB))
|
|
283
|
+
if not paths:
|
|
284
|
+
return ()
|
|
285
|
+
return await self.project.execute(
|
|
286
|
+
self.checker.check_entry_files,
|
|
287
|
+
paths)
|
|
288
|
+
|
|
218
289
|
def check_version(self) -> tuple[str, ...]:
|
|
219
290
|
errors = []
|
|
220
291
|
if self.duplicate_current:
|
|
@@ -4,8 +4,8 @@ import abc
|
|
|
4
4
|
import argparse
|
|
5
5
|
import pathlib
|
|
6
6
|
import re
|
|
7
|
+
from collections.abc import Mapping
|
|
7
8
|
from functools import cached_property
|
|
8
|
-
from typing import Mapping, Pattern
|
|
9
9
|
|
|
10
10
|
import yaml
|
|
11
11
|
|
|
@@ -207,11 +207,11 @@ class ACodeChecker(
|
|
|
207
207
|
raise NotImplementedError
|
|
208
208
|
|
|
209
209
|
@property
|
|
210
|
-
def grep_excluding_re(self) -> Pattern[str] | None:
|
|
210
|
+
def grep_excluding_re(self) -> re.Pattern[str] | None:
|
|
211
211
|
return self._grep_re(self.args.excluding)
|
|
212
212
|
|
|
213
213
|
@property
|
|
214
|
-
def grep_matching_re(self) -> Pattern[str] | None:
|
|
214
|
+
def grep_matching_re(self) -> re.Pattern[str] | None:
|
|
215
215
|
return self._grep_re(self.args.matching)
|
|
216
216
|
|
|
217
217
|
@property
|
|
@@ -230,7 +230,7 @@ class ACodeChecker(
|
|
|
230
230
|
|
|
231
231
|
@cached_property
|
|
232
232
|
def runtime_guards(self) -> "interface.IRuntimeGuardsCheck":
|
|
233
|
-
"""
|
|
233
|
+
"""Runtime guards checker."""
|
|
234
234
|
return self.runtime_guards_class(
|
|
235
235
|
self.project,
|
|
236
236
|
**self.check_kwargs)
|
|
@@ -302,7 +302,7 @@ class ACodeChecker(
|
|
|
302
302
|
[f"{changelog.version}"])
|
|
303
303
|
|
|
304
304
|
async def check_extensions_fuzzed(self) -> None:
|
|
305
|
-
"""Check
|
|
305
|
+
"""Check that all fuzzed extensions are accounted for."""
|
|
306
306
|
if await self.extensions.all_fuzzed:
|
|
307
307
|
self.succeed(
|
|
308
308
|
"extensions_fuzzed",
|
|
@@ -315,7 +315,7 @@ class ACodeChecker(
|
|
|
315
315
|
f"in {self.extensions.fuzz_test_path}"])
|
|
316
316
|
|
|
317
317
|
async def check_extensions_metadata(self) -> None:
|
|
318
|
-
"""Check
|
|
318
|
+
"""Check extensions metadata."""
|
|
319
319
|
errors = await self.extensions.metadata_errors
|
|
320
320
|
for extension, errors in errors.items():
|
|
321
321
|
if errors:
|
|
@@ -324,7 +324,7 @@ class ACodeChecker(
|
|
|
324
324
|
self.succeed("extensions_metadata", [f"{extension}"])
|
|
325
325
|
|
|
326
326
|
async def check_extensions_owners(self) -> None:
|
|
327
|
-
"""Check
|
|
327
|
+
"""Check extensions owners."""
|
|
328
328
|
checks = await self.extensions.owners_errors
|
|
329
329
|
for extension, errors in sorted(checks.items()):
|
|
330
330
|
if errors:
|
|
@@ -333,7 +333,7 @@ class ACodeChecker(
|
|
|
333
333
|
self.succeed("extensions_owners", [f"{extension}"])
|
|
334
334
|
|
|
335
335
|
async def check_extensions_registered(self) -> None:
|
|
336
|
-
"""Check
|
|
336
|
+
"""Check extensions are registered."""
|
|
337
337
|
if errors := await self.extensions.registration_errors:
|
|
338
338
|
self.error("extensions_registered", errors)
|
|
339
339
|
else:
|
|
@@ -359,7 +359,8 @@ class ACodeChecker(
|
|
|
359
359
|
await self._code_check(self.yapf)
|
|
360
360
|
|
|
361
361
|
async def check_runtime_guards(self) -> None:
|
|
362
|
-
"""Check
|
|
362
|
+
"""Check runtime guards."""
|
|
363
|
+
|
|
363
364
|
async for guard, status in self.runtime_guards.status:
|
|
364
365
|
if status is None:
|
|
365
366
|
self.log.info(f"Ignoring runtime guard: {guard}")
|
|
@@ -477,7 +478,7 @@ class ACodeChecker(
|
|
|
477
478
|
await check.files,
|
|
478
479
|
await check.problem_files)
|
|
479
480
|
|
|
480
|
-
def _grep_re(self, arg: str | None) -> Pattern[str] | None:
|
|
481
|
+
def _grep_re(self, arg: str | None) -> re.Pattern[str] | None:
|
|
481
482
|
# When using system `grep` we want to filter out at least some
|
|
482
483
|
# of the files that .gitignore would.
|
|
483
484
|
# TODO: use globs on cli and covert to re here
|
|
@@ -6,7 +6,7 @@ import logging
|
|
|
6
6
|
import pathlib
|
|
7
7
|
import re
|
|
8
8
|
from functools import cached_property
|
|
9
|
-
from typing import Any, cast
|
|
9
|
+
from typing import Any, cast
|
|
10
10
|
|
|
11
11
|
import yaml as _yaml
|
|
12
12
|
|
|
@@ -45,6 +45,7 @@ UPSTREAM_EXTENSION_CATEGORY = "envoy.filters.http.upstream"
|
|
|
45
45
|
@abstracts.implementer(interface.IExtensionsCheck)
|
|
46
46
|
class AExtensionsCheck(abstract.ACodeCheck, metaclass=abstracts.Abstraction):
|
|
47
47
|
"""Extensions check."""
|
|
48
|
+
|
|
48
49
|
_owners_min_default: int = OWNERS_MIN_DEFAULT
|
|
49
50
|
|
|
50
51
|
def __init__(
|
|
@@ -77,15 +78,15 @@ class AExtensionsCheck(abstract.ACodeCheck, metaclass=abstracts.Abstraction):
|
|
|
77
78
|
return self.extensions_schema["builtin"]
|
|
78
79
|
|
|
79
80
|
@cached_property
|
|
80
|
-
def codeowner_re(self) -> Pattern[str]:
|
|
81
|
+
def codeowner_re(self) -> re.Pattern[str]:
|
|
81
82
|
return re.compile(CODEOWNER_RE)
|
|
82
83
|
|
|
83
84
|
@cached_property
|
|
84
|
-
def codeowners_contrib_re(self) -> Pattern[str]:
|
|
85
|
+
def codeowners_contrib_re(self) -> re.Pattern[str]:
|
|
85
86
|
return re.compile(CODEOWNERS_CONTRIB_RE)
|
|
86
87
|
|
|
87
88
|
@cached_property
|
|
88
|
-
def codeowners_extensions_re(self) -> Pattern[str]:
|
|
89
|
+
def codeowners_extensions_re(self) -> re.Pattern[str]:
|
|
89
90
|
return re.compile(CODEOWNERS_EXTENSIONS_RE)
|
|
90
91
|
|
|
91
92
|
@cached_property
|
|
@@ -160,7 +161,7 @@ class AExtensionsCheck(abstract.ACodeCheck, metaclass=abstracts.Abstraction):
|
|
|
160
161
|
return maintainers
|
|
161
162
|
|
|
162
163
|
@cached_property
|
|
163
|
-
def maintainers_re(self) -> Pattern[str]:
|
|
164
|
+
def maintainers_re(self) -> re.Pattern[str]:
|
|
164
165
|
return re.compile(MAINTAINERS_RE)
|
|
165
166
|
|
|
166
167
|
@async_property(cache=True)
|
|
@@ -276,7 +277,7 @@ class AExtensionsCheck(abstract.ACodeCheck, metaclass=abstracts.Abstraction):
|
|
|
276
277
|
+ tuple(self.owned["contrib"].keys()))
|
|
277
278
|
|
|
278
279
|
@cached_property
|
|
279
|
-
def tracked_ownership_re(self) -> Pattern[str]:
|
|
280
|
+
def tracked_ownership_re(self) -> re.Pattern[str]:
|
|
280
281
|
return re.compile(TRACKED_OWNERSHIP_RE)
|
|
281
282
|
|
|
282
283
|
async def check_metadata(self, extension: str) -> tuple[str, ...]:
|
|
@@ -324,7 +325,7 @@ class AExtensionsCheck(abstract.ACodeCheck, metaclass=abstracts.Abstraction):
|
|
|
324
325
|
"and category is set", )
|
|
325
326
|
return tuple(
|
|
326
327
|
(f"Unknown extension category for {extension}: {cat}. "
|
|
327
|
-
"Please add it to
|
|
328
|
+
f"Please add it to {EXTENSIONS_SCHEMA}")
|
|
328
329
|
for cat
|
|
329
330
|
in categories
|
|
330
331
|
if cat not in self.extension_categories)
|
|
@@ -456,7 +457,7 @@ class AExtensionsCheck(abstract.ACodeCheck, metaclass=abstracts.Abstraction):
|
|
|
456
457
|
self,
|
|
457
458
|
line: str,
|
|
458
459
|
matcher: (
|
|
459
|
-
Pattern[str] | None) = None) -> dict[str, dict[str, set]]:
|
|
460
|
+
re.Pattern[str] | None) = None) -> dict[str, dict[str, set]]:
|
|
460
461
|
if line.startswith('#'):
|
|
461
462
|
return {}
|
|
462
463
|
m = (matcher or self.codeowners_extensions_re).search(line)
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
import asyncio
|
|
3
3
|
import pathlib
|
|
4
4
|
import re
|
|
5
|
+
from collections.abc import Callable, Iterable, Iterator
|
|
5
6
|
from functools import cached_property, partial
|
|
6
|
-
from typing import (
|
|
7
|
-
Callable, Iterable, Iterator, Pattern)
|
|
8
7
|
|
|
9
8
|
import abstracts
|
|
10
9
|
|
|
@@ -109,7 +108,7 @@ class AGlintCheck(abstract.AFileCodeCheck, metaclass=abstracts.Abstraction):
|
|
|
109
108
|
target=await self.files)
|
|
110
109
|
|
|
111
110
|
@cached_property
|
|
112
|
-
def noglint_re(self) -> Pattern[str]:
|
|
111
|
+
def noglint_re(self) -> re.Pattern[str]:
|
|
113
112
|
"""Regex for matching files that should not be checked."""
|
|
114
113
|
return re.compile(r"|".join(NOGLINT_RE))
|
|
115
114
|
|
|
@@ -5,7 +5,6 @@ import re
|
|
|
5
5
|
import shutil
|
|
6
6
|
import subprocess
|
|
7
7
|
from functools import cached_property, partial
|
|
8
|
-
from typing import Pattern
|
|
9
8
|
|
|
10
9
|
import abstracts
|
|
11
10
|
|
|
@@ -40,14 +39,13 @@ class Gofmt(_subprocess.ASubprocessHandler):
|
|
|
40
39
|
"""Handle response for `gofmt -d`.
|
|
41
40
|
|
|
42
41
|
As `gofmt` is called with multiple files, we need to parse the
|
|
43
|
-
diff line-by-line to match the diff content with the file that
|
|
44
|
-
generated it.
|
|
42
|
+
diff line-by-line to match the diff content with the file that
|
|
43
|
+
has generated it.
|
|
45
44
|
|
|
46
45
|
Returns the parsed or provided `filename`. If this is empty, or
|
|
47
|
-
doesnt match the files that we called `gofmt` with then
|
|
48
|
-
gone wrong.
|
|
46
|
+
doesnt match the files that we called `gofmt` with then
|
|
47
|
+
something has gone wrong.
|
|
49
48
|
"""
|
|
50
|
-
|
|
51
49
|
result: typing.ProblemDict = dict()
|
|
52
50
|
if not response.stdout:
|
|
53
51
|
return result
|
|
@@ -105,7 +103,7 @@ class AGofmtCheck(abstract.AFileCodeCheck, metaclass=abstracts.Abstraction):
|
|
|
105
103
|
def filter_files(
|
|
106
104
|
cls,
|
|
107
105
|
files: set[str],
|
|
108
|
-
exclude: Pattern[str] | None) -> set[str]:
|
|
106
|
+
exclude: re.Pattern[str] | None) -> set[str]:
|
|
109
107
|
"""Filter files for `gofmt` checking."""
|
|
110
108
|
return set(
|
|
111
109
|
path
|
|
@@ -187,7 +185,7 @@ class AGofmtCheck(abstract.AFileCodeCheck, metaclass=abstracts.Abstraction):
|
|
|
187
185
|
return self._gofmt("-l")
|
|
188
186
|
|
|
189
187
|
@cached_property
|
|
190
|
-
def nogofmt_re(self) -> Pattern[str] | None:
|
|
188
|
+
def nogofmt_re(self) -> re.Pattern[str] | None:
|
|
191
189
|
"""Regex for matching files that should not be checked."""
|
|
192
190
|
# TODO(phlax): merge e.c.c config
|
|
193
191
|
if not NOGOFMT_RE:
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import re
|
|
3
3
|
from functools import cached_property
|
|
4
|
-
from typing import Pattern
|
|
5
4
|
|
|
6
5
|
import abstracts
|
|
7
6
|
|
|
@@ -31,15 +30,15 @@ class ABackticksCheck(metaclass=abstracts.Abstraction):
|
|
|
31
30
|
else None)
|
|
32
31
|
|
|
33
32
|
@cached_property
|
|
34
|
-
def link_ticks_re(self) -> Pattern[str]:
|
|
33
|
+
def link_ticks_re(self) -> re.Pattern[str]:
|
|
35
34
|
return re.compile(LINK_TICKS_RE)
|
|
36
35
|
|
|
37
36
|
@cached_property
|
|
38
|
-
def ref_ticks_re(self) -> Pattern[str]:
|
|
37
|
+
def ref_ticks_re(self) -> re.Pattern[str]:
|
|
39
38
|
return re.compile(REF_TICKS_RE)
|
|
40
39
|
|
|
41
40
|
@cached_property
|
|
42
|
-
def single_tick_re(self) -> Pattern[str]:
|
|
41
|
+
def single_tick_re(self) -> re.Pattern[str]:
|
|
43
42
|
return re.compile(SINGLE_TICK_RE)
|
|
44
43
|
|
|
45
44
|
def _find_single_ticks(
|
|
@@ -70,7 +69,7 @@ class AReflinksCheck(metaclass=abstracts.Abstraction):
|
|
|
70
69
|
else None)
|
|
71
70
|
|
|
72
71
|
@cached_property
|
|
73
|
-
def invalid_reflink_re(self) -> Pattern[str]:
|
|
72
|
+
def invalid_reflink_re(self) -> re.Pattern[str]:
|
|
74
73
|
return re.compile(INVALID_REFLINK_RE)
|
|
75
74
|
|
|
76
75
|
|
|
@@ -85,7 +84,7 @@ class APunctuationCheck(metaclass=abstracts.Abstraction):
|
|
|
85
84
|
else None)
|
|
86
85
|
|
|
87
86
|
@cached_property
|
|
88
|
-
def punctuation_re(self) -> Pattern[str]:
|
|
87
|
+
def punctuation_re(self) -> re.Pattern[str]:
|
|
89
88
|
return re.compile(PUNCTUATION_RE, re.DOTALL)
|
|
90
89
|
|
|
91
90
|
def _check_punctuation(
|
{envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/envoy/code/check/abstract/runtime_guards.py
RENAMED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
#
|
|
2
2
|
import re
|
|
3
|
+
from collections.abc import AsyncIterator, Awaitable, Iterable
|
|
3
4
|
from functools import cached_property
|
|
4
|
-
from typing import (
|
|
5
|
-
AsyncIterator, Awaitable, Iterable, Pattern)
|
|
6
5
|
|
|
7
6
|
import abstracts
|
|
8
7
|
|
|
@@ -56,7 +55,7 @@ class ARuntimeGuardsCheck(
|
|
|
56
55
|
- self.expected_missing)
|
|
57
56
|
|
|
58
57
|
@cached_property
|
|
59
|
-
def reloadable_match_re(self) -> Pattern:
|
|
58
|
+
def reloadable_match_re(self) -> re.Pattern:
|
|
60
59
|
return re.compile(RELOADABLE_MATCH_RE)
|
|
61
60
|
|
|
62
61
|
@async_property
|
|
@@ -4,8 +4,9 @@ import pathlib
|
|
|
4
4
|
import re
|
|
5
5
|
import shutil
|
|
6
6
|
import subprocess
|
|
7
|
+
from collections.abc import Iterator
|
|
7
8
|
from functools import cached_property, partial
|
|
8
|
-
from typing import
|
|
9
|
+
from typing import TypedDict
|
|
9
10
|
|
|
10
11
|
import abstracts
|
|
11
12
|
|
|
@@ -39,7 +40,7 @@ class ShellcheckErrorDict(TypedDict):
|
|
|
39
40
|
class Shellcheck(_subprocess.ASubprocessHandler):
|
|
40
41
|
|
|
41
42
|
@cached_property
|
|
42
|
-
def error_line_re(self) -> Pattern[str]:
|
|
43
|
+
def error_line_re(self) -> re.Pattern[str]:
|
|
43
44
|
"""Regex for matching a shellcheck error line.
|
|
44
45
|
|
|
45
46
|
This demarcates the beginning of a specific error for a file.
|
|
@@ -145,12 +146,12 @@ class AShellcheckCheck(
|
|
|
145
146
|
| await self.shebang_files)
|
|
146
147
|
|
|
147
148
|
@cached_property
|
|
148
|
-
def path_match_exclude_re(self) -> Pattern[str]:
|
|
149
|
+
def path_match_exclude_re(self) -> re.Pattern[str]:
|
|
149
150
|
"""Regex to match files not to check."""
|
|
150
151
|
return re.compile("|".join(SHELLCHECK_NOMATCH_RE))
|
|
151
152
|
|
|
152
153
|
@cached_property
|
|
153
|
-
def path_match_re(self) -> Pattern[str]:
|
|
154
|
+
def path_match_re(self) -> re.Pattern[str]:
|
|
154
155
|
"""Regex to match files to check."""
|
|
155
156
|
return re.compile("|".join(SHELLCHECK_MATCH_RE))
|
|
156
157
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
import io
|
|
3
3
|
import pathlib
|
|
4
|
+
from collections.abc import AsyncIterator, Generator, Iterator
|
|
4
5
|
from functools import cached_property, partial
|
|
5
|
-
from typing import (
|
|
6
|
-
AsyncIterator, Generator, Iterator)
|
|
7
6
|
|
|
8
7
|
import yaml
|
|
9
8
|
from yamllint import linter # type:ignore
|
|
@@ -98,27 +98,27 @@ class ChangelogCheck(abstract.AChangelogCheck):
|
|
|
98
98
|
class CodeChecker(abstract.ACodeChecker):
|
|
99
99
|
|
|
100
100
|
@property
|
|
101
|
-
def extensions_class(self):
|
|
101
|
+
def extensions_class(self) -> type[ExtensionsCheck]:
|
|
102
102
|
return ExtensionsCheck
|
|
103
103
|
|
|
104
104
|
@property
|
|
105
|
-
def flake8_class(self):
|
|
105
|
+
def flake8_class(self) -> type[Flake8Check]:
|
|
106
106
|
return Flake8Check
|
|
107
107
|
|
|
108
108
|
@property
|
|
109
|
-
def fs_directory_class(self):
|
|
109
|
+
def fs_directory_class(self) -> type[directory.Directory]:
|
|
110
110
|
return directory.Directory
|
|
111
111
|
|
|
112
112
|
@property
|
|
113
|
-
def git_directory_class(self):
|
|
113
|
+
def git_directory_class(self) -> type[directory.GitDirectory]:
|
|
114
114
|
return directory.GitDirectory
|
|
115
115
|
|
|
116
116
|
@property
|
|
117
|
-
def glint_class(self):
|
|
117
|
+
def glint_class(self) -> type[GlintCheck]:
|
|
118
118
|
return GlintCheck
|
|
119
119
|
|
|
120
120
|
@property
|
|
121
|
-
def gofmt_class(self):
|
|
121
|
+
def gofmt_class(self) -> type[GofmtCheck]:
|
|
122
122
|
return GofmtCheck
|
|
123
123
|
|
|
124
124
|
@cached_property
|
|
@@ -130,21 +130,21 @@ class CodeChecker(abstract.ACodeChecker):
|
|
|
130
130
|
return Project
|
|
131
131
|
|
|
132
132
|
@property
|
|
133
|
-
def runtime_guards_class(self):
|
|
133
|
+
def runtime_guards_class(self) -> type[RuntimeGuardsCheck]:
|
|
134
134
|
return RuntimeGuardsCheck
|
|
135
135
|
|
|
136
136
|
@property
|
|
137
|
-
def shellcheck_class(self):
|
|
137
|
+
def shellcheck_class(self) -> type[ShellcheckCheck]:
|
|
138
138
|
return ShellcheckCheck
|
|
139
139
|
|
|
140
140
|
@property
|
|
141
|
-
def changelog_class(self):
|
|
141
|
+
def changelog_class(self) -> type[ChangelogCheck]:
|
|
142
142
|
return ChangelogCheck
|
|
143
143
|
|
|
144
144
|
@property
|
|
145
|
-
def yapf_class(self):
|
|
145
|
+
def yapf_class(self) -> type[YapfCheck]:
|
|
146
146
|
return YapfCheck
|
|
147
147
|
|
|
148
148
|
@property
|
|
149
|
-
def yamllint_class(self):
|
|
149
|
+
def yamllint_class(self) -> type[YamllintCheck]:
|
|
150
150
|
return YamllintCheck
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import asyncio
|
|
3
3
|
import pathlib
|
|
4
4
|
from concurrent import futures
|
|
5
|
-
from
|
|
5
|
+
from collections.abc import AsyncIterator, Iterator
|
|
6
6
|
|
|
7
7
|
from packaging import version as _version
|
|
8
8
|
|
|
@@ -138,6 +138,24 @@ class IChangelogChangesChecker(metaclass=abstracts.Interface):
|
|
|
138
138
|
tuple[str, ...]):
|
|
139
139
|
raise NotImplementedError
|
|
140
140
|
|
|
141
|
+
@abstracts.interfacemethod
|
|
142
|
+
def check_entry_filename(
|
|
143
|
+
self,
|
|
144
|
+
path: pathlib.Path) -> str | None:
|
|
145
|
+
raise NotImplementedError
|
|
146
|
+
|
|
147
|
+
@abstracts.interfacemethod
|
|
148
|
+
def check_entry_content(
|
|
149
|
+
self,
|
|
150
|
+
path: pathlib.Path) -> str | None:
|
|
151
|
+
raise NotImplementedError
|
|
152
|
+
|
|
153
|
+
@abstracts.interfacemethod
|
|
154
|
+
def check_entry_files(
|
|
155
|
+
self,
|
|
156
|
+
paths: list[pathlib.Path]) -> tuple[str, ...]:
|
|
157
|
+
raise NotImplementedError
|
|
158
|
+
|
|
141
159
|
|
|
142
160
|
class IChangelogStatus(metaclass=abstracts.Interface):
|
|
143
161
|
pass
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: envoy.code.check
|
|
3
|
+
Version: 0.6.1
|
|
4
|
+
Summary: Code checker used in Envoy proxy's CI
|
|
5
|
+
Home-page: https://github.com/envoyproxy/toolshed/tree/main/py/envoy.code.check
|
|
6
|
+
Author: Ryan Northey
|
|
7
|
+
Author-email: ryan@synca.io
|
|
8
|
+
Maintainer: Ryan Northey
|
|
9
|
+
Maintainer-email: ryan@synca.io
|
|
10
|
+
License: Apache Software License 2.0
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
21
|
+
Classifier: Topic :: Software Development
|
|
22
|
+
Classifier: Typing :: Typed
|
|
23
|
+
Requires-Python: >=3.12
|
|
24
|
+
Requires-Dist: abstracts==0.2.0
|
|
25
|
+
Requires-Dist: abstracts>=0.2.0
|
|
26
|
+
Requires-Dist: aio-core==0.11.0
|
|
27
|
+
Requires-Dist: aio-run-checker==0.6.0
|
|
28
|
+
Requires-Dist: aio.core>=0.11.0
|
|
29
|
+
Requires-Dist: aio.run.checker>=0.6.0
|
|
30
|
+
Requires-Dist: envoy.base.utils==0.6.1
|
|
31
|
+
Requires-Dist: envoy.base.utils>=0.6.0
|
|
32
|
+
Requires-Dist: flake8==7.3.0
|
|
33
|
+
Requires-Dist: flake8>=6.1.0
|
|
34
|
+
Requires-Dist: packaging==26.2
|
|
35
|
+
Requires-Dist: packaging>=23.0
|
|
36
|
+
Requires-Dist: pep8-naming>=0.13.3
|
|
37
|
+
Requires-Dist: types-pyyaml==6.0.12.20260508
|
|
38
|
+
Requires-Dist: yamllint==1.38.0
|
|
39
|
+
Requires-Dist: yamllint>=1.32.0
|
|
40
|
+
Requires-Dist: yapf==0.43.0
|
|
41
|
+
Requires-Dist: yapf>=0.40.2
|
|
42
|
+
Provides-Extra: test
|
|
43
|
+
Requires-Dist: pytest>=7.4.0; extra == "test"
|
|
44
|
+
Requires-Dist: pytest-asyncio>=0.23.3; extra == "test"
|
|
45
|
+
Requires-Dist: pytest-coverage; extra == "test"
|
|
46
|
+
Requires-Dist: pytest-iters>=0.1.0; extra == "test"
|
|
47
|
+
Requires-Dist: pytest-patches>=0.1.0; extra == "test"
|
|
48
|
+
Provides-Extra: lint
|
|
49
|
+
Requires-Dist: flake8>=6.1.0; extra == "lint"
|
|
50
|
+
Provides-Extra: types
|
|
51
|
+
Requires-Dist: mypy>=1.6.0; extra == "types"
|
|
52
|
+
Requires-Dist: mypy-abstracts>=0.1.0; extra == "types"
|
|
53
|
+
Provides-Extra: publish
|
|
54
|
+
Requires-Dist: wheel>=0.41.0; extra == "publish"
|
|
55
|
+
Dynamic: author
|
|
56
|
+
Dynamic: author-email
|
|
57
|
+
Dynamic: classifier
|
|
58
|
+
Dynamic: description
|
|
59
|
+
Dynamic: home-page
|
|
60
|
+
Dynamic: license
|
|
61
|
+
Dynamic: maintainer
|
|
62
|
+
Dynamic: maintainer-email
|
|
63
|
+
Dynamic: provides-extra
|
|
64
|
+
Dynamic: requires-dist
|
|
65
|
+
Dynamic: requires-python
|
|
66
|
+
Dynamic: summary
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
envoy.code.check
|
|
70
|
+
================
|
|
71
|
+
|
|
72
|
+
Code checker used in Envoy proxy's CI.
|
|
73
|
+
|
|
74
|
+
This package provides an async checker that runs source-code checks against an
|
|
75
|
+
Envoy (or Envoy-like) checkout. Registered checks include:
|
|
76
|
+
|
|
77
|
+
- ``python_flake8`` and ``python_yapf`` for Python style
|
|
78
|
+
- ``yamllint`` for YAML files
|
|
79
|
+
- ``shellcheck`` for shell scripts
|
|
80
|
+
- ``glint`` for file hygiene checks
|
|
81
|
+
- ``gofmt`` for Go formatting
|
|
82
|
+
- ``runtime_guards`` consistency checks
|
|
83
|
+
- extension metadata, registration, owner, and fuzz-coverage checks
|
|
84
|
+
- changelog validation, including RST sanity checks
|
|
85
|
+
|
|
86
|
+
Usage
|
|
87
|
+
-----
|
|
88
|
+
|
|
89
|
+
Installed as a console script:
|
|
90
|
+
|
|
91
|
+
.. code-block:: console
|
|
92
|
+
|
|
93
|
+
$ envoy.code.check --help
|
|
94
|
+
|
|
95
|
+
Run a subset of checks against a checkout:
|
|
96
|
+
|
|
97
|
+
.. code-block:: console
|
|
98
|
+
|
|
99
|
+
$ envoy.code.check --check python_flake8 python_yapf --path /path/to/envoy
|
|
100
|
+
|
|
101
|
+
Run only against files changed since a given ref:
|
|
102
|
+
|
|
103
|
+
.. code-block:: console
|
|
104
|
+
|
|
105
|
+
$ envoy.code.check --since main --path /path/to/envoy
|
|
106
|
+
|
|
107
|
+
See ``envoy.code.check --help`` for the full set of options.
|
|
108
|
+
|
|
109
|
+
Links
|
|
110
|
+
-----
|
|
111
|
+
|
|
112
|
+
- Source: https://github.com/envoyproxy/toolshed/tree/main/py/envoy.code.check
|
|
113
|
+
- Issues: https://github.com/envoyproxy/toolshed/issues
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
abstracts==0.2.0
|
|
2
|
+
abstracts>=0.2.0
|
|
3
|
+
aio-core==0.11.0
|
|
4
|
+
aio-run-checker==0.6.0
|
|
5
|
+
aio.core>=0.11.0
|
|
6
|
+
aio.run.checker>=0.6.0
|
|
7
|
+
envoy.base.utils==0.6.1
|
|
8
|
+
envoy.base.utils>=0.6.0
|
|
9
|
+
flake8==7.3.0
|
|
10
|
+
flake8>=6.1.0
|
|
11
|
+
packaging==26.2
|
|
12
|
+
packaging>=23.0
|
|
13
|
+
pep8-naming>=0.13.3
|
|
14
|
+
types-pyyaml==6.0.12.20260508
|
|
15
|
+
yamllint==1.38.0
|
|
16
|
+
yamllint>=1.32.0
|
|
17
|
+
yapf==0.43.0
|
|
18
|
+
yapf>=0.40.2
|
|
19
|
+
|
|
20
|
+
[lint]
|
|
21
|
+
flake8>=6.1.0
|
|
22
|
+
|
|
23
|
+
[publish]
|
|
24
|
+
wheel>=0.41.0
|
|
25
|
+
|
|
26
|
+
[test]
|
|
27
|
+
pytest>=7.4.0
|
|
28
|
+
pytest-asyncio>=0.23.3
|
|
29
|
+
pytest-coverage
|
|
30
|
+
pytest-iters>=0.1.0
|
|
31
|
+
pytest-patches>=0.1.0
|
|
32
|
+
|
|
33
|
+
[types]
|
|
34
|
+
mypy>=1.6.0
|
|
35
|
+
mypy-abstracts>=0.1.0
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
|
|
2
|
+
# DO NOT EDIT THIS FILE -- AUTOGENERATED BY PANTS
|
|
3
|
+
# Target: py/envoy.code.check:package
|
|
4
|
+
|
|
5
|
+
from setuptools import setup
|
|
6
|
+
|
|
7
|
+
setup(**{
|
|
8
|
+
'author': 'Ryan Northey',
|
|
9
|
+
'author_email': 'ryan@synca.io',
|
|
10
|
+
'classifiers': [
|
|
11
|
+
'Development Status :: 4 - Beta',
|
|
12
|
+
'Intended Audience :: Developers',
|
|
13
|
+
'License :: OSI Approved :: Apache Software License',
|
|
14
|
+
'Operating System :: OS Independent',
|
|
15
|
+
'Programming Language :: Python',
|
|
16
|
+
'Programming Language :: Python :: 3',
|
|
17
|
+
'Programming Language :: Python :: 3 :: Only',
|
|
18
|
+
'Programming Language :: Python :: 3.12',
|
|
19
|
+
'Programming Language :: Python :: 3.13',
|
|
20
|
+
'Programming Language :: Python :: Implementation :: CPython',
|
|
21
|
+
'Topic :: Software Development',
|
|
22
|
+
'Typing :: Typed',
|
|
23
|
+
],
|
|
24
|
+
'description': 'Code checker used in Envoy proxy\'s CI',
|
|
25
|
+
'entry_points': {
|
|
26
|
+
'console_scripts': [
|
|
27
|
+
'envoy.code.check=envoy.code.check:run',
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
'extras_require': {
|
|
31
|
+
'test': [
|
|
32
|
+
'pytest>=7.4.0',
|
|
33
|
+
'pytest-asyncio>=0.23.3',
|
|
34
|
+
'pytest-coverage',
|
|
35
|
+
'pytest-iters>=0.1.0',
|
|
36
|
+
'pytest-patches>=0.1.0',
|
|
37
|
+
],
|
|
38
|
+
'lint': [
|
|
39
|
+
'flake8>=6.1.0',
|
|
40
|
+
],
|
|
41
|
+
'types': [
|
|
42
|
+
'mypy>=1.6.0',
|
|
43
|
+
'mypy-abstracts>=0.1.0',
|
|
44
|
+
],
|
|
45
|
+
'publish': [
|
|
46
|
+
'wheel>=0.41.0',
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
'install_requires': (
|
|
50
|
+
'abstracts==0.2.0',
|
|
51
|
+
'abstracts>=0.2.0',
|
|
52
|
+
'aio-core==0.11.0',
|
|
53
|
+
'aio-run-checker==0.6.0',
|
|
54
|
+
'aio.core>=0.11.0',
|
|
55
|
+
'aio.run.checker>=0.6.0',
|
|
56
|
+
'envoy.base.utils==0.6.1',
|
|
57
|
+
'envoy.base.utils>=0.6.0',
|
|
58
|
+
'flake8==7.3.0',
|
|
59
|
+
'flake8>=6.1.0',
|
|
60
|
+
'packaging==26.2',
|
|
61
|
+
'packaging>=23.0',
|
|
62
|
+
'pep8-naming>=0.13.3',
|
|
63
|
+
'types-pyyaml==6.0.12.20260508',
|
|
64
|
+
'yamllint==1.38.0',
|
|
65
|
+
'yamllint>=1.32.0',
|
|
66
|
+
'yapf==0.43.0',
|
|
67
|
+
'yapf>=0.40.2',
|
|
68
|
+
),
|
|
69
|
+
'license': 'Apache Software License 2.0',
|
|
70
|
+
'long_description': """
|
|
71
|
+
envoy.code.check
|
|
72
|
+
================
|
|
73
|
+
|
|
74
|
+
Code checker used in Envoy proxy's CI.
|
|
75
|
+
|
|
76
|
+
This package provides an async checker that runs source-code checks against an
|
|
77
|
+
Envoy (or Envoy-like) checkout. Registered checks include:
|
|
78
|
+
|
|
79
|
+
- ``python_flake8`` and ``python_yapf`` for Python style
|
|
80
|
+
- ``yamllint`` for YAML files
|
|
81
|
+
- ``shellcheck`` for shell scripts
|
|
82
|
+
- ``glint`` for file hygiene checks
|
|
83
|
+
- ``gofmt`` for Go formatting
|
|
84
|
+
- ``runtime_guards`` consistency checks
|
|
85
|
+
- extension metadata, registration, owner, and fuzz-coverage checks
|
|
86
|
+
- changelog validation, including RST sanity checks
|
|
87
|
+
|
|
88
|
+
Usage
|
|
89
|
+
-----
|
|
90
|
+
|
|
91
|
+
Installed as a console script:
|
|
92
|
+
|
|
93
|
+
.. code-block:: console
|
|
94
|
+
|
|
95
|
+
$ envoy.code.check --help
|
|
96
|
+
|
|
97
|
+
Run a subset of checks against a checkout:
|
|
98
|
+
|
|
99
|
+
.. code-block:: console
|
|
100
|
+
|
|
101
|
+
$ envoy.code.check --check python_flake8 python_yapf --path /path/to/envoy
|
|
102
|
+
|
|
103
|
+
Run only against files changed since a given ref:
|
|
104
|
+
|
|
105
|
+
.. code-block:: console
|
|
106
|
+
|
|
107
|
+
$ envoy.code.check --since main --path /path/to/envoy
|
|
108
|
+
|
|
109
|
+
See ``envoy.code.check --help`` for the full set of options.
|
|
110
|
+
|
|
111
|
+
Links
|
|
112
|
+
-----
|
|
113
|
+
|
|
114
|
+
- Source: https://github.com/envoyproxy/toolshed/tree/main/py/envoy.code.check
|
|
115
|
+
- Issues: https://github.com/envoyproxy/toolshed/issues
|
|
116
|
+
""",
|
|
117
|
+
'maintainer': 'Ryan Northey',
|
|
118
|
+
'maintainer_email': 'ryan@synca.io',
|
|
119
|
+
'name': 'envoy.code.check',
|
|
120
|
+
'namespace_packages': (
|
|
121
|
+
),
|
|
122
|
+
'package_data': {
|
|
123
|
+
'envoy.code.check': (
|
|
124
|
+
'py.typed',
|
|
125
|
+
),
|
|
126
|
+
},
|
|
127
|
+
'packages': (
|
|
128
|
+
'envoy.code.check',
|
|
129
|
+
'envoy.code.check.abstract',
|
|
130
|
+
),
|
|
131
|
+
'python_requires': '>=3.12',
|
|
132
|
+
'url': 'https://github.com/envoyproxy/toolshed/tree/main/py/envoy.code.check',
|
|
133
|
+
'version': '0.6.1',
|
|
134
|
+
})
|
envoy.code.check-0.5.14/PKG-INFO
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: envoy.code.check
|
|
3
|
-
Version: 0.5.14
|
|
4
|
-
Summary: "Code checker used in Envoy proxy's CI"
|
|
5
|
-
Home-page: https://github.com/envoyproxy/toolshed/tree/main/envoy.code.check
|
|
6
|
-
Author: Ryan Northey
|
|
7
|
-
Author-email: ryan@synca.io
|
|
8
|
-
Maintainer: Ryan Northey
|
|
9
|
-
Maintainer-email: ryan@synca.io
|
|
10
|
-
License: Apache Software License 2.0
|
|
11
|
-
Requires-Python: >=3.10.0
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
envoy.code.check
|
|
15
|
-
================
|
|
16
|
-
|
|
17
|
-
Code checker used in Envoy proxy's CI
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: envoy.code.check
|
|
3
|
-
Version: 0.5.14
|
|
4
|
-
Summary: "Code checker used in Envoy proxy's CI"
|
|
5
|
-
Home-page: https://github.com/envoyproxy/toolshed/tree/main/envoy.code.check
|
|
6
|
-
Author: Ryan Northey
|
|
7
|
-
Author-email: ryan@synca.io
|
|
8
|
-
Maintainer: Ryan Northey
|
|
9
|
-
Maintainer-email: ryan@synca.io
|
|
10
|
-
License: Apache Software License 2.0
|
|
11
|
-
Requires-Python: >=3.10.0
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
envoy.code.check
|
|
15
|
-
================
|
|
16
|
-
|
|
17
|
-
Code checker used in Envoy proxy's CI
|
envoy.code.check-0.5.14/setup.py
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# DO NOT EDIT THIS FILE -- AUTOGENERATED BY PANTS
|
|
3
|
-
# Target: envoy.code.check:package
|
|
4
|
-
|
|
5
|
-
from setuptools import setup
|
|
6
|
-
|
|
7
|
-
setup(**{
|
|
8
|
-
'author': 'Ryan Northey',
|
|
9
|
-
'author_email': 'ryan@synca.io',
|
|
10
|
-
'description': '"Code checker used in Envoy proxy\'s CI"',
|
|
11
|
-
'entry_points': {
|
|
12
|
-
'console_scripts': [
|
|
13
|
-
'envoy.code.check=envoy.code.check:run',
|
|
14
|
-
],
|
|
15
|
-
},
|
|
16
|
-
'install_requires': (
|
|
17
|
-
'abstracts>=0.0.12',
|
|
18
|
-
'aio.core>=0.10.5',
|
|
19
|
-
'aio.run.checker>=0.5.8',
|
|
20
|
-
'envoy.base.utils>=0.4.7',
|
|
21
|
-
'flake8>=6',
|
|
22
|
-
'packaging>=23.0',
|
|
23
|
-
'types-pyyaml',
|
|
24
|
-
'yamllint',
|
|
25
|
-
'yapf',
|
|
26
|
-
),
|
|
27
|
-
'license': 'Apache Software License 2.0',
|
|
28
|
-
'long_description': """
|
|
29
|
-
envoy.code.check
|
|
30
|
-
================
|
|
31
|
-
|
|
32
|
-
Code checker used in Envoy proxy's CI
|
|
33
|
-
""",
|
|
34
|
-
'maintainer': 'Ryan Northey',
|
|
35
|
-
'maintainer_email': 'ryan@synca.io',
|
|
36
|
-
'name': 'envoy.code.check',
|
|
37
|
-
'namespace_packages': (
|
|
38
|
-
),
|
|
39
|
-
'package_data': {
|
|
40
|
-
'envoy.code.check': (
|
|
41
|
-
'py.typed',
|
|
42
|
-
),
|
|
43
|
-
},
|
|
44
|
-
'packages': (
|
|
45
|
-
'envoy.code.check',
|
|
46
|
-
'envoy.code.check.abstract',
|
|
47
|
-
),
|
|
48
|
-
'python_requires': '>=3.10.0',
|
|
49
|
-
'url': 'https://github.com/envoyproxy/toolshed/tree/main/envoy.code.check',
|
|
50
|
-
'version': '0.5.14',
|
|
51
|
-
})
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/envoy.code.check.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/envoy.code.check.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{envoy.code.check-0.5.14 → envoy_code_check-0.6.1}/envoy.code.check.egg-info/namespace_packages.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|