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

Create report that will show code with error #419

Closed
aik099 opened this issue Jan 2, 2015 · 22 comments
Closed

Create report that will show code with error #419

aik099 opened this issue Jan 2, 2015 · 22 comments
Milestone

Comments

@aik099
Copy link
Contributor

aik099 commented Jan 2, 2015

In Phabricator linting tool the default reporting way is to also show relevant code piece where error is happend with usual 3 lines of context. This drastically reduces switching between Terminal (Mac) and IDE when fixing errors.

Example:
phabricator_arcanistlinter

This is file, that does this: https://github.com/phacility/arcanist/blob/master/src/lint/renderer/ArcanistConsoleLintRenderer.php

IMO such report might become new default report type.

@gsherwood
Copy link
Member

This would certainly be an interesting report type, but would never be the default. Even for a moderately complex file, the number of errors, and thus number of output lines, would be far too great. The report would border on unreadable unless the number of errors is quite small (probably less than 10). But it could certainly be an optional report, and you can set your default report format to be whatever you want.

In my opinion, this sort of report is better suited to being integrated into an IDE, where action can be taken to fix the issues themselves. There are plugins available for most IDEs to do this, and they typically use the existing developer-friendly reports such as JSON, XML or CSV.

@gsherwood
Copy link
Member

I've added a new report type in the 3.0 version for this. Here is an example:

For this code:

<?php

$var = array(
    'one'       => 1,
    'one1'      => 1,
    'one11'     => 1,
    '\000'      => 1,
);

Running it over the Squiz standard with the full report (--report=full) gives you:

FILE: /Users/gsherwood/Sites/Projects/PHP_CodeSniffer/temp.php
--------------------------------------------------------------------------------------------
FOUND 12 ERRORS AFFECTING 6 LINES
--------------------------------------------------------------------------------------------
 1 | ERROR | [ ] Missing file doc comment
 4 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 4 | ERROR | [x] Array key not aligned correctly; expected 8 spaces but found 1
 4 | ERROR | [x] Spaces must be used for alignment; tabs are not allowed
 5 | ERROR | [x] Spaces must be used for alignment; tabs are not allowed
 5 | ERROR | [x] Array key not aligned correctly; expected 8 spaces but found 1
 5 | ERROR | [x] Spaces must be used for alignment; tabs are not allowed
 6 | ERROR | [x] Spaces must be used for alignment; tabs are not allowed
 6 | ERROR | [x] Array key not aligned correctly; expected 8 spaces but found 1
 6 | ERROR | [x] Spaces must be used for alignment; tabs are not allowed
 7 | ERROR | [x] Array key not aligned correctly; expected 8 spaces but found 4
 8 | ERROR | [x] Closing parenthesis not aligned correctly; expected 7 space(s) but found 0
--------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 11 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------

Using the new code report (--report=code) gives you this:

FILE: /Users/gsherwood/Sites/Projects/PHP_CodeSniffer/temp.php
---------------------------------------------------------------------------------------
FOUND 12 ERRORS AFFECTING 6 LINES
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
| ERROR [ ] Missing file doc comment
---------------------------------------------------------------------------------------
| >> 1:  <?php
|    2:
|    3:  $var·=·array(
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
| ERROR [x] Spaces must be used to indent lines; tabs are not allowed
| ERROR [x] Array key not aligned correctly; expected 8 spaces but found 4
| ERROR [x] Spaces must be used for alignment; tabs are not allowed
---------------------------------------------------------------------------------------
|    2:
|    3:  $var·=·array(
| >> 4:  »   'one'»  ·»  =>·1,
|    5:  »   'one1'» ·»  =>·1,
|    6:  »   'one11'»····=>·1,
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
| ERROR [x] Spaces must be used for alignment; tabs are not allowed
| ERROR [x] Array key not aligned correctly; expected 8 spaces but found 4
| ERROR [x] Spaces must be used for alignment; tabs are not allowed
---------------------------------------------------------------------------------------
|    3:  $var·=·array(
|    4:  »   'one'»  ·»  =>·1,
| >> 5:  »   'one1'» ·»  =>·1,
|    6:  »   'one11'»····=>·1,
|    7:  ····'\000'······=>·1,
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
| ERROR [x] Spaces must be used for alignment; tabs are not allowed
| ERROR [x] Array key not aligned correctly; expected 8 spaces but found 4
| ERROR [x] Spaces must be used for alignment; tabs are not allowed
---------------------------------------------------------------------------------------
|    4:  »   'one'»  ·»  =>·1,
|    5:  »   'one1'» ·»  =>·1,
| >> 6:  »   'one11'»····=>·1,
|    7:  ····'\000'······=>·1,
|    8:  );
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
| ERROR [x] Array key not aligned correctly; expected 8 spaces but found 4
---------------------------------------------------------------------------------------
|    5:  »   'one1'» ·»  =>·1,
|    6:  »   'one11'»····=>·1,
| >> 7:  ····'\000'······=>·1,
|    8:  );
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
| ERROR [x] Closing parenthesis not aligned correctly; expected 7 space(s) but found 0
---------------------------------------------------------------------------------------
|    6:  »   'one11'»····=>·1,
|    7:  ····'\000'······=>·1,
| >> 8:  );
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 11 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------

Note that I have also set the tab width to 4 (--tab-width=4) so that the output aligns nicely. If you aren't using tabs, you don't need to do this, but I was testing mixed tab/space indents at the time.

If you have any suggestions for the report, please let me know.

@aik099
Copy link
Contributor Author

aik099 commented Feb 12, 2016

  1. I see you're grouping errors per line. That is very helpful. In such cases Phabricator would display same code block several times.
  2. The visualisation of spaces and tabs is nice touch because otherwise it's impossible to tell the difference.
  3. The double separators are too much.
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------

You can use single separator to get same effect.

---------------------------------------------------------------------------------------

or maybe separator that looks differently

=======================================================================================

I presume in case of -s option usage the sniff error codes would be displayed next to error message text as well.

@gsherwood
Copy link
Member

The reason I used the double separator was so that is was clear which error list was for each line. Once you get a long list of errors, the report becomes much harder to read.

Compare this:

|    6:  »   'one11'»····=>·1,
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
| ERROR [x] Spaces must be used for alignment; tabs are not allowed
| ERROR [x] Array key not aligned correctly; expected 8 spaces but found 4
| ERROR [x] Spaces must be used for alignment; tabs are not allowed
---------------------------------------------------------------------------------------
|    3:  $var·=·array(
|    4:  »   'one'»  ·»  =>·1,
| >> 5:  »   'one1'» ·»  =>·1,
|    6:  »   'one11'»····=>·1,
|    7:  ····'\000'······=>·1,
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
| ERROR [x] Spaces must be used for alignment; tabs are not allowed
| ERROR [x] Array key not aligned correctly; expected 8 spaces but found 4
| ERROR [x] Spaces must be used for alignment; tabs are not allowed
---------------------------------------------------------------------------------------
|    4:  »   'one'»  ·»  =>·1,
|    5:  »   'one1'» ·»  =>·1,
| >> 6:  »   'one11'»····=>·1,
|    7:  ····'\000'······=>·1,
|    8:  );
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
| ERROR [x] Array key not aligned correctly; expected 8 spaces but found 4

To this:

|    6:  »   'one11'»····=>·1,
---------------------------------------------------------------------------------------
| ERROR [x] Spaces must be used for alignment; tabs are not allowed
| ERROR [x] Array key not aligned correctly; expected 8 spaces but found 4
| ERROR [x] Spaces must be used for alignment; tabs are not allowed
---------------------------------------------------------------------------------------
|    3:  $var·=·array(
|    4:  »   'one'»  ·»  =>·1,
| >> 5:  »   'one1'» ·»  =>·1,
|    6:  »   'one11'»····=>·1,
|    7:  ····'\000'······=>·1,
---------------------------------------------------------------------------------------
| ERROR [x] Spaces must be used for alignment; tabs are not allowed
| ERROR [x] Array key not aligned correctly; expected 8 spaces but found 4
| ERROR [x] Spaces must be used for alignment; tabs are not allowed
---------------------------------------------------------------------------------------
|    4:  »   'one'»  ·»  =>·1,
|    5:  »   'one1'» ·»  =>·1,
| >> 6:  »   'one11'»····=>·1,
|    7:  ····'\000'······=>·1,
|    8:  );
---------------------------------------------------------------------------------------
| ERROR [x] Array key not aligned correctly; expected 8 spaces but found 4

