Skip to content

Proposal for an alternative one-item-per-line linting of set literal expressions #197

Answered by jbj
gagliardetto asked this question in Ideas
Discussion options

You must be logged in to vote

A desire for each item in the list to stand out like that often means the reader should be aware of something special for each line. When that something is written in an end-of-line comment, the autoformatter preserves the line breaks. It looks like this: https://github.com/github/codeql/blob/92494441a72cd1c04c9359dc8c0d35e2a4525f6d/cpp/ql/src/semmle/code/cpp/commons/Strcat.qll#L12-L18. The indentation is not quite perfect, but we get by.

Would readers also benefit from comments in your use case?

Replies: 2 comments 6 replies

Comment options

jbj
Nov 3, 2020
Collaborator

You must be logged in to vote
5 replies
@gagliardetto
Comment options

@gagliardetto
Comment options

@jbj
Comment options

jbj Nov 4, 2020
Collaborator

@jbj
Comment options

@gagliardetto
Comment options

Answer selected by xcorail
Comment options

You must be logged in to vote
1 reply
@jbj
Comment options

jbj Nov 3, 2020
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
3 participants