Showing 7 of 10 total issues
Function setup
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
setup: function () {
var self = this;
atom.workspace.scan(/<project.*/g, (match) => {
if (match.filePath.endsWith('pom.xml')) {
- Create a ticketCreate a ticket
Function Common
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
var Common = function () {
const isWin = (/^win/.test(process.platform));
const pathSeparator = (isWin) ? ';' : ':';
const fileSeparator = (isWin) ? '\\' : '/';
const homeDir = (isWin) ? process.env.HOMEPATH : process.env.HOME;
- 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 log
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
UiUtils.prototype.log = function (message, fileLine, lineChar, path, pre, level) {
- Create a ticketCreate a ticket
Function addLineMessage
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
UiUtils.prototype.addLineMessage = function (text, fileLine, lineChar, path, level, pre) {
- Create a ticketCreate a ticket
Function error
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
UiUtils.prototype.error = function (message, fileLine, lineChar, path, pre) {
- Create a ticketCreate a ticket
Function containsLine
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
UiUtils.prototype.containsLine = function (file, text) {
const self = this;
if (self.messages && file && text) {
for (var message of self.messages.messages) {
if (message && message.file === file && message.message === text) {
- 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 containsMessage
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
UiUtils.prototype.containsMessage = function (text) {
const self = this;
if (self.messages && text) {
for (var message of self.messages.messages) {
if (message && message.html() === text) {
- 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"