Skip to content
This repository was archived by the owner on Aug 2, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ To use these lints create an `analysis_options.yaml` file with:
`include: package:lints/core.yaml`.

<!-- core -->
| Lint Rules | Description | Fix |
| :--------- | :---------- | --- |
| Lint Rules | Description | [Fix][] |
| :--------- | :---------- | ------- |
| [`avoid_empty_else`](https://dart.dev/lints/avoid_empty_else) | Avoid empty else statements. | ✅ |
| [`avoid_relative_lib_imports`](https://dart.dev/lints/avoid_relative_lib_imports) | Avoid relative imports for files in `lib/`. | ✅ |
| [`avoid_shadowing_type_parameters`](https://dart.dev/lints/avoid_shadowing_type_parameters) | Avoid shadowing type parameters. | |
Expand Down Expand Up @@ -138,8 +138,8 @@ To use these lints create an `analysis_options.yaml` file with:
`include: package:lints/recommended.yaml`.

<!-- recommended -->
| Lint Rules | Description | Fix |
| :--------- | :---------- | --- |
| Lint Rules | Description | [Fix][] |
| :--------- | :---------- | ------- |
| [`annotate_overrides`](https://dart.dev/lints/annotate_overrides) | Annotate overridden members. | ✅ |
| [`avoid_function_literals_in_foreach_calls`](https://dart.dev/lints/avoid_function_literals_in_foreach_calls) | Avoid using `forEach` with a function literal. | ✅ |
| [`avoid_init_to_null`](https://dart.dev/lints/avoid_init_to_null) | Don't explicitly initialize variables to null. | ✅ |
Expand Down Expand Up @@ -206,3 +206,4 @@ To use these lints create an `analysis_options.yaml` file with:
[linter repo]: https://github.com/dart-lang/linter
[`package:pedantic`]: https://pub.dev/packages/pedantic
[`package:flutter_lints`]: https://pub.dev/packages/flutter_lints
[Fix]: https://dart.dev/tools/dart-fix
16 changes: 8 additions & 8 deletions tool/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@

## `tool/validate_lib.dart`

This tool ensures that we don't commit `.dart` source files into the lib/
This tool ensures that we don't commit `.dart` source files into the `lib/`
directory; it's automatically run by the CI. To run manually:

```
dart tool/validate_lib.dart
```shell
dart run tool/validate_lib.dart
```

## `tool/gen_docs.dart`

This tool regenerates the lists of core and recommended lints into the package's
README.md file. To use it, run:
`README.md` file. To use it, run:

```
dart tool/gen_docs.dart
```shell
dart run tool/gen_docs.dart
```

It can also validate that the readme file is up-to-date. It's automatically
run by the CI; to run it manually:

```
dart tool/gen_docs.dart --verify
```shell
dart run tool/gen_docs.dart --verify
```
4 changes: 2 additions & 2 deletions tool/gen_docs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ String _createRuleTable(
rules.sort();

final lines = [
'| Lint Rules | Description | Fix |',
'| :--------- | :---------- | --- |',
'| Lint Rules | Description | [Fix][] |',
'| :--------- | :---------- | ------- |',
...rules.map((rule) {
final ruleMeta =
lintMeta.firstWhereOrNull((meta) => meta['name'] == rule);
Expand Down