Showing 51 of 75 total issues
File commandLineRenderer-2022.jsx
has 778 lines of code (exceeds 250 allowed). Consider refactoring. Open
module.exports = /*syntax:js*/ `// Command line renderer for After Effects. (nexrender-patch-v1.0.4)
// This function constructs an AECommandLineRenderer object.
// One and only one of these will be created to perform rendering tasks
// at the end of this file.
File commandLineRenderer-default.jsx
has 697 lines of code (exceeds 250 allowed). Consider refactoring. Open
module.exports = /*syntax:js*/ `// Command line renderer for After Effects. (nexrender-patch-v1.0.3)
// This function constructs an AECommandLineRenderer object.
// One and only one of these will be created to perform rendering tasks
// at the end of this file.
Function createWorker
has a Cognitive Complexity of 77 (exceeds 5 allowed). Consider refactoring. Open
const createWorker = () => {
let emptyReturns = 0;
let active = false;
let settingsRef = null;
- 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 exports
has 237 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = (job, settings) => {
settings.logger.log(`[${job.uid}] rendering job...`);
// create container for our parameters
let params = [];
Function exports
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
module.exports = (job, settings) => {
settings.logger.log(`[${job.uid}] rendering job...`);
// create container for our parameters
let params = [];
- 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 createWorker
has 142 lines of code (exceeds 25 allowed). Consider refactoring. Open
const createWorker = () => {
let emptyReturns = 0;
let active = false;
let settingsRef = null;
Function track
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
const track = async (settings, event, properties = {}) => {
// if (isRemote) console.log('tracking', event, properties, settings)
if (settings.noAnalytics === true) return;
- 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 download
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
const download = (job, settings, asset) => {
if (asset.type == 'data') return Promise.resolve();
// eslint-disable-next-line
const uri = global.URL ? new URL(asset.src) : url.parse(asset.src)
Function download
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
const download = (job, settings, asset) => {
if (asset.type == 'data') return Promise.resolve();
// eslint-disable-next-line
const uri = global.URL ? new URL(asset.src) : url.parse(asset.src)
- 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 createClient
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
const createClient = ({ host, secret, polling, headers, name }) => {
if (localFetch.default) {
localFetch = localFetch.default
}
- 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 start
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
const start = async (host, secret, settings, headers) => {
settings = init(Object.assign({
process: 'nexrender-worker',
stopOnError: false,
logger: console,
Function exports
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
module.exports = (settings) => {
const targetScript = 'commandLineRenderer.jsx';
const patched = getContentForPatch(settings.binary)
const afterEffects = path.dirname(settings.binary)
- 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 track
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
const track = async (settings, event, properties = {}) => {
// if (isRemote) console.log('tracking', event, properties, settings)
if (settings.noAnalytics === true) return;
Function init
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
const init = (settings) => {
settings = Object.assign({}, settings);
settings.logger = settings.logger || console;
settings.track = (...args) => track(settings, ...args);
settings.trackCombined = (event, params) => track(settings, event, { combined: true, ...params });
Function exports
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = (settings) => {
const targetScript = 'commandLineRenderer.jsx';
const patched = getContentForPatch(settings.binary)
const afterEffects = path.dirname(settings.binary)
Function exports
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
module.exports = (job, settings, { input, provider, params, ...options }, type) => {
let onProgress;
let onComplete;
if (type != 'postrender') {
- 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 upload
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
const upload = (job, settings, src, params, onProgress, onComplete) => {
const file = fs.createReadStream(src);
if (!params.endpoint && !params.region) {
return Promise.reject(new Error('S3 region or endpoint not provided.'))
File render.js
has 256 lines of code (exceeds 250 allowed). Consider refactoring. Open
const fs = require('fs')
const path = require('path')
const {spawn} = require('child_process')
const {expandEnvironmentVariables, checkForWSL} = require('../helpers/path')
Function upload
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
const upload = (job, settings, src, params) => {
if (!params.bucket) {
return Promise.reject(new Error('GCS bucket not provided.'))
}
if (!params.item) {
Function getBinary
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
const getBinary = (job, settings) => {
return new Promise((resolve, reject) => {
const {version} = pkg['ffmpeg-static']
const filename = `ffmpeg-${version}${process.platform == 'win32' ? '.exe' : ''}`
const fileurl = `https://github.com/eugeneware/ffmpeg-static/releases/download/${version}/${process.platform}-x64`