mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-15 19:55:27 +00:00
Tweak command
This commit is contained in:
2
.github/workflows/ci.yaml
vendored
2
.github/workflows/ci.yaml
vendored
@ -47,7 +47,7 @@ jobs:
|
|||||||
python3 find_dart_files.py
|
python3 find_dart_files.py
|
||||||
flutter pub get
|
flutter pub get
|
||||||
flutter analyze
|
flutter analyze
|
||||||
dart format --output=none --set-exit-if-changed .
|
dart format . --output=none --set-exit-if-changed
|
||||||
|
|
||||||
- name: Install Python
|
- name: Install Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
|
@ -3,16 +3,13 @@ include: package:lint/analysis_options.yaml
|
|||||||
analyzer:
|
analyzer:
|
||||||
exclude:
|
exclude:
|
||||||
- [build/**]
|
- [build/**]
|
||||||
|
- lib/l10n/**
|
||||||
- lib/generated/**
|
- lib/generated/**
|
||||||
language:
|
language:
|
||||||
strict-raw-types: true
|
strict-raw-types: true
|
||||||
|
|
||||||
linter:
|
linter:
|
||||||
rules:
|
rules:
|
||||||
# ------ Disable individual rules ----- #
|
|
||||||
# --- #
|
|
||||||
# Turn off what you don't like. #
|
|
||||||
# ------------------------------------- #
|
|
||||||
|
|
||||||
# Make constructors the first thing in every class
|
# Make constructors the first thing in every class
|
||||||
sort_constructors_first: true
|
sort_constructors_first: true
|
||||||
|
7
tasks.py
7
tasks.py
@ -39,6 +39,9 @@ def android(c):
|
|||||||
c.run("flutter build appbundle --release --no-tree-shake-icons")
|
c.run("flutter build appbundle --release --no-tree-shake-icons")
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def format(c):
|
def format(c, analyze=False, dry_run=False):
|
||||||
"""Format Dart code."""
|
"""Format Dart code."""
|
||||||
c.run("dart format --output=none")
|
c.run(f"dart format .{" --output=none" if dry_run else ''}")
|
||||||
|
|
||||||
|
if analyze:
|
||||||
|
c.run("flutter analyze")
|
||||||
|
Reference in New Issue
Block a user