Skip to content
This repository was archived by the owner on Jul 16, 2023. It is now read-only.

Commit 6691810

Browse files
committed
docs: update package example
1 parent b12807d commit 6691810

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

example/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Examples
2+
3+
Dart Code Metrics is a static analysis tool and code from it is not expected to be used directly. Instead, it should be added as a dev dependency and installed [as described here](https://dartcodemetrics.dev/docs/getting-started/installation).
4+
5+
## Plugin and CLI
6+
7+
To use Dart Code Metrics as a plugin or a CLI, check out [this repository](https://github.com/dart-code-checker/dart-code-metrics-example) with the example Flutter app. It covers DCM setup and shows all commands output.
8+
9+
## As a library
10+
11+
Dart Code Metrics can be used as a library, imported and called directly from your code. Continue with [this example](https://github.com/dart-code-checker/dart-code-metrics/blob/master/example/example.dart) in order to get more details.
12+
13+
## Presets
14+
15+
Dart Code Metrics supports presets:
16+
17+
- all Dart rules [dart_all.yaml](https://github.com/dart-code-checker/dart-code-metrics/blob/master/lib/presets/dart_all.yaml)
18+
- all Flutter rules [flutter_all.yaml](https://github.com/dart-code-checker/dart-code-metrics/blob/master/lib/presets/flutter_all.yaml)
19+
- all rules [all.yaml](https://github.com/dart-code-checker/dart-code-metrics/blob/master/lib/presets/all.yaml)
20+
21+
Presets can be enabled with `extends` config, more details [can be found here](https://dartcodemetrics.dev/docs/getting-started/configuration#extending-an-existing-configuration-preset).

0 commit comments

Comments
 (0)