-
Notifications
You must be signed in to change notification settings - Fork 75
Slightly fix the example files #267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I feel like using
|
Doesn't it seem that the explanatory comment is excessively big? |
Haha it does seem a bit large... brings a lot of attention to it which could distract from the actual example. Maybe something closer to this (not necessarily exactly this) would be better? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small change on the copyright
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thank you!
Description & Motivation
Examples should be given special attention, as the quality of the examples can both attract and repel new users from the project.
This set of changes proposes:
ignore_for_file: avoid_print
from examples, importdart:io
and usestdout.writeln('string')
instead ofprint('string')
. Subjectively, ignoring the rules of the linter in the examples does not look very nice.*.sv
files, because thefir_filter.dart
example creates artl.sv
file (maybe in the future there will be more examples that save the generated SystemVerilog to a file).fir_filter.dart
file, the declaration code and comments have been slightly rearranged to make the example more consistent.Related Issue(s)
No.
Testing
The only more or less significant change in the code is the use of the
stdout.writeln('string')
function instead ofprint('string')
. You can check the functionality by running the examples.Backwards-compatibility
Unfortunately, since the
dart:io
library is now used, it becomes impossible to compile examples in JS to run in browsers, but this should not be a problem since ROHD itself also uses thedart:io
library.Documentation
README.md
contains the code fromexample.dart
, but sinceREADME.md
is under revision, it is better to make changes in the new version ofREADME.md
.