Skip to content

Commit

Permalink
Add trailing spaces check to gulp lint
Browse files Browse the repository at this point in the history
Reviewers are asking for trailing spaces to be removed,
so gulp lint needs to include this check.

The change replaces the abandoned 1707.

Change-Id: Ie4662da6e32a51d8399d86f6f7009becaaac4257
Signed-off-by: Caroline Daughtrey <[email protected]>
  • Loading branch information
cdaughtr committed Oct 17, 2016
1 parent fb38844 commit 9203fbb
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 23 deletions.
6 changes: 3 additions & 3 deletions build/tasks/doc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@

var gulp = require('gulp');
var jsdoc = require('gulp-jsdoc3');

gulp.task('doc', function () {
gulp.src([
'README.md',
'README.md',
'index.js',
'./lib/api.js',
'./lib/api.js',
'./lib/impl/FileKeyValueStore.js',
'./lib/impl/CryptoSuite_ECDSA_SHA.js',
'./lib/impl/MemberServices.js',
Expand Down
3 changes: 2 additions & 1 deletion build/tasks/eslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ gulp.task('lint', function () {
indent: ['error', 'tab'],
'linebreak-style': ['error', 'unix'],
quotes: ['error', 'single'],
semi: ['error', 'always']
semi: ['error', 'always'],
'no-trailing-spaces': ['error']
}
}
))
Expand Down
2 changes: 1 addition & 1 deletion lib/Member.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ var Member = class {
sendDeploymentProposal(request) {
// Verify that chaincodePath is being passed
if (!request.chaincodePath || request.chaincodePath === '') {
return Promise.reject(new Error('missing chaincodePath in Deployment proposal request'));
return Promise.reject(new Error('missing chaincodePath in Deployment proposal request'));
}

return new Promise(
Expand Down
2 changes: 1 addition & 1 deletion lib/Orderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ var Orderer = class {

broadcast.on('end', function (response) {
if(isDebug) debug('Orderer.sendBroadcast - on end:');
// Removing the promise reject here as on an 'error', this case
// Removing the promise reject here as on an 'error', this case
// will hit before the 'error' event, and we loose the error
// information coming back to the caller
// return reject(response);
Expand Down
2 changes: 1 addition & 1 deletion lib/Peer.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var grpc = require('grpc');
var _fabricProto = grpc.load(__dirname + '/protos/fabric_next.proto').protos;

/**
* The Peer class represents a peer in the target blockchain network to which
* The Peer class represents a peer in the target blockchain network to which
* HFC sends endorsement proposals, transaction ordering or query requests.
*
* @class
Expand Down
24 changes: 12 additions & 12 deletions lib/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ module.exports.KeyValueStore = class {
/**
* Abstract class for a suite of crypto algorithms used by the SDK to perform encryption,
* decryption and secure hashing. A complete suite includes libraries for asymmetric
* keys (such as ECDSA or RSA), symmetric keys (such as AES) and secure hash (such as
* keys (such as ECDSA or RSA), symmetric keys (such as AES) and secure hash (such as
* SHA2/3).
*
* The SDK provides a default implementation based on ECDSA + AES + SHA2/3. An alternative
Expand Down Expand Up @@ -192,10 +192,10 @@ module.exports.CryptoSuite = class {
/**
* Represents enrollment data for a user.
*
* @class
* @class
*/
module.exports.Enrollment = class {

constructor() {
/**
* @member {Buffer} key private key generated locally by the SDK
Expand Down Expand Up @@ -269,11 +269,11 @@ module.exports.MemberServices = class {
* affiliation: {string} what organization this user belongs to,
*
* registrar: {Object} registrar enables this identity to register other members and can delegate the 'delegationRoles' roles
*
*
* roles: {string[]} The allowable roles which this member can register
*
* delegateRoles: {string[]} The allowable roles which can be registered by members registered by this member
*
*
* @param {Member} registrar The identity of the registar (i.e. who is performing the registration)
* @returns Promise for the enrollment secret
*/
Expand All @@ -298,7 +298,7 @@ module.exports.MemberServices = class {
* @param {Object} req A request object with the following fields:
*
* name: {string} name of the user
* enrollment: [Enrollment]{@link module:api.Enrollment} an object representing the user to get the TCerts for,
* enrollment: [Enrollment]{@link module:api.Enrollment} an object representing the user to get the TCerts for,
* num: {number} batch size,
* attrs: {string[]} the list of user attributes to include in the TCerts
*
Expand Down Expand Up @@ -332,21 +332,21 @@ module.exports.PrivacyLevel = {
*/
module.exports.Certificate = class {

constructor(cert, privateKey, privLevel) {
/**
constructor(cert, privateKey, privacyLevel) {
/**
* @member {buffer} cert The certificate
* @memberof module:api.Certificate
*/
this._cert = cert;

/**
/**
* @member {buffer} privateKey The private key
* @memberof module:api.Certificate
*/
this._privateKey = privateKey;

/**
* @member {module:api.PrivacyLevel} privacyLevel - Denoting if the Certificate is anonymous or carrying its owner's identity.
/**
* @member {module:api.PrivacyLevel} privacyLevel - Denoting if the Certificate is anonymous or carrying its owner's identity.
* @memberof module:api.Certificate
*/
this._privacyLevel = privacyLevel;
Expand Down Expand Up @@ -376,7 +376,7 @@ module.exports.ECert = class extends module.exports.Certificate {
* @class
*/
module.exports.TCert = class extends module.exports.Certificate {

constructor(publicKey, privateKey) {
super(publicKey, privateKey, module.exports.PrivacyLevel.Anonymous);
}
Expand Down
6 changes: 3 additions & 3 deletions lib/utils-x509cert.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ var _x509schema = require('pkijs/org/pkijs/x509_schema');
var merge = require('node.extend');

/**
* Abstract Syntax Notation One (ASN.1) is a standard and notation that describes
* rules and structures for representing, encoding, transmitting, and decoding data
* Abstract Syntax Notation One (ASN.1) is a standard and notation that describes
* rules and structures for representing, encoding, transmitting, and decoding data
* in telecommunications and computer networking
*
*
*
*/
module.exports = function() {
// #region Merging function/object declarations for ASN1js and PKIjs
Expand Down
2 changes: 1 addition & 1 deletion test/unit/ca-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ test('registrar test', function(t) {
}

t.pass('Successfully tested failed registration of validators');

chain.setRegistrar(webUser);

return registerAndEnroll('webUser2', 'client', null, chain);
Expand Down

0 comments on commit 9203fbb

Please sign in to comment.