Skip to content
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

How to turn off Invalid Warning check? #40

Open
brodienguyen opened this issue Jan 21, 2023 · 7 comments · May be fixed by #96
Open

How to turn off Invalid Warning check? #40

brodienguyen opened this issue Jan 21, 2023 · 7 comments · May be fixed by #96
Labels
enhancement New feature or request question Further information is requested

Comments

@brodienguyen
Copy link

Hi there,

Please let me know if there is a way to skip this warning message. Btw, I wonder why it raises for those import lines, please?
image

Regards,
Brodie

@brodienguyen brodienguyen changed the title How to turn off Invalid Warning check How to turn off Invalid Warning check? Jan 21, 2023
@simplenotezy
Copy link

We got something similar:

image

@simplenotezy
Copy link

@zgosalvez would love to hear if you got a workaround

@simplenotezy
Copy link

This is our workflow btw:

name: Run checks

on:
  pull_request:
    types:
      - opened
      - reopened
      - synchronize
      - ready_for_review
env:
  FLUTTER_VERSION: "3.13.9"
  FLUTTER_CHANNEL: "stable"
  
jobs:
  build:
    name: Run checks
    runs-on: ubuntu-latest
    if: ${{ github.event.pull_request.draft == false }}
    steps:
      - name: Checkout code
        uses: actions/checkout@v2
        
      - name: Set up Flutter
        uses: subosito/[email protected]
        with:
          flutter-version: ${{ env.FLUTTER_VERSION }}
          channel: ${{ env.FLUTTER_CHANNEL }}
          architecture: x64
          cache: true

      - name: Create .env
        run: echo "WHY_CANNOT_I_BE_EMPTY" > .env
      
      - run: |
          flutter pub get
          flutter pub run build_runner build --delete-conflicting-outputs

      - name: Analyze Dart
        uses: zgosalvez/github-actions-analyze-dart@v3
        with:
          line-length: 150
          fail-on-warnings: true
          fail-on-infos: false

@simplenotezy
Copy link

Perhaps it could be because line-length is not respected?

@zgosalvez zgosalvez added enhancement New feature or request question Further information is requested labels Dec 3, 2023
@zgosalvez
Copy link
Owner

I'm curious to know why you'd like to turn off warnings. By design, this action is informative based on the output reported by Dart. By default, this action won't fail anyway since fail-on-warnings is false.

@FriesI23 FriesI23 linked a pull request Mar 29, 2024 that will close this issue
@zgosalvez
Copy link
Owner

@brodienguyen / @simplenotezy, care to verify if the PR will resolve your issue? If so, I will merge the changes.

@FriesI23
Copy link

FriesI23 commented Apr 18, 2024

@brodienguyen / @simplenotezy, care to verify if the PR will resolve your issue? If so, I will merge the changes.

@zgosalvez Hi, Thank you very much for providing this great Action first!

This PR([#96) is useful because generated files doesn't and shouldn't be formatted with dart format, e,g, g.dart by json_serializable.

These files also configured to be excluded in analysis_options.yaml normally in projects.

I'm also feel confused by these warnings thrown from my *.g.dart files (generate by flutter gen-l10n, these files won't follow role defined by flutter_lints or linter option in analysis_options.yaml).

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants