analyze: 1774 constant_identifier_names in generated glyphs.g.dart and one use_null_aware_elements #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/2135-analyzer-clean"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Tracker: #2135
flutter analyzereported 1775 issues; it now reports "No issues found!".tool/build_font.dartemits// ignore_for_file: constant_identifier_namesat the top of the generatedlib/src/glyphs.g.dart. The constants keep the upstream snake_case glyph names (GlyphsSolid.chevron_left), so the public API does not change.'offsets': ?offsets), which fixesuse_null_aware_elements.lib/src/glyphs.g.dartwas regenerated withdart run tool/build_font.dart. The only change is the two header lines.Verification
lib/fonts/*.ttffiles,assets/codepoints.json,assets/metadata.json,assets/offsets.json,lib/src/glyph_offsets.g.dartandtool/xmark_rendered.pngcame out of the rebuild with the same git blob hashes as0570977(git hash-objectvsgit rev-parse 0570977:<path>).git archive HEAD→flutter pub get && flutter analyze: No issues found!flutter test: All tests passed.../../glyphsoverride pointing at this branch:flutter analyzeNo issues found! (same result as with0570977).Head:
842cd49980Approved for #2135. I checked head
842cd49980against base0570977dc8. The PR diff has the same hunks asgit diff 0570977...842cd49: two files, +5/−1.Gates (run on scratch
git archivecopies)flutter analyzeat0570977reports 1775 issues found: 1774 ×constant_identifier_namesinlib/src/glyphs.g.dart, plustool/build_font.dart:118:13 • use_null_aware_elements. At842cd49it reports No issues found!. The result is the same with the analysis_options.yaml thatpub getrewrites and with the committed one (--no-pub).flutter testat842cd49:00:06 +1: All tests passed!dart run tool/build_font.dartat842cd49in scratch and it exited 0. Every regenerated artifact matches the0570977blob: the fivelib/fonts/*.ttf,assets/codepoints.json,assets/metadata.json,assets/offsets.json,lib/src/glyph_offsets.g.dartandtool/xmark_rendered.png. The regeneratedlib/src/glyphs.g.dartmatches the committed842cd49blob (1c1d251). So the directive comes from the generator, and'offsets': ?offsetsbehaves the same as the oldifelement in both passes: pass 1 and its measured offsets.json are identical.class/static constdeclaration lines ofglyphs.g.darthash the same at both commits (4aab9aa…, 2868 constants), and everything after the header is byte-identical. No constant is renamed.../../glyphsoverride to842cd49.flutter analyzereports No issues found!. Banlu uses 73 distinct glyph constants, snake_case ones among them. The control run against0570977also reports No issues found!.Review. The
ignore_for_filedirective belongs in the generated file only, and the generator emits it there, which fixes the cause. The null-aware map element is equivalent to the oldifelement (Dart ≥3.8; the pubspec SDK is ^3.11.3). The diff adds no narrative comments and the commit message follows the rules. No findings.The PR is not merged. Review 177 approves
842cd49980, but the reviewer accountagenthas onlyreadpermission on agra/glyphs, so it cannot merge.POST /api/v1/repos/agra/glyphs/pulls/1/merge(merge-commit, PR title) returned HTTP 405 "User not allowed to merge PR", and Forgejo records the approval as non-official. An account with write access needs to merge this PR, oragentneeds write access on agra/glyphs before it can merge.