Repository navigation
Release 6.0.0 as hedgehoglab_flutter_analysis - #1
Merged
Merged
Conversation
Rename the package, add analysis_options.6.0.0.yaml (5.0.0 minus rules removed or deprecated in Dart 3, plus flutter_style_todos, strict language modes and generated-code and platform excludes), modernise CI, and rewrite the README and CHANGELOG. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
|
Update: CODEOWNERS now assigns the whole repository to @hedgehoglab-engineering/flutter-team (b93a073), replacing the deleted Netsells entry. Note the team doesn't yet have write access to this repository, which GitHub requires for a code owner entry to take effect; an org or repo admin needs to grant it (Settings → Collaborators and teams). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
The org fork was identical to netsells/flutter-analysis 5.0.0 (last changed 2023). This turns it into hedgehog lab's maintained lint package, so a project adopts the standard configuration with one
include:line instead of copying rules inline (as bnf-flutter did).The package is renamed to
hedgehoglab_flutter_analysis. Historicalanalysis_options.1.0.0to5.0.0files are untouched. Newlib/analysis_options.6.0.0.yamlis 5.0.0 minus ten rules, plusflutter_style_todos,strict-casts/strict-inference/strict-raw-types, and excludes for generated code and the platform directories. Netsells' severity overrides are kept (all still valid).lib/analysis_options.yamlnow points at 6.0.0. README rewritten (adoption, versioning policy, migration fromnetsells_flutter_analysisand from inline copies, attribution); CHANGELOG has a 6.0.0 entry; LICENSE keeps the Netsells line and adds hedgehog lab's.Rules dropped, checked against dart.dev's linter pages (not just the list I was given): removed in Dart 3 are
always_require_non_null_named_parameters,avoid_returning_null,avoid_returning_null_for_future,iterable_contains_unrelated_type,list_remove_unrelated_type,package_api_docs,prefer_equal_for_default_values; deprecated (replaced or no longer useful) areavoid_null_checks_in_equality_operators,avoid_private_typedef_functions,unnecessary_await_in_return. All other 160 rules are listed as Stable (or Experimental:no_default_cases,use_late_for_private_fields_and_variables,use_super_parameters, left alone). One page lookup 404'd forno_runtimeType_toStringbecause the URL is lower-cased; the analyser recognises the rule.Decisions:
lines_longer_than_80_charsstays. It matchesdart format's default page width and catches what the formatter cannot wrap (long strings and comments). Projects with a custompage_widthcan override it; no reason to churn it.lib/**.*.dartandtest/**.*.dartare replaced by explicit generated-file globs. The old ones silently excluded any hand-written file with a dotted name.publish_to: none; the package is consumed by git tag..github/CODEOWNERSdeleted: it named@netsells/flutter, a team that does not exist in this org. Question for the owner: who should own this repo?Verification
Run with Flutter 3.47.0 / Dart 3.13.0:
dart format --output=none --set-exit-if-changed .: 0 changed.dart analyze --fatal-infos .anddart analyze --fatal-infos example: No issues found, noundefined_lint/removed_lint/deprecated_lint/included_file_warning.analysis_options.6.0.0.yamlreports the strict-mode errors andflutter_style_todos, so the include works end to end.removed_lint/deprecated_lintfor the ten rules above (it accepts them silently); only genuinely unknown names giveundefined_lint. So the analyser alone cannot prove "no removed rules". CI therefore also greps the latest versioned file for those ten names, in addition to failing on the three diagnostics. The denylist needs extending when new rules are removed.CI is rewritten:
actions/checkout@v7,subosito/flutter-action@v2(stable), format and--fatal-infosanalyse on root and example, plus the lint-diagnostics step.Out of scope
Analyzer plugins, riverpod_lint and metrics (follow-up PR). No tag is created.
Recommendations
hedgehoglab-flutter-analysis(or similar) to match the package name; GitHub redirects old URLs. Not done here.6.0.0. BNF can then adopt with the git dependency (ref: 6.0.0) and one line:include: package:hedgehoglab_flutter_analysis/analysis_options.6.0.0.yaml. Expect new findings from the strict modes.🤖 Generated with Claude Code