Function getHostAddonInfo
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
getHostAddonInfo(packageInfoForLazyEngine) {
const cacheKey = `${this.project._packageInfo.realPath}-${packageInfoForLazyEngine.realPath}`;
let hostInfoCacheEntry = this._hostAddonInfoCache.get(cacheKey);
- Create a ticketCreate a ticket
Function findLCAHost
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
findLCAHost(engineInstance) {
// only compute once for a given engine
// we're using the engine name as the cache key here because regardless of its
// version, lazy engines will always get output to: `engines-dist/${engineName}`
let lcaHost = this._lcaHostCache.get(engineInstance.name);
- Create a ticketCreate a ticket
Function _getBundledPackageInfos
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
_getBundledPackageInfos(pkgInfoToStartAt) {
let pkgInfos = this._bundledPackageInfoCache.get(pkgInfoToStartAt);
if (pkgInfos) {
return pkgInfos;
- Create a ticketCreate a ticket
Function getHostAddonInfo
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
getHostAddonInfo(packageInfoForLazyEngine) {
const cacheKey = `${this.project._packageInfo.realPath}-${packageInfoForLazyEngine.realPath}`;
let hostInfoCacheEntry = this._hostAddonInfoCache.get(cacheKey);
- Read upRead up
- Create a ticketCreate a ticket
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 _getBundledPackageInfos
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
_getBundledPackageInfos(pkgInfoToStartAt) {
let pkgInfos = this._bundledPackageInfoCache.get(pkgInfoToStartAt);
if (pkgInfos) {
return pkgInfos;
- Read upRead up
- Create a ticketCreate a ticket
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 findLCAHost
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
findLCAHost(engineInstance) {
// only compute once for a given engine
// we're using the engine name as the cache key here because regardless of its
// version, lazy engines will always get output to: `engines-dist/${engineName}`
let lcaHost = this._lcaHostCache.get(engineInstance.name);
- Read upRead up
- Create a ticketCreate a ticket
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"