Commit 8cd5ca5
committed
fix(lint): address review feedback on path selection
The two assertions on the linted file name compared against raw console
output. The console wraps at 80 columns, so a long enough temporary path
splits the name across lines and the assertion fails. Under xdist the
path gains a popen-gwN segment, which is what makes it reproducible
there. Reproduced directly: a path of the right length renders the line
as "models/seed_model.sq\nl:". Both assertions now compare against the
output with the wrapping removed.
A directory now says so instead of reporting that no models were found
in it, which read as though the directory were empty.
The docstring records that relative paths resolve against the current
working directory rather than the project path. That is what path-based
tools pass, but it means the Python API only accepts relative paths when
called from inside the project.
The linter guide now frames path selection as the option for tools that
hand over file names, and points CI use towards a model selector instead
of paths from git diff, so that the models affected by a change are
linted rather than only the files that were edited.
Signed-off-by: Adegbite Ayoade <tripleaceme@gmail.com>1 parent e23151c commit 8cd5ca5
3 files changed
Lines changed: 28 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
131 | | - | |
132 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
133 | 137 | | |
134 | 138 | | |
135 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3617 | 3617 | | |
3618 | 3618 | | |
3619 | 3619 | | |
3620 | | - | |
| 3620 | + | |
| 3621 | + | |
| 3622 | + | |
| 3623 | + | |
3621 | 3624 | | |
3622 | 3625 | | |
3623 | 3626 | | |
3624 | 3627 | | |
3625 | 3628 | | |
| 3629 | + | |
| 3630 | + | |
| 3631 | + | |
| 3632 | + | |
| 3633 | + | |
| 3634 | + | |
| 3635 | + | |
3626 | 3636 | | |
3627 | 3637 | | |
3628 | 3638 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1492 | 1492 | | |
1493 | 1493 | | |
1494 | 1494 | | |
1495 | | - | |
| 1495 | + | |
1496 | 1496 | | |
1497 | 1497 | | |
1498 | 1498 | | |
| |||
1556 | 1556 | | |
1557 | 1557 | | |
1558 | 1558 | | |
1559 | | - | |
| 1559 | + | |
1560 | 1560 | | |
1561 | 1561 | | |
1562 | 1562 | | |
| |||
1586 | 1586 | | |
1587 | 1587 | | |
1588 | 1588 | | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
1589 | 1597 | | |
1590 | 1598 | | |
1591 | 1599 | | |
| |||
0 commit comments