You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the issue
I got back to work in this package I've created. And I've added the use_late_for_private_fields_and_variables to the analysis_options.yaml file:
And that is triggering on a random part of a variable inside an enum declaration (inside lib/src/cursor_border_side.dart line 29).
bottom(
cursor:SystemMouseCursors.resizeUpDown,
height: _defaultWidth,
bottomDistance:0,
leftDistance: _defaultWidth, // <- triggering on `_defaultWi` not the full variable name. Also, I don't think that is what is trying to trigger.
rightDistance: _defaultWidth,
),
Now when I change the part files order inside floating_overlay.dart so that cursor_border_side.dart is not the last file in my parts (alphabetical sorting):
It now triggers on size_extension.dart line 18 (a comment):
/// Returns this size clamped to be in the range lowerLimit-upperLimit.
///
/// The arguments lowerLimit and upperLimit must form a valid range where
/// `(lowerLimit.height < upperLimit.height) && (lowerLimit.width < /// triggering here only `it.width <` text.
/// upperLimit.width)`.
Size clamp(Size lowerLimit, Size upperLimit) {
Expected behavior
To trigger on the right file (if there is actually a file where that happens, of course). And to take into account the reordering of parts in the file that it's a part of.
Additional context
Nothing else.
The text was updated successfully, but these errors were encountered:
bwilkerson
added
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
P2
A bug or feature request we're likely to work on
labels
Apr 19, 2024
FMorschel
changed the title
use_late_for_private_fields_and_variables triggering stragely with part files use_late_for_private_fields_and_variables triggering strangely with part files
Apr 19, 2024
This primarily takes the form of adding an ErrorReporter field to
LinterContextUnit. In addition, we make the getter access to
`Linter.reporter` protected, to prevent lint rule authors from trying
to call `rule.reporter.reportError` with a temporary AnalysisError
that attempts to point to a specific source. The _setter_ for
`Linter.reporter` remains public, as it is generally set by the
framework.
Some other changes are made in order to facilitate this:
* Remove LinterAnalysis.linterUnit, no longer needed.
* Remove LinterContextUnit2, no longer needed.
* Correct the tests for avoid_private_typedef_functions and
use_late_for_private_fields_and_variables. These tests did not
correctly test declarations of typedefs or variables _in_ part
files.
Fixesdart-lang/linter#4946Fixesdart-lang/linter#2921
Change-Id: I77c14ab6e56f369417a27f5f5227d6ec11486c3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366405
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Describe the issue
I got back to work in this package I've created. And I've added the
use_late_for_private_fields_and_variables
to theanalysis_options.yaml
file:To Reproduce
In that project, the
lib/src/floating_overlay.dart
file is the main file for somepart
files.Currently, my parts are (in this specific order):
And that is triggering on a random part of a variable inside an enum declaration (inside
lib/src/cursor_border_side.dart
line 29).Now when I change the part files order inside
floating_overlay.dart
so thatcursor_border_side.dart
is not the last file in my parts (alphabetical sorting):It now triggers on
size_extension.dart
line 18 (a comment):Expected behavior
To trigger on the right file (if there is actually a file where that happens, of course). And to take into account the reordering of
part
s in the file that it's apart of
.Additional context
Nothing else.
The text was updated successfully, but these errors were encountered: