Skip to content
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

Commands with modifiers don't work with violations with line-only locations #316

Closed
jpsim opened this issue Jan 4, 2016 · 0 comments
Closed
Assignees
Labels
bug Unexpected and reproducible misbehavior.

Comments

@jpsim
Copy link
Collaborator

jpsim commented Jan 4, 2016

Easier explained with an example. This shouldn't trigger a violation, but it does:

// swiftlint:disable:next line_length
/* a very long line. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi est enim, vestibulum a arcu in, congue volutpat sapien. Proin nec mi tellus. Vestibulum blandit risus a lobortis dignissim. Ut vulputate placerat felis, in malesuada risus accumsan sit amet. Suspendisse non purus sit amet odio porttitor egestas. Vestibulum eu metus elit. Curabitur cursus ante quis ornare consequat. Nam faucibus at nunc a commodo. Donec ultricies facilisis ante. Curabitur placerat metus ut elit sodales eleifend. Aliquam blandit nunc in mauris lobortis vulputate. Proin venenatis congue neque sed ullamcorper. Mauris ac aliquam mauris. Mauris feugiat dignissim consequat. Etiam mattis neque mattis, aliquet risus vel, condimentum erat.*/

This happens because the style violation's location is set to line: 2, character: nil although the commands in the file above are set to disable line_length as of line: 2, character: 0 (e.g. after the violation location).

@jpsim jpsim added the bug Unexpected and reproducible misbehavior. label Jan 4, 2016
@jpsim jpsim self-assigned this Jan 4, 2016
@jpsim jpsim closed this as completed in #317 Jan 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected and reproducible misbehavior.
Projects
None yet
Development

No branches or pull requests

1 participant