Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-htmlhint-checkstyle-file-reporter

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-htmlhint-checkstyle-file-reporter

gulp-htmlhint checkstyle file reporter

  • 0.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

gulp-htmlhint-checkstyle-file-reporterjs-standard-style

Writes checkstyle output to a file. This can be used to report gulp-htmlhint results to Jenkins.

Install

$ npm i -D gulp-htmlhint-checkstyle-file-reporter

Usage

var gulp = require('gulp')
var del = require('del')
var vinylPaths = require('vinyl-paths')
var htmlhint = require('gulp-htmlhint')
var concat = require('gulp-concat')
var header = require('gulp-header')
var footer = require('gulp-footer')

var REPORT_DIR = 'reports/'
var FILE_NAME = 'htmlhint-checkstyle.xml'

// You can specify file name optionally,
// default file name is 'htmlhint-checkstyle.xml'
process.env.HTMLHINT_CHECKSTYLE_FILE = REPORT_DIR + FILE_NAME

gulp.task('htmlhint', ['clean'], function () {
  gulp.src('app/**/*.html')
      .pipe(htmlhint('.htmlhintrc'))
      .pipe(htmlhint.reporter('gulp-htmlhint-checkstyle-file-reporter'))
      .pipe(gulp.dest(REPORT_DIR + '.tmp'))
      .on('end', function () {
        gulp.src(REPORT_DIR + '*.tmp.*')
            .pipe(vinylPaths(del))
            .pipe(concat(FILE_NAME))
            .pipe(header('<?xml version="1.0" encoding="utf-8"?>\n<checkstyle version="4.3">\n'))
            .pipe(footer('\n</checkstyle>'))
            .pipe(gulp.dest(REPORT_DIR))
            .on('end', function () {
              del([REPORT_DIR + '.tmp'])
            })
      })
})

License

MIT © Kenichiro Murata

Keywords

FAQs

Package last updated on 20 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc