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]
76
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
60
Overall:
Weighted score of the above. [more]
35
Learn more about scoring.

We analyzed this package on Sep 10, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.0
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, other

Primary library: package:legit/legit.dart with components: io.

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. (-17.76 points)

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

line 49 col 14: Use = to separate a named parameter from its default value.

line 50 col 16: Use = to separate a named parameter from its default value.

line 69 col 14: Use = to separate a named parameter from its default value.

line 70 col 19: Use = to separate a named parameter from its default value.

line 71 col 16: Use = to separate a named parameter from its default value.

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

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

line 73 col 22: Use = to separate a named parameter from its default value.

line 76 col 34: Use = to separate a named parameter from its default value.

line 77 col 20: Use = to separate a named parameter from its default value.

line 84 col 17: Use = to separate a named parameter from its default value.

line 85 col 23: Use = to separate a named parameter from its default value.

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

Analysis of lib/raw.dart reported 3 hints:

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

line 69 col 26: 'ZLIB' is deprecated and shouldn't be used.

line 74 col 17: Avoid empty catch blocks.

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

Analysis of lib/id.dart reported 2 hints:

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

line 64 col 20: The declaration '_specials' isn't referenced.

Format lib/src/commits.dart.

Run dartfmt to format lib/src/commits.dart.

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.3
path ^1.6.2 1.6.4
Transitive dependencies
charcode 1.1.2
collection 1.14.12
convert 2.1.1
typed_data 1.1.6