fix(ci): golangci-lint v2 schema + Flutter 3.44 ListTile strictness
Two fixes for CI bounces caused by the new ci-go:1.26 / ci-flutter:3.44
toolchain images surfacing stricter checks than the previous runners.
1. .golangci.yml: migrate to v2 schema
- Add `version: "2"` (now required).
- `linters.disable-all: true` → `linters.default: none`.
- Move `gofmt` + `goimports` out of `linters` into the new
top-level `formatters:` block (v2 separates linters and
formatters).
- Nest `linters-settings:` under `linters.settings:`.
- Drop the v1-only `issues.exclude-use-default: false`
(v2 default exclusion behavior is what we want).
2. Flutter 3.44 made ListTile-inside-ColoredBox a hard assertion
(was a warning before). Both bottom sheets in track_actions/
set Container.color on the outer surface, which inserts a
ColoredBox above their ListTiles. Wrap each ListTile in
`Material(type: MaterialType.transparency)` so it has an ink
target beneath the outer color paint without changing the
visual surface:
- track_actions_sheet.dart `_MenuItem.build`
- add_to_playlist_sheet.dart inner ListTile
5 failing widget tests should pass with this change. Local task #70.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+16
-15
@@ -1,28 +1,29 @@
|
|||||||
|
version: "2"
|
||||||
|
|
||||||
run:
|
run:
|
||||||
timeout: 5m
|
timeout: 5m
|
||||||
tests: true
|
tests: true
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
disable-all: true
|
default: none
|
||||||
enable:
|
enable:
|
||||||
- errcheck
|
- errcheck
|
||||||
- govet
|
- govet
|
||||||
- ineffassign
|
- ineffassign
|
||||||
- staticcheck
|
- staticcheck
|
||||||
- unused
|
- unused
|
||||||
|
- revive
|
||||||
|
settings:
|
||||||
|
revive:
|
||||||
|
# Intentionally narrow: we skip `exported` (no doc-comment requirement) per
|
||||||
|
# the project's no-boilerplate-comment policy. Re-enable if the public API
|
||||||
|
# surface grows to the point where documentation lives alongside it.
|
||||||
|
rules:
|
||||||
|
- name: var-naming
|
||||||
|
- name: unused-parameter
|
||||||
|
- name: early-return
|
||||||
|
|
||||||
|
formatters:
|
||||||
|
enable:
|
||||||
- gofmt
|
- gofmt
|
||||||
- goimports
|
- goimports
|
||||||
- revive
|
|
||||||
|
|
||||||
linters-settings:
|
|
||||||
revive:
|
|
||||||
# Intentionally narrow: we skip `exported` (no doc-comment requirement) per
|
|
||||||
# the project's no-boilerplate-comment policy. Re-enable if the public API
|
|
||||||
# surface grows to the point where documentation lives alongside it.
|
|
||||||
rules:
|
|
||||||
- name: var-naming
|
|
||||||
- name: unused-parameter
|
|
||||||
- name: early-return
|
|
||||||
|
|
||||||
issues:
|
|
||||||
exclude-use-default: false
|
|
||||||
|
|||||||
@@ -69,18 +69,24 @@ class AddToPlaylistSheet extends ConsumerWidget {
|
|||||||
itemCount: owned.length,
|
itemCount: owned.length,
|
||||||
itemBuilder: (_, i) {
|
itemBuilder: (_, i) {
|
||||||
final p = owned[i];
|
final p = owned[i];
|
||||||
return ListTile(
|
// Material(transparency) gives ListTile an ink target
|
||||||
key: Key('add_to_playlist_${p.id}'),
|
// beneath the outer Container's color paint — required
|
||||||
leading: Icon(LucideIcons.list_music, color: fs.parchment),
|
// by the Flutter 3.44 ListTile/ColoredBox assertion.
|
||||||
title: Text(
|
return Material(
|
||||||
p.name,
|
type: MaterialType.transparency,
|
||||||
style: TextStyle(color: fs.parchment),
|
child: ListTile(
|
||||||
|
key: Key('add_to_playlist_${p.id}'),
|
||||||
|
leading: Icon(LucideIcons.list_music, color: fs.parchment),
|
||||||
|
title: Text(
|
||||||
|
p.name,
|
||||||
|
style: TextStyle(color: fs.parchment),
|
||||||
|
),
|
||||||
|
subtitle: Text(
|
||||||
|
'${p.trackCount} ${p.trackCount == 1 ? "track" : "tracks"}',
|
||||||
|
style: TextStyle(color: fs.ash, fontSize: 12),
|
||||||
|
),
|
||||||
|
onTap: () => Navigator.pop(context, p.id),
|
||||||
),
|
),
|
||||||
subtitle: Text(
|
|
||||||
'${p.trackCount} ${p.trackCount == 1 ? "track" : "tracks"}',
|
|
||||||
style: TextStyle(color: fs.ash, fontSize: 12),
|
|
||||||
),
|
|
||||||
onTap: () => Navigator.pop(context, p.id),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -236,10 +236,17 @@ class _MenuItem extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final fs = Theme.of(context).extension<FabledSwordTheme>()!;
|
final fs = Theme.of(context).extension<FabledSwordTheme>()!;
|
||||||
return ListTile(
|
// Transparency-typed Material sits between the outer Container's color
|
||||||
leading: Icon(icon, color: fs.parchment),
|
// paint and the ListTile so ListTile can paint its own ink splashes.
|
||||||
title: Text(label, style: TextStyle(color: fs.parchment)),
|
// Flutter 3.44 promoted the "ListTile inside ColoredBox without Material"
|
||||||
onTap: onTap,
|
// warning to a hard assertion.
|
||||||
|
return Material(
|
||||||
|
type: MaterialType.transparency,
|
||||||
|
child: ListTile(
|
||||||
|
leading: Icon(icon, color: fs.parchment),
|
||||||
|
title: Text(label, style: TextStyle(color: fs.parchment)),
|
||||||
|
onTap: onTap,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user