-
Notifications
You must be signed in to change notification settings - Fork 0
Migrate data source from rules.json to messages.yaml #9
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
Conversation
Ready for review 🚀 |
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.
@r0227n
I've left some comments, so please take a look. 🙏
tools/update_lint_rules/lib/src/services/lint_rule_service.dart
Outdated
Show resolved
Hide resolved
tools/update_lint_rules/lib/src/services/lint_rule_service.dart
Outdated
Show resolved
Hide resolved
@blendthink
but we are aware that this is not a problem. package_api_docsBefore: rules.jsonhttps://github.com/dart-lang/sdk/blob/ae6da8b926f208bf87d2e11375be5c611c27ee1b/pkg/linter/tool/machine/rules.json#L1625-L1638 After: message.yamlBecause “removed” is 3.7 or later, it is now output in 3.6. unsafe_htmlBefore modification: rules.jsonNot output because it is not described in the rules.json. After: message.yamlThe output is output because it is described. |
@blendthink |
… to JSON conversion process
…rule retrieval process
…ML to JSON within LintRuleService
Rename sourceRuleWithCategories to ruleWithCategories to make the code more concise while maintaining clarity about the variable's role in handling shared rule categories.
…dName and merge data after encoding.
tools/update_lint_rules/lib/src/mappers/lint_code_dto_mapper.dart
Outdated
Show resolved
Hide resolved
@blendthink |
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.
@r0227n
Please take a look and leave your comments or make any necessary changes.
…d sharedName null”.
@blendthink https://github.com/yumemi-inc/flutter-yumemi-lints/pull/163/files This is the latest diff as of 9ed9b39. |
@blendthink |
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.
LGTM!
Issue
Overview (Required)
This pull request includes several changes to the
tools/update_lint_rules
package, focusing on updating theLintRule
model, adding a new JSON converter forState
, and modifying theAnalysisOptionsService
to use the newState
type. The most important changes include the introduction of theState
type, the addition of new methods to theRuleState
enum, and the updates to theAnalysisOptionsService
to filter rules based on the newState
type.Updates to
LintRule
model:categories
anddetails
, and replacedRuleState
with the newState
type in theRule
factory constructor.State
type as a typedef forMap<RuleState, Since>
and added the_StateJsonConverter
class to handle JSON serialization and deserialization for theState
type.Enhancements to
RuleState
enum:internal
state to theRuleState
enum.active
andinactive
getter methods to determine the activity status of a rule state.Changes to
AnalysisOptionsService
:hasSupportedVersion
to theState
type to check if a rule state meets a minimum Dart SDK version.AnalysisOptionsService
to use the newState
type and itshasSupportedVersion
method.Codebase simplification:
description
,incompatibles
,sets
,fixStatus
, andsince
from theRule
class and its related classes and methods.lint_rule.g.dart
to reflect the changes in theRule
class.Links
Screenshot
N/A