Add dart formatting (#440)

Signed-off-by: Glenn Jocher <[email protected]>
This commit is contained in:
Glenn Jocher
2025-05-10 18:43:52 +02:00
committed by GitHub
parent 7ba774a7b1
commit d35f96057f
2 changed files with 20 additions and 3 deletions
+1
View File
@@ -82,6 +82,7 @@ To integrate this action into your Ultralytics repository:
python: true # Format Python with Ruff and docformatter
prettier: true # Format YAML, JSON, Markdown, CSS
swift: false # Format Swift (requires macos-latest)
dart: false # Format Dart/Flutter
spelling: true # Check spelling with codespell
links: true # Check broken links with Lychee
summary: true # Generate AI-powered PR summaries
+19 -3
View File
@@ -30,6 +30,10 @@ inputs:
description: "Run Swift formatting"
required: false
default: "false"
dart:
description: "Run Dart formatting"
required: false
default: "false"
spelling:
description: "Run Spelling checks"
required: false
@@ -107,7 +111,7 @@ runs:
if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && inputs.summary == 'true' && github.event.action != 'synchronize'
env:
GITHUB_TOKEN: ${{ inputs.token }}
BRAVE_API_KEY: ${{ inputs.openai_api_key }}
BRAVE_API_KEY: ${{ inputs.brave_api_key }}
OPENAI_API_KEY: ${{ inputs.openai_api_key }}
OPENAI_MODEL: ${{ inputs.openai_model }}
run: |
@@ -180,6 +184,18 @@ runs:
shell: bash
continue-on-error: true
# Dart formatting --------------------------------------------------------------------------------------------------
- name: Setup Dart SDK
if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && inputs.dart == 'true' && github.event.action != 'closed'
uses: dart-lang/setup-dart@v1
- name: Run Dart Formatter
if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && inputs.dart == 'true' && github.event.action != 'closed'
run: |
dart format .
shell: bash
continue-on-error: true # Important so that commit step can pick up changes
# Spelling ---------------------------------------------------------------------------------------------------------
- name: Run Codespell
if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && inputs.spelling == 'true' && github.event.action != 'closed'
@@ -199,7 +215,7 @@ runs:
GITHUB_TOKEN: ${{ inputs.token }}
FIRST_ISSUE_RESPONSE: ${{ inputs.first_issue_response }}
FIRST_PR_RESPONSE: ${{ inputs.first_pr_response }}
BRAVE_API_KEY: ${{ inputs.openai_api_key }}
BRAVE_API_KEY: ${{ inputs.brave_api_key }}
OPENAI_API_KEY: ${{ inputs.openai_api_key }}
OPENAI_MODEL: ${{ inputs.openai_model }}
run: |
@@ -230,7 +246,7 @@ runs:
# Broken links -----------------------------------------------------------------------------------------------------
- name: Broken Link Checker
if: inputs.links == 'true' && github.event.action != 'closed'
uses: lycheeverse/[email protected].0
uses: lycheeverse/[email protected].1
with:
# Check all markdown and html files in repo. Ignores the following status codes to reduce false positives:
# - 403(OpenVINO, "forbidden")