Add grunt-lintspaces module to check cr-at-end in js files
We are having problems in some files, that don't have cr at the end of the file. Some other editors are automatically adding it, so it's highlighting non-existent differences on gerrit when editing. Add grunt-lintspaces to ensure that all js files end with newline. Update all the files to end with a CR to prevent these errors. Change-Id: If0c89399dbb5cdf94384e979a3cfe8038850193b Story: 2000089
This commit is contained in:
parent
c4e7615817
commit
2250dc91e2
28
Gruntfile.js
28
Gruntfile.js
@ -121,6 +121,25 @@ module.exports = function (grunt) {
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* grunt newlines
|
||||
*
|
||||
* Checks that all js files end with a newline
|
||||
*/
|
||||
lintspaces: {
|
||||
dist: {
|
||||
src: [
|
||||
dir.source + '/**/*.js',
|
||||
dir.test + '/**/*.js',
|
||||
'./*.js'
|
||||
],
|
||||
options: {
|
||||
newline: true,
|
||||
trailingspaces: true
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* grunt recess
|
||||
*
|
||||
@ -444,6 +463,14 @@ module.exports = function (grunt) {
|
||||
],
|
||||
tasks: ['jshint']
|
||||
},
|
||||
lintspaces: {
|
||||
files: [
|
||||
'Gruntfile.js',
|
||||
dir.source + '/**/*.js',
|
||||
dir.test + '/**/*.js'
|
||||
],
|
||||
tasks: ['lintspaces']
|
||||
},
|
||||
livereload: {
|
||||
options: {
|
||||
livereload: config.livereload.port
|
||||
@ -559,6 +586,7 @@ module.exports = function (grunt) {
|
||||
'useminPrepare',
|
||||
'concat',
|
||||
'less',
|
||||
'lintspaces',
|
||||
'imagemin',
|
||||
'html2js',
|
||||
'copy:dist',
|
||||
|
@ -68,4 +68,4 @@ module.exports = function (config) {
|
||||
'/karma-html-reporter/jasmine_template.html'
|
||||
}
|
||||
});
|
||||
};
|
||||
};
|
||||
|
@ -69,4 +69,4 @@ module.exports = function (config) {
|
||||
'/karma-html-reporter/jasmine_template.html'
|
||||
}
|
||||
});
|
||||
};
|
||||
};
|
||||
|
@ -55,6 +55,7 @@
|
||||
"selenium-standalone": "2.43.1-2.9.0-1",
|
||||
"karma-html-reporter": "0.2.4",
|
||||
"grunt-connect-proxy": "0.1.11",
|
||||
"grunt-webfont": "0.4.8"
|
||||
"grunt-webfont": "0.4.8",
|
||||
"grunt-lintspaces": "0.6.0"
|
||||
}
|
||||
}
|
||||
|
@ -86,4 +86,4 @@ angular.module('sb.admin').controller('ProjectGroupAdminController',
|
||||
|
||||
// Initialize
|
||||
$scope.search();
|
||||
});
|
||||
});
|
||||
|
@ -41,4 +41,4 @@ angular.module('sb.admin').controller('ProjectGroupDeleteController',
|
||||
$scope.close = function () {
|
||||
$modalInstance.dismiss('cancel');
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -200,4 +200,4 @@ angular.module('sb.admin').controller('ProjectGroupEditController',
|
||||
// Put our model into the array
|
||||
$scope.projects[index] = model;
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -41,4 +41,4 @@ angular.module('sb.admin').controller('ProjectGroupItemController',
|
||||
$log.error(error);
|
||||
$scope.loadingProjectGroupItems = false;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -164,4 +164,4 @@ angular.module('sb.admin').controller('ProjectGroupNewController',
|
||||
$modalInstance.dismiss('cancel');
|
||||
};
|
||||
|
||||
});
|
||||
});
|
||||
|
@ -62,4 +62,4 @@ angular.module('sb.admin').controller('UserAdminController',
|
||||
|
||||
// Initialize
|
||||
$scope.search();
|
||||
});
|
||||
});
|
||||
|
@ -32,4 +32,4 @@ angular.module('sb.admin').controller('UserEditController',
|
||||
$scope.cancel = function () {
|
||||
$state.go('admin.user');
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -57,4 +57,4 @@ angular.module('sb.admin').controller('UserNewController',
|
||||
$scope.close = function () {
|
||||
$modalInstance.dismiss('cancel');
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -87,4 +87,4 @@ angular.module('sb.admin', [ 'sb.services', 'sb.templates', 'sb.util',
|
||||
url: '/team/:id',
|
||||
templateUrl: 'app/admin/template/team_edit.html'
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -41,4 +41,4 @@ angular.module('sb.auth').controller('AuthAuthorizeController',
|
||||
|
||||
// We're not an error, let's fire the authorization.
|
||||
OpenId.authorize();
|
||||
});
|
||||
});
|
||||
|
@ -25,4 +25,4 @@ angular.module('sb.auth').controller('AuthDeauthorizeController',
|
||||
$log.debug('Logging out');
|
||||
Session.destroySession();
|
||||
$state.go('index');
|
||||
});
|
||||
});
|
||||
|
@ -24,4 +24,4 @@ angular.module('sb.auth').controller('AuthErrorController',
|
||||
$scope.error = $stateParams.error || 'Unknown';
|
||||
$scope.errorDescription = $stateParams.error_description ||
|
||||
'No description received from server.';
|
||||
});
|
||||
});
|
||||
|
@ -68,4 +68,4 @@ angular.module('sb.auth').controller('AuthTokenController',
|
||||
$state.go('auth.error', error);
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
|
@ -30,4 +30,4 @@ angular.module('sb.auth').controller('LoginRequiredModalController',
|
||||
$scope.close = function () {
|
||||
$modalInstance.dismiss('cancel');
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -44,4 +44,4 @@ angular.module('sb.util').directive('permission',
|
||||
);
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -41,4 +41,4 @@ angular.module('sb.auth').factory('httpAuthorizationHeader',
|
||||
'use strict';
|
||||
|
||||
$httpProvider.interceptors.push('httpAuthorizationHeader');
|
||||
});
|
||||
});
|
||||
|
@ -81,4 +81,4 @@ angular.module('sb.auth', [ 'sb.services', 'sb.templates', 'ui.router',
|
||||
}, Priority.LAST);
|
||||
|
||||
RefreshManager.scheduleRefresh();
|
||||
});
|
||||
});
|
||||
|
@ -36,4 +36,4 @@ angular.module('sb.auth').value('SessionState', {
|
||||
*/
|
||||
PENDING: 'pending'
|
||||
|
||||
});
|
||||
});
|
||||
|
@ -168,4 +168,4 @@ angular.module('sb.auth').factory('AccessToken',
|
||||
return localStorageService.set(ID_TOKEN, value);
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -134,4 +134,4 @@ angular.module('sb.auth').factory('CurrentUser',
|
||||
return resolveCurrentUser();
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -110,4 +110,4 @@ angular.module('sb.auth').factory('OpenId',
|
||||
return deferred.promise;
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -147,4 +147,4 @@ angular.module('sb.auth').factory('PermissionManager',
|
||||
return resolvePermission(permName);
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -83,4 +83,4 @@ angular.module('sb.auth').service('RefreshManager',
|
||||
this.scheduleRefresh = scheduleRefresh;
|
||||
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -176,4 +176,4 @@ angular.module('sb.auth').factory('Session',
|
||||
return deferred.promise;
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -42,4 +42,4 @@ angular.module('sb.dashboard').directive('subscriptionEvent',
|
||||
},
|
||||
templateUrl: 'app/dashboard/template/subscription_event.html'
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -66,4 +66,4 @@ angular.module('sb.notification').controller('NotificationsController',
|
||||
}
|
||||
)
|
||||
);
|
||||
});
|
||||
});
|
||||
|
@ -27,4 +27,4 @@ angular.module('sb.notification').directive('notifications',
|
||||
templateUrl: 'app/notification/template/notifications.html',
|
||||
controller: 'NotificationsController'
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -18,4 +18,4 @@
|
||||
* This module acts as the central routing point for all errors that occur
|
||||
* within storyboard.
|
||||
*/
|
||||
angular.module('sb.notification', []);
|
||||
angular.module('sb.notification', []);
|
||||
|
@ -24,4 +24,4 @@ angular.module('sb.notification').constant('Priority', {
|
||||
FIRST: 0,
|
||||
LAST: 999,
|
||||
AFTER: 1000
|
||||
});
|
||||
});
|
||||
|
@ -24,4 +24,4 @@ angular.module('sb.notification').constant('Severity', {
|
||||
WARNING: 'warning',
|
||||
INFO: 'info',
|
||||
SUCCESS: 'success'
|
||||
});
|
||||
});
|
||||
|
@ -134,4 +134,4 @@ angular.module('sb.notification').factory('Notification',
|
||||
};
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -37,4 +37,4 @@ angular.module('sb.pages',
|
||||
url: '/about',
|
||||
templateUrl: 'app/pages/template/about.html'
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -32,4 +32,4 @@ angular.module('sb.profile').controller('ProfilePreferencesController',
|
||||
|
||||
$scope.message = 'Preferences Saved!';
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -60,4 +60,4 @@ angular.module('sb.profile').controller('ProfileTokenNewController',
|
||||
$scope.close = function () {
|
||||
$modalInstance.dismiss('cancel');
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -67,4 +67,4 @@ angular.module('sb.profile').controller('ProfileTokenItemController',
|
||||
$scope.expired = $scope.expires.getTime() < now.getTime();
|
||||
$scope.current =
|
||||
$scope.token.access_token === AccessToken.getAccessToken();
|
||||
});
|
||||
});
|
||||
|
@ -81,4 +81,4 @@ angular.module('sb.profile',
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -150,4 +150,4 @@ angular.module('sb.search').directive('searchResults',
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -59,4 +59,4 @@ angular.module('sb.services').factory('StoryStatus',
|
||||
return deferred.promise;
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -59,4 +59,4 @@ angular.module('sb.services').factory('TaskPriority',
|
||||
return deferred.promise;
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -61,4 +61,4 @@ angular.module('sb.services').factory('TaskStatus',
|
||||
return deferred.promise;
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -36,4 +36,4 @@ angular.module('sb.services').factory('Text',
|
||||
return deferred.promise;
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -59,4 +59,4 @@ angular.module('sb.services').factory('httpCacheHandler',
|
||||
.config(function ($httpProvider) {
|
||||
'use strict';
|
||||
$httpProvider.interceptors.push('httpCacheHandler');
|
||||
});
|
||||
});
|
||||
|
@ -63,4 +63,4 @@ angular.module('sb.services')
|
||||
.config(function ($httpProvider) {
|
||||
'use strict';
|
||||
$httpProvider.interceptors.unshift('httpErrorBroadcaster');
|
||||
});
|
||||
});
|
||||
|
@ -19,4 +19,4 @@
|
||||
* used by the storyboard client. Its resources are available via injection to
|
||||
* any module that declares it as a dependency.
|
||||
*/
|
||||
angular.module('sb.services', ['ngResource', 'sb.notification']);
|
||||
angular.module('sb.services', ['ngResource', 'sb.notification']);
|
||||
|
@ -89,4 +89,4 @@ angular.module('sb.services')
|
||||
Notification.intercept(filterTemplateRequests, Priority.BEFORE);
|
||||
Notification.intercept(filterSuccessful, Priority.LAST);
|
||||
Notification.intercept(rewriteHttpStatus, Priority.AFTER);
|
||||
});
|
||||
});
|
||||
|
@ -19,4 +19,4 @@
|
||||
* Our globally configured page size.
|
||||
*/
|
||||
|
||||
angular.module('sb.services').constant('pageSize', 500);
|
||||
angular.module('sb.services').constant('pageSize', 500);
|
||||
|
@ -32,4 +32,4 @@ angular.module('sb.services').factory('Comment',
|
||||
story_id: '@story_id'
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
|
@ -111,4 +111,4 @@ angular.module('sb.services').provider('Preference',
|
||||
PreferenceProvider.addPreference('page_size', 10);
|
||||
|
||||
})
|
||||
;
|
||||
;
|
||||
|
@ -39,4 +39,4 @@ angular.module('sb.services').factory('Project',
|
||||
);
|
||||
|
||||
return resource;
|
||||
});
|
||||
});
|
||||
|
@ -38,4 +38,4 @@ angular.module('sb.services').factory('ProjectGroup',
|
||||
);
|
||||
|
||||
return resource;
|
||||
});
|
||||
});
|
||||
|
@ -47,4 +47,4 @@ angular.module('sb.services').factory('ProjectGroupItem',
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
|
@ -43,4 +43,4 @@ angular.module('sb.services').factory('Story',
|
||||
);
|
||||
|
||||
return resource;
|
||||
});
|
||||
});
|
||||
|
@ -28,4 +28,4 @@ angular.module('sb.services').factory('Subscription',
|
||||
'/subscriptions/search',
|
||||
{id: '@id'}
|
||||
);
|
||||
});
|
||||
});
|
||||
|
@ -26,4 +26,4 @@ angular.module('sb.services').factory('SubscriptionEvent',
|
||||
'/subscription_events/search',
|
||||
{id: '@id'}
|
||||
);
|
||||
});
|
||||
});
|
||||
|
@ -46,4 +46,4 @@ angular.module('sb.services').factory('Task',
|
||||
);
|
||||
|
||||
return resource;
|
||||
});
|
||||
});
|
||||
|
@ -32,4 +32,4 @@ angular.module('sb.services').factory('Team',
|
||||
id: '@id'
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
|
@ -32,4 +32,4 @@ angular.module('sb.services').factory('TimelineEvent',
|
||||
story_id: '@story_id'
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
|
@ -39,4 +39,4 @@ angular.module('sb.services').factory('User',
|
||||
);
|
||||
|
||||
return resource;
|
||||
});
|
||||
});
|
||||
|
@ -32,4 +32,4 @@ angular.module('sb.services').factory('UserToken',
|
||||
);
|
||||
|
||||
return resource;
|
||||
});
|
||||
});
|
||||
|
@ -39,4 +39,4 @@ angular.module('sb.story').controller('StoryDeleteController',
|
||||
$scope.close = function () {
|
||||
$modalInstance.dismiss('cancel');
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -38,4 +38,4 @@ angular.module('sb.story').controller('StoryTaskDeleteController',
|
||||
$scope.close = function () {
|
||||
$modalInstance.dismiss('cancel');
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -36,4 +36,4 @@ angular.module('sb.story').controller('TimelineFilterController',
|
||||
init();
|
||||
|
||||
})
|
||||
;
|
||||
;
|
||||
|
@ -47,4 +47,4 @@ angular.element(document)
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -70,4 +70,4 @@ angular.module('storyboard',
|
||||
});
|
||||
|
||||
$http.defaults.cache = DSCacheFactory.get('defaultCache');
|
||||
});
|
||||
});
|
||||
|
@ -179,4 +179,4 @@ angular.module('sb.util').directive('subscribe',
|
||||
resolveSubscription();
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -20,4 +20,4 @@
|
||||
*
|
||||
* @author Michael Krotscheck
|
||||
*/
|
||||
angular.module('sb.subscription', ['sb.notification']);
|
||||
angular.module('sb.subscription', ['sb.notification']);
|
||||
|
@ -22,4 +22,4 @@ angular.module('sb.util').run(function ($rootScope) {
|
||||
'use strict';
|
||||
var regex = '^[a-zA-Z0-9]+([\\-\\./]?[a-zA-Z0-9]+)*$';
|
||||
$rootScope.PROJECT_NAME_REGEX = new RegExp(regex);
|
||||
});
|
||||
});
|
||||
|
@ -89,4 +89,4 @@ angular.module('sb.util').controller('TagInputController',
|
||||
event.stopImmediatePropagation();
|
||||
};
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -47,4 +47,4 @@ angular.module('sb.util').directive('activePath',
|
||||
setActivePath();
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -46,4 +46,4 @@ angular.module('sb.util').directive('focus',
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -80,4 +80,4 @@ angular.module('sb.util').directive('inputInline',
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -113,4 +113,4 @@ angular.module('sb.util').directive('projectTypeahead',
|
||||
}, $scope.loadProject);
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -34,4 +34,4 @@ angular.module('sb.util').directive('resolveStory',
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -66,4 +66,4 @@ angular.module('sb.util').directive('storyStatusLabel',
|
||||
updateStoryLabel();
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -29,4 +29,4 @@ angular.module('sb.util').directive('storyTaskStatus',
|
||||
story: '='
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -71,4 +71,4 @@ angular.module('sb.util').directive('taskStatusDropdown',
|
||||
};
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -111,4 +111,4 @@ angular.module('sb.util').directive('userTypeahead',
|
||||
}, $scope.loadUser);
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -28,4 +28,4 @@ angular.module('sb.util').filter('capitalize',
|
||||
return value;
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -28,4 +28,4 @@ angular.module('sb.util').filter('debug',
|
||||
console.warn('DEBUG', value);
|
||||
return value;
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -38,4 +38,4 @@ angular.module('sb.util').filter('taskStatusLabel',
|
||||
return 'Unknown Status';
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -27,4 +27,4 @@ angular.module('sb.util').filter('truncate',
|
||||
}
|
||||
return value;
|
||||
};
|
||||
});
|
||||
});
|
||||
|
@ -65,4 +65,4 @@ angular.module('sb.util').factory('StringUtil',
|
||||
}
|
||||
};
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -82,4 +82,4 @@ angular.module('sb.util').factory('UrlUtil',
|
||||
}
|
||||
};
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -32,4 +32,4 @@ angular.module('sb.util').factory('$searchParams',
|
||||
return UrlUtil.deserializeParameters(search);
|
||||
}
|
||||
return params;
|
||||
});
|
||||
});
|
||||
|
@ -54,4 +54,4 @@ beforeEach(function () {
|
||||
};
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user