amaranth icon indicating copy to clipboard operation
amaranth copied to clipboard

Normalize diagnostics to use either a backtick or a single quote, not both at random

Open whitequark opened this issue 1 year ago • 2 comments

Bikeshed: which of these should we use?

whitequark avatar Feb 27 '24 09:02 whitequark

What is an example of each in the code as it stands?

I'd say that backticks are better for code examples in like "x is bad. Do y". But single quotes are better for values, like "x should be a y, not 'z'"

tpwrules avatar Feb 28 '24 16:02 tpwrules

I'd say that backticks are better for code examples in like "x is bad. Do y". But single quotes are better for values, like "x should be a y, not 'z'"

I like this distinction!

What is an example of each in the code as it stands?

Backticks: https://github.com/amaranth-lang/amaranth/blob/31a12c03d19fef601b6515c431c5b686d2ba3702/amaranth/back/rtlil.py#L1007

Single quotes: https://github.com/amaranth-lang/amaranth/blob/31a12c03d19fef601b6515c431c5b686d2ba3702/amaranth/build/plat.py#L48

whitequark avatar Mar 04 '24 23:03 whitequark