Repository navigation
Update skills_lint to ^0.5.3 and enforce publisher rules - #257
Open
reidbaker-agent wants to merge 3 commits into
Open
reidbaker-agent wants to merge 3 commits into
reidbaker-agent wants to merge 3 commits into
Conversation
skills_lint 0.5.3 requires Dart ^3.12.0. With the 3.12 language version, Dart 3.13.7 stable reports prefer_initializing_formals on the private fields of ResourceFetcherService and deprecated_lint on use_if_null_to_convert_nulls_to_bools. Use private named initializing formals (the public parameter names stay httpClient and logger) and drop the deprecated lint.
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the Dart SDK environment constraint to ^3.12.0, adjusts linter and skills_lint configurations, and adds a test assertion for parsing errors. In ResourceFetcherService, the constructor was refactored to use initializing formals for private fields. However, because named parameters starting with an underscore are private in Dart, this change will cause compilation errors for external callers. It is recommended to revert to public named parameters with an initializer list.
reidbaker
self-requested a review
November 2, 2026 16:49
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.
Update to skills_lint 0.5.3 and enable new configs for published skills.
@reidbaker
Details
Description
This PR updates
skills_lintintool/generatorfrom^0.5.2to^0.5.3and turns on two more checks for the skills inskills/.Changes:
tool/generator/pubspec.yaml:skills_lint: ^0.5.3.pubspec.yaml(workspace root) andtool/generator/pubspec.yaml:sdk: ^3.12.0(was^3.10.8). skills_lint 0.5.3 requires Dart^3.12.0, sodart pub getfails on older SDKs. CI usessdk: stable(3.13.7 today), so CI is not affected.tool/generator/skills_lint.yaml:disallowed-field: error. This rule is not new in 0.5.3. It reports SKILL.md frontmatter keys that are not allowed.check-relative-pathswithwithin-skill: trueon the../../skillsdirectory. This option is new in 0.5.3. It reports relative links that leave the skill's own folder, which break when one skill is installed on its own.tool/generator/test/lint_skills_test.dart: addsexpect(config.parsingErrors, isEmpty). The 0.5.3 CHANGELOG notes thatvalidateSkillsreturns true even whenconfig.parsingErrorsis not empty. Without this check, a typo inskills_lint.yamlwould pass the test.dart analyze --fatal-infos. Onmain(3.10 language version) it reports none.prefer_initializing_formalson the 2 private fields inResourceFetcherService. Fixed with private named initializing formals (required this._httpClient). Callers still passhttpClient:andlogger:.deprecated_lintforuse_if_null_to_convert_nulls_to_bools. Removed fromanalysis_options.yaml.pub-archive-includes-skill(also new in 0.5.3) is not turned on, because this repo does not publish a pub package.Merge order
Land the dart-lang/skills skills_lint 0.5.3 PR (dart-lang/skills#56) first, or at the same time. A daily job (
sync_skills.yaml) copiesskills/dart-*from dart-lang/skills into this repo. Today dart-lang/skills does not rundisallowed-fieldorwithin-skill. If it adds content that breaks those rules, the sync PR here fails, andblock-dart-skills-prs.yamlstops anyone from fixing those files here.Testing
Run locally against skills_lint 0.5.3 from pub.dev, with no dependency overrides. Commands match
skills_tool.yamlandcode_scanning.yaml, run intool/generator:dart pub get: resolvesskills_lint 0.5.3from pub.dev.dart analyze --fatal-infos:No issues found!dart format --output=none --set-exit-if-changed .: 0 changed.dart test:+101: All tests passed!dart run skills_lint: all skills valid, exit 0.--format=sarif: 0 results.This change was prepared with help from an AI agent.