Skip to content

Solving Dart Warnings #57

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

Merged
merged 27 commits into from
Jul 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
cc0d672
Update Android Gradle configuration and dependencies
gabrielbmoro Jul 27, 2025
d36786e
Strengthen Dart static analysis and configure MegaLinter
gabrielbmoro Jul 27, 2025
ff93d7c
Some configurations specific for dart analysis
gabrielbmoro Jul 27, 2025
d0e8113
Update Flutter analysis options to use `flutter_lints`
gabrielbmoro Jul 27, 2025
04aec1e
feat: Add Dart analysis options
gabrielbmoro Jul 27, 2025
405c957
Refactor: Standardize string literal usage
gabrielbmoro Jul 27, 2025
140c6d4
Add pre-commands for Dartanalyzer
gabrielbmoro Jul 27, 2025
f636ba0
Remove unnecessary import
gabrielbmoro Jul 27, 2025
4e7dafd
chore: MegaLinter configuration updates
gabrielbmoro Jul 27, 2025
e048fcf
Add pre-step to install flutter dependencies
gabrielbmoro Jul 27, 2025
4a8c5e3
Some improvements
gabrielbmoro Jul 27, 2025
3e3544f
Disable detekt errors to focus only on Dart issues
gabrielbmoro Jul 27, 2025
dceb1dd
Specific fluttter set
gabrielbmoro Jul 27, 2025
1e2cad1
Setup flutter linter only for the craftD library
gabrielbmoro Jul 27, 2025
048e93b
Only including craftd-widget
gabrielbmoro Jul 27, 2025
8728544
Trying to specify a single location to be analyzed by megalinter
gabrielbmoro Jul 27, 2025
a62f106
Trying to execute as a precommand flutter pub get
gabrielbmoro Jul 27, 2025
f068334
Disable apply fixes
gabrielbmoro Jul 27, 2025
fa7f0cb
Specify the configuration file
gabrielbmoro Jul 27, 2025
575bcaa
Try to specify automatically the linter rules
gabrielbmoro Jul 27, 2025
eb42efd
Replace default cli analyzer
gabrielbmoro Jul 28, 2025
85caf66
Set Dartanalyzer include filter to flutter/craftd_widget/lib
gabrielbmoro Jul 28, 2025
2ac5ce7
Remove dart analyze from Megalinter, adding an extra step for flutter
gabrielbmoro Jul 28, 2025
0db7058
Create a specific workflow for flutter linter
gabrielbmoro Jul 28, 2025
c0014b4
Update flutter_lints dependency to version 4.0.0 in pubspec.yaml files
gabrielbmoro Jul 28, 2025
4f6e00f
Format yamls
gabrielbmoro Jul 28, 2025
50645c1
Solve some yaml issues
gabrielbmoro Jul 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@
## Related Issues

[Add issues related to this PR, if any.]
- [issue 1 link]

- [issue 1 link]
20 changes: 20 additions & 0 deletions .github/actions/setup-flutter/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Setup Flutter"
description: "Reusable action to setup Flutter environment"

runs:
using: "composite"
steps:
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.29.3" # Set the desired Flutter version

- name: Install dependencies - CraftD Widget
working-directory: flutter/craftd_widget
run: flutter pub get
shell: bash

- name: Install dependencies - Sample
working-directory: flutter/sample
run: flutter pub get
shell: bash
8 changes: 4 additions & 4 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: documentation
name: documentation
on:
pull_request:
branches:
- main
paths:
- 'docs/**'
- "docs/**"
permissions:
contents: write
jobs:
Expand All @@ -19,12 +19,12 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force
25 changes: 25 additions & 0 deletions .github/workflows/flutter-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Flutter linter

on:
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Flutter
uses: ./.github/actions/setup-flutter

- name: Analyze - CraftD Widget
working-directory: flutter/craftd_widget
run: dart analyze

- name: Analyze - Sample
working-directory: flutter/sample
run: dart analyze
2 changes: 1 addition & 1 deletion .github/workflows/mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ jobs:
env:
VALIDATE_ALL_CODEBASE: true

GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10 changes: 5 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build and Test for PRs
on:
pull_request:
branches:
- '*'
- "*"

jobs:
build:
Expand All @@ -17,8 +17,8 @@ jobs:
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
distribution: "temurin"
java-version: "17"

- name: Set up Android SDK
uses: android-actions/setup-android@v2
Expand All @@ -43,8 +43,8 @@ jobs:
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
distribution: "temurin"
java-version: "17"

- name: Run Unit Tests
run: ./gradlew testDebugUnitTest --no-daemon
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
distribution: "temurin"
java-version: "17"

- name: Publish to Maven Central
run: |
Expand All @@ -37,7 +37,7 @@ jobs:
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
ruby-version: "3.0"
bundler-cache: true

- name: Install bundler & Fastlane
Expand All @@ -49,4 +49,4 @@ jobs:
- name: Update tag
run: bundle exec fastlane update_tag
env:
PREFIX: 'android'
PREFIX: "android"
6 changes: 2 additions & 4 deletions .mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# linters documentation

# all, none, or list of linter keys
APPLY_FIXES: all
APPLY_FIXES: none

# If you use ENABLE variable, all other languages/formats/tooling-formats will
# be disabled by default
Expand All @@ -16,7 +16,6 @@ ENABLE_LINTERS:
- YAML_PRETTIER
- MARKDOWN_MARKDOWN_TABLE_FORMATTER
- KOTLIN_DETEKT
- DART_DARTANALYZER
- SWIFT_SWIFTLINT

DISABLE:
Expand All @@ -28,7 +27,6 @@ SHOW_ELAPSED_TIME: true
FILEIO_REPORTER: false
# Uncomment if you want MegaLinter to detect errors but not block CI to pass

DISABLE_ERRORS: true

KOTLIN_DETEKT_ARGUMENTS: -c android_kmp/config/detekt/detekt.yml
JAVASCRIPT_STANDARD_DISABLE_ERRORS: true
KOTLIN_DETEKT_DISABLE_ERRORS: true
Loading
Loading