Showing 9 of 16 total issues
Function authorize
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
authorize: (options) => {
//Build the OAuth consent page URL
let authWindow = new BrowserWindow({
minWidth: 600,
minHeight: 835,
Function default
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function (name, options) {
var userDataDir = jetpack.cwd(app.getPath('userData'));
var stateStoreFile = 'window-state-' + name +'.json';
var defaultSize = {
Function signApp
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var signApp = function () {
var identity = utils.getSigningId(manifest);
var MASIdentity = utils.getMASSigningId(manifest);
var MASInstallerIdentity = utils.getMASInstallerSigningId(manifest);
Function createInstaller
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var createInstaller = function () {
var deferred = Q.defer();
var finalPackageName = utils.getReleasePackageName(manifest) + '.exe';
var installScript = projectDir.read('resources/windows/installer.nsi');
Function packToDmgFile
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var packToDmgFile = function () {
if (utils.releaseForMAS()) {
return new Q();
}
Function getAccessToken
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
let getAccessToken = (code) => {
let data = {
grant_type: 'authorization_code',
client_id: options.client_id,
client_secret: options.client_secret,
Function packToDebFile
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var packToDebFile = function () {
var deferred = Q.defer();
var debFileName = packName + '.deb';
var debPath = releasesDir.path(debFileName);
Function signApp
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
var signApp = function () {
var identity = utils.getSigningId(manifest);
var MASIdentity = utils.getMASSigningId(manifest);
var MASInstallerIdentity = utils.getMASInstallerSigningId(manifest);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function default
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
export default function (name, options) {
var userDataDir = jetpack.cwd(app.getPath('userData'));
var stateStoreFile = 'window-state-' + name +'.json';
var defaultSize = {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"