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

Update Ruby implementation to support pretty output #26

Closed
10 of 11 tasks
fulldecent opened this issue Jan 13, 2017 · 8 comments
Closed
10 of 11 tasks

Update Ruby implementation to support pretty output #26

fulldecent opened this issue Jan 13, 2017 · 8 comments

Comments

@fulldecent
Copy link
Owner

fulldecent commented Jan 13, 2017

Currently our Ruby implementation only supports JSON output. This is great for consumers, but linters prefer a more friendly looking output by default.

Let's make a great looking output option and add it into the Ruby implementation. It should look so good that linters will want to use our STAT implementation just to get this beautiful output.

screen shot 2017-01-13 at 2 38 42 pm

Work plan

  • Document all possible output situations and required output formatting
    • Processes
      • A process with only a name
        ⭐️ web-puc
      • A process with a name and a version
        ⭐️ web-puc, version 0.0.2
      • (Other information is not used.)
    • Findings
      • With failure set to true
        🛑 Rule, description (entire line is red)
      • With failure set to false
        ⚠️ Rule, description (entire line is yellow)
      • With rule, description and location (location only has file name)
        ⚠️ Rule, description (entire line is yellow)
        in index2.php
      • With rule, description and location (location is one line)
        ⚠️ Rule, description (entire line is yellow)
        in index2.php, line 24
      • With rule, description and location (location is multiple lines)
        ⚠️ Rule, description (entire line is yellow)
        in index2.php, lines 24-26
      • With rule, description and location (location is columns on one line)
        ⚠️ Rule, description (entire line is yellow)
        in index2.php, line 24:15-18
      • With rule, description and location (location is columns on multiple lines)
        ⚠️ Rule, description (entire line is yellow)
        in index2.php, line 24:15 to line 25:5
      • With recommendation
        ⚠️ Rule, description (entire line is yellow)
        RECOMMENDATION: Reword to avoid the passive voice.
      • (Other finding information is not used.)
    • Summaries
      • No errors, no warnings
        ✅ PASSED with no warnings (whole line is green)
      • No errors, with warnings
        ⚠️ PASSED with 5 warnings (whole line is yellow)
      • With errors, no warnings
        🛑 FAILED with 5 errors (whole line is red)
      • With errors, with warnings
        🛑 FAILED with 5 errors and 1 warning (whole line is red)
  • Update our Ruby implement to add this outputting option
  • Update example consumer from Update example-consumer to use our gem #25 to use this new outputting format

Follow-on work

@ilyalyo
Copy link
Collaborator

ilyalyo commented Feb 5, 2017

Added PR: #29
Updated example-consumer for for different possible cases.

@ilyalyo
Copy link
Collaborator

ilyalyo commented Feb 15, 2017

Also added this PR #32
with fix error symbol utf code

@ilyalyo
Copy link
Collaborator

ilyalyo commented Feb 18, 2017

@ilyalyo
Copy link
Collaborator

ilyalyo commented Feb 22, 2017

About web-puc, it's written on shell, so it can not use new STAT gem.

@ilyalyo
Copy link
Collaborator

ilyalyo commented Feb 22, 2017

Added PR with pretty json for print_* methods: #35

@fulldecent
Copy link
Owner Author

Please see fulldecent/web-puc#5

@ilyalyo
Copy link
Collaborator

ilyalyo commented Apr 13, 2017

All points are done except:
Begin looking for other projects that we may recommend to adopt STAT.

@fulldecent
Copy link
Owner Author

LGTm, closing, thank you

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

No branches or pull requests

2 participants