Repository navigation
Allow acceptable long lines to suppress warnings - #1872
Conversation
|
@BillWagner I'll readily admit this is pretty hacky - but in the context of how often we'd want to change things, I think it's reasonable. If we want to extract this bit of config, I'd probably want to do a proper job and extract everything that is currently hard-coded into a JSON file, just to be consistent. |
|
I don't think the test failures here are due to my changes. @BillWagner is this something you're aware of? (I'm on a train with bad wifi at the moment, so it's slightly tricky to diagnose efficiently.) |
|
I was wrong about new warnings - copy/paste error. Fixing now; should be warning free afterwards. |
BillWagner
left a comment
There was a problem hiding this comment.
I had one optional comment. This is good to merge.
| { | ||
| // expressions.md and grammar.md | ||
| // These genuinely wrap, but that's better than breaking the lines. | ||
| " : null_conditional_member_access null_forgiving_operator? '(' argument_list? ')'", |
There was a problem hiding this comment.
The only thing I might consider here is adding a comment stating which clause (in expressions.md) that these productions appear.
I agree this feels like a hack in some ways, but I like the design in that if we edit those lines, suddenly warnings appear and we need to look to see if the new content works. The only stale risk is if we shorten these lines and they remain forever as unneeded accepted long lines.
Noting where they are in the standard might entice us to remove those no longer needed while editing any that changed. (We're just detailed enough to consider it).
There was a problem hiding this comment.
Have added more detail for the location in a separate commit - not just the number, but the title, so it's easier to find if we renumber.
I did wonder about checking at the end of the conversion whether every long line listed for the file that's being converted ended up being used... but it felt like overengineering in the end. Can explore that if you'd like.
There was a problem hiding this comment.
I agree that's more than we need. Let's ![]()
|
@BillWagner: Can't
|
This is hard-coded rather than configurable simply because we don't actually need flexibility here (any one branch will only have a single file) and it's easier than passing a list around, having a new file etc. Fixes dotnet#1858
This is hard-coded rather than configurable simply because we don't actually need flexibility here (any one branch will only have a single file) and it's easier than passing a list around, having a new file etc.
There are two new line-length warnings around stackalloc, which I assume are for recently-merged changes; I'll look at those separately.Fixes #1858