1.0.1 • Published 7 years ago

bootlint-teamcity v1.0.1

Weekly downloads
18
License
MIT
Repository
github
Last release
7 years ago

bootlint-teamcity

NPM version MIT License Dependency Status devDependency Status GitHub issues

TeamCity reporter for bootlint errors.

Install

npm install --save-dev bootlint-teamcity

Usage

Use the gulp-bootlint module for gulp to pipe in files to be analysed.

When run in TeamCity the errors will show as failed test results and can therefore fail the build.

bootlint-teamcity provides an object with a reportFn and a summaryReportFn function than can be used for the Options object passed to gulp-bootlint.

var gulp = require('gulp');
var bootlint = require('gulp-bootlint');
var bootlintTeamcity = require('bootlint-teamcity');

gulp.task('default', function () {
    gulp.src(['**/*.html'])
        .pipe(bootlint(bootlintTeamcity));

If other bootlint options are required, the two bootlint-teamcity functions can be set within the options object.

Note: both functions are required

var gulp = require('gulp');
var bootlint = require('gulp-bootlint');
var bootlintTeamcity = require('bootlint-teamcity');

gulp.task('default', function () {
    gulp.src(['**/*.html'])
        .pipe(bootlint({
            stoponerror: true,
            stoponwarning: true,
            loglevel: 'debug',
            disabledIds: ['W009', 'E007'],
            issues: fileIssues,
            reportFn: bootlintTeamcity.reportFn,
            summaryReportFn: bootlintTeamcity.summaryReportFn
        }));

Errors are grouped by file and then by bootlint problem id when displayed in TeamCity Build Log or Tests tab.