jhauberg/comply

Beginning column set as 1 cause Xcode integration to not display as intended

jhauberg opened this issue · 1 comments

In 4484ae4 the "beginning" column was changed to 1 instead of 0. I'm not sure exactly why I did this, but it did have a negative effect.

The 1 means the Xcode integration shows the bubble from the first column, rather than the "entire line" (e.g. no squiggly line, just full line markup) as intended. I think we should change the parameter to something that reflects the intention- e.g. marking the entire line, and not just the first column.

Is setting to column 1 ever useful, actually? I can't think of any rules where this is needed- the match should always point to the correct starting index.

It was set to 1 to make tests succeed. As in, a violation that spans an entire line does not actually trigger "inside" the line.

Example:

'↓// some header file\n'

In that case, the intention is to indicate that a violation occurs, but we can't represent column 0 in the string. So the test fails.

I'll come up with something for this edge-case. Maybe a different symbol, that if appearing at the beginning of a line, indicates that a whole-line violation is expected.