Skip to content

The reporter should not output empty reports on console #39

@abhishekdev

Description

@abhishekdev

For the most basic setup (using built-in report formatters) the reporter outputs an empty line on console even if the report if effectively empty. This creates unwanted breaks in the console logs.

Example

For a gulpfile like:

var gulp = require('gulp');
var csslint = require('gulp-csslint');

gulp.task('default', ['lint:css']);

gulp.task('lint:css', function() {
  return gulp.src('src/**/*.css')
    .pipe(csslint())
    .pipe(csslint.reporter());
});

For a successful lint, output is:

[19:35:08] Using gulpfile ~/playzone/sampleproject/gulpfile.js
[19:35:08] Starting 'lint:css'...
[19:35:08] 
[19:35:08] Finished 'lint:css' after 38 ms
[19:35:08] Starting 'default'...
[19:35:08] Finished 'default' after 26 μs
  • For text, compact report formats an empty line is printed for no errors/warnings. (ISSUE?)
  • For *xml based report formats the root tags render, which is as per the XML syntax.

To be consistent with other linter outputs gulp-csslint should probably not print anything to console if the effective output of the report is empty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions