You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+21-7Lines changed: 21 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,18 @@ but we still recommend to file an issue detailing what you’re fixing.
17
17
This is helpful in case we don’t accept that specific fix but want to keep
18
18
track of the issue.
19
19
20
+
## Contributing new Dart lint rules
21
+
22
+
If you intend to provide changes related to a new Dart version you can follow these steps:
23
+
24
+
1. Ensure you are on the latest stable Dart version.
25
+
1. Run `dart tool/bump_version/main.dart <NEW_VERSION>` to generate a new version.
26
+
1. Add or remove the lint rules you want to change in the version file you generated in step 2.
27
+
> To find new rules more easily you can run the same command as in step 4 which will add new rules directly to the exclusion table.
28
+
1. Open a terminal in `tool/linter_rules` and run `dart lib/exclusion_reason_table.dart` to generate an up-to-date exclusion table.
29
+
1. Document the rules that were removed with a reason as to why, if there is any.
30
+
> Link to an issue as to why a lint rule should not be used if there is any.
31
+
20
32
## Creating a Pull Request
21
33
22
34
Before creating a pull request please:
@@ -44,18 +56,20 @@ Every snapshot of a version is saved on its own yaml file under the name pattern
44
56
45
57
### Release a new version
46
58
59
+
Skip step `1` if a new version file was already generated.
60
+
47
61
1. Run the `bump_version` script with the desired new version as an argument:
48
62
49
-
```sh
50
-
dart tool/bump_version/main.dart <version>
51
-
```
63
+
```sh
64
+
dart tool/bump_version/main.dart <version>
65
+
```
52
66
53
-
Where `<version>` is the new version to be released in the format `x.y.z`.
67
+
Where `<version>` is the new version to be released in the format `x.y.z`.
54
68
55
-
This script will:
69
+
This script will:
56
70
57
-
- Copy the most recent yaml to a new one with the new desired version.
58
-
- Include that file on the main yaml file `lib/analysis_options.yaml`.
71
+
- Copy the most recent yaml to a new one with the new desired version.
72
+
- Include that file on the main yaml file `lib/analysis_options.yaml`.
59
73
60
74
1. Update the `README.md` exclusion table, refer to the ["Exclusion Reason Table 🗞️👨⚖️"](tool/linter_rules/README.md#exclusion-reason-table-️️) documentation for more information.
0 commit comments