Commit e615fea
Fix starlark lint errors in kotlin_library BUCK file
Summary:
D93521644 introduced conditional target definitions using variables (`_uses_ksp_and_ap`, `_ksp_generates`, `_uses_ksp_and_kapt`) that are assigned but never used. The diff used `# buildifier: disable=unused-variable` comments to suppress buildifier warnings, but this doesn't work for Buck2's starlark linter which uses a different suppression format.
The starlark linter has an `unused-assign` lint rule that flags these unused variable assignments. The correct suppression format is `# starlark-lint-disable unused-assign`.
This fix adds `# starlark-lint-disable unused-assign` comments alongside the existing `# buildifier: disable=unused-variable` comments for the three affected variables:
- `_uses_ksp_and_ap`
- `_ksp_generates`
- `_uses_ksp_and_kapt`
Both comments are needed:
- `# buildifier: disable=unused-variable` - suppresses buildifier warnings
- `# starlark-lint-disable unused-assign` - suppresses Buck2 starlark linter warnings
This resolves the `test_lint_buck2` test failure which runs `buck starlark lint buck2` and checks for lint errors in all Starlark files under the buck2 directory.
[Session trajectory link](https://www.internalfb.com/intern/devai/devmate/inspector/?id=T256989125-22c236ee-ef70-4534-92f7-dde113fab2fb)
Differential Revision: D94225083
fbshipit-source-id: 9b08f298d14806d0910ef37231d15dbf1538dad21 parent 9556d46 commit e615fea
1 file changed
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
428 | | - | |
429 | 428 | | |
430 | 429 | | |
431 | 430 | | |
| |||
444 | 443 | | |
445 | 444 | | |
446 | 445 | | |
447 | | - | |
448 | 446 | | |
449 | 447 | | |
450 | 448 | | |
| |||
512 | 510 | | |
513 | 511 | | |
514 | 512 | | |
515 | | - | |
516 | 513 | | |
517 | 514 | | |
518 | 515 | | |
| |||
833 | 830 | | |
834 | 831 | | |
835 | 832 | | |
836 | | - | |
837 | 833 | | |
838 | 834 | | |
839 | 835 | | |
| |||
0 commit comments