If you were just looking at that report, you wouldn't know if the errors were for the code snippet below or above (assume there is more content above and below this snippet). Of course we know the error are for the snippet below, and you can tell if you look at the top of the report, but I wanted to make sure it wasn't confusing for other people.

An alternative approach would be to use a single separator, but include the line numbers in the error messages:

|    6:  »   'one11'»····=>·1,
---------------------------------------------------------------------------------------
| Line 5: ERROR [x] Spaces must be used for alignment; tabs are not allowed
| Line 5: ERROR [x] Array key not aligned correctly; expected 8 spaces but found 4
| Line 5: ERROR [x] Spaces must be used for alignment; tabs are not allowed
---------------------------------------------------------------------------------------
|    3:  $var·=·array(
|    4:  »   'one'»  ·»  =>·1,
| >> 5:  »   'one1'» ·»  =>·1,
|    6:  »   'one11'»····=>·1,
|    7:  ····'\000'······=>·1,
---------------------------------------------------------------------------------------
| Line 6: ERROR [x] Spaces must be used for alignment; tabs are not allowed
| Line 6: ERROR [x] Array key not aligned correctly; expected 8 spaces but found 4
| Line 6: ERROR [x] Spaces must be used for alignment; tabs are not allowed
---------------------------------------------------------------------------------------
|    4:  »   'one'»  ·»  =>·1,
|    5:  »   'one1'» ·»  =>·1,
| >> 6:  »   'one11'»····=>·1,
|    7:  ····'\000'······=>·1,
|    8:  );
---------------------------------------------------------------------------------------
| Line 7: ERROR [x] Array key not aligned correctly; expected 8 spaces but found 4

What do you think about that?

@gsherwood
Copy link
Member

I presume in case of -s option usage the sniff error codes would be displayed next to error message text as well.

Yes. It looks exactly the same as it does in the standard report. Like that report, it also removes the [x] boxes if there are no fixable errors.

@aik099
Copy link
Contributor Author

aik099 commented Feb 13, 2016

Without line numbers shown it was hard to guess where relevant code snippet is located (above errors or below them).

What about ======= separator?

@gsherwood
Copy link
Member

Is this more like what you are thinking?

