-
-
Notifications
You must be signed in to change notification settings - Fork 957
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support stable #3796
Support stable #3796
Conversation
WalkthroughThe changes encompass updates to various configuration files and dependencies across multiple Flutter projects and packages. Key modifications include adjustments to GitHub Actions workflows, specifically the addition of a stable channel option and corrections in YAML formatting. Several Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (7)
website/pubspec_overrides.yaml (1)
17-17
: Approved: Analyzer dependency version updateThe update of the
analyzer
dependency to^6.7.0
is consistent with changes in other files and aligns with the PR objective of supporting stable versions.Consider updating or removing the comment "Needed due to Flutter not supporting 6.0.0 yet" as it's now outdated. You could either remove it or update it to explain why version 6.7.0 is specifically needed.
packages/riverpod_lint/pubspec.yaml (1)
14-17
: Summary of dependency changes and their impactThe changes to
analyzer
andcustom_lint_builder
dependencies appear to be part of a broader update across multiple packages in the project. While this consistency is good for maintaining compatibility between packages, it's important to consider the following:
- Ensure that downgrading these dependencies doesn't remove any critical features or bug fixes that your project relies on.
- Verify that all packages depending on
riverpod_lint
are compatible with these new version constraints.- Update your CI/CD pipelines and development environments to reflect these changes.
- Consider documenting the reason for these downgrades in your project's changelog or documentation.
To maintain long-term stability and ease future upgrades, consider implementing a dependency management strategy that includes:
- Regular reviews of dependency versions across all packages
- A process for testing and rolling out dependency updates
- Documentation of reasons for specific version constraints
.github/workflows/riverpod_lint.yml (1)
29-29
: LGTM! Consider conditional job execution for efficiency.Adding the 'stable' channel to the matrix strategy is a good practice. It increases test coverage across different Flutter versions, helping to catch potential issues early.
To optimize CI resources, consider adding a condition to skip certain jobs when changes are made to specific paths. For example:
jobs: riverpod_lint: # ... existing configuration ... if: | !contains(github.event.head_commit.modified, 'README.md') && !contains(github.event.head_commit.modified, 'CHANGELOG.md')This would prevent unnecessary runs for documentation-only changes.
packages/riverpod_analyzer_utils/CHANGELOG.md (1)
1-5
: LGTM! Consider adding a date placeholder.The new "Unreleased patch" section is well-structured and provides clear information about the analyzer version support and its implications for Flutter compatibility. This is valuable for users and follows changelog best practices.
Consider adding a date placeholder (e.g.,
## Unreleased patch - [DATE]
) to make it easier to update when releasing:-## Unreleased patch +## Unreleased patch - [DATE]packages/riverpod_lint/lib/src/lints/scoped_providers_should_specify_dependencies.dart (2)
Line range hint
76-79
: Address TODOs for handlingparent: null
casesThere are two TODO comments in the code regarding handling
parent: null
cases. These might be areas for future improvement.Consider creating issues to track these TODOs:
- In
addProviderContainerInstanceCreationExpression
method (around line 76)- In
isProviderScopeScoped
method (around line 102)Both TODOs suggest checking if the expression's static type is non-nullable. This could enhance the lint rule's accuracy in detecting scoped providers.
Also applies to: 102-105
Line range hint
46-50
: Consider extracting common logic for readabilityThe
isFlutterRunApp
andisPumpWidget
methods in theSimpleIdentifierX
extension share similar logic. Consider extracting the common parts into a private method to improve readability and maintainability.Here's a suggested refactoring:
extension SimpleIdentifierX on SimpleIdentifier { bool _isFromPackage(String packageName) { final library = staticElement?.library; if (library == null) return false; final libraryUri = Uri.tryParse(library.identifier); if (libraryUri == null) return false; return libraryUri.scheme == 'package' && libraryUri.pathSegments.first == packageName; } bool get isFlutterRunApp => name == 'runApp' && _isFromPackage('flutter'); bool get isPumpWidget => name == 'pumpWidget' && _isFromPackage('flutter_test'); }This refactoring reduces code duplication and makes it easier to add similar checks in the future.
packages/riverpod_lint/CHANGELOG.md (1)
1-5
: LGTM! Consider adding the release date.The new changelog entry for version 2.6.1 is well-formatted and provides clear information about the changes. It correctly mentions the support for the analyzer version range and its compatibility with Flutter's stable channel, which aligns with the PR objectives.
Consider adding a placeholder for the release date:
-## Unreleased 2.6.1 +## 2.6.1 - UnreleasedThis will make it easier to add the actual release date when the version is published.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (29)
- .github/workflows/build.yml (1 hunks)
- .github/workflows/riverpod_lint.yml (1 hunks)
- examples/counter/pubspec.yaml (1 hunks)
- examples/marvel/pubspec.yaml (1 hunks)
- examples/pub/pubspec.yaml (1 hunks)
- examples/random_number/pubspec.yaml (1 hunks)
- examples/stackoverflow/pubspec.yaml (1 hunks)
- examples/todos/pubspec.yaml (1 hunks)
- packages/riverpod/pubspec.yaml (1 hunks)
- packages/riverpod/pubspec_overrides.yaml (1 hunks)
- packages/riverpod_analyzer_utils/CHANGELOG.md (2 hunks)
- packages/riverpod_analyzer_utils/lib/src/riverpod_ast/ref_invocation.dart (1 hunks)
- packages/riverpod_analyzer_utils/lib/src/riverpod_ast/widget_ref_invocation.dart (1 hunks)
- packages/riverpod_analyzer_utils/pubspec.yaml (1 hunks)
- packages/riverpod_analyzer_utils_tests/pubspec.yaml (1 hunks)
- packages/riverpod_generator/CHANGELOG.md (1 hunks)
- packages/riverpod_generator/pubspec.yaml (1 hunks)
- packages/riverpod_graph/lib/src/analyze.dart (1 hunks)
- packages/riverpod_graph/pubspec.yaml (1 hunks)
- packages/riverpod_lint/CHANGELOG.md (1 hunks)
- packages/riverpod_lint/lib/src/assists/convert_to_stateful_base_widget.dart (1 hunks)
- packages/riverpod_lint/lib/src/assists/convert_to_stateless_base_widget.dart (1 hunks)
- packages/riverpod_lint/lib/src/lints/avoid_manual_providers_as_generated_provider_dependency.dart (1 hunks)
- packages/riverpod_lint/lib/src/lints/provider_parameters.dart (1 hunks)
- packages/riverpod_lint/lib/src/lints/scoped_providers_should_specify_dependencies.dart (1 hunks)
- packages/riverpod_lint/pubspec.yaml (1 hunks)
- packages/riverpod_lint/pubspec_overrides.yaml (0 hunks)
- packages/riverpod_lint_flutter_test/pubspec.yaml (1 hunks)
- website/pubspec_overrides.yaml (1 hunks)
💤 Files with no reviewable changes (1)
- packages/riverpod_lint/pubspec_overrides.yaml
✅ Files skipped from review due to trivial changes (2)
- packages/riverpod/pubspec_overrides.yaml
- packages/riverpod_generator/pubspec.yaml
🧰 Additional context used
🔇 Additional comments (28)
examples/random_number/pubspec.yaml (1)
17-17
: Verify the reason for downgradingcustom_lint
dependency.The
custom_lint
dependency has been downgraded from^0.6.5
to^0.6.0
. This change aligns with similar updates across multiple projects in this pull request. Could you please clarify the reason for this downgrade? It's important to ensure that this change doesn't introduce any compatibility issues or affect the project's functionality.To ensure this change doesn't break anything, please run the following commands:
If any issues arise during these checks, please address them before merging this change.
packages/riverpod_graph/pubspec.yaml (1)
14-14
: Approve the analyzer dependency update, but verify compatibility.The change from
analyzer: "6.9.0"
toanalyzer: ^6.7.0
provides more flexibility for minor updates and aligns with changes in other packages. However, please note:
- This change potentially allows for a downgrade from 6.9.0 to 6.7.0.
- Ensure that the package is compatible with analyzer versions 6.7.0 through 6.9.0.
To verify the impact of this change, please run the following script:
examples/stackoverflow/pubspec.yaml (1)
22-22
: Verify the impact of downgrading custom_lint.The downgrade of
custom_lint
from^0.6.5
to^0.6.0
is consistent with changes across multiple projects in this PR. This aligns with the PR objective of "Support stable".To ensure this change doesn't negatively impact the development process:
Verify that all projects using
custom_lint
have been updated consistently:Check if there are any breaking changes or important fixes in the versions being skipped:
Consider adding a comment in the pubspec.yaml file or updating the project's documentation to explain the reason for this specific version constraint, which will help future maintainers understand the decision.
✅ Verification successful
Downgrade of
custom_lint
to version ^0.6.0 has been verified and is consistent across all projects. This ensures alignment with the PR objective of supporting stability.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for consistent custom_lint version across all pubspec.yaml files # Test: Verify custom_lint version. Expect: All occurrences should be ^0.6.0 rg -g 'pubspec.yaml' 'custom_lint:' --no-filename | sort | uniq -cLength of output: 94
Script:
#!/bin/bash # Description: Fetch the changelog for custom_lint # Test: Check for breaking changes or important fixes between 0.6.0 and 0.6.5 curl -s https://raw.githubusercontent.com/invertase/dart_custom_lint/main/packages/custom_lint/CHANGELOG.md | sed -n '/## 0.6.5/,/## 0.6.0/p'Length of output: 846
packages/riverpod/pubspec.yaml (1)
22-22
: LGTM! Verify analyzer compatibility across the project.The update to the analyzer dependency version looks good. It narrows down the acceptable range to
^6.7.0
, which should improve stability and ensure compatibility with the latest features in the 6.x range.To ensure consistency across the project, please run the following script to verify that all references to the analyzer package use the same version constraint:
This will help ensure that the analyzer version is consistently updated across all relevant files in the project.
✅ Verification successful
Analyzer version consistently updated across all pubspec files.
All relevant
pubspec.yaml
files now useanalyzer: ^6.7.0
, ensuring uniformity and improved stability throughout the project.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for consistent analyzer version across the project # Search for analyzer version specifications in pubspec files echo "Checking analyzer versions in pubspec files:" rg -g 'pubspec*.yaml' 'analyzer:' -A 1 # Search for analyzer version specifications in workflow files echo "\nChecking analyzer versions in workflow files:" rg -g '*.yml' -g '*.yaml' 'uses: dart-lang/setup-dart@' -A 1Length of output: 1219
packages/riverpod_analyzer_utils/pubspec.yaml (2)
16-16
: Verify the reason for downgrading thecustom_lint_core
dependency.The
custom_lint_core
dependency has been downgraded from^0.6.5
to^0.6.0
. While this aligns with changes in other packages, it's important to ensure this doesn't remove any necessary features or bug fixes.Could you please confirm:
- The reason for this downgrade?
- That all features required by this package are still supported in version 0.6.0?
- That this change doesn't reintroduce any known bugs or issues that were fixed in versions 0.6.1 to 0.6.5?
#!/bin/bash # Description: Check for any usage of custom_lint_core features that might be affected by the downgrade # Test: Search for custom_lint_core usage in the codebase rg -p 'import .+custom_lint_core' -g '!pubspec.yaml'
13-13
: Verify the reason for downgrading theanalyzer
dependency.The
analyzer
dependency has been downgraded from^6.9.0
to^6.7.0
. While this aligns with changes in other packages, it's important to ensure this doesn't introduce any compatibility issues or remove necessary features.Could you please confirm:
- The reason for this downgrade?
- That all features required by this package are still supported in version 6.7.0?
- That this change doesn't introduce any known bugs or issues?
✅ Verification successful
Downgrade of
analyzer
dependency verified as safe. No usage ofanalyzer
found in the codebase that would be affected by this change.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for any usage of analyzer features that might be affected by the downgrade # Test: Search for analyzer usage in the codebase rg -p 'import .+analyzer' -g '!pubspec.yaml'Length of output: 287
examples/pub/pubspec.yaml (1)
26-26
: Please clarify the rationale for downgradingcustom_lint
.The version of
custom_lint
has been downgraded from^0.6.5
to^0.6.0
. While this change is consistent across multiple projects in this PR, downgrading dependencies is unusual and may have implications.
- Could you explain the reasons for this downgrade?
- Have you verified that this version is compatible with other dependencies in the project?
- If not already done, please update the changelog to reflect this change.
To ensure all related files have been updated consistently, please run the following script:
This will help us confirm that the change has been applied uniformly across the project.
✅ Verification successful
Consistency Verified:
custom_lint
version is uniformly set to^0.6.0
across allpubspec.yaml
files.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for consistent custom_lint version across all pubspec.yaml files # Test: Verify custom_lint version in all pubspec.yaml files rg -A 5 'custom_lint:' $(fd -e yaml pubspec)Length of output: 4658
examples/todos/pubspec.yaml (1)
21-21
: Acknowledge downgrade ofcustom_lint
and request clarification.The
custom_lint
dependency has been downgraded from^0.6.5
to^0.6.0
. This change is consistent across multiple projects in this PR.
- Could you please clarify the reason for this downgrade?
- Are there any known compatibility issues with the newer version?
- How does this affect the project's linting capabilities?
To ensure this change doesn't negatively impact the project, please run the following script:
This will help verify that the linting still functions as expected with the older version.
packages/riverpod_lint/pubspec.yaml (2)
17-17
: Confirm compatibility with downgraded custom_lint_builder versionThe
custom_lint_builder
dependency has been downgraded from^0.6.5
to^0.6.0
. This change is consistent with updates in other packages within the project. However, it's important to verify that this downgrade doesn't remove any necessary features or bug fixes introduced in versions 0.6.1 to 0.6.5.To check for any potential issues, run the following script:
#!/bin/bash # Description: Check for usage of custom_lint_builder features introduced in versions 0.6.1 to 0.6.5 # Test: Search for any imports or usages of the custom_lint_builder package rg -i 'import.*custom_lint_builder' --type dart rg -i 'custom_lint_builder\.' --type dartIf the script returns results, review them to ensure no newer features are being used that might be incompatible with version 0.6.0.
14-14
: Verify compatibility with downgraded analyzer versionThe
analyzer
dependency has been downgraded from^6.9.0
to^6.7.0
. This change aligns with updates in other packages within the project, which is good for consistency. However, please ensure that this downgrade doesn't impact any features or bug fixes you might have been relying on from versions 6.8.x and 6.9.x.To check for any potential issues, run the following script:
If the script returns results, review them to ensure no newer features are being used that might be incompatible with version 6.7.0.
✅ Verification successful
Analyzer Version Downgrade Verified
The downgrade of the
analyzer
dependency from^6.9.0
to^6.7.0
does not impact the current codebase. No usages of features introduced in versions 6.8.x or 6.9.x were found.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for usage of analyzer features introduced in versions 6.8.x and 6.9.x # Test: Search for any imports or usages of the analyzer package rg -i 'import.*analyzer' --type dart rg -i 'analyzer\.' --type dartLength of output: 9281
Script:
#!/bin/bash # Description: Check for usage of analyzer features introduced in versions 6.8.x and 6.9.x # Test: Search for any imports or usages of the analyzer package rg -i 'import\s+["'\'']package:analyzer' --type dart rg -i 'analyzer\.' --type dartLength of output: 12772
packages/riverpod_lint_flutter_test/pubspec.yaml (1)
18-19
: Verify the impact of downgrading custom_lint dependencies.The downgrade of
custom_lint
andcustom_lint_core
from^0.6.5
to^0.6.0
is consistent with changes made in other packages as mentioned in the AI summary. However, it's important to consider the following:
- Ensure that this downgrade doesn't introduce compatibility issues with other dependencies or the project's requirements.
- Verify that the features or bug fixes you need are still available in version 0.6.0.
- Check if this change is intentional and aligns with the PR objective of "Support stable".
To confirm the consistency of these changes across the project, run the following script:
This will help ensure that the changes are consistent across all relevant packages.
✅ Verification successful
Downgrade of custom_lint dependencies is consistent across all packages.
All instances of
custom_lint
andcustom_lint_core
are set to version^0.6.0
across the project, ensuring consistency and alignment with the PR objective.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify custom_lint dependency versions across all pubspec.yaml files # Test: Check custom_lint versions in all pubspec.yaml files echo "Checking custom_lint versions:" rg -g 'pubspec.yaml' 'custom_lint:' --no-filename # Test: Check custom_lint_core versions in all pubspec.yaml files echo "Checking custom_lint_core versions:" rg -g 'pubspec.yaml' 'custom_lint_core:' --no-filenameLength of output: 460
packages/riverpod_analyzer_utils_tests/pubspec.yaml (1)
9-9
: LGTM! Consider verifying compatibility.The update of the
analyzer
dependency to^6.7.0
aligns well with the PR objective to "Support stable". This change narrows down the acceptable versions, which should lead to more consistent behavior across different environments.To ensure this change doesn't introduce any compatibility issues, please run the following script:
If the script returns any results, consider updating those packages to use compatible versions.
✅ Verification successful
Verified: All
pubspec.yaml
files haveanalyzer: ^6.7.0
.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that all packages using 'analyzer' have compatible versions # Test: Check for any incompatible 'analyzer' versions across all pubspec.yaml files rg -g 'pubspec.yaml' 'analyzer:' | grep -v '^6.7.0'Length of output: 406
examples/marvel/pubspec.yaml (1)
25-25
: Confirm the rationale for downgrading custom_lint.The
custom_lint
dependency has been downgraded from^0.6.5
to^0.6.0
. This change is consistent with the modifications made in other projects as mentioned in the summary.Could you please confirm the reason for this downgrade? It's generally recommended to use the latest stable versions of dependencies unless there are specific compatibility issues or requirements.
To verify the impact of this change, you can run the following script:
This script will help identify any potential issues or reasons for the downgrade by examining the release notes and searching for relevant references in the project.
examples/counter/pubspec.yaml (1)
27-27
: LGTM. Please verify compatibility and document version choice.The downgrade of
custom_lint
from^0.6.5
to^0.6.0
is consistent with changes in other projects mentioned in the summary. This change looks good, but please ensure:
- This version is compatible with other dependencies in the project.
- The specific reason for choosing version 0.6.0 is documented, either in the commit message or in a comment in this file.
To verify compatibility, please run the following command and ensure there are no conflicts:
packages/riverpod_lint/lib/src/lints/avoid_manual_providers_as_generated_provider_dependency.dart (1)
33-33
: LGTM: Consistent use of private_code
variableThe change from
code
to_code
aligns with the lint rule's declaration and improves consistency. This modification ensures that the correct lint code is used when reporting errors related to provider dependencies.To ensure this change is consistent across the codebase, let's run the following script:
✅ Verification successful
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the consistent use of '_code' instead of 'code' in lint files # Test: Search for remaining instances of 'code' in lint files echo "Searching for remaining instances of 'code' in lint files:" rg '\bcode\b' packages/riverpod_lint/lib/src/lints --type dart # Test: Confirm the use of '_code' in lint files echo "Confirming the use of '_code' in lint files:" rg '\b_code\b' packages/riverpod_lint/lib/src/lints --type dartLength of output: 8938
.github/workflows/build.yml (1)
31-31
: LGTM: Addition of 'stable' channel improves test coverageThe inclusion of the 'stable' channel in the matrix strategy is a positive change. It ensures that the project is tested against both the stable and master Flutter channels, which can help identify compatibility issues early in the development process.
Let's verify the complete matrix configuration:
✅ Verification successful
LGTM: Verified matrix configuration and code structure
- Both 'stable' and 'master' channels are present in the matrix strategy.
- 'examples/marvel' is correctly indented at line 35.
- No residual comments about 'WidgetStateProperty' found.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the complete matrix configuration in the workflow file # Test: Check for both 'stable' and 'master' channels echo "Checking for 'stable' and 'master' channels:" grep -A2 "channel:" .github/workflows/build.yml # Test: Verify the indentation of 'examples/marvel' in the package_path list echo "Checking indentation of 'examples/marvel':" grep -n "examples/marvel" .github/workflows/build.yml # Test: Check for any remaining comments about WidgetStateProperty echo "Checking for comments about WidgetStateProperty:" grep "WidgetStateProperty" .github/workflows/build.ymlLength of output: 702
packages/riverpod_lint/lib/src/lints/provider_parameters.dart (4)
40-40
: LGTM: Consistent use of_code
The change from
code
to_code
aligns with the class constructor and improves consistency in using the private constant for the lint code.
43-43
: LGTM: Consistent use of_code
This change maintains consistency with the previous modification, ensuring uniform usage of the private
_code
constant for lint reporting.
Line range hint
1-89
: Overall assessment: Improvements in consistency and null-safetyThe changes in this file primarily focus on two aspects:
- Consistent use of the private
_code
constant for lint reporting.- Updates to element access methods and improved null-safety checks.
These modifications enhance the code's consistency and robustness. The only point of attention is to ensure that the change from
enclosingElement3
toenclosingElement
is compatible with the current analyzer version being used.No new issues have been introduced, and the overall functionality of the
ProviderParameters
lint rule appears to be maintained.
49-58
: Verify API change and approve null-safe improvements
The change from
enclosingElement3
toenclosingElement
suggests a possible API update in the analyzer package. Please verify that this change is compatible with the current version of the analyzer being used.The introduction of
isEqualFromObjectMethod
improves null-safety and provides a more explicit check for whether the==
method is from theObject
class. This is a good improvement in code clarity and safety.The use of
_code
in the error reporting is consistent with previous changes.These changes appear to enhance the code's robustness and clarity. However, it's important to ensure that the analyzer API change is intentional and compatible.
To verify the analyzer API change, please run the following command:
packages/riverpod_lint/lib/src/lints/scoped_providers_should_specify_dependencies.dart (2)
Line range hint
1-138
: Overall assessment: Good quality with minor improvement suggestionsThe changes made to this file are appropriate and align with the broader updates in the package. The existing code is well-structured and follows good practices. The suggestions provided are for future improvements and do not impact the current functionality of the lint rule.
61-61
: Consistent use of_code
instead ofcode
The change from
code
to_code
aligns with the standardization of lint reporting mechanism mentioned in the summary. This modification enhances consistency across theriverpod_lint
package.Let's verify if this change is consistent across the codebase:
✅ Verification successful
Change to
_code
is consistent across the codebaseThe replacement of
code
with_code
has been thoroughly verified across theriverpod_lint
package, ensuring consistent use in the lint reporting mechanism.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for any remaining usages of 'code' in lint reporting # Test 1: Search for remaining instances of 'reporter.atNode' using 'code' echo "Checking for remaining 'reporter.atNode(code)' instances:" rg 'reporter\.atNode\([^,]+,\s*code\b' packages/riverpod_lint/lib/src/lints # Test 2: Verify the usage of '_code' in other lint files echo "Verifying '_code' usage in other lint files:" rg 'reporter\.atNode\([^,]+,\s*_code\b' packages/riverpod_lint/lib/src/lintsLength of output: 2103
packages/riverpod_generator/CHANGELOG.md (1)
1-5
: LGTM! The changelog entry is clear and informative.The new changelog entry for version 2.6.1 is well-formatted and provides clear information about the changes:
- It correctly specifies the version as "Unreleased 2.6.1".
- It clearly states the new analyzer version support range.
- It provides context for why this change is important (compatibility with Flutter's stable channel).
This aligns well with the PR objectives and the AI-generated summary, which mentioned updates to dependencies and support for the stable channel.
packages/riverpod_analyzer_utils/lib/src/riverpod_ast/ref_invocation.dart (1)
24-24
: Verify compatibility with the latest analyzer version.The change from
enclosingElement3
toenclosingElement
suggests an update to align with a newer version of the analyzer package. This modification appears to be part of a broader update across the codebase.To ensure compatibility and correct functionality, please run the following verification script:
This script will help confirm that:
- The analyzer version is up-to-date.
- All instances of
enclosingElement3
have been replaced.- The new
enclosingElement
property is consistently used across the codebase.Please review the script output to ensure the change has been applied consistently and that there are no compatibility issues with the current analyzer version.
✅ Verification successful
Verification Successful: All instances of
enclosingElement3
have been replaced withenclosingElement
.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the analyzer version and usage of enclosingElement # Check the analyzer version in pubspec.yaml echo "Analyzer version:" grep "analyzer:" pubspec.yaml # Check for any remaining usage of enclosingElement3 echo "Checking for any remaining usage of enclosingElement3:" rg "enclosingElement3" --type dart # Verify that all occurrences have been updated to enclosingElement echo "Verifying updated usage to enclosingElement:" rg "enclosingElement(?!3)" --type dartLength of output: 609
Script:
#!/bin/bash # Description: Verify the analyzer version and usage of enclosingElement # Check the analyzer version in pubspec.yaml echo "Analyzer version:" grep "analyzer:" pubspec.yaml # Check for any remaining usage of enclosingElement3 echo "Checking for any remaining usage of enclosingElement3:" rg "enclosingElement3" --type dart # Verify that all occurrences have been updated to enclosingElement without '3' suffix echo "Verifying updated usage to enclosingElement without '3':" rg --pcre2 "enclosingElement(?!3)" --type dartLength of output: 2063
packages/riverpod_analyzer_utils/lib/src/riverpod_ast/widget_ref_invocation.dart (1)
29-29
: LGTM. Verify impact on function owner identification.The change from
enclosingElement3
toenclosingElement
aligns with similar modifications in other parts of the codebase. This consistency is good for maintainability.Please ensure that this change doesn't alter the intended behavior of identifying the function owner. You may want to:
- Verify that
enclosingElement
provides the same or correct information as previously obtained fromenclosingElement3
.- Update any related documentation or comments if they reference the old property name.
To assist with verification, you can run the following script to check for any remaining uses of
enclosingElement3
in the codebase:This will help ensure that all instances have been updated consistently.
packages/riverpod_graph/lib/src/analyze.dart (1)
686-686
: LGTM! Verify impact on provider naming.The change from
enclosingElement3
toenclosingElement
looks correct and aligns with the updatedanalyzer
package (version ^6.7.0). This modification ensures compatibility with the new API.To ensure this change doesn't affect provider naming across the codebase, run the following script:
✅ Verification successful
Verified: Provider naming remains correct.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for any remaining usage of 'enclosingElement3' and verify 'enclosingElement' usage. # Test 1: Check for any remaining usage of 'enclosingElement3' echo "Checking for any remaining usage of 'enclosingElement3':" rg "enclosingElement3" --type dart # Test 2: Verify correct usage of 'enclosingElement' echo "Verifying correct usage of 'enclosingElement':" rg "enclosingElement\s*\?" --type dart # Test 3: Check for any provider name generation issues echo "Checking for potential provider name generation issues:" rg "displayNameForProvider|_ProviderName" --type dart -A 10 -B 5Length of output: 12933
packages/riverpod_lint/lib/src/assists/convert_to_stateful_base_widget.dart (1)
294-294
: Code change looks goodThe updated condition accurately checks whether the
element
's enclosing element is thewidgetClassElement
, which is appropriate for determining if the element should be modified or moved.packages/riverpod_lint/lib/src/assists/convert_to_stateless_base_widget.dart (1)
336-336
: LGTM!The added condition ensures that only elements belonging to
widgetClassElement
are considered, improving the accuracy of the visitor.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3796 +/- ##
===========================================
+ Coverage 95.76% 100.00% +4.23%
===========================================
Files 53 3 -50
Lines 2312 74 -2238
===========================================
- Hits 2214 74 -2140
+ Misses 98 0 -98
Flags with carried forward coverage won't be shown. Click here to find out more. |
Summary by CodeRabbit
New Features
Bug Fixes
custom_lint
dependency across multiple projects to ensure compatibility.analyzer
to align with Flutter's stable channel.Documentation
Refactor
riverpod_lint
package for better handling of stateful and stateless widgets.