Logo-amall

Currently when I lint in huge project, like [station](https://github.com/superfaceai/station), I get verbose, yet useless output (see eg. [here](https://github.com/superfaceai/station/runs/6325585597?check_suite_focus=true)): When there is an error with my files, at the end I get only this unhelpful message: ``` Detected 1 problem › Error: ❌ Errors were found ``` And I need to scroll back and search through the list of linted files to find my error. My suggestion here is for CLI is to act like any sensitive linter / test harness out there, and display summary of errors at the end. Alternatively `lint` command could also display only errors instead of listing all the validated files, having a verbose switch to also display OK files – still, a summary of errors at the end would be nice nevertheless.

Last active 7 months ago

7 replies

17 views

  • JN

    Currently when I lint in huge project, like station, I get verbose, yet useless output (see eg. here): When there is an error with my files, at the end I get only this unhelpful message:

    Detected 1 problem
     ›   Error: ❌ Errors were found
    

    And I need to scroll back and search through the list of linted files to find my error.

    My suggestion here is for CLI is to act like any sensitive linter / test harness out there, and display summary of errors at the end. Alternatively lint command could also display only errors instead of listing all the validated files, having a verbose switch to also display OK files – still, a summary of errors at the end would be nice nevertheless.

  • JA

    @jnv
    We already have format which can be used to define format/length of output. I an not sure tah new flag is needed 🤷🏻‍♂️

    We could do like this:

    sf lint => print only errors and warnings (format is short by default)
    sf lint -f long => print everything and add error and warning summary

  • JN

    OK, agreed that a new flag is not necessary (or it could act as an alias to match the conventions), but that was not my primary issue.

  • JA

    Would you agree with the sf lint (only summary) and sf lint -f long (verbose + summary) solution? :)

  • JN

    I don't think that would work. If I understand it correctly, sf lint (without -f) is the default used on Station and the failed checks are hidden among other outputs.

    I see the following options:

    • Add new format option like "errors only" and set it as default and/or use it in Station
    • Change the default format option to display only errors
    • Summarize errors at the end of run regardless of the output format (personally preferred variant)

    In addition to that, the summary at the end should display number of checked files. This is in general useful indicator for the user that the command did actually check anything.

  • JN

    ha, I did misunderstood. So the current default is -f long while you suggest to make the errors + summary-only the default. I think it could work, but then the summary should display the number of checked files.

  • JA

    @jnv Ok, so print of sf lint -f long looks like:

    Snímek obrazovky 2022-06-20 v 11 47 37

    And for sf lint

    Snímek obrazovky 2022-06-20 v 11 48 47

    I think this is ok :)

Last active 7 months ago

7 replies

17 views