FILE: temp.php
--------------------------------------------------------------------------------------------
FOUND 12 ERRORS AFFECTING 6 LINES
============================================================================================
Line 1: ERROR [ ] Missing file doc comment
--------------------------------------------------------------------------------------------
>> 1:  <?php
   2:
   3:  $var·=·array(
============================================================================================
Line 4: ERROR [x] Spaces must be used to indent lines; tabs are not allowed
Line 4: ERROR [x] Array key not aligned correctly; expected 8 spaces but found 4
Line 4: ERROR [x] Spaces must be used for alignment; tabs are not allowed
--------------------------------------------------------------------------------------------
   2:
   3:  $var·=·array(
>> 4:  »   'one'»  ·»  =>·1,
   5:  »   'one1'» ·»  =>·1,
   6:  »   'one11'»····=>·1,
============================================================================================
Line 5: ERROR [x] Spaces must be used for alignment; tabs are not allowed
Line 5: ERROR [x] Array key not aligned correctly; expected 8 spaces but found 4
Line 5: ERROR [x] Spaces must be used for alignment; tabs are not allowed
--------------------------------------------------------------------------------------------
   3:  $var·=·array(
   4:  »   'one'»  ·»  =>·1,
>> 5:  »   'one1'» ·»  =>·1,
   6:  »   'one11'»····=>·1,
   7:  ····'\000'······=>·1,
============================================================================================
Line 6: ERROR [x] Spaces must be used for alignment; tabs are not allowed
Line 6: ERROR [x] Array key not aligned correctly; expected 8 spaces but found 4
Line 6: ERROR [x] Spaces must be used for alignment; tabs are not allowed
--------------------------------------------------------------------------------------------
   4:  »   'one'»  ·»  =>·1,
   5:  »   'one1'» ·»  =>·1,
>> 6:  »   'one11'»····=>·1,
   7:  ····'\000'······=>·1,
   8:  );
============================================================================================
Line 7: ERROR [x] Array key not aligned correctly; expected 8 spaces but found 4
--------------------------------------------------------------------------------------------
   5:  »   'one1'» ·»  =>·1,
   6:  »   'one11'»····=>·1,
>> 7:  ····'\000'······=>·1,
   8:  );
============================================================================================
Line 8: ERROR [x] Closing parenthesis not aligned correctly; expected 7 space(s) but found 0
--------------------------------------------------------------------------------------------
   6:  »   'one11'»····=>·1,
   7:  ····'\000'······=>·1,
>> 8:  );
============================================================================================
PHPCBF CAN FIX THE 11 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------

@aik099
Copy link
Contributor Author

aik099 commented Feb 13, 2016

Now when you put === in place the solution you've used previously (double --- separators) looked better.

@gsherwood
Copy link
Member

I might just make it this then, because there is no need for double lines if I put the line numbers back into the error messages:

FILE: temp.php
--------------------------------------------------------------------------------------------
FOUND 12 ERRORS AFFECTING 6 LINES
--------------------------------------------------------------------------------------------
Line 1: ERROR [ ] Missing file doc comment
--------------------------------------------------------------------------------------------
>> 1:  <?php
   2:
   3:  $var·=·array(
--------------------------------------------------------------------------------------------
Line 4: ERROR [x] Spaces must be used to indent lines; tabs are not allowed
Line 4: ERROR [x] Array key not aligned correctly; expected 8 spaces but found 4
Line 4: ERROR [x] Spaces must be used for alignment; tabs are not allowed
--------------------------------------------------------------------------------------------
   2:
   3:  $var·=·array(
>> 4:  »   'one'»  ·»  =>·1,
   5:  »   'one1'» ·»  =>·1,
   6:  »   'one11'»····=>·1,
--------------------------------------------------------------------------------------------
Line 5: ERROR [x] Spaces must be used for alignment; tabs are not allowed
Line 5: ERROR [x] Array key not aligned correctly; expected 8 spaces but found 4
Line 5: ERROR [x] Spaces must be used for alignment; tabs are not allowed
--------------------------------------------------------------------------------------------
   3:  $var·=·array(
   4:  »   'one'»  ·»  =>·1,
>> 5:  »   'one1'» ·»  =>·1,
   6:  »   'one11'»····=>·1,
   7:  ····'\000'······=>·1,
--------------------------------------------------------------------------------------------
Line 6: ERROR [x] Spaces must be used for alignment; tabs are not allowed
Line 6: ERROR [x] Array key not aligned correctly; expected 8 spaces but found 4
Line 6: ERROR [x] Spaces must be used for alignment; tabs are not allowed
--------------------------------------------------------------------------------------------
   4:  »   'one'»  ·»  =>·1,
   5:  »   'one1'» ·»  =>·1,
>> 6:  »   'one11'»····=>·1,
   7:  ····'\000'······=>·1,
   8:  );
--------------------------------------------------------------------------------------------
Line 7: ERROR [x] Array key not aligned correctly; expected 8 spaces but found 4
--------------------------------------------------------------------------------------------
   5:  »   'one1'» ·»  =>·1,
   6:  »   'one11'»····=>·1,
>> 7:  ····'\000'······=>·1,
   8:  );
--------------------------------------------------------------------------------------------
Line 8: ERROR [x] Closing parenthesis not aligned correctly; expected 7 space(s) but found 0
--------------------------------------------------------------------------------------------
   6:  »   'one11'»····=>·1,
   7:  ····'\000'······=>·1,
>> 8:  );
--------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 11 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------

@gsherwood
Copy link
Member

One more option - leave out the separators all together:

FILE: temp.php
--------------------------------------------------------------------------------------------
FOUND 12 ERRORS AFFECTING 6 LINES
--------------------------------------------------------------------------------------------
Line 1: ERROR [ ] Missing file doc comment

>> 1:  <?php
   2:
   3:  $var·=·array(
--------------------------------------------------------------------------------------------
Line 4: ERROR [x] Spaces must be used to indent lines; tabs are not allowed
Line 4: ERROR [x] Array key not aligned correctly; expected 8 spaces but found 4
Line 4: ERROR [x] Spaces must be used for alignment; tabs are not allowed

   2:
   3:  $var·=·array(
>> 4:  »   'one'»  ·»  =>·1,
   5:  »   'one1'» ·»  =>·1,
   6:  »   'one11'»····=>·1,
--------------------------------------------------------------------------------------------
Line 5: ERROR [x] Spaces must be used for alignment; tabs are not allowed
Line 5: ERROR [x] Array key not aligned correctly; expected 8 spaces but found 4
Line 5: ERROR [x] Spaces must be used for alignment; tabs are not allowed

   3:  $var·=·array(
   4:  »   'one'»  ·»  =>·1,
>> 5:  »   'one1'» ·»  =>·1,
   6:  »   'one11'»····=>·1,
   7:  ····'\000'······=>·1,
--------------------------------------------------------------------------------------------
Line 6: ERROR [x] Spaces must be used for alignment; tabs are not allowed
Line 6: ERROR [x] Array key not aligned correctly; expected 8 spaces but found 4
Line 6: ERROR [x] Spaces must be used for alignment; tabs are not allowed

   4:  »   'one'»  ·»  =>·1,
   5:  »   'one1'» ·»  =>·1,
>> 6:  »   'one11'»····=>·1,
   7:  ····'\000'······=>·1,
   8:  );
--------------------------------------------------------------------------------------------
Line 7: ERROR [x] Array key not aligned correctly; expected 8 spaces but found 4

   5:  »   'one1'» ·»  =>·1,
   6:  »   'one11'»····=>·1,
>> 7:  ····'\000'······=>·1,
   8:  );
--------------------------------------------------------------------------------------------
Line 8: ERROR [x] Closing parenthesis not aligned correctly; expected 7 space(s) but found 0

   6:  »   'one11'»····=>·1,
   7:  ····'\000'······=>·1,
>> 8:  );
--------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 11 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------

@aik099
Copy link
Contributor Author

aik099 commented Feb 15, 2016

I like it. It does differ greatly from initial version, but different doesn't mean it's bad.

@gsherwood
Copy link
Member

I like it. It does differ greatly from initial version, but different doesn't mean it's bad.

Which option are you talking about? Line numbers with separators or no separators?

I think I like the one in this comment best because I think it fits in with the style of the other reports as well: #419 (comment)

@aik099
Copy link
Contributor Author

aik099 commented Feb 15, 2016

I think I like the one in this comment best because I think it fits in with the style of the other reports as well: #419 (comment)

I agree with you. User can clearly see line number in error message and in the code and this way can detect which code related to what error messages without knowing if error messages come after or before code.

@gsherwood
Copy link
Member

I've committed a change to the report format. The original code now outputs a report looking like this:

FILE: temp.php
---------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 6 LINES
---------------------------------------------------------------------------------------------
LINE 1: ERROR [ ] Missing file doc comment
---------------------------------------------------------------------------------------------
>> 1:  <?php
   2:
   3:  $var·=·array(
---------------------------------------------------------------------------------------------
LINE 4: ERROR [x] Array key not aligned correctly; expected 8 spaces but found 4
---------------------------------------------------------------------------------------------
   2:
   3:  $var·=·array(
>> 4:  ····'one'·······=>·1,
   5:  ····'one1'······=>·1,
   6:  ····'one11'·····=>·1,
---------------------------------------------------------------------------------------------
LINE 5: ERROR [x] Array key not aligned correctly; expected 8 spaces but found 4
---------------------------------------------------------------------------------------------
   3:  $var·=·array(
   4:  ····'one'·······=>·1,
>> 5:  ····'one1'······=>·1,
   6:  ····'one11'·····=>·1,
   7:  ····'\000'······=>·1,
---------------------------------------------------------------------------------------------
LINE 6: ERROR [x] Array key not aligned correctly; expected 8 spaces but found 4
---------------------------------------------------------------------------------------------
   4:  ····'one'·······=>·1,
   5:  ····'one1'······=>·1,
>> 6:  ····'one11'·····=>·1,
   7:  ····'\000'······=>·1,
   8:  );
---------------------------------------------------------------------------------------------
LINE 7: ERROR [x] Array key not aligned correctly; expected 8 spaces but found 4
---------------------------------------------------------------------------------------------
   5:  ····'one1'······=>·1,
   6:  ····'one11'·····=>·1,
>> 7:  ····'\000'······=>·1,
   8:  );
---------------------------------------------------------------------------------------------
LINE 8: ERROR [x] Closing parenthesis not aligned correctly; expected 7 space(s) but found 0
---------------------------------------------------------------------------------------------
   6:  ····'one11'·····=>·1,
   7:  ····'\000'······=>·1,
>> 8:  );
---------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------

Looks good?

@aik099
Copy link
Contributor Author

aik099 commented Feb 16, 2016

Yes. I suppose this was report after auto-fixing, because I no longer see TAB sings in there used for indentation along with SPACEs as in previous examples.

@VasekPurchart
Copy link
Contributor

I am probably late to the party, but have you perhaps considered reversing the code-erorrs order?

I mean now the errors are printed out before the code - before you know whats wrong, so in my case I would usually have to glance at them, then at the code, but go for specifics back to the code.

If the order would be reversed in plenty (in my case most of them) I would know what the error is just by looking at the line of code - because the purpose of CS for me is "reminding" me that I do everything right (or that I made a typo), not that I don't know, how it should look like when I think about it.

@aik099
Copy link
Contributor Author

aik099 commented Feb 16, 2016

because the purpose of CS for me is "reminding" me that I do everything right (or that I made a typo), not that I don't know

That depends. If that is an ERROR, then you must fix it. If it's a WARNING, then you're recommended to fix it, but it's not necessary.

@aik099
Copy link
Contributor Author

aik099 commented Feb 16, 2016

I mean now the errors are printed out before the code - before you know whats wrong, so in my case I would usually have to glance at them, then at the code, but go for specifics back to the code.

In ideal world yes. But at my company we're created coding standard because people have no idea what is wrong with their code until I said them what's wrong.

@VasekPurchart
Copy link
Contributor

I am not speaking about error vs warning, I am talking about workflow ;)

In ideal world yes. But at my company we're created coding standard because people have no idea what is wrong with their code until I said them what's wrong.

Even if you don't know what exactly is wrong with the code, you get references after you have seen it - with reference to the specific line. In the current shape you give the references "in advance" - before the user has seen it.

@aik099
Copy link
Contributor Author

aik099 commented Feb 16, 2016

IMO coding standard enforcing tool, like PHP_CodeSniffer is for cases, when developers don't know how things needs to be done and make mistakes and then PHP_CodeSniffer finds these mistakes and reports them. It's important for developer to know what mistake is rather then seeing broken code first and then realizing what mistake was made.

@gsherwood
Copy link
Member

I don't think having the errors on the top or bottom is going to make much difference to glancing. Plus, the errors are the main content and the code snippet is in support of them. So I believe the errors should come first, followed by the supporting material.

I'm going to close this as I'm now happy with the report format. Thanks for the feedback.

@VasekPurchart
Copy link
Contributor

Ok, it's a great improvement anyway, thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants