Commit 36ca46b
authored
## Why
Issue #16393 asks for a `pylint` presubmit check on the GAPIC golden
client libraries so generator regressions are caught at PR time.
`flake8` and `ruff` already run on these goldens, but they do not catch
the kinds of issues `pylint` flagged in the original investigation
(undefined names, broken imports, etc.).
## What
- New `packages/gapic-generator/tests/integration/goldens/.pylintrc`
scoped to the goldens. Conservative bar to start: `pylint --errors-only`
is used in CI, and the `.pylintrc` disables the small set of error-class
checks that consistently misfire on auto-generated GAPIC output
(`no-name-in-module`, `no-member`, `import-error`,
`relative-beyond-top-level`, `cyclic-import`). This catches real bugs
without forcing a stylistic cleanup of the existing goldens, which can
be tightened later.
- New `Pylint goldens (errors only)` step in the existing `goldens` job
in `.github/workflows/gapic-generator-tests.yml`. Runs after the
existing `format`/`lint`/`unit` nox sessions, so the heavy setup is
amortized. Iterates over the same `credentials eventarc logging redis`
set.
## Tested
- Confirmed the new step is gated by the same `paths` filter as the rest
of `gapic-generator-tests.yml`, so it stays silent on PRs that do not
touch the generator.
- `pylint --errors-only --rcfile=.pylintrc` only reports E/F categories
minus the listed disables, which keeps the signal meaningful and stops
the generator from silently regressing on the next refactor.
If the maintainers want a different starting bar (e.g. include warnings,
or run on more golden packages), happy to adjust.
1 parent 69f0134 commit 36ca46b
2 files changed
Lines changed: 43 additions & 0 deletions
File tree
- .github/workflows
- packages/gapic-generator/tests/integration/goldens
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
118 | 129 | | |
119 | 130 | | |
120 | 131 | | |
| |||
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
0 commit comments