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

A rule or rule type should be able to configure if the content of the line is shown #826

Open
OskarStark opened this issue Nov 21, 2020 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@OskarStark
Copy link
Owner

Maybe this should be implemented after: #825

Currently we show the line content for all rules/types:
CleanShot 2020-11-21 at 15 52 01

However this makes no sense for the rules introduced in: #824

We should use Line number 0 like now to be able to annotate on Github, but showing the content of this line 0 is confusing.

@OskarStark OskarStark added enhancement New feature or request help wanted Extra attention is needed labels Nov 21, 2020
@alamirault
Copy link
Collaborator

I think is now possible with the Violation object. When rawLine is empty line is not displayed

if (!empty($violation->rawLine())) {
$style->writeln(sprintf(' <info>-></info> %s', $violation->rawLine()));
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants