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
{{ message }}
This repository was archived by the owner on Feb 4, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -137,6 +137,21 @@ pub run build_runner build
137
137
138
138
You'll now find a `.g.dart` file containing code to interact with the contract.
139
139
140
+
#### Optional: Ignore naming suggestions for generated files
141
+
142
+
If importing contract ABIs with function names that don't follow dart's naming conventions, the dart analyzer will (by default) be unhappy about it, and show warnings.
143
+
This can be mitigated by excluding all the generated files from being analyzed.
144
+
Note that this has the side effect of suppressing serious errors as well, should there exist any. (There shouldn't as these files are automatically generated).
145
+
146
+
Create a file named `analysis_options.yaml` in the root directory of your project:
147
+
```
148
+
analyzer:
149
+
exclude:
150
+
- '**/*.g.dart'
151
+
```
152
+
153
+
See [Customizing static analysis](https://dart.dev/guides/language/analysis-options) for advanced options.
154
+
140
155
## Feature requests and bugs
141
156
142
157
Please file feature requests and bugs at the [issue tracker][tracker].
0 commit comments