legit 0.2.0

Legit #

Legit is a Git Library for Dart.

Examples #

List Commits #

import "package:legit/legit.dart";

main() async {
  var git = new GitClient.forCurrentDirectory();

  var commits = await git.listCommits();
  for (var commit in commits) {
    print("- " + commit.message);
    print("  By: ${commit.author.name} <${commit.author.email}>");
    print("  SHA: ${commit.sha}");
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  legit: ^0.2.0

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:legit/legit.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
74
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
60
Overall:
Weighted score of the above. [more]
34
Learn more about scoring.

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

  • Dart: 2.7.1
  • pana: 0.13.6

Health issues and suggestions

Document public APIs. (-1 points)

196 out of 196 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/src/client.dart. (-25 points)

Analysis of lib/src/client.dart reported 71 hints, including:

line 4 col 37: Unnecessary new keyword.

line 30 col 15: Unnecessary new keyword.

line 31 col 12: Unnecessary new keyword.

line 35 col 12: Unnecessary new keyword.

line 39 col 12: Unnecessary new keyword.

Fix lib/io.dart. (-9.08 points)

Analysis of lib/io.dart reported 19 hints, including:

line 31 col 31: Unnecessary new keyword.

line 35 col 14: Unnecessary new keyword.

line 37 col 15: Unnecessary new keyword.

line 45 col 14: Unnecessary new keyword.

line 47 col 15: Unnecessary new keyword.

Fix lib/raw.dart. (-5.36 points)

Analysis of lib/raw.dart reported 11 hints, including:

line 16 col 22: Unnecessary new keyword.

line 19 col 12: Unnecessary new keyword.

line 37 col 30: Unnecessary new keyword.

line 41 col 23: Unnecessary new keyword.

line 57 col 20: 'ZLIB' is deprecated and shouldn't be used. Use zlib instead.

Fix lib/id.dart. (-4.89 points)

Analysis of lib/id.dart reported 10 hints, including:

line 6 col 47: Use = to separate a named parameter from its default value.

line 7 col 12: Unnecessary new keyword.

line 8 col 16: Unnecessary new keyword.

line 10 col 11: Unnecessary new keyword.

line 11 col 13: Unnecessary new keyword.

Fix lib/src/commits.dart. (-0.50 points)

Analysis of lib/src/commits.dart reported 1 hint:

line 34 col 27: Unnecessary new keyword.

Maintenance issues and suggestions

Provide a file named CHANGELOG.md. (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

Common filename patterns include main.dart, example.dart, and legit.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 >=2.0.0 <3.0.0
crypto ^2.0.6 2.1.4
path ^1.6.2 1.6.4
Transitive dependencies
charcode 1.1.3
collection 1.14.12
convert 2.1.1
typed_data 1.1.6