@@ -33,30 +33,39 @@ Here is how static analysis is used internally at Google:
33
33
34
34
## Enabled Lints
35
35
36
- The currently enabled lints can be found in the sample
37
- [ analysis_options.yaml] ( https://github.com/dart-lang/pedantic/blob/master/lib/analysis_options.yaml ) .
36
+ The currently enabled lints can be found in
37
+ [ analysis_options.1.7.0. yaml] ( https://github.com/dart-lang/pedantic/blob/master/lib/analysis_options.1.7.0 .yaml ) .
38
38
39
- To use those lints you can add a dependency in your ` pubspec.yaml ` :
39
+ ## Using the Lints
40
+
41
+ To use the lints add a dependency in your ` pubspec.yaml ` :
40
42
41
43
``` yaml
42
- # If you also need to import `package:pedantic/pedantic.dart`, it's a
43
- # normal dependency.
44
+ # If you use `package:pedantic/pedantic.dart`, add a normal dependency.
44
45
dependencies :
45
- pedantic : ' 1.4 .0'
46
+ pedantic : ' 1.7 .0'
46
47
47
48
# Or, if you just want `analysis_options.yaml`, it can be a dev dependency.
48
49
dev_dependencies :
49
- pedantic : ' 1.4 .0'
50
+ pedantic : ' 1.7 .0'
50
51
` ` `
51
52
52
- and add an include in your ` analysis_options.yaml`:
53
+ then, add an include in your ` analysis_options.yaml`. If you want to always
54
+ use the latest version of the lints, add a dependency on the main
55
+ `analysis_options` file :
56
+
53
57
54
58
` ` ` yaml
55
59
include: package:pedantic/analysis_options.yaml
56
60
` ` `
57
61
58
- This example uses a pinned version because every added lint rule could break a
59
- build for projects using it.
62
+ If your continuous build and/or presubmit check lints then they will likely
63
+ fail whenever a new version of `package:pedantic` is released. To avoid this,
64
+ specify a specific version of `analysis_options.yaml` instead :
65
+
66
+ ` ` ` yaml
67
+ include: package:pedantic/analysis_options.1.7.0.yaml
68
+ ` ` `
60
69
61
70
# # Unused Lints
62
71
0 commit comments