Skip to content

chore: replace DCM with the bitwild_analysis presets - #142

Open
leoafarias wants to merge 3 commits into
mainfrom
claude/project-thread-1ajzib
Open

leoafarias wants to merge 3 commits into
mainfrom
claude/project-thread-1ajzib

Conversation

@leoafarias

@leoafarias leoafarias commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Requested by Leo · project thread

Intent

Use the shared lint presets from btwld/lints and remove DCM.

Changes

  • shared_analysis_options.yaml becomes the root analysis_options.yaml. It includes bitwild_analysis v0.3.0 dart.yaml + plugin.yaml. Each member includes the root file, and Flutter members also include flutter.yaml.
  • Removes DCM:
    • the dart_code_metrics and dcm config blocks
    • the analyze:dcm*, analyze:all and fix:dcm melos scripts
    • the dart_code_metrics_presets dependency
  • melos run analyze is now dart analyze --fatal-infos with the plugin. CI runs it, so the plugin rules are checked on every PR. (Before, CI ran only the Dart half.)
  • Removes lints/flutter_lints. Updates AGENTS.md and .claude/settings.json.
  • Settings kept close to main:
    • The strict modes stay off, as before. Turning them on reports about 40 issues.
    • avoid_dynamic_calls is off. It reports 65 calls, mostly on decoded JSON and YAML.
    • no_adjacent_strings_in_list is off. It conflicts with unnecessary_parenthesis.
    • **/vendor/** is excluded, so vendored code keeps its upstream style.
  • plugin_all.yaml is not used. It would add sort_class_members and the formatting rules, which report about 1,700 issues. The member order from AGENTS.md is in the config, so sort_class_members can be turned on later.
  • The second commit fixes the remaining diagnostics:
    • dart fix with explicit --code values only. No reformatting, because main is not fully format-clean.
    • One barrel import in lib/src now imports the defining files.
    • unawaited for two fire-and-forget futures.
    • ignore comments on the public AsyncThumbnail.load positional bool and on a private value class.
    • slide_template_test.dart keeps non-const constructors, because its tests compare distinct instances.

Packages

All of them: core, builder, cli, superdeck, plugins/pdf, playground and demo.

Commands run (Flutter 3.47.5)

I could not resolve the full workspace here, because leoafarias/hero_ui is private. So I ran the checks on a copy without packages/playground:

  • dart analyze --fatal-infos .: no issues
  • Tests pass in core (699), builder (162), cli (33), superdeck (809) and pdf (38). -x ci-excluded was used.

Please watch CI for playground. I could not analyze it here. I added the bitwild_analysis entry to pubspec.lock by hand.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QEFHxKAKfcCJWc6pQDZL25

Move the shared options to a root analysis_options.yaml that includes the
bitwild_analysis v0.3.0 presets and the bitwild_lints analyzer plugin from
btwld/lints. Remove the DCM config, melos scripts and dependencies, and run
the plugin in CI through melos run analyze.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QEFHxKAKfcCJWc6pQDZL25
Apply dart fix for the new rules, import defining files instead of the
barrel, wrap fire-and-forget futures in unawaited and sort pubspecs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QEFHxKAKfcCJWc6pQDZL25
@leoafarias leoafarias self-assigned this Nov 23, 2026
@leoafarias

Copy link
Copy Markdown
Collaborator Author

CI fails before analysis or tests start. melos bootstrap cannot clone the private leoafarias/hero_ui dependency of packages/playground ("could not read Username for 'https://github.com'"). This is not caused by this PR. The recent Test Workflow runs on main were all cancelled, so main has no green run to compare with. To get CI working, give the workflow read access to hero_ui (for example a token or deploy key), or make the dependency public.

The local checks in the PR description ran on a copy of the workspace without playground.


Generated by Claude Code

Parallel dart analyze runs build the bitwild_lints plugin snapshot in the
shared ~/.dartServer cache at the same time, and one of them can load a
half-written snapshot. Run the packages in sequence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QEFHxKAKfcCJWc6pQDZL25

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants