tuneup 0.3.7

  • Readme
  • Changelog
  • Installing
  • 75

tuneup.dart #

A command-line tool to manipulate and inspect your Dart projects.

Build Status

Installing #

To install, run:

pub global activate tuneup

Running #

Run tuneup --help (or pub global run tuneup --help) to see a list of available commands.

  • init: create a new project
  • check: analyze all the source code in the project - fail if there are any errors (this is the default action)
  • stats: display metadata and statistics about the project
  • trim: trim unwanted whitespace from your source
  • clean: clean the project (remove the build/ directory)

Then run a tuneup command, like check:

pub global run tuneup check

or,

tuneup check

from the root of your project.

Filing Issues #

Please file reports on the GitHub Issue Tracker.

Disclaimer #

This is not an official Google product.

Changelog #

0.3.7 #

  • add a new --fail-on-todos flag to the check command
  • update the package:cli_util dep

0.3.6+2 #

  • widened our dependency on package:intl

0.3.6+1 #

  • reduced the package dependencies

0.3.6 #

  • updated pubspec dependencies for Dart 2

0.3.5 #

  • fix an issue where the --ignore-infos flag was ignored

0.3.4 #

  • add additional flags to the check command

0.3.3 #

  • upgrade package dependencies

0.3.2+2 #

  • better server crash reporting

0.3.2+1 #

  • fix an issue responding to analysis server crashes

0.3.2 #

  • add a --preview-dart-2 flag

0.3.1+3 #

  • pass the --client-id field into the analysis server

0.3.1+2 #

  • allow an sdk to be specified with --dart-sdk

0.3.1+1 #

  • fix an NPE when analyzing a directory without a pubspec.yaml file

0.3.0 #

  • re-write the check command to be based on the analysis server

0.2.6 #

  • rev to 0.30.0-alpha.1 of the analyzer
  • print error codes in the output (useful for // ignore: foo_bar comments)

0.2.5 #

  • rev to 0.28.1 of the analyzer

0.2.4 #

  • rev to the latest version of the analysis engine (0.27.4)

0.2.3 #

  • rev to the latest version of the analysis engine (0.27.4-alpha.13)

0.2.2 #

  • rev to the latest version of the analysis engine to capture some fixes to strong mode warnings

0.2.1 #

  • rev to the latest version of the analysis engine
  • support conditional directives and super mixins

0.2.0 #

  • bump version to 0.2.0

0.1.4 #

  • add support for .analysis_options file excludes
  • add support for strong mode analysis

0.1.3+1 #

  • fixed an issue with the check command on windows

0.1.3 #

  • upgraded the analyzer version to capture a change to analyzing unnamed libraries
  • added a --directory flag to support analyzing something besides the current working directory

0.1.2 #

  • fixed an issue analyzing libraries that were referred to by both self-references (package: references) and relative path references

0.1.1 #

  • added support for .packages files
  • added support for SDK extensions

0.1.0 #

  • upgraded to analyzer 0.26.0 and test 0.12.0

0.0.5 #

  • made check the default command

0.0.4 #

  • upgraded to the latest analyzer; now supports async / await syntax

0.0.3+1 #

  • bug fixes to the init command

0.0.3 #

  • added support for yaml files to trim

0.0.2 #

  • added a trim command
  • renamed analyze to check

0.0.1 #

  • initial version, created by Stagehand

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate tuneup

2. Use it

The package has the following executables:


$ tuneup

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  tuneup: ^0.3.7

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:tuneup/tuneup.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
70
Health:
Code health derived from static analysis. [more]
75
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
75
Learn more about scoring.

We analyzed this package on Jul 9, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.14

Analysis suggestions

Package not compatible with runtime flutter-web on web

Because:

  • package:tuneup/tuneup.dart that imports:
  • package:tuneup/src/common.dart that imports:
  • package:cli_util/cli_logging.dart that imports:
  • dart:io

Package not compatible with runtime js

Because:

  • package:tuneup/tuneup.dart that imports:
  • package:tuneup/src/common.dart that imports:
  • package:cli_util/cli_logging.dart that imports:
  • dart:io

Health suggestions

Fix lib/commands/trim.dart. (-16.51 points)

Analysis of lib/commands/trim.dart reported 36 hints, including:

line 14 col 5: Unnecessary new keyword.

line 15 col 5: Unnecessary new keyword.

line 16 col 5: Unnecessary new keyword.

line 17 col 5: Unnecessary new keyword.

line 18 col 5: Unnecessary new keyword.

Fix lib/commands/check.dart. (-6.31 points)

Analysis of lib/commands/check.dart reported 13 hints, including:

line 36 col 27: Unnecessary new keyword.

line 81 col 27: Unnecessary new keyword.

line 82 col 5: Future results in async function bodies must be awaited or marked unawaited using package:pedantic.

line 88 col 51: Unnecessary new keyword.

line 96 col 13: Unnecessary new keyword.

Fix lib/tuneup.dart. (-6.31 points)

Analysis of lib/tuneup.dart reported 13 hints, including:

line 5 col 1: Prefer using /// for doc comments.

line 48 col 16: Unnecessary new keyword.

line 49 col 16: Unnecessary new keyword.

line 50 col 16: Unnecessary new keyword.

line 51 col 16: Unnecessary new keyword.

Fix additional 6 files with analysis or formatting issues. (-13.77 points)

Additional issues in the following files:

  • lib/src/common.dart (11 hints)
  • lib/commands/init.dart (8 hints)
  • lib/commands/stats.dart (3 hints)
  • lib/src/glob.dart (3 hints)
  • lib/commands/clean.dart (2 hints)
  • bin/tuneup.dart (1 hint)

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and tuneup.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.23.0 <3.0.0
analysis_server_lib ^0.1.4 0.1.9
args ^1.0.0 1.6.0
cli_util ^0.2.0 0.2.0
intl >=0.15.0 <0.17.0 0.16.1
logging ^0.11.0 0.11.4
path >=1.4.0 <2.0.0 1.7.0
yaml >=2.0.0 <3.0.0 2.2.1
Transitive dependencies
charcode 1.1.3
collection 1.14.13 1.15.0-nnbd
meta 1.2.1
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
Dev dependencies
test ^1.0.0