From a934501ae79b39fda4a8fb7314efe7ac2191fdae Mon Sep 17 00:00:00 2001 From: Husamettin ARABACI Date: Fri, 3 Oct 2025 00:11:45 +0300 Subject: [PATCH 1/2] feat(setup): rules Test Rules Test 1 --- .github/workflows/ci.yml | 91 ++++++++++++++------------------ .github/workflows/commitlint.yml | 2 +- README.md | 6 +++ REUSE.toml | 18 ++++++- hexagenapp/README.md | 5 ++ hexagenapp/analysis_options.yaml | 4 +- hexagenapp/lib/main.dart | 3 ++ hexagenapp/pubspec.yaml | 6 ++- 8 files changed, 80 insertions(+), 55 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b756a81..072bca8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,72 +1,63 @@ # SPDX-FileCopyrightText: 2025 hexaTune LLC # SPDX-License-Identifier: MIT -name: 🤖 CI +name: "🤖 Lint & Format (Flutter - hexagenapp)" on: + push: + branches: + - develop + - main + - "release/**" pull_request: branches: - develop - main - "release/**" +env: + PROJECT_DIR: hexagenapp + jobs: - fmt: + lint: name: Check Formatting (hexaGenApp) runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - name: Check code formatting - run: cargo fmt -- --check - - clippy: - name: Run Clippy Linter (hexaGenApp) - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v4 - - name: Install Rust - uses: actions-rs/toolchain@v1 + - name: Setup Java (required by some Flutter tooling) + uses: actions/setup-java@v4 with: - toolchain: stable - override: true + distribution: temurin + java-version: "17" - - name: Run Clippy - run: cargo clippy --all-targets --all-features -- -D warnings - - build: - name: Build Project (hexaGenApp) - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Install Rust - uses: actions-rs/toolchain@v1 + - name: Setup Flutter + uses: subosito/flutter-action@v2 with: - toolchain: stable - override: true - - - name: Build - run: cargo build --locked --all-targets + flutter-version: "stable" + channel: "stable" + cache: true - test: - name: Run Tests (hexaGenApp) - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Install Rust - uses: actions-rs/toolchain@v1 + - name: Cache Pub & .dart_tool + uses: actions/cache@v4 with: - toolchain: stable - override: true - - - name: Run tests - run: cargo test --locked --all-targets + path: | + ~/.pub-cache + ${{ env.PROJECT_DIR }}/.dart_tool + key: pub-${{ runner.os }}-${{ hashFiles(format('{0}/pubspec.lock', env.PROJECT_DIR)) }} + restore-keys: | + pub-${{ runner.os }}- + + - name: flutter pub get + working-directory: ${{ env.PROJECT_DIR }} + run: flutter pub get + + - name: Check formatting + working-directory: ${{ env.PROJECT_DIR }} + run: dart format --output=none --set-exit-if-changed . + + - name: Static analysis + working-directory: ${{ env.PROJECT_DIR }} + run: flutter analyze diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index c25647a..3c4fc03 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -17,5 +17,5 @@ jobs: - name: Lint commits uses: wagoid/commitlint-github-action@v5 with: - configFile: .commitlintrc.yml + configFile: .github/.commitlintrc.yml failOnWarnings: true diff --git a/README.md b/README.md index 5d0af6e..829fd7c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,8 @@ + + # hexaGenApp + hexaGen Mobile App diff --git a/REUSE.toml b/REUSE.toml index e850e3e..5707dc4 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -1,7 +1,23 @@ version = 1 [[annotations]] -path = ["package.json", "CHANGELOG.md"] +path = ["package.json", "CHANGELOG.md", ".gitignore", "docs/CNAME"] +precedence = "aggregate" +SPDX-FileCopyrightText = "2025 hexaTune LLC" +SPDX-License-Identifier = "MIT" + +[[annotations]] +path = [ + "hexagenapp/android/**", + "hexagenapp/ios/**", + "hexagenapp/linux/**", + "hexagenapp/web/**", + "hexagenapp/windows/**", + "hexagenapp/macos/**", + "hexagenapp/.gitignore", + "hexagenapp/.metadata", + "hexagenapp/test/**", +] precedence = "aggregate" SPDX-FileCopyrightText = "2025 hexaTune LLC" SPDX-License-Identifier = "MIT" diff --git a/hexagenapp/README.md b/hexagenapp/README.md index 0e11881..829aea2 100644 --- a/hexagenapp/README.md +++ b/hexagenapp/README.md @@ -1,3 +1,8 @@ + + # hexagenapp A new Flutter project. diff --git a/hexagenapp/analysis_options.yaml b/hexagenapp/analysis_options.yaml index 0d29021..abb7328 100644 --- a/hexagenapp/analysis_options.yaml +++ b/hexagenapp/analysis_options.yaml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2025 hexaTune LLC +# SPDX-License-Identifier: MIT + # This file configures the analyzer, which statically analyzes Dart code to # check for errors, warnings, and lints. # @@ -23,6 +26,5 @@ linter: rules: # avoid_print: false # Uncomment to disable the `avoid_print` rule # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - # Additional information about this file can be found at # https://dart.dev/guides/language/analysis-options diff --git a/hexagenapp/lib/main.dart b/hexagenapp/lib/main.dart index 7b7f5b6..7fcfee7 100644 --- a/hexagenapp/lib/main.dart +++ b/hexagenapp/lib/main.dart @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2025 hexaTune LLC +// SPDX-License-Identifier: MIT + import 'package:flutter/material.dart'; void main() { diff --git a/hexagenapp/pubspec.yaml b/hexagenapp/pubspec.yaml index b5109a5..0b01f60 100644 --- a/hexagenapp/pubspec.yaml +++ b/hexagenapp/pubspec.yaml @@ -1,8 +1,11 @@ +# SPDX-FileCopyrightText: 2025 hexaTune LLC +# SPDX-License-Identifier: MIT + name: hexagenapp description: "A new Flutter project." # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev +publish_to: "none" # Remove this line if you wish to publish to pub.dev # The following defines the version and build number for your application. # A version number is three numbers separated by dots, like 1.2.43 @@ -51,7 +54,6 @@ dev_dependencies: # The following section is specific to Flutter packages. flutter: - # The following line ensures that the Material Icons font is # included with your application, so that you can use the icons in # the material Icons class. From b182d78d8ff78bd7745be62e722d8a21c40b37d3 Mon Sep 17 00:00:00 2001 From: Husamettin ARABACI Date: Fri, 3 Oct 2025 00:16:08 +0300 Subject: [PATCH 2/2] feat(setup): rules Test Rules Test 1 --- .github/workflows/ci.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 072bca8..c72b153 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,14 +1,9 @@ # SPDX-FileCopyrightText: 2025 hexaTune LLC # SPDX-License-Identifier: MIT -name: "🤖 Lint & Format (Flutter - hexagenapp)" +name: 🤖 Lint & Format on: - push: - branches: - - develop - - main - - "release/**" pull_request: branches: - develop @@ -36,7 +31,6 @@ jobs: - name: Setup Flutter uses: subosito/flutter-action@v2 with: - flutter-version: "stable" channel: "stable" cache: true